diff --git a/admin/asset-manifest.json b/admin/asset-manifest.json index baaef19..6d9d425 100644 --- a/admin/asset-manifest.json +++ b/admin/asset-manifest.json @@ -1,23 +1,23 @@ { "files": { - "main.css": "./static/css/main.e2d673ee.chunk.css", - "main.js": "./static/js/main.255f9c57.chunk.js", - "main.js.map": "./static/js/main.255f9c57.chunk.js.map", - "runtime-main.js": "./static/js/runtime-main.0b37ba43.js", - "runtime-main.js.map": "./static/js/runtime-main.0b37ba43.js.map", - "static/css/2.67ef5efb.chunk.css": "./static/css/2.67ef5efb.chunk.css", - "static/js/2.c2f27cb2.chunk.js": "./static/js/2.c2f27cb2.chunk.js", - "static/js/2.c2f27cb2.chunk.js.map": "./static/js/2.c2f27cb2.chunk.js.map", + "main.css": "./static/css/main.c9480e85.chunk.css", + "main.js": "./static/js/main.ef8e32e0.chunk.js", + "main.js.map": "./static/js/main.ef8e32e0.chunk.js.map", + "runtime-main.js": "./static/js/runtime-main.1532eaf1.js", + "runtime-main.js.map": "./static/js/runtime-main.1532eaf1.js.map", + "static/css/2.faf2f676.chunk.css": "./static/css/2.faf2f676.chunk.css", + "static/js/2.f425d7e3.chunk.js": "./static/js/2.f425d7e3.chunk.js", + "static/js/2.f425d7e3.chunk.js.map": "./static/js/2.f425d7e3.chunk.js.map", "index.html": "./index.html", - "static/css/2.67ef5efb.chunk.css.map": "./static/css/2.67ef5efb.chunk.css.map", - "static/css/main.e2d673ee.chunk.css.map": "./static/css/main.e2d673ee.chunk.css.map", - "static/js/2.c2f27cb2.chunk.js.LICENSE.txt": "./static/js/2.c2f27cb2.chunk.js.LICENSE.txt" + "static/css/2.faf2f676.chunk.css.map": "./static/css/2.faf2f676.chunk.css.map", + "static/css/main.c9480e85.chunk.css.map": "./static/css/main.c9480e85.chunk.css.map", + "static/js/2.f425d7e3.chunk.js.LICENSE.txt": "./static/js/2.f425d7e3.chunk.js.LICENSE.txt" }, "entrypoints": [ - "static/js/runtime-main.0b37ba43.js", - "static/css/2.67ef5efb.chunk.css", - "static/js/2.c2f27cb2.chunk.js", - "static/css/main.e2d673ee.chunk.css", - "static/js/main.255f9c57.chunk.js" + "static/js/runtime-main.1532eaf1.js", + "static/css/2.faf2f676.chunk.css", + "static/js/2.f425d7e3.chunk.js", + "static/css/main.c9480e85.chunk.css", + "static/js/main.ef8e32e0.chunk.js" ] } \ No newline at end of file diff --git a/admin/index_m.html b/admin/index_m.html index e833ddc..80bcd37 100644 --- a/admin/index_m.html +++ b/admin/index_m.html @@ -1 +1 @@ -s7
\ No newline at end of file +s7
\ No newline at end of file diff --git a/admin/static/css/2.67ef5efb.chunk.css b/admin/static/css/2.faf2f676.chunk.css similarity index 99% rename from admin/static/css/2.67ef5efb.chunk.css rename to admin/static/css/2.faf2f676.chunk.css index b61802d..ba84db3 100644 --- a/admin/static/css/2.67ef5efb.chunk.css +++ b/admin/static/css/2.faf2f676.chunk.css @@ -1,2 +1,2 @@ .logo-background-colored,.logo-background-light{background:#fff}.logo-background-blue,.logo-background-dark{background:#000}.logo-div{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);overflow:hidden;z-index:2}.logo-border,.logo-div{position:absolute;border-radius:50%}.logo-border{border-color:#39c #164477 #164477;border-style:solid;box-sizing:border-box;width:100%;height:100%}.logo-top{position:absolute;width:4.5%;height:16%;top:0;z-index:2}.logo-i{height:60%;top:20%}.logo-i,.logo-i-top{position:absolute;width:14.5%;left:42%;background:#39c}.logo-i-top{height:4%;border-radius:100%}.logo-back{width:100%;height:100%;z-index:0;overflow:hidden}@-webkit-keyframes logo-grow{0%{width:230px;height:230px;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);opacity:1}99%{width:230px;height:230px;-webkit-transform:translate(-50%,-50%) scale(10);transform:translate(-50%,-50%) scale(10);opacity:0}to{width:0;height:0;opacity:0}}@keyframes logo-grow{0%{width:230px;height:230px;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);opacity:1}99%{width:230px;height:230px;-webkit-transform:translate(-50%,-50%) scale(10);transform:translate(-50%,-50%) scale(10);opacity:0}to{width:0;height:0;opacity:0}}@-webkit-keyframes logo-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes logo-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes logo-color-inside-light{0%{background:#fefefe}to{background:#39c}}@keyframes logo-color-inside-light{0%{background:#fefefe}to{background:#39c}}@-webkit-keyframes logo-color-inside-dark{0%{background:#030303}to{background:#39c}}@keyframes logo-color-inside-dark{0%{background:#030303}to{background:#39c}}@-webkit-keyframes logo-color-inside-colored{0%{background:#fefefe}to{background:#39c}}@keyframes logo-color-inside-colored{0%{background:#fefefe}to{background:#39c}}@-webkit-keyframes logo-color-inside-blue{0%{background:#030303}to{background:#39c}}@keyframes logo-color-inside-blue{0%{background:#030303}to{background:#39c}}@-webkit-keyframes logo-color-outside-light{0%{border-color:#fefefe}to{border-color:#39c #164477 #164477}}@keyframes logo-color-outside-light{0%{border-color:#fefefe}to{border-color:#39c #164477 #164477}}@-webkit-keyframes logo-color-outside-dark{0%{border-color:#040404}to{border-color:#39c #164477 #164477}}@keyframes logo-color-outside-dark{0%{border-color:#040404}to{border-color:#39c #164477 #164477}}@-webkit-keyframes logo-color-outside-colored{0%{border-color:#fefefe}to{border-color:#39c #164477 #164477}}@keyframes logo-color-outside-colored{0%{border-color:#fefefe}to{border-color:#39c #164477 #164477}}@-webkit-keyframes logo-color-outside-blue{0%{border-color:#040404}to{border-color:#39c #164477 #164477}}@keyframes logo-color-outside-blue{0%{border-color:#040404}to{border-color:#39c #164477 #164477}}.logo-animate-wait{-webkit-animation:logo-color-outside 1.5s,logo-spin 1.5s linear infinite;animation:logo-color-outside 1.5s,logo-spin 1.5s linear infinite}.logo-animate-grow-light{background:#ddd}.logo-animate-grow-dark{background:#1d1d1d}.logo-animate-grow-colored{background:#ddd}.logo-animate-grow-blue{background:#1d1d1d}.logo-animate-grow{display:inline-block;text-align:center;z-index:1;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:245px;height:245px;border-radius:50%;position:absolute;-webkit-animation:logo-grow 1s ease 1 forwards;animation:logo-grow 1s ease 1 forwards}.logo-animate-color-inside-light{-webkit-animation:logo-color-inside-light 2.5s;animation:logo-color-inside-light 2.5s}.logo-animate-color-inside-dark{-webkit-animation:logo-color-inside-dark 2.5s;animation:logo-color-inside-dark 2.5s}.logo-animate-color-inside-colored{-webkit-animation:logo-color-inside-colored 2.5s;animation:logo-color-inside-colored 2.5s}.logo-animate-color-inside-blue{-webkit-animation:logo-color-inside-blue 2.5s;animation:logo-color-inside-blue 2.5s}.logo-animate-color-outside-light{-webkit-animation:logo-color-outside-light 1.5s;animation:logo-color-outside-light 1.5s}.logo-animate-color-outside-dark{-webkit-animation:logo-color-outside-dark 1.5s;animation:logo-color-outside-dark 1.5s}.logo-animate-color-outside-colored{-webkit-animation:logo-color-outside-colored 1.5s;animation:logo-color-outside-colored 1.5s}.logo-animate-color-outside-blue{-webkit-animation:logo-color-outside-blue 1.5s;animation:logo-color-outside-blue 1.5s}body,html{height:100%}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:100%;overflow:hidden}::-webkit-scrollbar-track{background-color:#ccc;border-radius:5px}::-webkit-scrollbar{width:5px;height:5px;background-color:#ccc}::-webkit-scrollbar-thumb{background-color:#575757;border-radius:5px}#root,.App{height:100%}@-webkit-keyframes glow{0%{background-color:initial}to{background-color:#58c458}}@keyframes glow{0%{background-color:initial}to{background-color:#58c458}} -/*# sourceMappingURL=2.67ef5efb.chunk.css.map */ \ No newline at end of file +/*# sourceMappingURL=2.faf2f676.chunk.css.map */ \ No newline at end of file diff --git a/src/build/static/css/2.67ef5efb.chunk.css.map b/admin/static/css/2.faf2f676.chunk.css.map similarity index 99% rename from src/build/static/css/2.67ef5efb.chunk.css.map rename to admin/static/css/2.faf2f676.chunk.css.map index 2284901..cd4d30d 100644 --- a/src/build/static/css/2.67ef5efb.chunk.css.map +++ b/admin/static/css/2.faf2f676.chunk.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://node_modules/@iobroker/adapter-react/Components/loader.css","webpack://node_modules/@iobroker/adapter-react/index.css"],"names":[],"mappings":"AAOA,gDACI,eACJ,CACA,4CACI,eACJ,CACA,UAEI,OAAQ,CACR,QAAS,CAET,sCAAuC,CACvC,8BAA+B,CAC/B,eAAgB,CAEhB,SACJ,CACA,uBAVI,iBAAkB,CAOlB,iBAeJ,CAZA,aAKI,iCAA2B,CAE3B,kBAAmB,CACnB,qBAAsB,CACtB,UAAW,CACX,WAEJ,CACA,UACI,iBAAkB,CAClB,UAAW,CACX,UAAW,CACX,KAAM,CACN,SACJ,CACA,QAGI,UAAW,CACX,OAGJ,CACA,oBAPI,iBAAkB,CAClB,WAAY,CAGZ,QAAS,CACT,eASJ,CAPA,YAGI,SAAU,CAGV,kBACJ,CACA,WACI,UAAW,CACX,WAAY,CACZ,SAAU,CACV,eACJ,CACA,6BACI,GACI,WAAY,CACZ,YAAa,CACb,+CAAwC,CAAxC,uCAAwC,CACxC,SACJ,CACA,IACI,WAAY,CACZ,YAAa,CACb,gDAAyC,CAAzC,wCAAyC,CACzC,SACJ,CACA,GACI,OAAQ,CACR,QAAS,CACT,SACJ,CACJ,CAlBA,qBACI,GACI,WAAY,CACZ,YAAa,CACb,+CAAwC,CAAxC,uCAAwC,CACxC,SACJ,CACA,IACI,WAAY,CACZ,YAAa,CACb,gDAAyC,CAAzC,wCAAyC,CACzC,SACJ,CACA,GACI,OAAQ,CACR,QAAS,CACT,SACJ,CACJ,CACA,6BAAuB,GAAO,+BAAiC,CAAE,uBAA2B,CAAE,CAA9F,qBAAuB,GAAO,+BAAiC,CAAE,uBAA2B,CAAE,CAC9F,2CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,mCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,0CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,kCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,6CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,qCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,0CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,kCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAEA,4CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,oCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,2CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,mCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,8CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,sCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,2CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,mCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAEA,mBACI,wEAAkE,CAAlE,gEACJ,CAEA,yBACI,eACJ,CACA,wBACI,kBACJ,CACA,2BACI,eACJ,CACA,wBACI,kBACJ,CAEA,mBACI,oBAAqB,CACrB,iBAAkB,CAClB,SAAU,CACV,OAAQ,CACR,QAAS,CAET,sCAAuC,CACvC,8BAA+B,CAC/B,WAAY,CACZ,YAAa,CACb,iBAAkB,CAClB,iBAAkB,CAClB,8CAAuC,CAAvC,sCACJ,CAEA,iCACI,8CAAuC,CAAvC,sCACJ,CACA,gCACI,6CAAsC,CAAtC,qCACJ,CACA,mCACI,gDAAyC,CAAzC,wCACJ,CACA,gCACI,6CAAsC,CAAtC,qCACJ,CAEA,kCACI,+CAAwC,CAAxC,uCACJ,CACA,iCACI,8CAAuC,CAAvC,sCACJ,CACA,oCACI,iDAA0C,CAA1C,yCACJ,CACA,iCACI,8CAAuC,CAAvC,sCACJ,CClNA,UAHI,WAYJ,CATA,KACI,QAAS,CACT,SAAU,CACV,mJAA8J,CAC9J,kCAAmC,CACnC,iCAAkC,CAClC,UAAW,CAEX,eACJ,CAGA,0BACI,qBAAsB,CACtB,iBACJ,CAEA,oBACI,SAAU,CACV,UAAW,CACX,qBACJ,CAEA,0BACI,wBAAyB,CACzB,iBACJ,CAMA,WACI,WACJ,CAEA,wBACI,GACI,wBACJ,CACA,GACI,wBACJ,CACJ,CAPA,gBACI,GACI,wBACJ,CACA,GACI,wBACJ,CACJ","file":"2.67ef5efb.chunk.css","sourcesContent":["/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\n\n.logo-background-light, .logo-background-colored {\n background: white;\n}\n.logo-background-dark, .logo-background-blue {\n background: black;\n}\n.logo-div {\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n overflow: hidden;\n border-radius: 50%;\n z-index: 2;\n}\n.logo-border {\n /*border-color: #164477;*/\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n border-radius: 50%;\n border-style: solid;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.logo-top {\n position: absolute;\n width: 4.5%;\n height: 16%;\n top: 0;\n z-index: 2;\n}\n.logo-i {\n position: absolute;\n width: 14.5%;\n height: 60%;\n top: 20%;\n left: 42%;\n background: #3399CC;\n}\n.logo-i-top {\n position: absolute;\n width: 14.5%;\n height: 4%;\n left: 42%;\n background: #3399CC;\n border-radius: 100%;\n}\n.logo-back {\n width: 100%;\n height: 100%;\n z-index: 0;\n overflow: hidden;\n}\n@keyframes logo-grow {\n 0% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(1);\n opacity: 1\n }\n 99% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(10);\n opacity: 0;\n }\n 100% {\n width: 0;\n height: 0;\n opacity: 0;\n }\n}\n@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }\n@keyframes logo-color-inside-light {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-dark {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-colored {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-blue {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n\n@keyframes logo-color-outside-light {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-dark {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-colored {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-blue {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n\n.logo-animate-wait {\n animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;\n}\n\n.logo-animate-grow-light {\n background: #DDD;\n}\n.logo-animate-grow-dark {\n background: #1d1d1d;\n}\n.logo-animate-grow-colored {\n background: #DDD;\n}\n.logo-animate-grow-blue {\n background: #1d1d1d;\n}\n\n.logo-animate-grow {\n display: inline-block;\n text-align: center;\n z-index: 1;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: 245px;\n height: 245px;\n border-radius: 50%;\n position: absolute;\n animation: logo-grow 1s 1 ease forwards;\n}\n\n.logo-animate-color-inside-light {\n animation: logo-color-inside-light 2.5s;\n}\n.logo-animate-color-inside-dark {\n animation: logo-color-inside-dark 2.5s;\n}\n.logo-animate-color-inside-colored {\n animation: logo-color-inside-colored 2.5s;\n}\n.logo-animate-color-inside-blue {\n animation: logo-color-inside-blue 2.5s;\n}\n\n.logo-animate-color-outside-light {\n animation: logo-color-outside-light 1.5s;\n}\n.logo-animate-color-outside-dark {\n animation: logo-color-outside-dark 1.5s;\n}\n.logo-animate-color-outside-colored {\n animation: logo-color-outside-colored 1.5s;\n}\n.logo-animate-color-outside-blue {\n animation: logo-color-outside-blue 1.5s;\n}","/**\n * Copyright 2018-2020 bluefox \n *\n * MIT License\n *\n **/\n\nhtml {\n height: 100%;\n}\n\nbody {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n/* scrollbar */\n::-webkit-scrollbar-track {\n background-color: #ccc;\n border-radius: 5px;\n}\n\n::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n background-color: #ccc;\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #575757;\n border-radius: 5px;\n}\n\n#root {\n height: 100%;\n}\n\n.App {\n height: 100%;\n}\n\n@keyframes glow {\n from {\n background-color: initial;\n }\n to {\n background-color: #58c458;\n }\n}"]} \ No newline at end of file +{"version":3,"sources":["webpack://node_modules/@iobroker/adapter-react/Components/loader.css","webpack://node_modules/@iobroker/adapter-react/index.css"],"names":[],"mappings":"AAOA,gDACI,eACJ,CACA,4CACI,eACJ,CACA,UAEI,OAAQ,CACR,QAAS,CAET,sCAAuC,CACvC,8BAA+B,CAC/B,eAAgB,CAEhB,SACJ,CACA,uBAVI,iBAAkB,CAOlB,iBAeJ,CAZA,aAKI,iCAA2B,CAE3B,kBAAmB,CACnB,qBAAsB,CACtB,UAAW,CACX,WAEJ,CACA,UACI,iBAAkB,CAClB,UAAW,CACX,UAAW,CACX,KAAM,CACN,SACJ,CACA,QAGI,UAAW,CACX,OAGJ,CACA,oBAPI,iBAAkB,CAClB,WAAY,CAGZ,QAAS,CACT,eASJ,CAPA,YAGI,SAAU,CAGV,kBACJ,CACA,WACI,UAAW,CACX,WAAY,CACZ,SAAU,CACV,eACJ,CACA,6BACI,GACI,WAAY,CACZ,YAAa,CACb,+CAAwC,CAAxC,uCAAwC,CACxC,SACJ,CACA,IACI,WAAY,CACZ,YAAa,CACb,gDAAyC,CAAzC,wCAAyC,CACzC,SACJ,CACA,GACI,OAAQ,CACR,QAAS,CACT,SACJ,CACJ,CAlBA,qBACI,GACI,WAAY,CACZ,YAAa,CACb,+CAAwC,CAAxC,uCAAwC,CACxC,SACJ,CACA,IACI,WAAY,CACZ,YAAa,CACb,gDAAyC,CAAzC,wCAAyC,CACzC,SACJ,CACA,GACI,OAAQ,CACR,QAAS,CACT,SACJ,CACJ,CACA,6BAAuB,GAAO,+BAAiC,CAAE,uBAA2B,CAAE,CAA9F,qBAAuB,GAAO,+BAAiC,CAAE,uBAA2B,CAAE,CAC9F,2CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,mCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,0CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,kCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,6CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,qCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,0CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,kCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAEA,4CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,oCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,2CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,mCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,8CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,sCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,2CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,mCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAEA,mBACI,wEAAkE,CAAlE,gEACJ,CAEA,yBACI,eACJ,CACA,wBACI,kBACJ,CACA,2BACI,eACJ,CACA,wBACI,kBACJ,CAEA,mBACI,oBAAqB,CACrB,iBAAkB,CAClB,SAAU,CACV,OAAQ,CACR,QAAS,CAET,sCAAuC,CACvC,8BAA+B,CAC/B,WAAY,CACZ,YAAa,CACb,iBAAkB,CAClB,iBAAkB,CAClB,8CAAuC,CAAvC,sCACJ,CAEA,iCACI,8CAAuC,CAAvC,sCACJ,CACA,gCACI,6CAAsC,CAAtC,qCACJ,CACA,mCACI,gDAAyC,CAAzC,wCACJ,CACA,gCACI,6CAAsC,CAAtC,qCACJ,CAEA,kCACI,+CAAwC,CAAxC,uCACJ,CACA,iCACI,8CAAuC,CAAvC,sCACJ,CACA,oCACI,iDAA0C,CAA1C,yCACJ,CACA,iCACI,8CAAuC,CAAvC,sCACJ,CClNA,UAHI,WAYJ,CATA,KACI,QAAS,CACT,SAAU,CACV,mJAA8J,CAC9J,kCAAmC,CACnC,iCAAkC,CAClC,UAAW,CAEX,eACJ,CAGA,0BACI,qBAAsB,CACtB,iBACJ,CAEA,oBACI,SAAU,CACV,UAAW,CACX,qBACJ,CAEA,0BACI,wBAAyB,CACzB,iBACJ,CAMA,WACI,WACJ,CAEA,wBACI,GACI,wBACJ,CACA,GACI,wBACJ,CACJ,CAPA,gBACI,GACI,wBACJ,CACA,GACI,wBACJ,CACJ","file":"2.faf2f676.chunk.css","sourcesContent":["/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\n\n.logo-background-light, .logo-background-colored {\n background: white;\n}\n.logo-background-dark, .logo-background-blue {\n background: black;\n}\n.logo-div {\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n overflow: hidden;\n border-radius: 50%;\n z-index: 2;\n}\n.logo-border {\n /*border-color: #164477;*/\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n border-radius: 50%;\n border-style: solid;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.logo-top {\n position: absolute;\n width: 4.5%;\n height: 16%;\n top: 0;\n z-index: 2;\n}\n.logo-i {\n position: absolute;\n width: 14.5%;\n height: 60%;\n top: 20%;\n left: 42%;\n background: #3399CC;\n}\n.logo-i-top {\n position: absolute;\n width: 14.5%;\n height: 4%;\n left: 42%;\n background: #3399CC;\n border-radius: 100%;\n}\n.logo-back {\n width: 100%;\n height: 100%;\n z-index: 0;\n overflow: hidden;\n}\n@keyframes logo-grow {\n 0% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(1);\n opacity: 1\n }\n 99% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(10);\n opacity: 0;\n }\n 100% {\n width: 0;\n height: 0;\n opacity: 0;\n }\n}\n@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }\n@keyframes logo-color-inside-light {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-dark {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-colored {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-blue {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n\n@keyframes logo-color-outside-light {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-dark {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-colored {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-blue {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n\n.logo-animate-wait {\n animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;\n}\n\n.logo-animate-grow-light {\n background: #DDD;\n}\n.logo-animate-grow-dark {\n background: #1d1d1d;\n}\n.logo-animate-grow-colored {\n background: #DDD;\n}\n.logo-animate-grow-blue {\n background: #1d1d1d;\n}\n\n.logo-animate-grow {\n display: inline-block;\n text-align: center;\n z-index: 1;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: 245px;\n height: 245px;\n border-radius: 50%;\n position: absolute;\n animation: logo-grow 1s 1 ease forwards;\n}\n\n.logo-animate-color-inside-light {\n animation: logo-color-inside-light 2.5s;\n}\n.logo-animate-color-inside-dark {\n animation: logo-color-inside-dark 2.5s;\n}\n.logo-animate-color-inside-colored {\n animation: logo-color-inside-colored 2.5s;\n}\n.logo-animate-color-inside-blue {\n animation: logo-color-inside-blue 2.5s;\n}\n\n.logo-animate-color-outside-light {\n animation: logo-color-outside-light 1.5s;\n}\n.logo-animate-color-outside-dark {\n animation: logo-color-outside-dark 1.5s;\n}\n.logo-animate-color-outside-colored {\n animation: logo-color-outside-colored 1.5s;\n}\n.logo-animate-color-outside-blue {\n animation: logo-color-outside-blue 1.5s;\n}","/**\n * Copyright 2018-2020 bluefox \n *\n * MIT License\n *\n **/\n\nhtml {\n height: 100%;\n}\n\nbody {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n/* scrollbar */\n::-webkit-scrollbar-track {\n background-color: #ccc;\n border-radius: 5px;\n}\n\n::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n background-color: #ccc;\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #575757;\n border-radius: 5px;\n}\n\n#root {\n height: 100%;\n}\n\n.App {\n height: 100%;\n}\n\n@keyframes glow {\n from {\n background-color: initial;\n }\n to {\n background-color: #58c458;\n }\n}"]} \ No newline at end of file diff --git a/src/build/static/css/main.e2d673ee.chunk.css b/admin/static/css/main.c9480e85.chunk.css similarity index 90% rename from src/build/static/css/main.e2d673ee.chunk.css rename to admin/static/css/main.c9480e85.chunk.css index eada367..a12dbff 100644 --- a/src/build/static/css/main.e2d673ee.chunk.css +++ b/admin/static/css/main.c9480e85.chunk.css @@ -1,2 +1,2 @@ body,html{height:100%}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:100%;overflow:hidden}::-webkit-scrollbar,::-webkit-scrollbar-track{background-color:#ccc}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background-color:#575757}#root,.App{height:100%} -/*# sourceMappingURL=main.e2d673ee.chunk.css.map */ \ No newline at end of file +/*# sourceMappingURL=main.c9480e85.chunk.css.map */ \ No newline at end of file diff --git a/admin/static/css/main.c9480e85.chunk.css.map b/admin/static/css/main.c9480e85.chunk.css.map new file mode 100644 index 0000000..70116f3 --- /dev/null +++ b/admin/static/css/main.c9480e85.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://src/index.css"],"names":[],"mappings":"AAGA,UAFE,WAWF,CATA,KACE,QAAS,CACT,SAAU,CACV,mJAA8J,CAC9J,kCAAmC,CACnC,iCAAkC,CAClC,UAAW,CAEX,eACF,CAKA,8CAFE,qBAKF,CAHA,oBACE,SAEF,CACA,0BACE,wBACF,CAMA,WACE,WACF","file":"main.c9480e85.chunk.css","sourcesContent":["html {\r\n height: 100%;\r\n}\r\nbody {\r\n margin: 0;\r\n padding: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\n/* scrollbar */\r\n*::-webkit-scrollbar-track {\r\n background-color: #ccc;\r\n}\r\n*::-webkit-scrollbar {\r\n width: 6px;\r\n background-color: #ccc;\r\n}\r\n*::-webkit-scrollbar-thumb {\r\n background-color: #575757;\r\n}\r\n\r\n\r\n#root {\r\n height: 100%;\r\n}\r\n.App {\r\n height: 100%;\r\n}"]} \ No newline at end of file diff --git a/admin/static/css/main.e2d673ee.chunk.css.map b/admin/static/css/main.e2d673ee.chunk.css.map deleted file mode 100644 index c3890f9..0000000 --- a/admin/static/css/main.e2d673ee.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://src/index.css"],"names":[],"mappings":"AAGA,UAFE,WAWF,CATA,KACE,QAAS,CACT,SAAU,CACV,mJAA8J,CAC9J,kCAAmC,CACnC,iCAAkC,CAClC,UAAW,CAEX,eACF,CAKA,8CAFE,qBAKF,CAHA,oBACE,SAEF,CACA,0BACE,wBACF,CAMA,WACE,WACF","file":"main.e2d673ee.chunk.css","sourcesContent":["html {\n height: 100%;\n}\nbody {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n/* scrollbar */\n*::-webkit-scrollbar-track {\n background-color: #ccc;\n}\n*::-webkit-scrollbar {\n width: 6px;\n background-color: #ccc;\n}\n*::-webkit-scrollbar-thumb {\n background-color: #575757;\n}\n\n\n#root {\n height: 100%;\n}\n.App {\n height: 100%;\n}"]} \ No newline at end of file diff --git a/admin/static/js/2.c2f27cb2.chunk.js b/admin/static/js/2.c2f27cb2.chunk.js deleted file mode 100644 index f741d69..0000000 --- a/admin/static/js/2.c2f27cb2.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 2.c2f27cb2.chunk.js.LICENSE.txt */ -(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(346)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){e.exports=n(353)()},function(e,t,n){"use strict";var r=n(1),o=n(431),i=n(54);t.a=function(e,t){return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"g",(function(){return d}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function d(){for(var e=[],t=0;t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){if(0===e.indexOf("#"))return e;var t=c(e).values;return"#".concat(t.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))}function s(e){var t=(e=c(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),l({type:s,values:u})}function c(e){if(e.type)return e;if("#"===e.charAt(0))return c(i(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var o=e.substring(t+1,e.length-1).split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)}))}}function l(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function u(e,t){var n=d(e),r=d(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function d(e){var t="hsl"===(e=c(e)).type?c(s(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return d(e)>.5?m(e,t):g(e,t)}function h(e,t){return p(e,t)}function p(e,t){return e=c(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,l(e)}function m(e,t){if(e=c(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function g(e,t){if(e=c(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return l(e)}},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.r(t),n.d(t,"chainPropTypes",(function(){return r})),n.d(t,"deepmerge",(function(){return o.a})),n.d(t,"elementAcceptingRef",(function(){return c})),n.d(t,"elementTypeAcceptingRef",(function(){return l})),n.d(t,"exactProp",(function(){return u})),n.d(t,"formatMuiErrorMessage",(function(){return d.a})),n.d(t,"getDisplayName",(function(){return b})),n.d(t,"HTMLElementType",(function(){return y})),n.d(t,"ponyfillGlobal",(function(){return _})),n.d(t,"refType",(function(){return w}));var o=n(160),i=n(4),a=n.n(i);var s=(a.a.element,function(){return null});s.isRequired=(a.a.element.isRequired,function(){return null});var c=s;var l=(i.elementType,function(){return null});n(12),n(1);function u(e){return e}var d=n(131),f=n(62),h=n(37),p=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function m(e){var t="".concat(e).match(p);return t&&t[1]||""}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||m(e)||t}function v(e,t,n){var r=g(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function b(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return g(e,"Component");if("object"===Object(f.a)(e))switch(e.$$typeof){case h.ForwardRef:return v(e,e.render,"ForwardRef");case h.Memo:return v(e,e.type,"memo");default:return}}}function y(e,t,n,r,o){return null}var _="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w=a.a.oneOfType([a.a.func,a.a.object])},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(c.a)(t,["attached"]),o=p(r).linebreak,i="",a=0;a0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=ce(),n=0;nn?n:t},he=function(){function e(e){this.getPropertyValue=oe,this.setProperty=ie,this.removeProperty=ae,this.setSelector=se,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=ue();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=le(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.breakpoints,r=void 0===n?["sm","md","lg"]:n,o=t.disableAlign,i=void 0!==o&&o,a=t.factor,s=void 0===a?2:a,c=t.variants,d=void 0===c?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:c,h=Object(l.a)({},e);h.typography=Object(l.a)({},h.typography);var b=h.typography,y=p(b.htmlFontSize),_=r.map((function(e){return h.breakpoints.values[e]}));return d.forEach((function(e){var t=b[e],n=parseFloat(y(t.fontSize,"rem"));if(!(n<=1)){var r=n,o=1+(r-1)/s,a=t.lineHeight;if(!f(a)&&!i)throw new Error(Object(u.a)(6));f(a)||(a=parseFloat(y(a,"rem"))/parseFloat(n));var c=null;i||(c=function(e){return m({size:e,grid:g({pixels:4,lineHeight:a,htmlFontSize:b.htmlFontSize})})}),b[e]=Object(l.a)({},t,v({cssProperty:"fontSize",min:o,max:r,unit:"rem",breakpoints:_,transform:c}))}})),h}var y=n(157),_=n(21),w=n(17),S=n(5),k=n(151),x=n(54),O=Object(k.b)({defaultTheme:x.a}),C=n(338),E=n(343),j=n(456),R=n(119),T=n(457)},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=r.createContext({});t.a=o},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(1),o=n(3),i=["xs","sm","md","lg","xl"];function a(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,a=e.unit,s=void 0===a?"px":a,c=e.step,l=void 0===c?5:c,u=Object(o.a)(e,["values","unit","step"]);function d(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function f(e,t){var r=i.indexOf(t);return r===i.length-1?d(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[i[r+1]]?n[i[r+1]]:t)-l/100).concat(s,")")}return Object(r.a)({keys:i,values:n,up:d,down:function(e){var t=i.indexOf(e)+1,r=n[i[t]];return t===i.length?d("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-l/100).concat(s,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},u)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),o=n(15),i=!0,a=!1,s=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!c[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function h(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function p(){return{isFocusVisible:f,onBlurVisible:h,ref:r.useCallback((function(e){var t,n=o.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[])}}},function(e,t,n){"use strict";var r=n(351),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;ge.length)&&(t=e.length);for(var n=0,r=new Array(t);n"}try{s.currentTarget=Object(i.c)(a.currentTarget)?Object(o.b)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(l){s.currentTarget=""}for(var c in"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(s.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c]);return s}return e}function f(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}function h(e,t,n){void 0===t&&(t=3),void 0===n&&(n=102400);var r=g(e,t);return f(r)>n?h(e,t-1,n):r}function p(t,n){return"domain"===n&&t&&"object"===typeof t&&t._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!==typeof e&&t===e?"[Global]":"undefined"!==typeof window&&t===window?"[Window]":"undefined"!==typeof document&&t===document?"[Document]":Object(i.l)(t)?"[SyntheticEvent]":"number"===typeof t&&t!==t?"[NaN]":void 0===t?"[undefined]":"function"===typeof t?"[Function: "+Object(s.a)(t)+"]":"symbol"===typeof t?"["+String(t)+"]":"bigint"===typeof t?"[BigInt: "+String(t)+"]":t}function m(e,t,n,r){if(void 0===n&&(n=1/0),void 0===r&&(r=new a.a),0===n)return function(e){var t=Object.prototype.toString.call(e);if("string"===typeof e)return e;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=p(e);return Object(i.i)(n)?n:t}(t);if(null!==t&&void 0!==t&&"function"===typeof t.toJSON)return t.toJSON();var o=p(t,e);if(Object(i.i)(o))return o;var s=d(t),c=Array.isArray(t)?[]:{};if(r.memoize(t))return"[Circular ~]";for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(c[l]=m(l,s[l],n-1,r));return r.unmemoize(t),c}function g(e,t){try{return JSON.parse(JSON.stringify(e,(function(e,n){return m(e,n,t)})))}catch(n){return"**non-serializable**"}}function v(e,t){void 0===t&&(t=40);var n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(c.d)(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:Object(c.d)(o,t)}return""}function b(e){var t,n;if(Object(i.h)(e)){var o=e,a={};try{for(var s=Object(r.h)(Object.keys(o)),c=s.next();!c.done;c=s.next()){var l=c.value;"undefined"!==typeof o[l]&&(a[l]=b(o[l]))}}catch(u){t={error:u}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}return Array.isArray(e)?e.map(b):e}}).call(this,n(69))},function(e,t,n){"use strict";n.r(t);var r=n(218);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(13));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&e<11.25?"N":e>=11.25&&e<33.75?"NNE":e>=33.75&&e<56.25?"NE":e>=56.25&&e<78.75?"ENE":e>=78.75&&e<101.25?"E":e>=101.25&&e<123.75?"ESE":e>=123.75&&e<146.25?"SE":e>=146.25&&e<168.75?"SSE":e>=168.75&&e<191.25?"S":e>=191.25&&e<213.75?"SSW":e>=213.75&&e<236.25?"SW":e>=236.25&&e<258.75?"WSW":e>=258.75&&e<281.25?"W":e>=281.25&&e<303.75?"WNW":e>=303.75&&e<326.25?"NW":e>=326.25&&e<348.75?"NNW":e>=348.75?"N":void 0}},{key:"padding",value:function(e){return"string"===typeof e?e.length<2?"0"+e:e:e<10?"0"+e:e}},{key:"setDataFormat",value:function(t){t&&(e.dateFormat=t.toUpperCase().split(/[.-/]/),e.dateFormat.splice(e.dateFormat.indexOf("YYYY"),1))}},{key:"date2string",value:function(t){if("string"===typeof t){if(!(t=t.trim()))return"";if(t.match(/^[\w\s]+$/))return t;var n=t.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);if(n){var r=[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)],i=r.find((function(e){return e>31}));r.splice(r.indexOf(i),1);var a=r.find((function(e){return e>12}));a?(r.splice(r.indexOf(a),1),t=new Date(i,r[0]-1,a)):"M"===e.dateFormat[0][0]&&"D"===e.dateFormat[1][0]?(t=new Date(i,r[0]-1,r[1]),Math.abs(t.getTime-Date.now())>864e6&&(t=new Date(i,r[1]-1,r[0]))):"D"===e.dateFormat[0][0]&&"M"===e.dateFormat[1][0]?(t=new Date(i,r[1]-1,r[0]),Math.abs(t.getTime-Date.now())>864e6&&(t=new Date(i,r[0]-1,r[1]))):t=new Date(t)}else t=new Date(t)}else t=new Date(t);var s=o.default.t("ra_dow_"+f[t.getDay()]).replace("ra_dow_","");return s+=". "+t.getDate()+" "+o.default.t("ra_month_"+h[t.getMonth()]).replace("ra_month_","")}},{key:"renderTextWithA",value:function(e){var t=e.match(/|/);if(t){var n=[],o=1;do{var i=e.split(t[0]);if(i[0]&&n.push(r.default.createElement("span",{key:"a"+o++},i[0])),t[0].startsWith("([^<]*)|/))||i[1]&&n.push(r.default.createElement("span",{key:"a"+o++},i[1]))}while(t);return n}return e}},{key:"getSmartName",value:function(e,t,n,r){return t?r?e[t]&&e[t].common&&e[t].common.custom&&e[t].common.custom[n]&&e[t].common.custom[n].smartName||null:e[t].common.smartName:r?e&&!e.common?e.smartName:e&&e.common&&e.common.custom&&e.common.custom[n]?e.common.custom[n].smartName:void 0:e.common?e&&!e.common?e.smartName:e.common.smartName:e.smartName}},{key:"getSmartNameFromObj",value:function(e,t,n){return n?e&&!e.common?e.smartName:e&&e.common&&e.common.custom&&e.common.custom[t]?e.common.custom[t].smartName:void 0:e.common?e&&!e.common?e.smartName:e.common.smartName:e.smartName}},{key:"enableSmartName",value:function(e,t,n){n?(e.common.custom=e.common.custom||{},e.common.custom[t]=e.common.custom[t]||{},e.common.custom[t].smartName={}):e.common.smartName={}}},{key:"removeSmartName",value:function(e,t,n){n?e.common&&e.common.custom&&e.common.custom[t]&&(e.common.custom[t]=null):e.common.smartName=null}},{key:"updateSmartName",value:function(e,t,n,r,i,a){var s,l=o.default.getLanguage();if("string"===typeof e.common.smartName){var u=e.common.smartName;e.common.smartName={},e.common.smartName[l]=u}if(e.native&&e.native.byON){delete e.native.byON;var d=e.common.smartName;d&&"object"===c(d)||((d={en:d})[l]=d.en),e.common.smartName=d}if(void 0!==r&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},r?e.common.custom[i].smartName.smartType=r:delete e.common.custom[i].smartName.smartType):(e.common.smartName=e.common.smartName||{},r?e.common.smartName.smartType=r:delete e.common.smartName.smartType)),void 0!==n&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},e.common.custom[i].smartName.byON=n):(e.common.smartName=e.common.smartName||{},e.common.smartName.byON=n)),void 0!==t&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},s=e.common.custom[i].smartName):(e.common.smartName=e.common.smartName||{},s=e.common.smartName),s[l]=t,s&&(!s[l]||s[l]===e.common.name&&(!e.common.role||e.common.role.indexOf("button")>=0)))){delete s[l];var f=!0;for(var h in s)if(s.hasOwnProperty(h)){f=!1;break}f&&(a?void 0===e.common.custom[i].smartName.byON?delete e.common.custom[i]:(delete e.common.custom[i].en,delete e.common.custom[i].de,delete e.common.custom[i].ru,delete e.common.custom[i].nl,delete e.common.custom[i].pl,delete e.common.custom[i].it,delete e.common.custom[i].fr,delete e.common.custom[i].pt,delete e.common.custom[i].es,delete e.common.custom[i]["zh-cn"]):void 0!==e.common.smartName.byON?(delete e.common.smartName.en,delete e.common.smartName.de,delete e.common.smartName.ru,delete e.common.smartName.nl,delete e.common.smartName.pl,delete e.common.smartName.it,delete e.common.smartName.fr,delete e.common.smartName.pt,delete e.common.smartName.es,delete e.common.smartName["zh-cn"]):e.common.smartName=null)}}},{key:"disableSmartName",value:function(e,t,n){n?(e.common.custom=e.common.custom||{},e.common.custom[t]=e.common.custom[t]||{},e.common.custom[t].smartName=!1):e.common.smartName=!1}},{key:"copyToClipboard",value:function(e,t){var n=window.document.createElement("textarea");n.value=e,window.document.body.appendChild(n),n.select(),window.document.execCommand("copy"),window.document.body.removeChild(n),console.log(e),t&&t.stopPropagation(),t&&t.preventDefault()}},{key:"getFileExtension",value:function(e){var t=(e||"").lastIndexOf(".");return-1!==t?e.substring(t+1).toLowerCase():null}},{key:"formatBytes",value:function(e){if(Math.abs(e)<1024)return e+" B";var t=["KB","MB","GB"],n=-1;do{e/=1024,++n}while(Math.abs(e)>=1024&&n186?"#000000":"#FFFFFF":(o=(255-o).toString(16),i=(255-i).toString(16),a=(255-a).toString(16),"#"+o.padStart(2,"0")+i.padStart(2,"0")+a.padStart(2,"0"))}},{key:"_toVal",value:function(t){var n,r,o="";if("string"===typeof t||"number"===typeof t)o+=t;else if("object"===c(t))if(Array.isArray(t))for(n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?window.vendorPrefix:e||(window.localStorage&&window.localStorage.getItem("App.themeName")?window.localStorage.getItem("App.themeName"):window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"colored")}},{key:"getThemeType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?"light":"dark"===(e=e||window.localStorage&&window.localStorage.getItem("App.themeName"))||"blue"===e?"dark":"light"}},{key:"setThemeName",value:function(e){window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix||(window.localStorage.setItem("App.themeName",e),window.localStorage.setItem("App.theme","dark"===e||"blue"===e?"dark":"light"))}},{key:"toggleTheme",value:function(t){if(window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix)return window.vendorPrefix;t=t||window.localStorage&&window.localStorage.getItem("App.themeName");var n,r=e.getThemeNames(),o=r.indexOf(t);return n=-1!==o?r[(o+1)%r.length]:r[0],e.setThemeName(n),n}},{key:"getThemeNames",value:function(){return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?[window.vendorPrefix]:["light","dark","blue","colored"]}},{key:"parseQuery",value:function(e){e=(e||"").toString().replace(/^\?/,"");var t={};return e.split("&").forEach((function(e){if(e=e.trim()){var n=e.split("="),r=decodeURIComponent(n[0]).trim();if(n.length>1)if(t[r]=decodeURIComponent(n[1]),"true"===t[r])t[r]=!0;else if("false"===t[r])t[r]=!1;else{var o=parseFloat(t[r]);o.toString()===t[r]&&(t[r]=o)}else t[r]=!0}})),t}},{key:"getParentId",value:function(e){var t=(e||"").toString().split(".");return t.length>1?(t.pop(),t.join(".")):null}},{key:"formatDate",value:function(e,t){if(!e)return"";var n,r=e.getMonth()+1;r<10&&(r="0"+r);var o=e.getDate();o<10&&(o="0"+o),n="MM/DD/YYYY"===t?r+"/"+o+"/"+e.getFullYear():e.getFullYear()+"-"+r+"-"+o;var i=e.getHours();return n+=i<10?" 0"+i:" "+i,n+=(i=e.getMinutes())<10?":0"+i:":"+i,n+=(i=e.getSeconds())<10?":0"+i:":"+i,n+=(i=e.getMilliseconds())<10?".00"+i:i<100?".0"+i:"."+i}},{key:"formatTime",value:function(e){if(e){e=Math.round(e);var t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60;return t?"".concat(t,".").concat(n.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):n?"".concat(n,":").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):"0:".concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))}return"0:00:00"}},{key:"MDtext2link",value:function(e){var t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Z\u0430-\u044f\u0410-\u042f0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}},{key:"openLink",value:function(e,t){"this"===t?window.location=e:window.open(e,t||"_blank")}},{key:"MDgetTitle",value:function(t){var n=e.extractHeader(t),r=n.body,o=n.header;if(o.title)return o.title;for(var i=(r=(r=r.replace(/{[^}]*}/g,"")).trim()).replace(/\r/g,"").split("\n"),a=0;a>16).toString(16).toUpperCase()),t}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"getStates",value:function(e){var t,n=null===e||void 0===e||null===(t=e.common)||void 0===t?void 0:t.states;if(n)if("string"===typeof n&&"{"===n[0])try{n=JSON.parse(n)}catch(s){console.error("Cannot parse states: ".concat(n)),n=null}else if("string"===typeof n){var r=n.split(";");n={};for(var o=0;o=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),Object(s.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(s.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(o={minHeight:56},Object(r.a)(o,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(o,e.up("sm"),{minHeight:64}),o)},n)}var l=n(131),u=n(78),d=n(94),f=n(95),h=n(96),p=n(97),m=n(98),g=n(99),v=n(100),b=n(10),y={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.a.white,default:d.a[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:u.a.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d.a[800],default:"#303030"},action:{active:u.a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(b.j)(e.main,o):"dark"===t&&(e.dark=Object(b.b)(e.main,i)))}function S(e){var t=e.primary,n=void 0===t?{light:f.a[300],main:f.a[500],dark:f.a[700]}:t,r=e.secondary,a=void 0===r?{light:h.a.A200,main:h.a.A400,dark:h.a.A700}:r,c=e.error,S=void 0===c?{light:p.a[300],main:p.a[500],dark:p.a[700]}:c,k=e.warning,x=void 0===k?{light:m.a[300],main:m.a[500],dark:m.a[700]}:k,O=e.info,C=void 0===O?{light:g.a[300],main:g.a[500],dark:g.a[700]}:O,E=e.success,j=void 0===E?{light:v.a[300],main:v.a[500],dark:v.a[700]}:E,R=e.type,T=void 0===R?"light":R,A=e.contrastThreshold,L=void 0===A?3:A,M=e.tonalOffset,$=void 0===M?.2:M,D=Object(o.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function N(e){return Object(b.f)(e,_.text.primary)>=L?_.text.primary:y.text.primary}var P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(s.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(l.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(l.a)(5,JSON.stringify(e.main)));return w(e,"light",n,$),w(e,"dark",r,$),e.contrastText||(e.contrastText=N(e.main)),e},I={dark:_,light:y};return Object(i.a)(Object(s.a)({common:u.a,type:T,primary:P(n),secondary:P(a,"A400","A200","A700"),error:P(S),warning:P(x),info:P(C),success:P(j),grey:d.a,contrastThreshold:L,getContrastText:N,augmentColor:P,tonalOffset:$},I[T]),D)}function k(e){return Math.round(1e5*e)/1e5}function x(e){return k(e)}var O={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function E(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,a=void 0===r?C:r,c=n.fontSize,l=void 0===c?14:c,u=n.fontWeightLight,d=void 0===u?300:u,f=n.fontWeightRegular,h=void 0===f?400:f,p=n.fontWeightMedium,m=void 0===p?500:p,g=n.fontWeightBold,v=void 0===g?700:g,b=n.htmlFontSize,y=void 0===b?16:b,_=n.allVariants,w=n.pxToRem,S=Object(o.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=l/14,j=w||function(e){return"".concat(e/y*E,"rem")},R=function(e,t,n,r,o){return Object(s.a)({fontFamily:a,fontWeight:e,fontSize:j(t),lineHeight:n},a===C?{letterSpacing:"".concat(k(r/t),"em")}:{},o,_)},T={h1:R(d,96,1.167,-1.5),h2:R(d,60,1.2,-.5),h3:R(h,48,1.167,0),h4:R(h,34,1.235,.25),h5:R(h,24,1.334,0),h6:R(m,20,1.6,.15),subtitle1:R(h,16,1.75,.15),subtitle2:R(m,14,1.57,.1),body1:R(h,16,1.5,.15),body2:R(h,14,1.43,.15),button:R(m,14,1.75,.4,O),caption:R(h,12,1.66,.4),overline:R(h,12,2.66,1,O)};return Object(i.a)(Object(s.a)({htmlFontSize:y,pxToRem:j,round:x,fontFamily:a,fontSize:l,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:m,fontWeightBold:v},T),S,{clone:!1})}function j(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var R=["none",j(0,2,1,-1,0,1,1,0,0,1,3,0),j(0,3,1,-2,0,2,2,0,0,1,5,0),j(0,3,3,-2,0,3,4,0,0,1,8,0),j(0,2,4,-1,0,4,5,0,0,1,10,0),j(0,3,5,-1,0,5,8,0,0,1,14,0),j(0,3,5,-1,0,6,10,0,0,1,18,0),j(0,4,5,-2,0,7,10,1,0,2,16,1),j(0,5,5,-3,0,8,10,1,0,3,14,2),j(0,5,6,-3,0,9,12,1,0,3,16,2),j(0,6,6,-3,0,10,14,1,0,4,18,3),j(0,6,7,-4,0,11,15,1,0,4,20,3),j(0,7,8,-4,0,12,17,2,0,5,22,4),j(0,7,8,-4,0,13,19,2,0,5,24,4),j(0,7,9,-4,0,14,21,2,0,5,26,4),j(0,8,9,-5,0,15,22,2,0,6,28,5),j(0,8,10,-5,0,16,24,2,0,6,30,5),j(0,8,11,-5,0,17,26,2,0,6,32,5),j(0,9,11,-5,0,18,28,2,0,7,34,6),j(0,9,12,-6,0,19,29,2,0,7,36,6),j(0,10,13,-6,0,20,31,3,0,8,38,7),j(0,10,13,-6,0,21,33,3,0,8,40,7),j(0,10,14,-6,0,22,35,3,0,8,42,7),j(0,11,14,-7,0,23,36,3,0,9,44,8),j(0,11,15,-7,0,24,38,3,0,9,46,8)],T={borderRadius:4},A=n(128);function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(A.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,s=void 0===r?{}:r,l=e.palette,u=void 0===l?{}:l,d=e.spacing,f=e.typography,h=void 0===f?{}:f,p=Object(o.a)(e,["breakpoints","mixins","palette","spacing","typography"]),m=S(u),g=Object(a.a)(n),v=L(d),b=Object(i.a)({breakpoints:g,direction:"ltr",mixins:c(g,v,s),overrides:{},palette:m,props:{},shadows:R,typography:E(m,h),spacing:v,shape:T,transitions:M.a,zIndex:$.a},p),y=arguments.length,_=new Array(y>1?y-1:0),w=1;w1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.default=a},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o="object"===("undefined"===typeof window?"undefined":r(window))&&"object"===("undefined"===typeof document?"undefined":r(document))&&9===document.nodeType;t.a=o},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(25);function o(e,t){return void 0===t&&(t=0),"string"!==typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i=0||(o[n]=e[n]);return o}var b=o.a.createContext(),y={root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},_={containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}},w={default:20,dense:4},S={default:6,dense:2},k={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:s.a,transitionDuration:{enter:225,exit:195}},x=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},O=function(e){return Object.keys(e).filter((function(e){return!_[e]})).reduce((function(t,n){var r;return g({},t,((r={})[n]=e[n],r))}),{})},C={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},E=function(e){return"containerAnchorOrigin"+e},j=function(e){var t=e.vertical,n=e.horizontal;return"anchorOrigin"+x(t)+x(n)},R=function(e){return"variant"+x(e)},T=function(e){return!!e||0===e},A=function(e){return"number"===typeof e||null===e};function L(e,t,n){return void 0===e&&(e={}),void 0===t&&(t={}),void 0===n&&(n={}),g({},n,{},t,{},e)}var M=function(e){var t;return Object(c.a)({root:(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[e.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t)})},$=Object(r.forwardRef)((function(e,t){var n=e.classes,r=e.className,i=v(e,["classes","className"]);return o.a.createElement("div",Object.assign({ref:t,className:Object(a.a)(n.root,r)},i))})),D=Object(l.a)(M)($),N={right:"left",left:"right",bottom:"up",top:"down"},P=function(e){return"center"!==e.horizontal?N[e.horizontal]:N[e.vertical]},I=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},F=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},z=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},W=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},B={fontSize:20,marginInlineEnd:8},H={default:void 0,success:o.a.createElement(I,{style:B}),warning:o.a.createElement(F,{style:B}),error:o.a.createElement(z,{style:B}),info:o.a.createElement(W,{style:B})};function U(e,t){return e.reduce((function(e,n){return null==n?e:function(){for(var r=arguments.length,o=new Array(r),i=0;i .MuiCollapse-container, & > .MuiCollapse-root",Q="& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper",Z=Object(d.a)((function(e){var t,n,r,o,i;return{root:(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:e.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[X]={pointerEvents:"all"},t[Q]={padding:S.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+2*w.default+"px)",t[e.breakpoints.down("xs")]={width:"100%",maxWidth:"calc(100% - 32px)"},t),rootDense:(n={},n[Q]={padding:S.dense+"px 0px"},n),top:{top:w.default-S.default,flexDirection:"column"},bottom:{bottom:w.default-S.default,flexDirection:"column-reverse"},left:(r={left:w.default},r[e.breakpoints.up("sm")]={alignItems:"flex-start"},r[e.breakpoints.down("xs")]={left:"16px"},r),right:(o={right:w.default},o[e.breakpoints.up("sm")]={alignItems:"flex-end"},o[e.breakpoints.down("xs")]={right:"16px"},o),center:(i={left:"50%",transform:"translateX(-50%)"},i[e.breakpoints.up("sm")]={alignItems:"center"},i)}})),ee=function(e){var t=Z(),n=e.className,r=e.anchorOrigin,i=e.dense,s=v(e,["className","anchorOrigin","dense"]),c=Object(a.a)(t[r.vertical],t[r.horizontal],t.root,n,i&&t.rootDense);return o.a.createElement("div",Object.assign({className:c},s))},te=o.a.memo(ee),ne=function(e){var t,n,r,s,c;function l(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){void 0===t&&(t={});var r=t,o=r.key,i=r.preventDuplicate,a=v(r,["key","preventDuplicate"]),s=T(o),c=s?o:(new Date).getTime()+Math.random(),l=function(e,t,n){return function(r){return"autoHideDuration"===r?A(e.autoHideDuration)?e.autoHideDuration:A(t.autoHideDuration)?t.autoHideDuration:k.autoHideDuration:e[r]||t[r]||n[r]}}(a,n.props,k),u=g({key:c},a,{message:e,open:!0,entered:!1,requestClose:!1,variant:l("variant"),anchorOrigin:l("anchorOrigin"),autoHideDuration:l("autoHideDuration")});return a.persist&&(u.autoHideDuration=void 0),n.setState((function(t){if(void 0===i&&n.props.preventDuplicate||i){var r=function(t){return s?t.key===o:t.message===e},a=t.queue.findIndex(r)>-1,c=t.snacks.findIndex(r)>-1;if(a||c)return t}return n.handleDisplaySnack(g({},t,{queue:[].concat(t.queue,[u])}))})),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?g({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var t=!1,r=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return t||e.persist&&!r?g({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,C.MAXSNACK,e.key),n.props.onClose&&n.props.onClose(null,C.MAXSNACK,e.key),g({},e,{open:!1})):g({},e,{requestClose:!0}))}));return g({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!T(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.key===r?g({},e,{entered:!0}):g({},e)}))}}))},n.handleCloseSnack=function(e,t,r){if(n.props.onClose&&n.props.onClose(e,t,r),t!==C.CLICKAWAY){var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.key===r?e.entered?g({},e,{open:!1}):g({},e,{requestClose:!0}):g({},e)})),queue:n.filter((function(e){return e.key!==r}))}}))}},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.key===e}));T(e)&&t&&t.onClose&&t.onClose(null,C.INSTRUCTED,e),n.handleCloseSnack(null,C.INSTRUCTED,e)},n.handleExitedSnack=function(e,t,r){var o=t||r;if(!T(o))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var t=n.processQueue(g({},e,{snacks:e.snacks.filter((function(e){return e.key!==o}))}));return 0===t.queue.length?t:n.handleDismissOldest(t)}))},n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar,closeSnackbar:n.closeSnackbar}},n}return n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,l.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.iconVariant,s=n.dense,c=void 0===s?k.dense:s,l=n.hideIconVariant,u=void 0===l?k.hideIconVariant:l,d=n.domRoot,f=n.children,h=n.classes,p=void 0===h?{}:h,m=v(n,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),y=this.state.snacks.reduce((function(e,t){var n,r,o=(r=t.anchorOrigin,""+x(r.vertical)+x(r.horizontal)),i=e[o]||[];return g({},e,((n={})[o]=[].concat(i,[t]),n))}),{}),_=Object.keys(y).map((function(t){var n=y[t];return o.a.createElement(te,{key:t,dense:c,anchorOrigin:n[0].anchorOrigin,className:Object(a.a)(p.containerRoot,p[E(t)])},n.map((function(t){return o.a.createElement(J,Object.assign({},m,{key:t.key,snack:t,dense:c,iconVariant:r,hideIconVariant:u,classes:O(p),onClose:e.handleCloseSnack,onExited:U([e.handleExitedSnack,e.props.onExited]),onEntered:U([e.handleEnteredSnack,e.props.onEntered])}))})))}));return o.a.createElement(b.Provider,{value:t},f,d?Object(i.createPortal)(_,d):_)},r=l,(s=[{key:"maxSnack",get:function(){return this.props.maxSnack||k.maxSnack}}])&&m(r.prototype,s),c&&m(r,c),l}(r.Component),re=function(){return Object(r.useContext)(b)}},function(e,t,n){"use strict";t.a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"}},function(e,t,n){"use strict";t.a={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"}},function(e,t,n){"use strict";t.a={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"}},function(e,t,n){"use strict";t.a={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},function(e,t,n){"use strict";t.a={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},function(e,t,n){"use strict";t.a={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},function(e,t,n){"use strict";t.a={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(132);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(1),o=n(23),i=n(3),a=n(0),s=(n(4),n(2)),c=n(35),l=n(38),u=n(5),d=n(218),f=a.forwardRef((function(e,t){var n=e.autoFocus,u=e.checked,f=e.checkedIcon,h=e.classes,p=e.className,m=e.defaultChecked,g=e.disabled,v=e.icon,b=e.id,y=e.inputProps,_=e.inputRef,w=e.name,S=e.onBlur,k=e.onChange,x=e.onFocus,O=e.readOnly,C=e.required,E=e.tabIndex,j=e.type,R=e.value,T=Object(i.a)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),A=Object(c.a)({controlled:u,default:Boolean(m),name:"SwitchBase",state:"checked"}),L=Object(o.a)(A,2),M=L[0],$=L[1],D=Object(l.a)(),N=g;D&&"undefined"===typeof N&&(N=D.disabled);var P="checkbox"===j||"radio"===j;return a.createElement(d.a,Object(r.a)({component:"span",className:Object(s.a)(h.root,p,M&&h.checked,N&&h.disabled),disabled:N,tabIndex:null,role:void 0,onFocus:function(e){x&&x(e),D&&D.onFocus&&D.onFocus(e)},onBlur:function(e){S&&S(e),D&&D.onBlur&&D.onBlur(e)},ref:t},T),a.createElement("input",Object(r.a)({autoFocus:n,checked:u,defaultChecked:m,className:h.input,disabled:N,id:P&&b,name:w,onChange:function(e){var t=e.target.checked;$(t),k&&k(e,t)},readOnly:O,ref:_,required:C,tabIndex:E,type:j,value:R},y)),M?f:v)}));t.a=Object(u.a)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(f)},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");t.default=a},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=o.a.createContext(null)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=n(8),l=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.color,d=void 0===u?"inherit":u,f=e.component,h=void 0===f?"svg":f,p=e.fontSize,m=void 0===p?"medium":p,g=e.htmlColor,v=e.titleAccess,b=e.viewBox,y=void 0===b?"0 0 24 24":b,_=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(h,Object(r.a)({className:Object(a.a)(s.root,l,"inherit"!==d&&s["color".concat(Object(c.a)(d))],"default"!==m&&"medium"!==m&&s["fontSize".concat(Object(c.a)(m))]),focusable:"false",viewBox:y,color:g,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},_),n,v?i.createElement("title",null,v):null)}));l.muiName="SvgIcon",t.a=Object(s.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n.n(i),s=(n(4),n(15)),c=n(2),l=n(14),u=n(18),d=n(5),f=n(52),h=n(22),p=n(67),m=n(79),g=n(77),v=n(105);function b(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(i.isValidElement)(e)?t(e):e}(e)})),n}function y(e,t,n){return null!=n[t]?n[t]:e.props[t]}function _(e,t,n){var r=b(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var c in t){if(o[c])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,s=void 0===i?a||t.pulsate:i,c=t.fakeElement,l=void 0!==c&&c;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var u,d,f,h=l?null:_.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(p.width/2),d=Math.round(p.height/2);else{var m=e.touches?e.touches[0]:e,g=m.clientX,S=m.clientY;u=Math.round(g-p.left),d=Math.round(S-p.top)}if(s)(f=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(f+=1);else{var k=2*Math.max(Math.abs((h?h.clientWidth:0)-u),u)+2,x=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(k,2)+Math.pow(x,2))}e.touches?null===y.current&&(y.current=function(){w({pulsate:o,rippleX:u,rippleY:d,rippleSize:f,cb:n})},b.current=setTimeout((function(){y.current&&(y.current(),y.current=null)}),80)):w({pulsate:o,rippleX:u,rippleY:d,rippleSize:f,cb:n})}}),[a,w]),x=i.useCallback((function(){S({},{pulsate:!0})}),[S]),C=i.useCallback((function(e,t){if(clearTimeout(b.current),"touchend"===e.type&&y.current)return e.persist(),y.current(),y.current=null,void(b.current=setTimeout((function(){C(e,t)})));y.current=null,p((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:x,start:S,stop:C}}),[x,S,C]),i.createElement("span",Object(r.a)({className:Object(c.a)(s.root,l),ref:_},u),i.createElement(k,{component:null,exit:!0},f))})),E=Object(d.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(C)),j=i.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,d=e.centerRipple,h=void 0!==d&&d,p=e.children,m=e.classes,g=e.className,v=e.component,b=void 0===v?"button":v,y=e.disabled,_=void 0!==y&&y,w=e.disableRipple,S=void 0!==w&&w,k=e.disableTouchRipple,x=void 0!==k&&k,O=e.focusRipple,C=void 0!==O&&O,j=e.focusVisibleClassName,R=e.onBlur,T=e.onClick,A=e.onFocus,L=e.onFocusVisible,M=e.onKeyDown,$=e.onKeyUp,D=e.onMouseDown,N=e.onMouseLeave,P=e.onMouseUp,I=e.onTouchEnd,F=e.onTouchMove,z=e.onTouchStart,W=e.onDragLeave,B=e.tabIndex,H=void 0===B?0:B,U=e.TouchRippleProps,V=e.type,G=void 0===V?"button":V,K=Object(o.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),q=i.useRef(null);var Y=i.useRef(null),J=i.useState(!1),X=J[0],Q=J[1];_&&X&&Q(!1);var Z=Object(f.a)(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;return Object(u.a)((function(r){return t&&t(r),!n&&Y.current&&Y.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){Q(!0),q.current.focus()}}}),[]),i.useEffect((function(){X&&C&&!S&&Y.current.pulsate()}),[S,C,X]);var oe=re("start",D),ie=re("stop",W),ae=re("stop",P),se=re("stop",(function(e){X&&e.preventDefault(),N&&N(e)})),ce=re("start",z),le=re("stop",I),ue=re("stop",F),de=re("stop",(function(e){X&&(te(e),Q(!1)),R&&R(e)}),!1),fe=Object(u.a)((function(e){q.current||(q.current=e.currentTarget),ee(e)&&(Q(!0),L&&L(e)),A&&A(e)})),he=function(){var e=s.findDOMNode(q.current);return b&&"button"!==b&&!("A"===e.tagName&&e.href)},pe=i.useRef(!1),me=Object(u.a)((function(e){C&&!pe.current&&X&&Y.current&&" "===e.key&&(pe.current=!0,e.persist(),Y.current.stop(e,(function(){Y.current.start(e)}))),e.target===e.currentTarget&&he()&&" "===e.key&&e.preventDefault(),M&&M(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&!_&&(e.preventDefault(),T&&T(e))})),ge=Object(u.a)((function(e){C&&" "===e.key&&Y.current&&X&&!e.defaultPrevented&&(pe.current=!1,e.persist(),Y.current.stop(e,(function(){Y.current.pulsate(e)}))),$&&$(e),T&&e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&T(e)})),ve=b;"button"===ve&&K.href&&(ve="a");var be={};"button"===ve?(be.type=G,be.disabled=_):("a"===ve&&K.href||(be.role="button"),be["aria-disabled"]=_);var ye=Object(l.a)(a,t),_e=Object(l.a)(ne,q),we=Object(l.a)(ye,_e),Se=i.useState(!1),ke=Se[0],xe=Se[1];i.useEffect((function(){xe(!0)}),[]);var Oe=ke&&!S&&!_;return i.createElement(ve,Object(r.a)({className:Object(c.a)(m.root,g,X&&[m.focusVisible,j],_&&m.disabled),onBlur:de,onClick:T,onFocus:fe,onKeyDown:me,onKeyUp:ge,onMouseDown:oe,onMouseLeave:se,onMouseUp:ae,onDragLeave:ie,onTouchEnd:le,onTouchMove:ue,onTouchStart:ce,ref:we,tabIndex:_?-1:H},be,K),p,Oe?i.createElement(E,Object(r.a)({ref:Y,center:h},U)):null)}));t.a=Object(d.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(j)},,,,,,,function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e,t,n,r,o){return null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(303);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var r,o=n(1),i=n(3),a=n(0),s=n.n(a),c=(n(4),n(338)),l=n(29),u=n(343),d=Object(l.c)(Object(u.a)()),f=Object(c.a)(),h=new Map,p={disableGeneration:!1,generateClassName:f,jss:d,sheetsCache:null,sheetsManager:h,sheetsRegistry:null},m=s.a.createContext(p);function g(e){var t=e.children,n=e.injectFirst,a=void 0!==n&&n,c=e.disableGeneration,d=void 0!==c&&c,f=Object(i.a)(e,["children","injectFirst","disableGeneration"]),h=s.a.useContext(m),p=Object(o.a)({},h,{disableGeneration:d},f);if(!p.jss.options.insertionPoint&&a&&"undefined"!==typeof window){if(!r){var g=document.head;r=document.createComment("mui-inject-first"),g.insertBefore(r,g.firstChild)}p.jss=Object(l.c)({plugins:Object(u.a)().plugins,insertionPoint:r})}return s.a.createElement(m.Provider,{value:p},t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return f}));var r=n(9),o=n(27);function i(e){return"number"!==typeof e?e:"".concat(e,"px solid")}var a=Object(r.a)({prop:"border",themeKey:"borders",transform:i}),s=Object(r.a)({prop:"borderTop",themeKey:"borders",transform:i}),c=Object(r.a)({prop:"borderRight",themeKey:"borders",transform:i}),l=Object(r.a)({prop:"borderBottom",themeKey:"borders",transform:i}),u=Object(r.a)({prop:"borderLeft",themeKey:"borders",transform:i}),d=Object(r.a)({prop:"borderColor",themeKey:"palette"}),f=Object(r.a)({prop:"borderRadius",themeKey:"shape"}),h=Object(o.a)(a,s,c,l,u,d,f);t.h=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(22),o=n(1),i=(n(4),n(64));function a(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function s(e){var t=function(t){var n=e(t);return t.css?Object(o.a)({},Object(i.a)(n,e(Object(o.a)({theme:t.theme},t.css))),a(t.css,[e.filterProps])):t.sx?Object(o.a)({},Object(i.a)(n,e(Object(o.a)({theme:t.theme},t.sx))),a(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat(Object(r.a)(e.filterProps)),t}function c(e){return s(e)}t.b=s},function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"k",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"n",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return v}));var r=n(9),o=n(27),i=Object(r.a)({prop:"flexBasis"}),a=Object(r.a)({prop:"flexDirection"}),s=Object(r.a)({prop:"flexWrap"}),c=Object(r.a)({prop:"justifyContent"}),l=Object(r.a)({prop:"alignItems"}),u=Object(r.a)({prop:"alignContent"}),d=Object(r.a)({prop:"order"}),f=Object(r.a)({prop:"flex"}),h=Object(r.a)({prop:"flexGrow"}),p=Object(r.a)({prop:"flexShrink"}),m=Object(r.a)({prop:"alignSelf"}),g=Object(r.a)({prop:"justifyItems"}),v=Object(r.a)({prop:"justifySelf"}),b=Object(o.a)(i,a,s,c,l,u,d,f,h,p,m,g,v);t.d=b},function(e,t,n){"use strict";n.d(t,"h",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return p})),n.d(t,"k",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n(9),o=n(27),i=Object(r.a)({prop:"gridGap"}),a=Object(r.a)({prop:"gridColumnGap"}),s=Object(r.a)({prop:"gridRowGap"}),c=Object(r.a)({prop:"gridColumn"}),l=Object(r.a)({prop:"gridRow"}),u=Object(r.a)({prop:"gridAutoFlow"}),d=Object(r.a)({prop:"gridAutoColumns"}),f=Object(r.a)({prop:"gridAutoRows"}),h=Object(r.a)({prop:"gridTemplateColumns"}),p=Object(r.a)({prop:"gridTemplateRows"}),m=Object(r.a)({prop:"gridTemplateAreas"}),g=Object(r.a)({prop:"gridArea"}),v=Object(o.a)(i,a,s,c,l,u,d,f,h,p,m,g);t.a=v},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(9),o=n(27),i=Object(r.a)({prop:"color",themeKey:"palette"}),a=Object(r.a)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),s=Object(o.a)(i,a);t.c=s},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return u}));var r=n(9),o=n(27),i=Object(r.a)({prop:"position"}),a=Object(r.a)({prop:"zIndex",themeKey:"zIndex"}),s=Object(r.a)({prop:"top"}),c=Object(r.a)({prop:"right"}),l=Object(r.a)({prop:"bottom"}),u=Object(r.a)({prop:"left"});t.b=Object(o.a)(i,a,s,c,l,u)},function(e,t,n){"use strict";n.d(t,"j",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(9),o=n(27);function i(e){return e<=1?"".concat(100*e,"%"):e}var a=Object(r.a)({prop:"width",transform:i}),s=Object(r.a)({prop:"maxWidth",transform:i}),c=Object(r.a)({prop:"minWidth",transform:i}),l=Object(r.a)({prop:"height",transform:i}),u=Object(r.a)({prop:"maxHeight",transform:i}),d=Object(r.a)({prop:"minHeight",transform:i}),f=Object(r.a)({prop:"size",cssProperty:"width",transform:i}),h=Object(r.a)({prop:"size",cssProperty:"height",transform:i}),p=Object(r.a)({prop:"boxSizing"}),m=Object(o.a)(a,s,c,l,u,d,p);t.b=m},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return d}));var r=n(9),o=n(27),i=Object(r.a)({prop:"fontFamily",themeKey:"typography"}),a=Object(r.a)({prop:"fontSize",themeKey:"typography"}),s=Object(r.a)({prop:"fontStyle",themeKey:"typography"}),c=Object(r.a)({prop:"fontWeight",themeKey:"typography"}),l=Object(r.a)({prop:"letterSpacing"}),u=Object(r.a)({prop:"lineHeight"}),d=Object(r.a)({prop:"textAlign"}),f=Object(o.a)(i,a,s,c,l,u,d);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(23),o=n(91),i=n(64);var a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},l=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!c[e])return[e];e=c[e]}var t=e.split(""),n=Object(r.a)(t,2),o=n[0],i=n[1],l=a[o],u=s[i]||"";return Array.isArray(u)?u.map((function(e){return l+e})):[l+u]})),u=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function d(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function f(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function h(e){var t=d(e.theme);return Object.keys(e).map((function(n){if(-1===u.indexOf(n))return null;var r=f(l(n),t),i=e[n];return Object(o.b)(e,i,r)})).reduce(i.a,{})}h.propTypes={},h.filterProps=u;t.b=h},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p}));var r=n(102),o=n(56),i=n(22),a=n(168),s=n(20),c=n(66);function l(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function u(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function d(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(i.a)(r)),s=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===s.indexOf(e.tagName)&&l(e,o)}))}function f(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function h(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(s.a)(e);return t.body===e?Object(c.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var l=Object(a.a)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(u(i)+l,"px"),n=Object(s.a)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(u(e)+l,"px")}))}var d=i.parentElement,f="HTML"===d.nodeName&&"scroll"===window.getComputedStyle(d)["overflow-y"]?d:i;r.push({value:f.style.overflow,key:"overflow",el:f}),f.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var p=function(){function e(){Object(r.a)(this,e),this.modals=[],this.containers=[]}return Object(o.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&l(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);d(t,e.mountNode,e.modalRef,r,!0);var o=f(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=f(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=h(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=f(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&l(e.modalRef,!0),d(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&l(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}()},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=function(e){var n=a.a.forwardRef((function(n,i){var s=n.innerRef,c=Object(o.a)(n,["innerRef"]),u=Object(l.a)()||t;return a.a.createElement(e,Object(r.a)({theme:u,ref:s||i},c))}));return c()(n,e),n};return n}var d=u();t.a=d},function(e,t,n){"use strict";n.r(t);var r=n(8);n.d(t,"capitalize",(function(){return r.a}));var o=n(39);n.d(t,"createChainedFunction",(function(){return o.a}));var i=n(19);n.d(t,"createSvgIcon",(function(){return i.a}));var a=n(30);n.d(t,"debounce",(function(){return a.a}));var s=n(36);n.d(t,"deprecatedPropType",(function(){return s.a}));var c=n(43);n.d(t,"isMuiElement",(function(){return c.a}));var l=n(20);n.d(t,"ownerDocument",(function(){return l.a}));var u=n(66);n.d(t,"ownerWindow",(function(){return u.a}));var d=n(211);n.d(t,"requirePropFactory",(function(){return d.a}));var f=n(28);n.d(t,"setRef",(function(){return f.a}));var h=n(117);n.d(t,"unsupportedProp",(function(){return h.a}));var p=n(35);n.d(t,"useControlled",(function(){return p.a}));var m=n(18);n.d(t,"useEventCallback",(function(){return m.a}));var g=n(14);n.d(t,"useForkRef",(function(){return g.a}));var v=n(63);n.d(t,"unstable_useId",(function(){return v.a}));var b=n(52);n.d(t,"useIsFocusVisible",(function(){return b.a}))},function(e,t,n){"use strict";n.r(t);var r=n(300);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(302);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(212);n.d(t,"a",(function(){return r.b}))},function(e,t,n){(function(e){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,r){"string"===typeof t?(2==arguments.length&&(r=n),e.modules[t]||(e.payloads[t]=r,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var o=i(e,t);if(void 0!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,c=t.length;s=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=i.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(i.split(" Edge/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isAndroid=i.indexOf("Android")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(i)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r,o=e("./useragent");t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var i=[],a=0;a=1.5,o.isChromeOS&&(t.HI_DPI=!1),"undefined"!==typeof document){var c=document.createElement("div");t.HI_DPI&&void 0!==c.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||"undefined"===typeof c.style.animationName||(t.HAS_CSS_ANIMATION=!0),c=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./oop"),o=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,o),t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r,o=e("./keys"),i=e("./useragent"),a=null,s=0;function c(){return void 0==r&&function(){r=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){r={passive:!1}}})}catch(e){}}(),r}function l(e,t,n){this.elem=e,this.type=t,this.callback=n}l.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,r){e.addEventListener(t,n,c()),r&&r.$toDestroy.push(new l(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,c())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function o(e){t&&t(e),n&&n(e),d(r,"mousemove",t),d(r,"mouseup",o),d(r,"dragstart",o)}return u(r,"mousemove",t),u(r,"mouseup",o),u(r,"dragstart",o),o},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?u(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?u(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):u(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,r,o,a){var s,c,l,d=0,f={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,i.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-c)>5;l&&!a||(d=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[d-1]||600),1==d&&(s=e.clientX,c=e.clientY)}if(e._clicks=d,r[o]("mousedown",e),d>4)d=0;else if(d>1)return r[o](f[d],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",h,a)}))};var f=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function h(e,t,n){var r=f(t);if(!i.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var c="location"in t?t.location:t.keyLocation;if(17===n&&1===c)1==a[n]&&(s=t.timeStamp);else if(18===n&&3===r&&2===c){t.timeStamp-s<50&&(a.altGr=!0)}}}if((n in o.MODIFIER_KEYS&&(n=-1),!r&&13===n)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,r,-n),t.defaultPrevented)))return;if(i.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}function p(){a=Object.create(null)}if(t.getModifierString=function(e){return o.KEY_MODS[f(e)]},t.addCommandKeyListener=function(e,n,r){if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var o=null;u(e,"keydown",(function(e){o=e.keyCode}),r),u(e,"keypress",(function(e){return h(n,e,o)}),r)}else{var s=null;u(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=h(n,e,e.keyCode);return s=e.defaultPrevented,t}),r),u(e,"keypress",(function(e){s&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),s=null)}),r),u(e,"keyup",(function(e){a[e.keyCode]=null}),r),a||(p(),u(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!i.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++;u(n,"message",(function o(i){i.data==r&&(t.stopPropagation(i),d(n,"message",o),e())})),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var o={row:t+1,column:0};else if(this.start.row0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;nDate.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=e("../lib/dom"),a=e("../lib/lang"),s=e("../clipboard"),c=o.isChrome<18,l=o.isIE,u=o.isChrome>63,d=400,f=e("../lib/keys"),h=f.KEY_MODS,p=o.isIOS,m=p?/\s/:/\n/,g=o.isMobile;t.TextInput=function(e,t){var n=i.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,b=!1,y=!1,_=!1,w="";g||(n.style.fontSize="1px");var S=!1,k=!1,x="",O=0,C=0,E=0;try{var j=document.activeElement===n}catch(G){}r.addListener(n,"blur",(function(e){k||(t.onBlur(e),j=!1)}),t),r.addListener(n,"focus",(function(e){if(!k){if(j=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(R):R()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(G){return}var r=[];if(t)for(var o=n.parentElement;o&&1==o.nodeType;)r.push(o),o.setAttribute("ace_nocontext",!0),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;n.focus({preventScroll:!0}),t&&r.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return j},t.on("beforeEndOperation",(function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var o=r&&(e.docChanged||e.selectionChanged);y&&o&&(x=n.value="",z()),R()}}));var R=p?function(e){if(j&&(!v||e)&&!_){e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=x=r);var o=4+(e.length||(t.selection.isEmpty()?0:1));4==O&&C==o||n.setSelectionRange(4,o),O=4,C=o}}:function(){if(!y&&!_&&(j||A)){y=!0;var e=0,r=0,o="";if(t.session){var i=t.selection,a=i.getRange(),s=i.cursor.row;if(e=a.start.column,r=a.end.column,o=t.session.getLine(s),a.start.row!=s){var c=t.session.getLine(s-1);e=a.start.rows+1?l.length:r,r+=o.length+1,o=o+"\n"+l}else g&&s>0&&(o="\n"+o,r+=1,e+=1);o.length>d&&(e0&&x[f]==e[f];)f++,s--;for(l=l.slice(f),f=1;c>0&&x.length-f>O-1&&x[x.length-f]==e[e.length-f];)f++,c--;u-=f-1,d-=f-1;var h=l.length-f+1;if(h<0&&(s=-h,h=0),l=l.slice(0,h),!r&&!l&&!u&&!s&&!c&&!d)return"";_=!0;var p=!1;return o.isAndroid&&". "==l&&(l=" ",p=!0),l&&!s&&!c&&!u&&!d||S?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:c,restoreStart:u,restoreEnd:d}),_=!1,x=e,O=i,C=a,E=d,p?"\n":l},M=function(e){if(y)return F();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var r=n.value,o=L(r,!0);(r.length>500||m.test(o)||g&&O<1&&O==C)&&R()},$=function e(t,n,r){var o=t.clipboardData||window.clipboardData;if(o&&!c){var i=l||r?"Text":"text/plain";try{return n?!1!==o.setData(i,n):o.getData(i)}catch(t){if(!r)return e(t,n,!0)}}},D=function(e,o){var i=t.getCopyText();if(!i)return r.preventDefault(e);$(e,i)?(p&&(R(i),v=i,setTimeout((function(){v=!1}),10)),o?t.onCut():t.onCopy(),r.preventDefault(e)):(v=!0,n.value=i,n.select(),setTimeout((function(){v=!1,R(),o?t.onCut():t.onCopy()})))},N=function(e){D(e,!0)},P=function(e){D(e,!1)},I=function(e){var i=$(e);s.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),o.isIE&&setTimeout(R),r.preventDefault(e)):(n.value="",b=!0))};r.addCommandKeyListener(n,t.onCommandKey.bind(t),t),r.addListener(n,"select",(function(e){y||(v?v=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=x.length&&e.value===x&&x&&e.selectionEnd!==C}(n)?g&&n.selectionStart!=O&&R():(t.selectAll(),R()))}),t),r.addListener(n,"input",M,t),r.addListener(n,"cut",N,t),r.addListener(n,"copy",P,t),r.addListener(n,"paste",I,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:P(e);break;case 86:I(e);break;case 88:N(e)}}),t);var F=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){if(S)return W();if(y.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;L(e),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+C-y.selectionStart+E)}}},z=function(e){t.onCompositionEnd&&!t.$readOnly&&(y=!1,t.onCompositionEnd(),t.off("mousedown",W),e&&M())};function W(){k=!0,n.blur(),n.focus(),k=!1}var B,H=a.delayedCall(F,50).schedule.bind(null,null);function U(){clearTimeout(B),B=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",(function(e){if(!y&&t.onCompositionStart&&!t.$readOnly&&(y={},!S)){e.data&&(y.useTextareaForIME=!1),setTimeout(F,0),t._signal("compositionStart"),t.on("mousedown",W);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,y.markerRange=r,y.selectionStart=O,t.onCompositionStart(y),y.useTextareaForIME?(x=n.value="",O=0,C=0):(n.msGetInputContext&&(y.context=n.msGetInputContext()),n.getInputContext&&(y.context=n.getInputContext()))}}),t),r.addListener(n,"compositionupdate",F,t),r.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthC&&"\n"==x[i]?a=f.end:rC&&x.slice(0,i).split("\n").length>2?a=f.down:i>C&&" "==x[i-1]?(a=f.right,s=h.option):(i>C||i==C&&C!=O&&r==i)&&(a=f.right),r!==i&&(s|=h.shift),a){if(!t.onCommandKey({},s,a)&&t.commands){a=f.keyCodeToString(a);var c=t.commands.findKeyCommand(s,a);c&&t.execCommand(c)}O=r,C=i,R("")}}};document.addEventListener("selectionchange",i),t.on("destroy",(function(){document.removeEventListener("selectionchange",i)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/useragent");function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function i(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,i=e.getButton();return 0!==i?((o.getSelectionRange().isEmpty()||1==i)&&o.selection.moveToPosition(n),void(2==i&&(o.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==a&&s<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==s&&a>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==a&&1==s)r=o.end,t=o.start;else{var c=i(this.$clickSelection,r);r=c.cursor,t=c.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,r,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),i=Date.now();(o>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,o=r-n.t,i=o?e.wheelX/o:n.vx,a=o?e.wheelY/o:n.vy;o<550&&(i=(i+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(i/a),c=!1;if(s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)n.allowed=r;else if(r-n.allowed<550){Math.abs(i)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(c=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=i,n.vy=a,c?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(o.prototype),t.DefaultHandlers=o})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/oop"),i=e("../lib/event"),a=e("../tooltip").Tooltip;function s(e){a.call(this,e)}o.inherits(s,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),i=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+i>r&&(t-=20+i),a.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=function(e){var t,n,o,a=e.editor,c=a.renderer.$gutterLayer,l=new s(a.container);function u(){t&&(t=clearTimeout(t)),o&&(l.hide(),o=null,a._signal("hideGutterTooltip",l),a.off("mousewheel",u))}function d(e){l.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=c.getRegion(t)){var n=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(i){var s=i.domEvent.target||i.domEvent.srcElement;if(r.hasCssClass(s,"ace_fold-widget"))return u();o&&e.$tooltipFollowsMouse&&d(i),n=i,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=c.$annotations[t];if(!r)return u();if(t==a.session.getLength()){var i=a.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(i>a.session.documentToScreenRow(s.row,s.column))return u()}if(o!=r)if(o=r.text.join("
"),l.setHtml(o),l.show(),a._signal("showGutterTooltip",l),a.on("mousewheel",u),e.$tooltipFollowsMouse)d(n);else{var f=n.domEvent.target.getBoundingClientRect(),h=l.getElement().style;h.left=f.right+"px",h.top=f.bottom+"px"}}():u()}),50))})),i.addListener(a.renderer.$gutter,"mouseout",(function(e){n=null,o&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),a),a.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(i.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/event"),i=e("../lib/useragent");function a(e){var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var a,c,l,u,d,f,h,p,m,g,v,b=t.container,y=0;function _(){var e=f;(function(e,n){var r=Date.now(),o=!n||e.row!=n.row,i=!n||e.column!=n.column;!g||o||i?(t.moveCursorToPosition(e),g=r,v={x:c,y:l}):s(v.x,v.y,c,l)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(f=t.renderer.screenToTextCoordinates(c,l),e),function(e,n){var r=Date.now(),o=t.renderer.layerConfig.lineHeight,i=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:c-a.left,right:a.right-c},y:{top:l-a.top,bottom:a.bottom-l}},u=Math.min(s.x.left,s.x.right),d=Math.min(s.y.top,s.y.bottom),f={row:e.row,column:e.column};u/i<=2&&(f.column+=s.x.left=200&&t.renderer.scrollCursorIntoView(f):m=r:m=null}(f,e)}function w(){d=t.selection.toOrientedRange(),a=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),_(),u=setInterval(_,20),y=0,o.addListener(document,"mousemove",x)}function S(){clearInterval(u),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(d),t.isFocused()&&!p&&t.$resetCursorStyle(),d=null,f=null,y=0,m=null,g=null,o.removeListener(document,"mousemove",x)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),o.setDragImage&&o.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),o.clearData(),o.setData("Text",t.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,p=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&O(e.dataTransfer))return c=e.clientX,l=e.clientY,a||w(),y++,e.dataTransfer.dropEffect=h=C(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&O(e.dataTransfer))return c=e.clientX,l=e.clientY,a||(w(),y++),null!==k&&(k=null),e.dataTransfer.dropEffect=h=C(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&a)return S(),h=null,o.preventDefault(e)},this.onDrop=function(e){if(f){var n=e.dataTransfer;if(p)switch(h){case"move":d=d.contains(f.row,f.column)?{start:f,end:f}:t.moveText(d,f);break;case"copy":d=t.moveText(d,f,!0)}else{var r=n.getData("Text");d={start:f,end:t.session.insert(f,r)},t.focus(),h=null}return S(),o.preventDefault(e)}},o.addListener(b,"dragstart",this.onDragStart.bind(e),t),o.addListener(b,"dragend",this.onDragEnd.bind(e),t),o.addListener(b,"dragenter",this.onDragEnter.bind(e),t),o.addListener(b,"dragover",this.onDragOver.bind(e),t),o.addListener(b,"dragleave",this.onDragLeave.bind(e),t),o.addListener(b,"drop",this.onDrop.bind(e),t);var k=null;function x(){null==k&&(k=setTimeout((function(){null!=k&&a&&S()}),20))}function O(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function C(e){var t=["copy","copymove","all","uninitialized"],n=i.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(r)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?o="move":t.indexOf(r)>=0&&(o="copy"),o}}function s(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=i.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;i.isIE&&"dragReady"==this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(i.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,o=e("../lib/event"),i=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,c,l,u,d,f,h,p="scroll",m=0,g=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(r){var o=r.target.getAttribute("action");if("more"==o||!n)return n=!n,function(){var r=t.getCopyText(),o=t.session.getUndoManager().hasUndo();h.replaceChild(i.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),h.firstChild)}();"paste"==o?e.readText().then((function(e){t.execCommand(o,e)})):o&&("cut"!=o&&"copy"!=o||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),h.firstChild.style.display="none",n=!1,"openCommandPallete"!=o&&t.focus()};h=i.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){p="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),r(e)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function _(){h||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,i=t.container.getBoundingClientRect();h.style.top=n.pageY-i.top-3+"px",n.pageX-i.left1)return clearTimeout(l),l=null,s=-1,void(p="zoom");f=t.$mouseHandler.isMousePressed=!0;var i=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,h=e.timeStamp;c=h;var y=o[0],_=y.clientX,w=y.clientY;Math.abs(n-_)+Math.abs(a-w)>i&&(s=-1),n=e.clientX=_,a=e.clientY=w,v=b=0;var k=new r(e,t);if(d=k.getDocumentPosition(),h-s<500&&1==o.length&&!m)g++,e.preventDefault(),e.button=0,function(){l=null,clearTimeout(l),t.selection.moveToPosition(d);var e=g>=2?t.selection.getLineRange(d.row):t.session.getBracketRange(d);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),p="wait"}();else{g=0;var x=t.selection.cursor,O=t.selection.isEmpty()?x:t.selection.anchor,C=t.renderer.$cursorLayer.getPixelPosition(x,!0),E=t.renderer.$cursorLayer.getPixelPosition(O,!0),j=t.renderer.scroller.getBoundingClientRect(),R=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,A=function(e,t){return(e/=u)*e+(t=t/i-.75)*t};if(e.clientXM?"cursor":"anchor"),p=M<3.5?"anchor":L<3.5?"cursor":"scroll",l=setTimeout(S,450)}s=h}),t),o.addListener(e,"touchend",(function(e){f=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",m=0):l?(t.selection.moveToPosition(d),m=0,_()):"scroll"==p?(m+=60,u=setInterval((function(){m--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),m<20&&(v*=.9),m<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(m=0)}),10),w()):_(),clearTimeout(l),l=null}),t),o.addListener(e,"touchmove",(function(e){l&&(clearTimeout(l),l=null);var o=e.touches;if(!(o.length>1||"zoom"==p)){var i=o[0],s=n-i.clientX,u=a-i.clientY;if("wait"==p){if(!(s*s+u*u>4))return e.preventDefault();p="cursor"}n=i.clientX,a=i.clientY,e.clientX=i.clientX,e.clientY=i.clientY;var d=e.timeStamp,f=d-c;if(c=d,"scroll"==p){var h=new r(e,t);h.speed=1,h.wheelX=s,h.wheelY=u,10*Math.abs(s)1&&(o=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+o+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var o,a;Array.isArray(n)&&(a=n[0],n=n[1]);try{o=e(n)}catch(c){}if(o&&!t.$loading[n])return r&&r(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var s=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return s();i.loadScript(t.moduleUrl(n,a),s),u()}};var u=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};function d(o){if(c&&c.document){l.packaged=o||e.packaged||r.packaged||c.define&&n(309).packaged;for(var i,a={},s="",u=document.currentScript||document._currentScript,d=(u&&u.ownerDocument||document).getElementsByTagName("script"),f=0;f=e){for(i=d+1;i=e;)i++;for(s=d,c=i-1;s=t.length||2!=(c=n[o-1])&&3!=c||2!=(l=t[o+1])&&3!=l?4:(i&&(l=3),l==c?l:4);case 10:return 2==(c=o>0?n[o-1]:5)&&o+10&&2==n[o-1])return 2;if(i)return 4;for(h=o+1,f=t.length;h=1425&&m<=2303||64286==m;if(c=t[h],g&&(1==c||7==c))return 1}return o<1||5==(c=t[o-1])?4:n[o-1];case 5:return i=!1,a=!0,r;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:i=!1;case d:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:f[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var f=e.split(""),h=new Array(f.length),v=new Array(f.length),b=[];r=u?1:0,function(e,t,n,u){var d=r?l:c,f=null,h=null,p=null,v=0,b=null,y=-1,_=null,w=null,S=[];if(!u)for(_=0,u=[];_0)if(16==b){for(_=y;_-1){for(_=y;_=0&&8==u[k];k--)t[k]=r}}(f,b,f.length,n);for(var y=0;y7&&n[y]<13||4===n[y]||n[y]===d)?b[y]=t.ON_R:y>0&&"\u0644"===f[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(f[y])&&(b[y-1]=b[y]=t.R_H,y++);f[f.length-1]===t.DOT&&(b[f.length-1]=t.B),"\u202b"===f[0]&&(b[0]=t.RLE);for(y=0;y=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,o=r.getVisualFromLogicalIdx(n,this.bidiMap),i=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&i[o]%2!==0&&o++;for(var s=0;st&&i[o]%2===0&&(a+=this.charWidths[i[o]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},this.getSelections=function(e,t){var n,r=this.bidiMap,o=r.bidiLevels,i=[],a=0,s=Math.min(e,t)-this.wrapIndent,c=Math.max(e,t)-this.wrapIndent,l=!1,u=!1,d=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var f,h=0;h=s&&fn+i/2;){if(n+=i,r===o.length-1){i=0;break}i=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!==0&&o[r]%2===0?(e0&&o[r-1]%2===0&&o[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===i&&o[r-1]%2===0||!this.isRtlDir&&0===r&&o[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!==0&&0!==i&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/lang"),i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){r.implement(this,i),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(!this.$silent){var o=this.$isEmpty,i=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||i)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(r);return o?(r=o.start.row,n=o.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,o=e.column+t;return n<0&&(r=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var i=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var i=o.stringReverse(r),a=this.$shortWordEndIndex(i);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var i=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&i.row===this.lead.row&&(i.column,this.lead.column),this.moveCursorTo(i.row,i.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(r){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var r=e("./config"),o=2e3,i=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],o=0,i=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],c=0;c1?this.$applyToken:l.token),d>1&&(/\\\d/.test(l.regex)?u=l.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(d=1,u=this.removeCapturingGroups(l.regex)),l.splitRegex||"string"==typeof l.token||s.push(l)),i[o]=c,o+=d,r.push(u),l.onMatch||(l.onMatch=null)}}r.length||(i[0]=0,r.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var r=[],o=0,i=n.length;ou){var v=e.substring(u,g-m.length);f.type==h?f.value+=v:(f.type&&l.push(f),f={type:h,value:v})}for(var b=0;bo){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:l,state:n.length?n:r}},this.reportError=r.reportError}).call(i.prototype),t.Tokenizer=i})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(o.prototype),t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},f=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},h=function(e,t,n,r){var o=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}},p=function e(t){this.add("braces","insertion",(function(n,o,i,a,c){var l=i.getCursorPosition(),u=a.doc.getLine(l.row);if("{"==c){f(i);var d=i.getSelectionRange(),p=a.doc.getTextRange(d);if(""!==p&&"{"!==p&&i.getWrapBehavioursEnabled())return h(d,p,"{","}");if(e.isSaneInsertion(i,a))return/[\]\}\)]/.test(u[l.column])||i.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(i,a,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(i,a,"{"),{text:"{",selection:[1,1]})}else if("}"==c){if(f(i),"}"==u.substring(l.column,l.column+1))if(null!==a.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,u,c))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==c||"\r\n"==c){f(i);var m="";if(e.isMaybeInsertedClosing(l,u)&&(m=s.stringRepeat("}",r.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(l.column,l.column+1)){var g=a.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!g)return null;var v=this.$getIndent(a.getLine(g.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+a.getTabString();return{text:"\n"+b+"\n"+v+m,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){if(f(n),"}"==o.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,r,o,i){if("("==i){f(r);var a=r.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"(",")");if(e.isSaneInsertion(r,o))return e.recordAutoInsert(r,o,")"),{text:"()",selection:[1,1]}}else if(")"==i){f(r);var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if(")"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket(")",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,l,i))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i&&(f(n),")"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(t,n,r,o,i){if("["==i){f(r);var a=r.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"[","]");if(e.isSaneInsertion(r,o))return e.recordAutoInsert(r,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){f(r);var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if("]"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket("]",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,l,i))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i&&(f(n),"]"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,r,o){var i=r.$mode.$quotes||d;if(1==o.length&&i[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;f(n);var a=o,s=n.getSelectionRange(),c=r.doc.getTextRange(s);if(!(""===c||1==c.length&&i[c])&&n.getWrapBehavioursEnabled())return h(s,c,a,a);if(!c){var l=n.getCursorPosition(),u=r.doc.getLine(l.row),p=u.substring(l.column-1,l.column),m=u.substring(l.column,l.column+1),g=r.getTokenAt(l.row,l.column),v=r.getTokenAt(l.row,l.column+1);if("\\"==p&&g&&/escape/.test(g.type))return null;var b,y=g&&/string|escape/.test(g.type),_=!v||/string|escape/.test(v.type);if(m==a)(b=y!==_)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!_)return null;if(y&&_)return null;var w=r.$mode.tokenRe;w.lastIndex=0;var S=w.test(p);w.lastIndex=0;var k=w.test(p);if(S||k)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var x=u[l.column-2];if(p==a&&(x==a||w.test(x)))return null;b=!0}return{text:b?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,o){var i=r.$mode.$quotes||d,a=r.doc.getTextRange(o);if(!o.isMultiLine()&&i.hasOwnProperty(a)&&(f(n),r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==a))return o.end.column++,o}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(p,i),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,i=[],a=0;a2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,p=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(h)+")"),g=new RegExp("(?:"+c.escapeRegExp(p)+")\\s*$"),v=function(e,t){y(e,t)||i&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},p),o.insertInLine({row:t,column:s},h))},b=function(e,t){var n;(n=e.match(g))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&o.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var r=t.getTokens(n),o=0;oe.length&&(w=e.length)})),s==1/0&&(s=w,i=!1,a=!1),u&&s%l!=0&&(s=Math.floor(s/l)*l),_(a?b:v)},this.toggleBlockComment=function(e,t,n,r){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var i,a,s=(m=new l(t,r.row,r.column)).getCurrentToken(),c=(t.selection,t.selection.toOrientedRange());if(s&&/comment/.test(s.type)){for(var d,f;s&&/comment/.test(s.type);){if(-1!=(g=s.value.indexOf(o.start))){var h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;d=new u(h,p,h,p+o.start.length);break}s=m.stepBackward()}var m;for(s=(m=new l(t,r.row,r.column)).getCurrentToken();s&&/comment/.test(s.type);){var g;if(-1!=(g=s.value.indexOf(o.end))){h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;f=new u(h,p,h,p+o.end.length);break}s=m.stepForward()}f&&t.remove(f),d&&(t.remove(d),i=d.start.row,a=-o.start.length)}else a=o.start.length,i=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);c.start.row==i&&(c.start.column+=a),c.end.row==i&&(c.end.column+=a),t.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],o=n.prototype.$id,i=r.$modes[o];i||(r.$modes[o]=i=new n),r.$modes[t]||(r.$modes[t]=i),this.$embeds.push(t),this.$modes[t]=i}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,r){var o="insert"==t.action,i=(o?1:-1)*(t.end.row-t.start.row),a=(o?1:-1)*(t.end.column-t.start.column),s=t.start,c=o?s:t.end;if(e(n,s,r))return{row:n.row,column:n.column};if(e(c,n,!r))return{row:n.row+i,column:n.column+(n.row==c.row?a:0)};return{row:s.row,column:s.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var o={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:o,value:r})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(i.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,c=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),i<=r&&n.fireUpdateEvent(i,r)}}};(function(){r.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(i.prototype),t.BackgroundTokenizer=i})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),i=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,i){if(this.regExp)for(var a=i.firstRow,s=i.lastRow,c=a;c<=s;c++){var l=this.cache[c];null==l&&((l=r.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map((function(e){return new o(c,e.offset,c,e.offset+e.length)})),this.cache[c]=l.length?l:"");for(var u=l.length;u--;)t.drawSingleLineMarker(e,l[u].toScreenRange(n),this.clazz,i)}}}).call(i.prototype),t.SearchHighlight=i})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,o,i=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var c=0;c0)){var c=r(e,a.start);return 0===s?t&&0!==c?-i-2:i:c>0||0===c&&!t?i:-i-1}}return-i-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],i=1;i=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=r)break}if("insert"==e.action)for(var c=o-r,l=-t.column+n.column;ar)break;if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=l,u.start.row+=c)),u.end.row==r&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&l>0&&au.start.column&&u.end.column==i[a+1].start.column&&(u.end.column-=l),u.end.column+=l,u.end.row+=c}}else for(c=r-o,l=t.column-n.column;ao)break;u.end.rowt.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=l,u.end.row+=c):u.end.row>o&&(u.end.row+=c),u.start.rowt.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=l,u.start.row+=c):u.start.row>o&&(u.start.row+=c)}if(0!=c&&a=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,o=0;o=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof i?n=e:(n=new i(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,c=n.start.column,l=n.end.row,u=n.end.column,d=this.getFoldAt(s,c,1),f=this.getFoldAt(l,u,-1);if(d&&f==d)return d.addSubFold(n);d&&!d.range.isStart(s,c)&&this.removeFold(d),f&&!f.range.isEnd(l,u)&&this.removeFold(f);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach((function(e){n.addSubFold(e)})));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e)n=new r(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach((function(e){o=o.concat(this.unfold(e))}),this),o;n=e}for(var i=o=this.getFoldsInRangeList(n);1==o.length&&r.comparePoints(o[0].start,n.start)<0&&r.comparePoints(o[0].end,n.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(o):this.expandFolds(o),i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,o){null==r&&(r=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var i=this.doc,a="";return e.walk((function(e,t,n,s){if(!(tu)break}while(i&&c.test(i.type));i=o.stepBackward()}else i=o.getCurrentToken();return l.end.row=o.getCurrentTokenRow(),l.end.column=o.getCurrentTokenColumn()+i.value.length-2,l}},this.foldAll=function(e,t,n,r){void 0==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var i=e=e||0;i=e&&(i=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),r=0;r=0;){var i=n[o];if(null==i&&(i=n[o]=this.getFoldWidget(o)),"start"==i){var a=this.getFoldWidgetRange(o);if(r||(r=a),a&&a.end.row>=e)break}o--}return{range:-1!==o&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),o="end"===n?-1:1,i=this.getFoldAt(e,-1===o?0:r.length,o);if(i)return t.children||t.all?this.removeFold(i):this.expandFold(i),i;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(i=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(i.range))return this.removeFold(i),i;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var c=s.range.start.row+1,l=s.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=a?a.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,i=n.charAt(e.column-1),a=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(a||(i=n.charAt(e.column),e={row:e.row,column:e.column+1},a=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=o.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=o.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(r||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!r)return null;var i=new o(e.row,e.column-1,e.row,e.column),a=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);return a?[i,new o(a.row,a.column,a.row,a.column+1)]:[i]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn()-2,l=s.value;;){for(;c>=0;){var u=l.charAt(c);if(u==o){if(0==(i-=1))return{row:a.getCurrentTokenRow(),column:c+a.getCurrentTokenColumn()}}else u==e&&(i+=1);c-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;c=(l=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn();;){for(var l=s.value,u=l.length;cn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var o=n+r>>1,i=e[o];if(t>i)n=o+1;else{if(!(t=t);i++);return(n=r[i])?(n.index=i,n.start=o-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var i=t;if(i>0){do{i--}while(i>=0&&n.charAt(i).match(o));i++}for(var a=t;ae&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,o=0,i=this.$foldData[o],a=i?i.start.row:1/0,s=t.length,c=0;ca){if((c=i.end.row+1)>=s)break;a=(i=this.$foldData[o++])?i.start.row:1/0}null==n[c]&&(n[c]=this.$getStringScreenWidth(t[c])[0]),n[c]>r&&(r=n[c])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(i.start.column+=l),i.end.row==e.end.row&&i.end.column>e.end.column&&(i.end.column+=l)),a&&i.start.row>=e.end.row&&(i.start.row+=a,i.end.row+=a)}if(i.end=this.insert(i.start,r),o.length){var s=e.start,c=i.start,l=(a=c.row-s.row,c.column-s.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=l),e.end.row==s.row&&(e.end.column+=l),e.start.row+=a,e.end.row+=a,e})))}return i},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var i=this.getLine(o);n.start.row=o,n.end.row=o;for(var a=0;a0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=o-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var i=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(i).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,o=e.end,i=r.row,a=o.row,s=a-i,c=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(i,s);var l=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var u=0;if(m=this.getFoldLine(o.row)){m.addRemoveChars(o.row,o.column,r.column-o.column),m.shiftRow(-s);var d=this.getFoldLine(i);d&&d!==m&&(d.merge(m),m=d),u=l.indexOf(m)+1}for(;u=o.row&&m.shiftRow(-s)}a=i}else{var f=Array(s);f.unshift(i,0);var h=t?this.$wrapData:this.$rowLengthCache;h.splice.apply(h,f);l=this.$foldData,u=0;if(m=this.getFoldLine(i)){var p=m.range.compareInside(r.row,r.column);0==p?(m=m.split(r.row,r.column))&&(m.shiftRow(s),m.addRemoveChars(a,0,o.column-r.column)):-1==p&&(m.addRemoveChars(i,0,o.column-r.column),m.shiftRow(s)),u=l.indexOf(m)+1}for(;u=i&&m.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(c=this.getFoldsInRange(e),this.removeFolds(c),s=-s),(m=this.getFoldLine(i))&&m.addRemoveChars(i,r.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(i,a):this.$updateRowLengthCache(i,a),c},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,r){var o,i,a=this.doc.getAllLines(),s=this.getTabSize(),c=this.$wrapData,l=this.$wrapLimit,u=n;for(r=Math.min(r,a.length-1);u<=r;)(i=this.getFoldLine(u,i))?(o=[],i.walk(function(n,r,i,s){var c;if(null!=n){(c=this.$getDisplayTokens(n,o.length))[0]=e;for(var l=1;l=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,r,o){if(0==n.length)return[];var i=[],a=n.length,s=0,c=0,l=this.$wrapAsCode,u=this.$indentedSoftWrap,d=r<=Math.max(2*o,8)||!1===u?0:Math.floor(r/2);function f(e){for(var t=e-s,r=s;rr-h;){var p=s+r-h;if(n[p-1]>=10&&n[p]>=10)f(p);else if(n[p]!=e&&n[p]!=t){for(var m=Math.max(p-(r-(r>>2)),s-1);p>m&&n[p]m&&n[p]m&&9==n[p];)p--}else for(;p>m&&n[p]<10;)p--;p>m?f(++p):(2==n[p=s+r]&&p--,f(p-h))}else{for(;p!=s-1&&n[p]!=e;p--);if(p>s){f(p);continue}for(p=s+r;p39&&a<48||a>57&&a<64?o.push(9):a>=4352&&n(a)?o.push(1,2):o.push(1)}return o},this.$getStringScreenWidth=function(e,t,r){if(0==t)return[0,0];var o,i;for(null==t&&(t=1/0),r=r||0,i=0;i=4352&&n(o)?r+=2:r+=1,!(r>t));i++);return[r,i]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){s=l[u],i=this.$docRowCache[u];var f=e>l[d-1]}else f=!d;for(var h=this.getLength()-1,p=this.getNextFoldLine(i),m=p?p.start.row:1/0;s<=e&&!(s+(c=this.getRowLength(i))>e||i>=h);)s+=c,++i>m&&(i=p.end.row+1,m=(p=this.getNextFoldLine(i,p))?p.start.row:1/0),f&&(this.$docRowCache.push(i),this.$screenRowCache.push(s));if(p&&p.start.row<=i)r=this.getFoldDisplayLine(p),i=p.start.row;else{if(s+c<=e||i>h)return{row:h,column:this.getLine(h).length};r=this.getLine(i),p=null}var g=0,v=Math.floor(e-s);if(this.$useWrapMode){var b=this.$wrapData[i];b&&(o=b[v],v>0&&b.length&&(g=b.indent,a=b[v-1]||b[b.length-1],r=r.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+v,i,v)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=o&&(a=o-1),p?p.idxToPosition(a):{row:i,column:a}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,o=0,i=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var a,s=0,c=this.$docRowCache,l=this.$getRowCacheIndex(c,e),u=c.length;if(u&&l>=0){s=c[l],o=this.$screenRowCache[l];var d=e>c[u-1]}else d=!u;for(var f=this.getNextFoldLine(s),h=f?f.start.row:1/0;s=h){if((a=f.end.row+1)>e)break;h=(f=this.getNextFoldLine(a,f))?f.start.row:1/0}else a=s+1;o+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(o))}var p="";f&&s>=h?(p=this.getFoldDisplayLine(f,e,t),i=f.start.row):(p=this.getLine(e).substring(0,t),i=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[i];if(g){for(var v=0;p.length>=g[v];)o++,v++;p=p.substring(g[v-1]||0,p.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(o+=this.lineWidgets[s].rowsAbove),{row:o,column:m+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,o=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);ro&&(r=t.end.row+1,o=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sn);i++);return[r,i]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=n}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),a.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),o=e("./lib/oop"),i=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach((function(e,n,o,a){return r=new i(e,n,o,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var c,l=s.length,u=o.length-l;e:for(var d=s.offset||0;d<=u;d++){for(var f=0;fm||(a.push(c=new i(d,m,d+l-1,g)),l>2&&(d=d+l-2))}}else for(var v=0;vw&&a[f].end.row==n.end.row;)f--;for(a=a.slice(v,f+1),v=0,f=a.length;v=s;n--)if(d(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=c,s=a.row;n>=s;n--)if(d(n,Number.MAX_VALUE,e))return}};else l=function(e){var n=a.row;if(!d(n,a.column,e)){for(n+=1;n<=c;n++)if(d(n,0,e))return;if(0!=t.wrap)for(n=s,c=a.row;n<=c;n++)if(d(n,0,e))return}};if(t.$isMultiLine)var u=n.length,d=function(t,o,i){var a=r?t-u+1:t;if(!(a<0||a+u>e.getLength())){var s=e.getLine(a),c=s.search(n[0]);if(!(!r&&co))return!!i(a,c,a+u-1,d)||void 0}}};else if(r)d=function(t,r,o){var i,a=e.getLine(t),s=[],c=0;for(n.lastIndex=0;i=n.exec(a);){var l=i[0].length;if(c=i.index,!l){if(c>=a.length)break;n.lastIndex=c+=1}if(i.index+l>r)break;s.push(i.index,l)}for(var u=s.length-1;u>=0;u-=2){var d=s[u-1];if(o(t,d,t,d+(l=s[u])))return!0}};else d=function(t,r,o){var i,a,s=e.getLine(t);for(n.lastIndex=r;a=n.exec(s);){var c=a[0].length;if(o(t,i=a.index,t,i+c))return!0;if(!c&&(n.lastIndex=i+=1,i>=s.length))return!1}};return{forEach:l}}}).call(a.prototype),t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/keys"),o=e("../lib/useragent"),i=r.KEY_MODS;function a(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){a.call(this,e,t),this.$singleCommand=!1}s.prototype=a.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var o in r){var i=r[o];if(i==e)delete r[o];else if(Array.isArray(i)){var a=i.indexOf(e);-1!=a&&(i.splice(a,1),1==i.length&&(r[o]=i[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var r="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=i[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var a=this.parseKeys(e),s=i[a.hashId]+a.key;this._addCommandToBinding(r+s,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var o,i=this.commandKeyBinding;if(n)if(!i[t]||this.$singleCommand)i[t]=n;else{Array.isArray(i[t])?-1!=(o=i[t].indexOf(n))&&i[t].splice(o,1):i[t]=[i[t]],"number"!=typeof r&&(r=e(n));var a=i[t];for(o=0;or)break}a.splice(o,0,n)}else delete i[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),o=r[n];if(r.FUNCTION_KEYS[o])n=r.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,a=t.length;a--;){var s=r.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;i|=s}return{key:n,hashId:i}},this.findKeyCommand=function(e,t){var n=i[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var o=i[t]+n,a=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,a=this.commandKeyBinding[e.$keyChain]||a),!a||"chainKeys"!=a&&"chainKeys"!=a[a.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:a}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=s})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,a=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};r.inherits(a,o),function(){r.implement(this,i),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(a.prototype),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var r=e("../lib/lang"),o=e("../config"),i=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,c=e.session.doc.getLine(n.row),l=n.row+1;l<=o.row+1;l++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));0!==u.length&&(u=" "+u),c+=u}o.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,o=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a=o.lastRow||r.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var i=this.selection.toJSON();this.curOp.selectionAfter=i,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(i),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var r="ace_bracket";Array.isArray(n)?1==n.length&&(r="ace_error_bracket"):n=[n],2==n.length&&(0==h.comparePoints(n[0].end,n[1].start)?n=[h.fromPoints(n[0].start,n[1].end)]:0==h.comparePoints(n[0].start,n[1].end)&&(n=[h.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,r,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new b(e.session,n.row,n.column),o=r.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===o.type.indexOf("tag-open")||(o=r.stepForward())){var i=o.value,a=o.value,s=0,c=r.stepBackward();if("<"===c.value)do{c=o,(o=r.stepForward())&&(-1!==o.type.indexOf("tag-name")?i===(a=o.value)&&("<"===c.value?s++:""===o.value&&s--)}while(o&&s>=0);else{do{if(o=c,c=r.stepBackward(),o)if(-1!==o.type.indexOf("tag-name"))i===o.value&&("<"===c.value?s++:""===o.value){for(var l=0,u=c;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===i){s--;break}if("<"===u.value)break;u=r.stepBackward(),l++}for(var d=0;d1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new h(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,o=e.getLine(t.start.row),i=o.substring(n,r);if(!(i.length>5e3)&&/[\w\d]/.test(i)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:i}),s=o.substring(n-1,r+1);if(a.test(s))return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),o=0;os.search(/\S|$/)){var c=s.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+c)}}this.clearSelection();var l=o.column,u=n.getState(o.row),d=(s=n.getLine(o.row),r.checkOutdent(u,s,e));if(n.insert(o,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new h(o.row,l+i.selection[0],o.row,l+i.selection[1])):this.selection.setSelectionRange(new h(o.row+i.selection[0],i.selection[1],o.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(u,s.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},f)}d&&r.autoOutdent(u,n,o.row)}},this.autoIndent=function(){var e,t,n=this.session,r=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var o=this.getSelectionRange();e=o.start.row,t=o.end.row}for(var i,a,s,c="",l="",u="",d=n.getTabString(),f=e;f<=t;f++)f>0&&(c=n.getState(f-1),l=n.getLine(f-1),u=r.getNextLineIndent(c,l,d)),i=n.getLine(f),u!==(a=r.$getIndent(i))&&(a.length>0&&(s=new h(f,0,f,a.length),n.remove(s)),u.length>0&&n.insert({row:f,column:0},u)),r.autoOutdent(c,n,f)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),o=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var i=n.getTextRange(t);if("\n"==i[i.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,o=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var o=new h(0,0,0,0);for(r=e.first;r<=e.last;r++){var i=t.getLine(r);o.start.row=r,o.end.row=r,o.end.column=i.length,t.replace(o,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),o=this.session.getTextRange(r);if(!isNaN(parseFloat(o))&&isFinite(o)){var i=this.getNumberAt(t,n);if(i){var a=i.value.indexOf(".")>=0?i.start+i.value.indexOf(".")+1:i.end,s=i.start+i.value.length-a,c=parseFloat(i.value);c*=Math.pow(10,s),a!==i.end&&n=s&&a<=c&&(n=t,l.selection.clearSelection(),l.moveCursorTo(e,s+r),l.selection.selectTo(e,c+r)),s=c}));for(var u,d=this.$toggleWordPairs,f=0;fh+1)break;h=p.last}for(u--,s=this.session.$moveLines(f,h,t?0:e),t&&-1==e&&(d=u+1);d<=u;)a[d].moveBy(s,0),d++;t||(s=0),c+=s}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,o=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var i=n.scrollTop;n.scrollBy(0,o*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(i)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new b(this.session,n.row,n.column),o=r.getCurrentToken(),i=o||r.stepForward();if(i){var a,s,c=!1,l={},u=n.column-i.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(i.value.match(/[{}()\[\]]/g)){for(;u=0;--i)this.$tryReplace(n[i],e)&&r++;return this.selection.setSelectionRange(o),r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var i=this.$search.find(this.session);return t.preventScroll?i:i?(this.revealRange(i,n),i):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var i=this.on("changeSelection",(function(){r=!0})),a=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,i=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=i.top-a.offset;null!=(r=i.top>=0&&s+t.top<0||!(i.topwindow.innerHeight)&&null)&&(o.style.top=s+"px",o.style.left=i.left+"px",o.style.height=a.lineHeight+"px",o.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",i),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var r=this;v.loadModule("./ext/prompt",(function(o){o.prompt(r,e,t,n)}))}}.call(_.prototype),v.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?w.attach(this):w.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var w={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=_})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var o=n[r][0];if(o.id<=e)break;o.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?s(e):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)}}).call(r.prototype);var o=e("./range").Range,i=o.comparePoints;o.comparePoints;function a(e){return{row:e.row,column:e.column}}function s(e){if(e=e||this,Array.isArray(e))return e.map(s).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(c).join("\n"):c(e.value)),e.start&&(t+=c(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function c(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function l(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)if(i(t.start,e.end)>=0)f(t,e,-1);else{if(!(i(t.start,e.start)<=0))return null;f(e,t,1)}else if(n&&!r)if(i(t.start,e.end)>=0)f(t,e,-1);else{if(!(i(t.end,e.start)<=0))return null;f(e,t,-1)}else if(!n&&r)if(i(t.start,e.start)>=0)f(t,e,1);else{if(!(i(t.start,e.start)<=0))return null;f(e,t,1)}else if(!n&&!r)if(i(t.start,e.start)>=0)f(t,e,1);else{if(!(i(t.end,e.start)<=0))return null;f(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var r=0;r=0?f(e,t,-1):(i(e.start,t.start)<=0||f(e,o.fromPoints(t.start,e.start),-1),f(t,e,1));else if(!n&&r)i(t.start,e.end)>=0?f(t,e,-1):(i(t.start,e.start)<=0||f(t,o.fromPoints(e.start,t.start),-1),f(e,t,1));else if(!n&&!r)if(i(t.start,e.end)>=0)f(t,e,-1);else{var a,s;if(!(i(t.end,e.start)<=0))return i(e.start,t.start)<0&&(a=e,e=p(e,t.start)),i(e.end,t.end)>0&&(s=p(e,t.end)),h(t.end,e.start,e.end,-1),s&&!a&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,a,s].filter(Boolean);f(e,t,-1)}return[t,e]}function f(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function p(e,t){var n=e.lines,r=e.end;e.end=a(t);var o=e.end.row-e.start.row,i=n.splice(o,n.length),s=o?t.column:t.column-e.start.column;return n.push(i[0].substring(0,s)),i[0]=i[0].substr(s),{start:a(t),end:r,lines:i,action:e.action}}function m(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var r=e[n],o=0;oi&&(c=o.end.row+1,i=(o=t.getNextFoldLine(c,o))?o.start.row:1/0),c>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}(a=this.$lines.get(++s))?a.row=c:(a=this.$lines.createCell(c,e,this.session,l),this.$lines.push(a)),this.$renderCell(a,e,o,c),c++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+r-1);var i=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(i+=a.left+a.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(r.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r0;o--)this.$lines.shift();if(r>n)for(o=this.session.getFoldedRowCount(n+1,r);o>0;o--)this.$lines.pop();e.firstRowr&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var r=[],o=t,i=this.session.getNextFoldLine(o),a=i?i.start.row:1/0;o>a&&(o=i.end.row+1,a=(i=this.session.getNextFoldLine(o,i))?i.start.row:1/0),!(o>n);){var s=this.$lines.createCell(o,e,this.session,l);this.$renderCell(s,e,i,o),r.push(s),o++}return r},this.$renderCell=function(e,t,n,o){var i=e.element,a=this.session,s=i.childNodes[0],c=i.childNodes[1],l=a.$firstLineNumber,u=a.$breakpoints,d=a.$decorations,f=a.gutterRenderer||this.$renderer,h=this.$showFoldWidgets&&a.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o=p&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[o]&&(m+=u[o]),d[o]&&(m+=d[o]),this.$annotations[o]&&(m+=this.$annotations[o].className),i.className!=m&&(i.className=m),h){var g=h[o];null==g&&(g=h[o]=a.getFoldWidget(o))}if(g){m="ace_fold-widget ace_"+g;"start"==g&&o==p&&on.right-t.right?"foldWidgets":void 0}}).call(c.prototype),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../range").Range,o=e("../lib/dom"),i=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var o=r.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),r.renderer){var i=this.$getTop(o.start.row,e),a=this.$padding+o.start.column*e.characterWidth;r.renderer(t,o,a,i,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,o,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,o,r.clazz,e):o.isMultiLine()?"text"==r.type?this.drawTextMarker(t,o,r.clazz,e):this.drawMultiLineMarker(t,o,r.clazz,e):this.drawSingleLineMarker(t,o,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.if?4:0)|(l==c?8:0)),o,l==c?0:1,i)},this.drawMultiLineMarker=function(e,t,n,r,o){var i=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),c=i+t.start.column*r.characterWidth;(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((l=t.clone()).end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,n+" ace_br1 ace_start",r,null,o)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+s+"px;left:"+c+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l;(l=t.clone()).start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,n+" ace_br12",r,null,o)}else{s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+u+"px;top:"+s+"px;left:"+i+"px;"+(o||""))}if(!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+a+"px;right:0;top:"+s+"px;left:"+i+"px;"+(o||""))}},this.drawSingleLineMarker=function(e,t,n,r,o,i){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,o,i);var a=r.lineHeight,s=(t.end.column+(o||0)-t.start.column)*r.characterWidth,c=this.$getTop(t.start.row,r),l=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+c+"px;left:"+l+"px;"+(i||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,o,i){var a=r.lineHeight,s=this.$getTop(t.start.row,r),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+e.width+(o||0)+"px;top:"+s+"px;left:"+(c+e.left)+"px;"+(i||""))}),this)},this.drawFullLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-i),this.elt(n,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(o||""))},this.drawScreenLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),a=r.lineHeight;this.elt(n,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(o||""))}}).call(i.prototype),t.Marker=i})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,c=function(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)};(function(){r.implement(this,s),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nu&&(s=c.end.row+1,u=(c=this.session.getNextFoldLine(s,c))?c.start.row:1/0),!(s>o);){var d=i[a++];if(d){this.dom.removeChildren(d),this.$renderLine(d,s,s==u&&c),l&&(d.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var f=e.lineHeight*this.session.getRowLength(s)+"px";d.style.height!=f&&(l=!0,d.style.height=f)}s++}if(l)for(;a0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var r=[],i=t,a=this.session.getNextFoldLine(i),s=a?a.start.row:1/0;i>s&&(i=a.end.row+1,s=(a=this.session.getNextFoldLine(i,a))?a.start.row:1/0),!(i>n);){var c=this.$lines.createCell(i,e,this.session),l=c.element;this.dom.removeChildren(l),o.setStyle(l.style,"height",this.$lines.computeLineHeight(i,e,this.session)+"px"),o.setStyle(l.style,"top",this.$lines.computeLineTop(i,e,this.session)+"px"),this.$renderLine(l,i,i==s&&a),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",r.push(c),i++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){for(var o,a=this,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,c=this.dom.createFragment(this.element),l=0;o=s.exec(r);){var u=o[1],d=o[2],f=o[3],h=o[4],p=o[5];if(a.showSpaces||!d){var m=l!=o.index?r.slice(l,o.index):"";if(l=o.index+o[0].length,m&&c.appendChild(this.dom.createTextNode(m,this.element)),u){var g=a.session.getScreenTabSize(t+o.index);c.appendChild(a.$tabStrings[g].cloneNode(!0)),t+=g-1}else if(d){if(a.showSpaces)(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",b.textContent=i.stringRepeat(a.SPACE_CHAR,d.length),c.appendChild(b);else c.appendChild(this.com.createTextNode(d,this.element))}else if(f){(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",b.textContent=i.stringRepeat(a.SPACE_CHAR,f.length),c.appendChild(b)}else if(h){t+=1,(b=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",b.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=a.showSpaces?a.SPACE_CHAR:h,c.appendChild(b)}else if(p){t+=1,(b=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",b.className="ace_cjk",b.textContent=p,c.appendChild(b)}}}if(c.appendChild(this.dom.createTextNode(l?r.slice(l):r,this.element)),this.$textToken[n.type])e.appendChild(c);else{var v="ace_"+n.type.replace(/\./g," ace_"),b=this.dom.createElement("span");"fold"==n.type&&(b.style.width=n.value.length*this.config.characterWidth+"px"),b.className=v,b.appendChild(c),e.appendChild(b)}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var o=(r-=r%this.tabSize)/this.tabSize,i=0;i=a;)s=this.$renderToken(c,s,u,d.substring(0,a-r)),d=d.substring(a-r),r=a,c=this.$createLineElement(),e.appendChild(c),c.appendChild(this.dom.createTextNode(i.stringRepeat("\xa0",n.indent),this.element)),s=0,a=n[++o]||Number.MAX_VALUE;0!=d.length&&(r+=d.length,s=this.$renderToken(c,s,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(c,s,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],o=r.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(n=this.$renderToken(e,n,r,o));for(var i=1;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,o);n=this.$renderToken(e,n,r,o)}},this.$renderOverflowMessage=function(e,t,n,r,o){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var i=this.dom.createElement("span");i.className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=o?"":"",e.appendChild(i)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var o=e;if(r.length){var i=this.session.getRowSplitData(t);if(i&&i.length){this.$renderWrappedLine(e,r,i);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,r)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(a)}},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var o=n.getTokens(e);return t.walk((function(e,t,i,a,s){null!=e?r.push({type:"fold",value:e}):(s&&(o=n.getTokens(t)),o.length&&function(e,t,n){for(var o=0,i=0;i+e[o].value.lengthn-t&&(a=a.substring(0,n-t)),r.push({type:e[o].type,value:a}),i=t+a.length,o+=1);in?r.push({type:e[o].type,value:a.substring(0,n-i)}):r.push(e[o]),i+=a.length,o+=1}}(o,a,i))}),t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(c.prototype),t.Text=c})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[o++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(r.setStyle(c,"display","block"),r.translate(s,a.left,a.top),r.setStyle(c,"width",Math.round(e.characterWidth)+"px"),r.setStyle(c,"height",e.lineHeight+"px")):r.setStyle(c,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=32768,c=function(e){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addListener(this.element,"scroll",this.onScroll.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)};(function(){r.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(c.prototype);var l=function(e,t){c.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=o.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(l,c),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>s?(this.coeff=s/e,e=s):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var u=function(e,t){c.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(u,c),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var r=e("./lib/event"),o=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(o.prototype),t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),c=e("../lib/event_emitter").EventEmitter,l=256,u="function"==typeof ResizeObserver,d=200,f=t.FontMetrics=function(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=i.stringRepeat("X",l),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){r.implement(this,c),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=i.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(d,0),e(0,d),e(d,d)],this.el)},this.transformCoordinates=function(e,t){e&&(e=i(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function i(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),c=a(this.els[1]),l=a(this.els[2]),u=a(this.els[3]),f=n(r(u,c),r(u,l),r(o(c,l),o(u,s))),h=i(1+f[0],r(c,s)),p=i(1+f[1],r(l,s));if(t){var m=t,g=f[0]*m[0]/d+f[1]*m[1]/d+1,v=o(i(m[0],h),i(m[1],p));return o(i(1/g/d,v),s)}var b=r(e,s),y=n(r(h,i(f[0],b)),r(p,i(f[1],b)),b);return i(d,y)}}).call(f.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./config"),a=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,c=e("./layer/text").Text,l=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,f=e("./renderloop").RenderLoop,h=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',g=e("./lib/useragent"),v=g.isIE;o.importCssString(m,"ace_editor.css",!1);var b=function(e,t){var n=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==i.get("useStrictCSP")&&i.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new s(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),i.resetOptions(this),i._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;r||(r=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var i=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(i|this.$changes,!0):this.$loop.schedule(i|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(r&&(e||a.height!=r)&&(a.height=r,i|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){i|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var c=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",c),o.setStyle(this.scroller.style,"right",c),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)}return a.$dirty=!n||!r,i&&this._signal("resize",s),i},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,i=n.top,a=n.left;i-=r.offset;var s=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(i<0||i>r.height-s)o.translate(this.textarea,0,0);else{var c=1,l=this.$size.height-s;if(t)if(t.useTextareaForIME){var u=this.textarea.value;c=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else i+=this.lineHeight+2;else i+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-c&&(a=this.$size.scrollerWidth-c),a+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",s+"px"),o.setStyle(e,"width",c+"px"),o.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-c),Math.min(i,l))}}}else o.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},this.setMargin=function(e,t,n,r){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var i=n.width+2*this.$padding+"px",a=n.minHeight+"px";o.setStyle(this.content.style,"width",i),o.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),i=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==i;a&&(this.$horizScroll=i,this.scrollBarH.setVisible(i));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=t.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=l;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+l<0||this.scrollTop>u.top),f=s!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var h,p,m=this.scrollTop%this.lineHeight,g=Math.ceil(c/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=v+g,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var _=e.getFoldLine(v);_&&(v=_.start.row),h=e.documentToScreenRow(v,0),p=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(b)*y+p,m=this.scrollTop-h*y;var w=0;return(this.layerConfig.width!=o||a)&&(w=this.CHANGE_H_SCROLL),(a||f)&&(w|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:h,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),w},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),o=r.left,i=r.top,a=n&&n.top||0,s=n&&n.bottom||0,c=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;c+a>i?(t&&c+a>i+this.lineHeight&&(i-=t*this.$size.scrollerHeight),0===i&&(i=-this.scrollMargin.top),this.session.setScrollTop(i)):c+this.$size.scrollerHeight-so?(o=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(i):Math.round(i);return{row:a,column:s,side:i-s>0?1:-1,offsetX:o}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,a=this.$blockCursor?Math.floor(i):Math.round(i),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),o)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),i=r.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+i-this.scrollTop}},this.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,r){var o=this.session;o.bgTokenizer.lines[n]=null;var i={type:t,value:e},a=o.getTokens(n);if(null==r)a.push(i);else for(var s=0,c=0;c50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);t.UIWorkerClient=function(e,t,n){var r=null,o=!1,s=Object.create(i),l=[],u=new c({messageBuffer:l,terminate:function(){},postMessage:function(e){l.push(e),r&&(o?setTimeout(d):d())}});u.setEmitSync=function(e){o=e};var d=function(){var e=l.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){u.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(r=new e[n](s);l.length;)d()})),u},t.WorkerClient=c,t.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),a=function(e,t,n,r,o,i){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){i.implement(this,o),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new r(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,i=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(c=this.others[a]).row,column:c.column+i};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var c;s={row:(c=this.others[a]).row,column:c.column+i};this.doc.remove(new r(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var r=e("./range_list").RangeList,o=e("./range").Range,i=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),c=e("./lib/lang"),l=e("./commands/multi_select_commands");t.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=new(0,e("./search").Search);var d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],i=e.column0;)b--;if(b>0)for(var y=0;r[y].isEmpty();)y++;for(var _=b;_>=y;_--)r[_].isEmpty()&&r.splice(_,1)}return r}}.call(i.prototype);var f=e("./editor").Editor;function h(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(l.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}s.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),s.addListener(t,"keyup",r,e),s.addListener(t,"blur",r,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var o=t.indexOf(r);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,o=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,c=this.selection,l=c.rangeList,u=(o?c:l).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=c._eventRegistry;c._eventRegistry={};var f=new i(s);this.inVirtualSelectionMode=!0;for(var h=u.length;h--;){if(a)for(;h>0&&u[h].start.row==u[h-1].end.row;)h--;f.fromOrientedRange(u[h]),f.index=h,this.selection=s.selection=f;var p=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===p||(r=p),f.toOrientedRange(u[h])}f.detach(),this.selection=s.selection=c,this.inVirtualSelectionMode=!1,c._eventRegistry=d,c.mergeOverlappingRanges(),c.ranges[0]&&c.fromOrientedRange(c.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ra&&(a=n.column),ru?e.insert(r,c.stringRepeat(" ",i-u)):e.remove(new o(r.row,r.column,r.row,r.column-i+u)),t.start.column=t.end.column=a,t.start.row=t.end.row=r.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,f=u.end.row,h=d==f;if(h){var p,m=this.session.getLength();do{p=this.session.getLine(f)}while(/[=:]/.test(p)&&++f0);d<0&&(d=0),f>=m&&(f=m-1)}var g=this.session.removeFullLines(d,f);g=this.$reAlignText(g,h),this.session.insert({row:d,column:0},g.join("\n")+"\n"),h||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,o,i=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,o=t[3].length,t):(n+r+o!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(i=!1),n>t[1].length&&(n=t[1].length),rt[3].length&&(o=t[3].length),t):[e]})).map(t?l:i?a?function(e){return e[2]?s(n+r-e[2].length)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:l:function(e){return e[2]?s(n)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return c.stringRepeat(" ",e)}function l(e){return e[2]?s(n)+e[2]+s(r-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(f.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=h,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(e){h(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,i=e.getLine(t),a=i.search(o);if(-1!=a){for(var s=n||i.length,c=e.getLength(),l=t,u=t;++tl){var h=e.getLine(u).length;return new r(l,s,u,h)}}},this.openingBracketBlock=function(e,t,n,o,i){var a={row:n,column:o+1},s=e.$findClosingBracket(t,a,i);if(s){var c=e.foldWidgets[s.row];return null==c&&(c=e.getFoldWidget(s.row)),"start"==c&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,o,i){var a={row:n,column:o},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(o.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./lib/dom");function o(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,o=r.start.row,i=r.end.row,a="add"==e.action,s=o+1;st[n].column&&n++,i.unshift(n,0),t.splice.apply(t,i),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var o=1/0,i=0;i0&&!r[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=o;a<=i;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var c=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(c+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=c-n.offset+"px";var l=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(l-=t.scrollLeft),s.el.style.left=l+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(o.prototype),t.LineWidgets=o})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,o=e("../lib/dom"),i=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,c=n.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];c?c.destroy():s-=t;var l,u=function(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(r.length){var o=function(e,t,n){for(var r=0,o=e.length-1;r<=o;){var i=r+o>>1,a=n(t,e[i]);if(a>0)r=i+1;else{if(!(a<0))return i;o=i-1}}return-(r+1)}(r,{row:t,column:-1},i.comparePoints);o<0&&(o=-o-1),o>=r.length?o=n>0?0:r.length-1:0===o&&n<0&&(o=r.length-1);var a=r[o];if(a&&n){if(a.row===t){do{a=r[o+=n]}while(a&&a.row===t);if(!a)return r.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=r[o+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,l=e.renderer.$gutterLayer.$annotations[a.row]}else{if(c)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var f={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},h=f.el.appendChild(o.createElement("div")),p=f.el.appendChild(o.createElement("div"));p.className="error_widget_arrow "+l.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;p.style.left=m+e.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",h.className="error_widget "+l.className,h.innerHTML=l.text.join("
"),h.appendChild(o.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(f),e.off("changeSelection",f.destroy),e.off("changeSession",f.destroy),e.off("mouseup",f.destroy),e.off("change",f.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",f.destroy),e.on("changeSession",f.destroy),e.on("mouseup",f.destroy),e.on("change",f.destroy),e.session.widgetManager.addLineWidget(f),f.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},o.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),i=e("./lib/event"),a=e("./range").Range,s=e("./editor").Editor,c=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n(309),t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var c=e;a=c.value,e=o.createElement("pre"),c.parentNode.replaceChild(e,c)}else e&&(a=e.textContent,e.innerHTML="");var l=t.createEditSession(a),d=new s(new u(e),l,n),f={document:l,editor:d,onResize:d.resize.bind(d,null)};return c&&(f.textarea=c),i.addListener(window,"resize",f.onResize),d.on("destroy",(function(){i.removeListener(window,"resize",f.onResize),f.editor.container.env=null})),d.container.env=d.env=f,d},t.createEditSession=function(e,t){var n=new c(e,t);return n.setUndoManager(new l),n},t.Range=a,t.Editor=s,t.EditSession=c,t.UndoManager=l,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}).call(this,n(213)(e))},function(e,t,n){"use strict";var r=n(1),o=n(434),i=n(54);t.a=function(e){var t=Object(o.a)(e);return function(e,n){return t(e,Object(r.a)({defaultTheme:i.a},n))}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=n.n(r).a.createContext(null);t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n(62);function i(e){return e&&"object"===Object(o.a)(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},o=n.clone?Object(r.a)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e?o[r]=a(e[r],t[r],n):o[r]=t[r])})),o}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(430);function o(e){return Object(r.a)(e)}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r="";function o(e){try{return e&&"function"===typeof e&&e.name||r}catch(t){return r}}},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=n(19);t.a=Object(o.a)(r.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(8),c=i.forwardRef((function(e,t){var n=e.classes,c=e.className,l=e.disabled,u=e.IconComponent,d=e.inputRef,f=e.variant,h=void 0===f?"standard":f,p=Object(o.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return i.createElement(i.Fragment,null,i.createElement("select",Object(r.a)({className:Object(a.a)(n.root,n.select,n[h],c,l&&n.disabled),disabled:l,ref:d||t},p)),e.multiple?null:i.createElement(u,{className:Object(a.a)(n.icon,n["icon".concat(Object(s.a)(h))],l&&n.disabled)}))}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=r.createContext();t.a=o},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(15),s=(n(4),n(137)),c=n(432),l=n(20),u=n(435),d=n(39),f=n(14),h=n(18),p=n(164),m=n(130),g=n(458),v={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},b=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,c=Object(r.a)(e,["invisible","open"]);return s?i.createElement("div",Object(o.a)({"aria-hidden":!0,ref:t},c,{style:Object(o.a)({},v.root,a?v.invisible:{},c.style)})):null}));var y=new m.b,_=i.forwardRef((function(e,t){var n=Object(s.a)(),v=Object(c.a)({name:"MuiModal",props:Object(o.a)({},e),theme:n}),_=v.BackdropComponent,w=void 0===_?b:_,S=v.BackdropProps,k=v.children,x=v.closeAfterTransition,O=void 0!==x&&x,C=v.container,E=v.disableAutoFocus,j=void 0!==E&&E,R=v.disableBackdropClick,T=void 0!==R&&R,A=v.disableEnforceFocus,L=void 0!==A&&A,M=v.disableEscapeKeyDown,$=void 0!==M&&M,D=v.disablePortal,N=void 0!==D&&D,P=v.disableRestoreFocus,I=void 0!==P&&P,F=v.disableScrollLock,z=void 0!==F&&F,W=v.hideBackdrop,B=void 0!==W&&W,H=v.keepMounted,U=void 0!==H&&H,V=v.manager,G=void 0===V?y:V,K=v.onBackdropClick,q=v.onClose,Y=v.onEscapeKeyDown,J=v.onRendered,X=v.open,Q=Object(r.a)(v,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Z=i.useState(!0),ee=Z[0],te=Z[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=Object(f.a)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(v),se=function(){return Object(l.a)(re.current)},ce=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},le=function(){G.mount(ce(),{disableScrollLock:z}),oe.current.scrollTop=0},ue=Object(h.a)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(C)||se().body;G.add(ce(),e),oe.current&&le()})),de=i.useCallback((function(){return G.isTopModal(ce())}),[G]),fe=Object(h.a)((function(e){re.current=e,e&&(J&&J(),X&&de()?le():Object(m.a)(oe.current,!0))})),he=i.useCallback((function(){G.remove(ce())}),[G]);if(i.useEffect((function(){return function(){he()}}),[he]),i.useEffect((function(){X?ue():ae&&O||he()}),[X,he,ae,O,ue]),!U&&!X&&(!ae||ee))return null;var pe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:p.a}),me={};return void 0===k.props.tabIndex&&(me.tabIndex=k.props.tabIndex||"-1"),ae&&(me.onEnter=Object(d.a)((function(){te(!1)}),k.props.onEnter),me.onExited=Object(d.a)((function(){te(!0),O&&he()}),k.props.onExited)),i.createElement(u.a,{ref:fe,container:C,disablePortal:N},i.createElement("div",Object(o.a)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&de()&&(Y&&Y(e),$||(e.stopPropagation(),q&&q(e,"escapeKeyDown")))},role:"presentation"},Q,{style:Object(o.a)({},pe.root,!X&&ee?pe.hidden:{},Q.style)}),B?null:i.createElement(w,Object(o.a)({open:X,onClick:function(e){e.target===e.currentTarget&&(K&&K(e),!T&&q&&q(e,"backdropClick"))}},S)),i.createElement(g.a,{disableEnforceFocus:L,disableAutoFocus:j,disableRestoreFocus:I,getDoc:se,isEnabled:de,open:X},i.cloneElement(k,me))))}));t.a=_},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(2)),s=n(5),c=i.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.component,l=void 0===c?"div":c,u=e.square,d=void 0!==u&&u,f=e.elevation,h=void 0===f?1:f,p=e.variant,m=void 0===p?"elevation":p,g=Object(r.a)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(l,Object(o.a)({className:Object(a.a)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(h)],!d&&n.rounded),ref:t},g))}));t.a=Object(s.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(o.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=n(8),l={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=i.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,f=e.color,h=void 0===f?"initial":f,p=e.component,m=e.display,g=void 0===m?"initial":m,v=e.gutterBottom,b=void 0!==v&&v,y=e.noWrap,_=void 0!==y&&y,w=e.paragraph,S=void 0!==w&&w,k=e.variant,x=void 0===k?"body1":k,O=e.variantMapping,C=void 0===O?l:O,E=Object(o.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),j=p||(S?"p":C[x]||l[x])||"span";return i.createElement(j,Object(r.a)({className:Object(a.a)(u.root,d,"inherit"!==x&&u[x],"initial"!==h&&u["color".concat(Object(c.a)(h))],_&&u.noWrap,b&&u.gutterBottom,S&&u.paragraph,"inherit"!==s&&u["align".concat(Object(c.a)(s))],"initial"!==g&&u["display".concat(Object(c.a)(g))]),ref:t},E))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},function(e,t,n){"use strict";var r=n(67),o=n(77),i=(n(4),n(0)),a=n.n(i),s=n(15),c=n.n(s),l=!1,u=n(105),d="unmounted",f="exited",h="entering",p="entered",m="exiting",g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=f,r.appearStatus=h):o=p:o=t.unmountOnExit||t.mountOnEnter?d:f,r.state={status:o},r.nextCallback=null,r}Object(o.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===d?{status:f}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==p&&(t=h):n!==h&&n!==p||(t=m)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===h?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===f&&this.setState({status:d})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[c.a.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||l?this.safeSetState({status:p},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:h},(function(){t.props.onEntering(i,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:p},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:c.a.findDOMNode(this);t&&!l?(this.props.onExit(r),this.safeSetState({status:m},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:f},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:f},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:c.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===d)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(u.a.Provider,{value:null},"function"===typeof n?n(e,o):a.a.cloneElement(a.a.Children.only(n),o))},t}(a.a.Component);function v(){}g.contextType=u.a,g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v,onEntering:v,onEntered:v,onExit:v,onExiting:v,onExited:v},g.UNMOUNTED=d,g.EXITED=f,g.ENTERING=h,g.ENTERED=p,g.EXITING=m;t.a=g},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),l=1;l1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";var r=n(9),o=n(27),i=Object(r.a)({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),a=Object(r.a)({prop:"display"}),s=Object(r.a)({prop:"overflow"}),c=Object(r.a)({prop:"textOverflow"}),l=Object(r.a)({prop:"visibility"}),u=Object(r.a)({prop:"whiteSpace"});t.a=Object(o.a)(i,a,s,c,l,u)},function(e,t,n){"use strict";var r=n(9),o=Object(r.a)({prop:"boxShadow",themeKey:"shadows"});t.a=o},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=n(10),l=n(107),u=n(8),d=i.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,c=e.children,d=e.classes,f=e.className,h=e.color,p=void 0===h?"default":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.size,_=void 0===y?"medium":y,w=Object(o.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(l.a,Object(r.a)({className:Object(a.a)(d.root,f,"default"!==p&&d["color".concat(Object(u.a)(p))],g&&d.disabled,"small"===_&&d["size".concat(Object(u.a)(_))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!b,disabled:g,ref:t},w),i.createElement("span",{className:d.label},c))}));t.a=Object(s.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(c.a)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=n(48),i=(r=n(293))&&r.__esModule?r:{default:r};var a=11/23/100;function s(e){var t={r:0,g:0,b:0};if(7===e.length)t.r=parseInt(e.substr(1,2),16),t.g=parseInt(e.substr(3,2),16),t.b=parseInt(e.substr(5,2),16);else if(4===e.length){var n=e.substr(1,1),r=e.substr(2,1),o=e.substr(3,1);t.r=parseInt(n+n,16),t.g=parseInt(r+r,16),t.b=parseInt(o+o,16)}return t}function c(e,t,n){var r,o=s(e),i=s(t);return o.r+=i.r*(.05+a*(n-1)),o.g+=i.g*(.05+a*(n-1)),o.b+=i.b*(.05+a*(n-1)),r=o,"#"+Math.round(r.r).toString(16)+Math.round(r.g).toString(16)+Math.round(r.b).toString(16)}function l(e,t){for(var n={},r=1;r<=24;r++)n["elevation"+r]={backgroundColor:c(e,t,r)};return n}var u=function(e){var t;return(t="dark"===e?{name:e,palette:{type:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[200],"&:hover":{color:i.default[100]}}},MuiPaper:l("#121212","#fff")}}:"blue"===e?{name:e,palette:{type:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[200],"&:hover":{color:i.default[100]}}},MuiPaper:l("#151d21","#fff")}}:"colored"===e?{name:e,palette:{type:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:"PT"===e?{name:e,palette:{type:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:"DX"===e?{name:e,palette:{type:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:{name:e,palette:{type:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#14bb00"},overrides:{MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}).toolbar={height:48},t.saveToolbar={background:t.palette.primary.main,button:{borderRadius:3,height:32}},(0,o.createTheme)(t)};t.default=u},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),i=s(n(4)),a=s(n(209));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n ".length,c=void 0;n&&o++<5&&!("html"===(c=a(n,t))||o>1&&i+r.length*s+c.length>=80);)r.push(c),i+=c.length,n=n.parentNode;return r.reverse().join(" > ")}catch(l){return""}}function a(e,t){var n,r,i,a,s,c,l,u=e,d=[];if(!u||!u.tagName)return"";d.push(u.tagName.toLowerCase());var f=(null===(n=t)||void 0===n?void 0:n.length)?t.filter((function(e){return u.getAttribute(e)})).map((function(e){return[e,u.getAttribute(e)]})):null;if(null===(r=f)||void 0===r?void 0:r.length)f.forEach((function(e){d.push("["+e[0]+'="'+e[1]+'"]')}));else if(u.id&&d.push("#"+u.id),(i=u.className)&&Object(o.k)(i))for(a=i.split(/\s+/),l=0;l1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,s=t.Component,c=t.defaultTheme,l=void 0===c?g:c,f=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),p=m(e),S=n||i||"makeStyles";p.options={index:h(),name:n,meta:S,classNamePrefix:S};var k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(u.a)()||l,r=Object(o.a)({},a.a.useContext(d.a),f),i=a.a.useRef(),c=a.a.useRef();w((function(){var o={name:n,state:{},stylesCreator:p,stylesOptions:r,theme:t};return b(o,e),c.current=!1,i.current=o,function(){_(o)}}),[t,p]),a.a.useEffect((function(){c.current&&y(i.current,e),c.current=!0}));var h=v(i.current,e.classes,s);return h};return k}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};t.default=r},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(2)),s=n(5),c=n(10),l=n(107),u=n(8),d=i.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,d=e.color,f=void 0===d?"default":d,h=e.component,p=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,v=e.disableElevation,b=void 0!==v&&v,y=e.disableFocusRipple,_=void 0!==y&&y,w=e.endIcon,S=e.focusVisibleClassName,k=e.fullWidth,x=void 0!==k&&k,O=e.size,C=void 0===O?"medium":O,E=e.startIcon,j=e.type,R=void 0===j?"button":j,T=e.variant,A=void 0===T?"text":T,L=Object(r.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),M=E&&i.createElement("span",{className:Object(a.a)(s.startIcon,s["iconSize".concat(Object(u.a)(C))])},E),$=w&&i.createElement("span",{className:Object(a.a)(s.endIcon,s["iconSize".concat(Object(u.a)(C))])},w);return i.createElement(l.a,Object(o.a)({className:Object(a.a)(s.root,s[A],c,"inherit"===f?s.colorInherit:"default"!==f&&s["".concat(A).concat(Object(u.a)(f))],"medium"!==C&&[s["".concat(A,"Size").concat(Object(u.a)(C))],s["size".concat(Object(u.a)(C))]],b&&s.disableElevation,g&&s.disabled,x&&s.fullWidth),component:p,disabled:g,focusRipple:!_,focusVisibleClassName:Object(a.a)(s.focusVisible,S),ref:t,type:R},L),i.createElement("span",{className:s.label},M,n,$))}));t.a=Object(s.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(c.a)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(c.a)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(c.a)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(12),a=n(0),s=(n(4),n(2)),c=n(5),l=n(8),u=n(172),d=n(436),f=n(340),h=n(21),p=n(173),m={enter:h.b.enteringScreen,exit:h.b.leavingScreen},g=a.forwardRef((function(e,t){var n=e.BackdropProps,i=e.children,c=e.classes,h=e.className,g=e.disableBackdropClick,v=void 0!==g&&g,b=e.disableEscapeKeyDown,y=void 0!==b&&b,_=e.fullScreen,w=void 0!==_&&_,S=e.fullWidth,k=void 0!==S&&S,x=e.maxWidth,O=void 0===x?"sm":x,C=e.onBackdropClick,E=e.onClose,j=e.onEnter,R=e.onEntered,T=e.onEntering,A=e.onEscapeKeyDown,L=e.onExit,M=e.onExited,$=e.onExiting,D=e.open,N=e.PaperComponent,P=void 0===N?p.a:N,I=e.PaperProps,F=void 0===I?{}:I,z=e.scroll,W=void 0===z?"paper":z,B=e.TransitionComponent,H=void 0===B?f.a:B,U=e.transitionDuration,V=void 0===U?m:U,G=e.TransitionProps,K=e["aria-describedby"],q=e["aria-labelledby"],Y=Object(o.a)(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),J=a.useRef();return a.createElement(u.a,Object(r.a)({className:Object(s.a)(c.root,h),BackdropComponent:d.a,BackdropProps:Object(r.a)({transitionDuration:V},n),closeAfterTransition:!0},v?{disableBackdropClick:v}:{},{disableEscapeKeyDown:y,onEscapeKeyDown:A,onClose:E,open:D,ref:t},Y),a.createElement(H,Object(r.a)({appear:!0,in:D,timeout:V,onEnter:j,onEntering:T,onEntered:R,onExit:L,onExiting:$,onExited:M,role:"none presentation"},G),a.createElement("div",{className:Object(s.a)(c.container,c["scroll".concat(Object(l.a)(W))]),onMouseUp:function(e){e.target===e.currentTarget&&e.target===J.current&&(J.current=null,C&&C(e),!v&&E&&E(e,"backdropClick"))},onMouseDown:function(e){J.current=e.target}},a.createElement(P,Object(r.a)({elevation:24,role:"dialog","aria-describedby":K,"aria-labelledby":q},F,{className:Object(s.a)(c.paper,c["paperScroll".concat(Object(l.a)(W))],c["paperWidth".concat(Object(l.a)(String(O)))],F.className,w&&c.paperFullScreen,k&&c.paperFullWidth)}),i))))}));t.a=Object(c.a)((function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}}),{name:"MuiDialog"})(g)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=i.forwardRef((function(e,t){var n=e.disableSpacing,s=void 0!==n&&n,c=e.classes,l=e.className,u=Object(o.a)(e,["disableSpacing","classes","className"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(c.root,l,!s&&c.spacing),ref:t},u))}));t.a=Object(s.a)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=i.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.dividers,l=void 0!==c&&c,u=Object(o.a)(e,["classes","className","dividers"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(n.root,s,l&&n.dividers),ref:t},u))}));t.a=Object(s.a)((function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}}),{name:"MuiDialogContent"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(0),i=(n(4),n(5)),a=n(174),s=o.forwardRef((function(e,t){return o.createElement(a.a,Object(r.a)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));t.a=Object(i.a)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(s)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=n(174),l=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.disableTypography,d=void 0!==u&&u,f=Object(o.a)(e,["children","classes","className","disableTypography"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(s.root,l),ref:t},f),d?n:i.createElement(c.a,{component:"h2",variant:"h6"},n))}));t.a=Object(s.a)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(l)},function(e,t,n){"use strict";var r=n(3),o=n(12),i=n(1),a=n(0),s=(n(4),n(2)),c=n(5),l=n(21),u=n(339),d=n(18),f=n(8),h=n(39),p=n(226),m=n(437),g=a.forwardRef((function(e,t){var n=e.action,o=e.anchorOrigin,c=(o=void 0===o?{vertical:"bottom",horizontal:"center"}:o).vertical,g=o.horizontal,v=e.autoHideDuration,b=void 0===v?null:v,y=e.children,_=e.classes,w=e.className,S=e.ClickAwayListenerProps,k=e.ContentProps,x=e.disableWindowBlurListener,O=void 0!==x&&x,C=e.message,E=e.onClose,j=e.onEnter,R=e.onEntered,T=e.onEntering,A=e.onExit,L=e.onExited,M=e.onExiting,$=e.onMouseEnter,D=e.onMouseLeave,N=e.open,P=e.resumeHideDuration,I=e.TransitionComponent,F=void 0===I?p.a:I,z=e.transitionDuration,W=void 0===z?{enter:l.b.enteringScreen,exit:l.b.leavingScreen}:z,B=e.TransitionProps,H=Object(r.a)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),U=a.useRef(),V=a.useState(!0),G=V[0],K=V[1],q=Object(d.a)((function(){E&&E.apply(void 0,arguments)})),Y=Object(d.a)((function(e){E&&null!=e&&(clearTimeout(U.current),U.current=setTimeout((function(){q(null,"timeout")}),e))}));a.useEffect((function(){return N&&Y(b),function(){clearTimeout(U.current)}}),[N,b,Y]);var J=function(){clearTimeout(U.current)},X=a.useCallback((function(){null!=b&&Y(null!=P?P:.5*b)}),[b,P,Y]);return a.useEffect((function(){if(!O&&N)return window.addEventListener("focus",X),window.addEventListener("blur",J),function(){window.removeEventListener("focus",X),window.removeEventListener("blur",J)}}),[O,X,N]),!N&&G?null:a.createElement(u.a,Object(i.a)({onClickAway:function(e){E&&E(e,"clickaway")}},S),a.createElement("div",Object(i.a)({className:Object(s.a)(_.root,_["anchorOrigin".concat(Object(f.a)(c)).concat(Object(f.a)(g))],w),onMouseEnter:function(e){$&&$(e),J()},onMouseLeave:function(e){D&&D(e),X()},ref:t},H),a.createElement(F,Object(i.a)({appear:!0,in:N,onEnter:Object(h.a)((function(){K(!1)}),j),onEntered:R,onEntering:T,onExit:A,onExited:Object(h.a)((function(){K(!0)}),L),onExiting:M,timeout:W,direction:"top"===c?"down":"up"},B),y||a.createElement(m.a,Object(i.a)({message:C,action:n},k)))))}));t.a=Object(c.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},a={justifyContent:"flex-start"},s={top:24},c={bottom:24},l={right:24},u={left:24},d={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Object(i.a)({},t,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({},s,d))),anchorOriginBottomCenter:Object(i.a)({},n,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({},c,d))),anchorOriginTopRight:Object(i.a)({},t,r,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({left:"auto"},s,l))),anchorOriginBottomRight:Object(i.a)({},n,r,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({left:"auto"},c,l))),anchorOriginTopLeft:Object(i.a)({},t,a,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({right:"auto"},s,u))),anchorOriginBottomLeft:Object(i.a)({},n,a,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({right:"auto"},c,u)))}}),{flip:!1,name:"MuiSnackbar"})(g)},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.default=a},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(2)),s=n(5),c=n(107),l=n(8),u=i.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,d=e.color,f=void 0===d?"default":d,h=e.component,p=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.focusVisibleClassName,_=e.size,w=void 0===_?"large":_,S=e.variant,k=void 0===S?"circular":S,x=Object(r.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return i.createElement(c.a,Object(o.a)({className:Object(a.a)(s.root,u,"large"!==w&&s["size".concat(Object(l.a)(w))],g&&s.disabled,"extended"===k&&s.extended,{primary:s.primary,secondary:s.secondary,inherit:s.colorInherit}[f]),component:p,disabled:g,focusRipple:!b,focusVisibleClassName:Object(a.a)(s.focusVisible,y),ref:t},x),i.createElement("span",{className:s.label},n))}));t.a=Object(s.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(u)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(12),a=n(0),s=(n(4),n(2)),c=n(5),l=a.forwardRef((function(e,t){var n=e.classes,i=e.className,c=e.component,l=void 0===c?"div":c,u=e.disableGutters,d=void 0!==u&&u,f=e.variant,h=void 0===f?"regular":f,p=Object(o.a)(e,["classes","className","component","disableGutters","variant"]);return a.createElement(l,Object(r.a)({className:Object(s.a)(n.root,n[h],i,!d&&n.gutters),ref:t},p))}));t.a=Object(c.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(i.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(l)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getSelectIdIcon=function(e,t){t=t||".";var n="",r=null===e||void 0===e?void 0:e.common;if(r){var o=r.icon;if(o)if(o.startsWith("data:image/"))n=o;else{if(!o.includes("."))return null;var i;"instance"===e.type||"adapter"===e.type?n=t+"/adapter/"+r.name+"/"+o:e._id&&e._id.startsWith("system.adapter.")?(i=e._id.split(".",3),"/"===o[0]?i[2]+=o:i[2]+="/"+o,n=t+"/adapter/"+i[2]):(i=e._id.split(".",2),"/"===o[0]?i[0]+=o:i[0]+="/"+o,n=t+"/adapter/"+i[0])}}return n||null},t.getSystemIcon=function(e){var t,n=null===e||void 0===e?void 0:e._id;if(!n)return null;n.startsWith("_design/")||"system"===n?t=o.default.createElement(s.default,{className:"iconOwn"}):"0_userdata"===n||"0_userdata.0"===n?t=o.default.createElement(c.default,{className:"iconOwn"}):"alias"===n||"alias.0"===n?t=o.default.createElement(m.default,{className:"iconOwn"}):"system.adapter"===n?t=o.default.createElement(s.default,{className:"iconOwn"}):"system.group"===n?t=o.default.createElement(l.default,{className:"iconOwn"}):"system.user"===n?t=o.default.createElement(u.default,{className:"iconOwn"}):"system.host"===n?t=o.default.createElement(d.default,{className:"iconOwn"}):n.endsWith(".connection")||n.endsWith(".connected")?t=o.default.createElement(f.default,{className:"iconOwn"}):n.endsWith(".info")?t=o.default.createElement(h.default,{className:"iconOwn"}):"meta"===(null===e||void 0===e?void 0:e.type)&&(t=o.default.createElement(p.default,{className:"iconOwn"}));return t||null};var o=v(n(0)),i=v(n(4)),a=v(n(428)),s=v(n(396)),c=v(n(397)),l=v(n(398)),u=v(n(399)),d=v(n(400)),f=v(n(401)),h=v(n(402)),p=v(n(403)),m=v(n(404)),g=v(n(61));function v(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;){var a=o(t),s=a.cell,c=a.lineIsOver;i.push(s),c&&(n.push(i),i=[])}return n}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){(function(e,n){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",c="[object Date]",l="[object Error]",u="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",S=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[i]=x[a]=x[_]=x[s]=x[w]=x[c]=x[l]=x[u]=x[d]=x[f]=x[h]=x[m]=x[g]=x[v]=x[y]=!1;var O="object"==typeof e&&e&&e.Object===Object&&e,C="object"==typeof self&&self&&self.Object===Object&&self,E=O||C||Function("return this")(),j=t&&!t.nodeType&&t,R=j&&"object"==typeof n&&n&&!n.nodeType&&n,T=R&&R.exports===j,A=T&&O.process,L=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),M=L&&L.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++ns))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var u=-1,d=!0,f=2&n?new ye:void 0;for(i.set(e,t),i.set(t,e);++u-1},ve.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||ve),string:new ge}},be.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return Te(this,e).get(e)},be.prototype.has=function(e){return Te(this,e).has(e)},be.prototype.set=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,r),this},ye.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new ve,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new be(r)}return n.set(e,t),this.size=n.size,this};var Le=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}function Be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var Ue=M?function(e){return function(t){return e(t)}}(M):function(e){return He(e)&&We(e.length)&&!!x[ke(e)]};function Ve(e){return null!=(t=e)&&We(t.length)&&!ze(t)?we(e):Ee(e);var t}n.exports=function(e,t){return Oe(e,t)}}).call(this,n(69),n(213)(e))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0;t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var t;return"undefined"===typeof window?(e.window={},t=n(156),delete e.window):window.ace?(t=window.ace).acequire=window.ace.require||window.ace.acequire:t=n(156),t};t.debounce=function(e,t){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,o)}),t)}}}).call(this,n(69))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&e.handleMarkers(w,t);for(r=0;r=200&&t<300?e.Success:429===t?e.RateLimit:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}}(a||(a={}));var l,u=n(25),d=n(454);!function(e){e.PENDING="PENDING",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(l||(l={}));var f,h,p=function(){function e(e){var t=this;this._state=l.PENDING,this._handlers=[],this._resolve=function(e){t._setResult(l.RESOLVED,e)},this._reject=function(e){t._setResult(l.REJECTED,e)},this._setResult=function(e,n){t._state===l.PENDING&&(Object(u.m)(n)?n.then(t._resolve,t._reject):(t._state=e,t._value=n,t._executeHandlers()))},this._attachHandler=function(e){t._handlers=t._handlers.concat(e),t._executeHandlers()},this._executeHandlers=function(){if(t._state!==l.PENDING){var e=t._handlers.slice();t._handlers=[],e.forEach((function(e){e.done||(t._state===l.RESOLVED&&e.onfulfilled&&e.onfulfilled(t._value),t._state===l.REJECTED&&e.onrejected&&e.onrejected(t._value),e.done=!0)}))}};try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}return e.resolve=function(t){return new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(n,r){if(Array.isArray(t))if(0!==t.length){var o=t.length,i=[];t.forEach((function(t,a){e.resolve(t).then((function(e){i[a]=e,0===(o-=1)&&n(i)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},e.prototype.then=function(t,n){var r=this;return new e((function(e,o){r._attachHandler({done:!1,onfulfilled:function(n){if(t)try{return void e(t(n))}catch(r){return void o(r)}else e(n)},onrejected:function(t){if(n)try{return void e(n(t))}catch(r){return void o(r)}else o(t)}})}))},e.prototype.catch=function(e){return this.then((function(e){return e}),e)},e.prototype.finally=function(t){var n=this;return new e((function(e,r){var o,i;return n.then((function(e){i=!1,o=e,t&&t()}),(function(e){i=!0,o=e,t&&t()})).then((function(){i?r(o):e(o)}))}))},e.prototype.toString=function(){return"[object SyncPromise]"},e}(),m=n(31),g=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return e.clone=function(t){var n=new e;return t&&(n._breadcrumbs=Object(s.g)(t._breadcrumbs),n._tags=Object(s.a)({},t._tags),n._extra=Object(s.a)({},t._extra),n._contexts=Object(s.a)({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=Object(s.g)(t._eventProcessors),n._requestSession=t._requestSession),n},e.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},e.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},e.prototype.setUser=function(e){return this._user=e||{},this._session&&this._session.update({user:e}),this._notifyScopeListeners(),this},e.prototype.getUser=function(){return this._user},e.prototype.getRequestSession=function(){return this._requestSession},e.prototype.setRequestSession=function(e){return this._requestSession=e,this},e.prototype.setTags=function(e){return this._tags=Object(s.a)(Object(s.a)({},this._tags),e),this._notifyScopeListeners(),this},e.prototype.setTag=function(e,t){var n;return this._tags=Object(s.a)(Object(s.a)({},this._tags),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(e){return this._extra=Object(s.a)(Object(s.a)({},this._extra),e),this._notifyScopeListeners(),this},e.prototype.setExtra=function(e,t){var n;return this._extra=Object(s.a)(Object(s.a)({},this._extra),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(e){return this._fingerprint=e,this._notifyScopeListeners(),this},e.prototype.setLevel=function(e){return this._level=e,this._notifyScopeListeners(),this},e.prototype.setTransactionName=function(e){return this._transactionName=e,this._notifyScopeListeners(),this},e.prototype.setTransaction=function(e){return this.setTransactionName(e)},e.prototype.setContext=function(e,t){var n;return null===t?delete this._contexts[e]:this._contexts=Object(s.a)(Object(s.a)({},this._contexts),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},e.prototype.getSpan=function(){return this._span},e.prototype.getTransaction=function(){var e,t,n,r,o=this.getSpan();return(null===(e=o)||void 0===e?void 0:e.transaction)?null===(t=o)||void 0===t?void 0:t.transaction:(null===(r=null===(n=o)||void 0===n?void 0:n.spanRecorder)||void 0===r?void 0:r.spans[0])?o.spanRecorder.spans[0]:void 0},e.prototype.setSession=function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this},e.prototype.getSession=function(){return this._session},e.prototype.update=function(t){if(!t)return this;if("function"===typeof t){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=Object(s.a)(Object(s.a)({},this._tags),t._tags),this._extra=Object(s.a)(Object(s.a)({},this._extra),t._extra),this._contexts=Object(s.a)(Object(s.a)({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):Object(u.h)(t)&&(t=t,this._tags=Object(s.a)(Object(s.a)({},this._tags),t.tags),this._extra=Object(s.a)(Object(s.a)({},this._extra),t.extra),this._contexts=Object(s.a)(Object(s.a)({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(e,t){var n="number"===typeof t?Math.min(t,100):100;if(n<=0)return this;var r=Object(s.a)({timestamp:Object(d.a)()},e);return this._breadcrumbs=Object(s.g)(this._breadcrumbs,[r]).slice(-n),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype.applyToEvent=function(e,t){var n;if(this._extra&&Object.keys(this._extra).length&&(e.extra=Object(s.a)(Object(s.a)({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=Object(s.a)(Object(s.a)({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=Object(s.a)(Object(s.a)({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=Object(s.a)(Object(s.a)({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=Object(s.a)({trace:this._span.getTraceContext()},e.contexts);var r=null===(n=this._span.transaction)||void 0===n?void 0:n.name;r&&(e.tags=Object(s.a)({transaction:r},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=Object(s.g)(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(Object(s.g)(v(),this._eventProcessors),e,t)},e.prototype._notifyEventProcessors=function(e,t,n,r){var o=this;return void 0===r&&(r=0),new p((function(i,a){var c=e[r];if(null===t||"function"!==typeof c)i(t);else{var l=c(Object(s.a)({},t),n);Object(u.m)(l)?l.then((function(t){return o._notifyEventProcessors(e,t,n,r+1).then(i)})).then(null,a):o._notifyEventProcessors(e,l,n,r+1).then(i).then(null,a)}}))},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e}();function v(){var e=Object(m.a)();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function b(e){v().push(e)}!function(e){e.Ok="ok",e.Exited="exited",e.Crashed="crashed",e.Abnormal="abnormal"}(f||(f={})),function(e){e.Ok="ok",e.Errored="errored",e.Crashed="crashed"}(h||(h={}));var y=n(455),_=n(134),w=n(133),S=n(59),k=function(){function e(e){this.errors=0,this.sid=Object(y.g)(),this.duration=0,this.status=f.Ok,this.init=!0,this.ignoreDuration=!1;var t=Object(d.b)();this.timestamp=t,this.started=t,e&&this.update(e)}return e.prototype.update=function(e){if(void 0===e&&(e={}),e.user&&(!this.ipAddress&&e.user.ip_address&&(this.ipAddress=e.user.ip_address),this.did||e.did||(this.did=e.user.id||e.user.email||e.user.username)),this.timestamp=e.timestamp||Object(d.b)(),e.ignoreDuration&&(this.ignoreDuration=e.ignoreDuration),e.sid&&(this.sid=32===e.sid.length?e.sid:Object(y.g)()),void 0!==e.init&&(this.init=e.init),!this.did&&e.did&&(this.did=""+e.did),"number"===typeof e.started&&(this.started=e.started),this.ignoreDuration)this.duration=void 0;else if("number"===typeof e.duration)this.duration=e.duration;else{var t=this.timestamp-this.started;this.duration=t>=0?t:0}e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),!this.ipAddress&&e.ipAddress&&(this.ipAddress=e.ipAddress),!this.userAgent&&e.userAgent&&(this.userAgent=e.userAgent),"number"===typeof e.errors&&(this.errors=e.errors),e.status&&(this.status=e.status)},e.prototype.close=function(e){e?this.update({status:e}):this.status===f.Ok?this.update({status:f.Exited}):this.update()},e.prototype.toJSON=function(){return Object(S.a)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"===typeof this.did||"string"===typeof this.did?""+this.did:void 0,duration:this.duration,attrs:Object(S.a)({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},e}(),x=function(){function e(e,t,n){void 0===t&&(t=new g),void 0===n&&(n=4),this._version=n,this._stack=[{}],this.getStackTop().scope=t,e&&this.bindClient(e)}return e.prototype.isOlderThan=function(e){return this._version1&&(d=h.slice(0,-1).join("/"),f=h.pop()),f){var p=f.match(/^\d+/);p&&(f=p[0])}this._fromComponents({host:c,pass:a,path:d,projectId:f,port:u,protocol:r,publicKey:o})},e.prototype._fromComponents=function(e){"user"in e&&!("publicKey"in e)&&(e.publicKey=e.user),this.user=e.publicKey||"",this.protocol=e.protocol,this.publicKey=e.publicKey||"",this.pass=e.pass||"",this.host=e.host,this.port=e.port||"",this.path=e.path||"",this.projectId=e.projectId},e.prototype._validate=function(){var e=this;if(["protocol","publicKey","host","projectId"].forEach((function(t){if(!e[t])throw new q("Invalid Dsn: "+t+" missing")})),!this.projectId.match(/^\d+$/))throw new q("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new q("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new q("Invalid Dsn: Invalid port "+this.port)},e}(),Q=n(83),Z=[];function ee(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function te(e){var t={};return function(e){var t=e.defaultIntegrations&&Object(s.g)(e.defaultIntegrations)||[],n=e.integrations,r=Object(s.g)(ee(t));Array.isArray(n)?r=Object(s.g)(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))})),ee(n)):"function"===typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o=r.map((function(e){return e.name})),i="Debug";return-1!==o.indexOf(i)&&r.push.apply(r,Object(s.g)(r.splice(o.indexOf(i),1))),r}(e).forEach((function(e){t[e.name]=e,function(e){-1===Z.indexOf(e.name)&&(e.setupOnce(b,E),Z.push(e.name),_.b.log("Integration installed: "+e.name))}(e)})),Object.defineProperty(t,"initialized",{value:!0}),t}var ne="Not capturing exception because it's already been captured.",re=function(){function e(e,t){this._integrations={},this._numProcessing=0,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=new X(t.dsn))}return e.prototype.captureException=function(e,t,n){var r=this;if(!Object(y.c)(e)){var o=t&&t.event_id;return this._process(this._getBackend().eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}_.b.log(ne)},e.prototype.captureMessage=function(e,t,n,r){var o=this,i=n&&n.event_id,a=Object(u.i)(e)?this._getBackend().eventFromMessage(String(e),t,n):this._getBackend().eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i},e.prototype.captureEvent=function(e,t,n){var r;if(!(null===(r=t)||void 0===r?void 0:r.originalException)||!Object(y.c)(t.originalException)){var o=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){o=e}))),o}_.b.log(ne)},e.prototype.captureSession=function(e){this._isEnabled()?"string"!==typeof e.release?_.b.warn("Discarded session because of missing or non-string release"):(this._sendSession(e),e.update({init:!1})):_.b.warn("SDK not enabled, will not capture session.")},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.getTransport=function(){return this._getBackend().getTransport()},e.prototype.flush=function(e){var t=this;return this._isClientDoneProcessing(e).then((function(n){return t.getTransport().close(e).then((function(e){return n&&e}))}))},e.prototype.close=function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))},e.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=te(this._options))},e.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){return _.b.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._updateSessionFromEvent=function(e,t){var n,r,o=!1,i=!1,a=t.exception&&t.exception.values;if(a){i=!0;try{for(var c=Object(s.h)(a),l=c.next();!l.done;l=c.next()){var u=l.value.mechanism;if(u&&!1===u.handled){o=!0;break}}}catch(h){n={error:h}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}var d=e.status===f.Ok;(d&&0===e.errors||d&&o)&&(e.update(Object(s.a)(Object(s.a)({},o&&{status:f.Crashed}),{errors:e.errors||Number(i||o)})),this.captureSession(e))},e.prototype._sendSession=function(e){this._getBackend().sendSession(e)},e.prototype._isClientDoneProcessing=function(e){var t=this;return new p((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},e.prototype._prepareEvent=function(e,t,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,a=Object(s.a)(Object(s.a)({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:Object(y.g)()),timestamp:e.timestamp||Object(d.a)()});this._applyClientOptions(a),this._applyIntegrationsMetadata(a);var c=t;n&&n.captureContext&&(c=g.clone(c).update(n.captureContext));var l=p.resolve(a);return c&&(l=c.applyToEvent(a,n)),l.then((function(e){return"number"===typeof i&&i>0?r._normalizeEvent(e,i):e}))},e.prototype._normalizeEvent=function(e,t){if(!e)return null;var n=Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return Object(s.a)(Object(s.a)({},e),e.data&&{data:Object(S.d)(e.data,t)})}))}),e.user&&{user:Object(S.d)(e.user,t)}),e.contexts&&{contexts:Object(S.d)(e.contexts,t)}),e.extra&&{extra:Object(S.d)(e.extra,t)});e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace);var r=this.getOptions()._experiments;return(void 0===r?{}:r).ensureNoCircularStructures?Object(S.d)(n):n},e.prototype._applyClientOptions=function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Object(Q.d)(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(Q.d)(s.value,a));var c=e.request;c&&c.url&&(c.url=Object(Q.d)(c.url,a))},e.prototype._applyIntegrationsMetadata=function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=Object(s.g)(e.sdk.integrations||[],t))},e.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},e.prototype._captureEvent=function(e,t,n){return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){_.b.error(e)}))},e.prototype._processEvent=function(e,t,n){var r,o,i=this,a=this.getOptions(),s=a.beforeSend,c=a.sampleRate,l=this.getTransport();if(!this._isEnabled())return p.reject(new q("SDK not enabled, will not capture event."));var u="transaction"===e.type;return!u&&"number"===typeof c&&Math.random()>c?(null===(o=(r=l).recordLostEvent)||void 0===o||o.call(r,V.SampleRate,"event"),p.reject(new q("Discarding event because it's not included in the random sample (sampling rate = "+c+")"))):this._prepareEvent(e,n,t).then((function(n){var r,o;if(null===n)throw null===(o=(r=l).recordLostEvent)||void 0===o||o.call(r,V.EventProcessor,e.type||"event"),new q("An event processor returned null, will not send event.");if(t&&t.data&&!0===t.data.__sentry__||u||!s)return n;var a=s(n,t);return i._ensureBeforeSendRv(a)})).then((function(t){var r,o;if(null===t)throw null===(o=(r=l).recordLostEvent)||void 0===o||o.call(r,V.BeforeSend,e.type||"event"),new q("`beforeSend` returned `null`, will not send event.");var a=n&&n.getSession&&n.getSession();return!u&&a&&i._updateSessionFromEvent(a,t),i._sendEvent(t),t})).then(null,(function(e){if(e instanceof q)throw e;throw i.captureException(e,{data:{__sentry__:!0},originalException:e}),new q("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)}))},e.prototype._process=function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))},e.prototype._ensureBeforeSendRv=function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Object(u.m)(e))return e.then((function(e){if(!Object(u.h)(e)&&null!==e)throw new q(t);return e}),(function(e){throw new q("beforeSend rejected with "+e)}));if(!Object(u.h)(e)&&null!==e)throw new q(t);return e},e}(),oe=function(){function e(){}return e.prototype.sendEvent=function(e){return p.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:a.Skipped})},e.prototype.close=function(e){return p.resolve(!0)},e}(),ie=function(){function e(e){this._options=e,this._options.dsn||_.b.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype.eventFromException=function(e,t){throw new q("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(e,t,n){throw new q("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,(function(e){_.b.error("Error while sending event: "+e)}))},e.prototype.sendSession=function(e){this._transport.sendSession?this._transport.sendSession(e).then(null,(function(e){_.b.error("Error while sending session: "+e)})):_.b.warn("Dropping session because custom transport doesn't implement sendSession")},e.prototype.getTransport=function(){return this._transport},e.prototype._setupTransport=function(){return new oe},e}(),ae=n(224),se="?",ce=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,le=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ue=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,de=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,fe=/\((\S*)(?::(\d+))(?::(\d+))\)/,he=/Minified React error #\d+;/i;function pe(e){var t=null,n=0;e&&("number"===typeof e.framesToPop?n=e.framesToPop:he.test(e.message)&&(n=1));try{if(t=function(e){if(!e||!e.stacktrace)return null;for(var t,n=e.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),a=[],s=0;s eval")>-1&&(r=de.exec(o[3]))?(o[1]=o[1]||"eval",o[3]=r[1],o[4]=r[2],o[5]=""):0!==l||o[5]||void 0===e.columnNumber||(a[0].column=e.columnNumber+1);d=o[3],f=o[1]||se;f=(n=Object(s.e)(me(f,d),2))[0],i={url:d=n[1],func:f,args:o[2]?o[2].split(","):[],line:o[4]?+o[4]:null,column:o[5]?+o[5]:null}}!i.func&&i.line&&(i.func=se),a.push(i)}if(!a.length)return null;return{message:ve(e),name:e.name,stack:a}}(e))return ge(t,n)}catch(r){}return{message:ve(e),name:e&&e.name,stack:[],failed:!0}}var me=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:se,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]};function ge(e,t){try{return Object(s.a)(Object(s.a)({},e),{stack:e.stack.slice(t)})}catch(n){return e}}function ve(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function be(e){var t=_e(e.stack),n={type:e.name,value:e.message};return t&&t.length&&(n.stacktrace={frames:t}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function ye(e){return{exception:{values:[be(e)]}}}function _e(e){if(!e||!e.length)return[];var t=e,n=t[0].func||"",r=t[t.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return{colno:null===e.column?void 0:e.column,filename:e.url||t[0].url,function:e.func||"?",in_app:!0,lineno:null===e.line?void 0:e.line}})).reverse()}function we(e,t,n){var r=ke(t,n&&n.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return Object(y.a)(r),r.level=c.a.Error,n&&n.event_id&&(r.event_id=n.event_id),p.resolve(r)}function Se(e,t,n,r){void 0===n&&(n=c.a.Info);var o=xe(t,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),p.resolve(o)}function ke(e,t,n){var r;if(void 0===n&&(n={}),Object(u.e)(e)&&e.error)return r=ye(pe(e=e.error));if(Object(u.a)(e)||Object(u.b)(e)){var o=e,i=o.name||(Object(u.a)(o)?"DOMError":"DOMException"),a=o.message?i+": "+o.message:i;return r=xe(a,t,n),Object(y.b)(r,a),"code"in o&&(r.tags=Object(s.a)(Object(s.a)({},r.tags),{"DOMException.code":""+o.code})),r}return Object(u.d)(e)?r=ye(pe(e)):Object(u.h)(e)||Object(u.f)(e)?(r=function(e,t,n){var r={exception:{values:[{type:Object(u.f)(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(S.b)(e)}]},extra:{__serialized__:Object(S.e)(e)}};if(t){var o=_e(pe(t).stack);r.stacktrace={frames:o}}return r}(e,t,n.rejection),Object(y.a)(r,{synthetic:!0}),r):(r=xe(e,t,n),Object(y.b)(r,""+e,void 0),Object(y.a)(r,{synthetic:!0}),r)}function xe(e,t,n){void 0===n&&(n={});var r={message:e};if(n.attachStacktrace&&t){var o=_e(pe(t).stack);r.stacktrace={frames:o}}return r}function Oe(e){if(e.metadata&&e.metadata.sdk){var t=e.metadata.sdk;return{name:t.name,version:t.version}}}function Ce(e,t){return t?(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=Object(s.g)(e.sdk.integrations||[],t.integrations||[]),e.sdk.packages=Object(s.g)(e.sdk.packages||[],t.packages||[]),e):e}function Ee(e,t){var n=Oe(t),r="aggregates"in e?"sessions":"session";return{body:JSON.stringify(Object(s.a)(Object(s.a)({sent_at:(new Date).toISOString()},n&&{sdk:n}),t.forceEnvelope()&&{dsn:t.getDsn().toString()}))+"\n"+JSON.stringify({type:r})+"\n"+JSON.stringify(e),type:r,url:t.getEnvelopeEndpointWithUrlEncodedAuth()}}function je(e,t){var n=Oe(t),r=e.type||"event",o="transaction"===r||t.forceEnvelope(),i=e.debug_meta||{},a=i.transactionSampling,c=Object(s.f)(i,["transactionSampling"]),l=a||{},u=l.method,d=l.rate;0===Object.keys(c).length?delete e.debug_meta:e.debug_meta=c;var f={body:JSON.stringify(n?Ce(e,t.metadata.sdk):e),type:r,url:o?t.getEnvelopeEndpointWithUrlEncodedAuth():t.getStoreEndpointWithUrlEncodedAuth()};if(o){var h=JSON.stringify(Object(s.a)(Object(s.a)({event_id:e.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),t.forceEnvelope()&&{dsn:t.getDsn().toString()}))+"\n"+JSON.stringify({type:r,sample_rates:[{id:u,rate:d}]})+"\n"+f.body;f.body=h}return f}var Re=function(){function e(e,t,n){void 0===t&&(t={}),this.dsn=e,this._dsnObject=new X(e),this.metadata=t,this._tunnel=n}return e.prototype.getDsn=function(){return this._dsnObject},e.prototype.forceEnvelope=function(){return!!this._tunnel},e.prototype.getBaseApiEndpoint=function(){var e=this.getDsn(),t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"},e.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},e.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},e.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this.forceEnvelope()?this._tunnel:this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},e.prototype.getStoreEndpointPath=function(){var e=this.getDsn();return(e.path?"/"+e.path:"")+"/api/"+e.projectId+"/store/"},e.prototype.getRequestHeaders=function(e,t){var n=this.getDsn(),r=["Sentry sentry_version=7"];return r.push("sentry_client="+e+"/"+t),r.push("sentry_key="+n.publicKey),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},e.prototype.getReportDialogEndpoint=function(e){void 0===e&&(e={});var t=this.getDsn(),n=this.getBaseApiEndpoint()+"embed/error-page/",r=[];for(var o in r.push("dsn="+t.toString()),e)if("dsn"!==o)if("user"===o){if(!e.user)continue;e.user.name&&r.push("name="+encodeURIComponent(e.user.name)),e.user.email&&r.push("email="+encodeURIComponent(e.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return r.length?n+"?"+r.join("&"):n},e.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},e.prototype._getIngestEndpoint=function(e){return this._tunnel?this._tunnel:""+this.getBaseApiEndpoint()+this.getDsn().projectId+"/"+e+"/"},e.prototype._encodedAuth=function(){var e={sentry_key:this.getDsn().publicKey,sentry_version:"7"};return Object(S.f)(e)},e}(),Te=function(){function e(e){this._limit=e,this._buffer=[]}return e.prototype.isReady=function(){return void 0===this._limit||this.length()0&&n(!1)}),e);p.all(t._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},e}();var Ae,Le=Object(m.a)();function Me(){var e,t;if(Ae)return Ae;if(Object(ae.a)(Le.fetch))return Ae=Le.fetch.bind(Le);var n=Le.document,r=Le.fetch;if("function"===typeof(null===(e=n)||void 0===e?void 0:e.createElement))try{var o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o),(null===(t=o.contentWindow)||void 0===t?void 0:t.fetch)&&(r=o.contentWindow.fetch),n.head.removeChild(o)}catch(i){_.b.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return Ae=r.bind(Le)}function $e(e,t){if("[object Navigator]"===Object.prototype.toString.call(Le&&Le.navigator)&&"function"===typeof Le.navigator.sendBeacon)return Le.navigator.sendBeacon.bind(Le.navigator)(e,t);if(Object(ae.b)()){var n=Me();n(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){console.error(e)}))}else;}var De={event:"error",transaction:"transaction",session:"session",attachment:"attachment"},Ne=Object(m.a)(),Pe=function(){function e(e){var t=this;this.options=e,this._buffer=new Te(30),this._rateLimits={},this._outcomes={},this._api=new Re(e.dsn,e._metadata,e.tunnel),this.url=this._api.getStoreEndpointWithUrlEncodedAuth(),this.options.sendClientReports&&Ne.document&&Ne.document.addEventListener("visibilitychange",(function(){"hidden"===Ne.document.visibilityState&&t._flushOutcomes()}))}return e.prototype.sendEvent=function(e){throw new q("Transport Class has to implement `sendEvent` method")},e.prototype.close=function(e){return this._buffer.drain(e)},e.prototype.recordLostEvent=function(e,t){var n;if(this.options.sendClientReports){var r=De[t]+":"+e;_.b.log("Adding outcome: "+r),this._outcomes[r]=(null!==(n=this._outcomes[r])&&void 0!==n?n:0)+1}},e.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var e=this._outcomes;if(this._outcomes={},Object.keys(e).length){_.b.log("Flushing outcomes:\n"+JSON.stringify(e,null,2));var t=this._api.getEnvelopeEndpointWithUrlEncodedAuth(),n=JSON.stringify(Object(s.a)({},this.options.tunnel&&{dsn:this._api.getDsn().toString()}))+"\n"+JSON.stringify({type:"client_report"})+"\n"+JSON.stringify({timestamp:Object(d.a)(),discarded_events:Object.keys(e).map((function(t){var n=Object(s.e)(t.split(":"),2),r=n[0];return{reason:n[1],category:r,quantity:e[t]}}))});try{$e(t,n)}catch(r){_.b.error(r)}}else _.b.log("No outcomes to flush")}},e.prototype._handleResponse=function(e){var t=e.requestType,n=e.response,r=e.headers,o=e.resolve,i=e.reject,s=a.fromHttpCode(n.status);this._handleRateLimit(r)&&_.b.warn("Too many "+t+" requests, backing off until: "+this._disabledUntil(t)),s!==a.Success?i(n):o({status:s})},e.prototype._disabledUntil=function(e){var t=De[e];return this._rateLimits[t]||this._rateLimits.all},e.prototype._isRateLimited=function(e){return this._disabledUntil(e)>new Date(Date.now())},e.prototype._handleRateLimit=function(e){var t,n,r,o,i=Date.now(),a=e["x-sentry-rate-limits"],c=e["retry-after"];if(a){try{for(var l=Object(s.h)(a.trim().split(",")),u=l.next();!u.done;u=l.next()){var d=u.value.split(":",2),f=parseInt(d[0],10),h=1e3*(isNaN(f)?60:f);try{for(var p=(r=void 0,Object(s.h)(d[1].split(";"))),m=p.next();!m.done;m=p.next()){var g=m.value;this._rateLimits[g||"all"]=new Date(i+h)}}catch(v){r={error:v}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(b){t={error:b}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return!0}return!!c&&(this._rateLimits.all=new Date(i+Object(y.e)(i,c)),!0)},e}(),Ie=function(e){function t(t,n){void 0===n&&(n=Me());var r=e.call(this,t)||this;return r._fetch=n,r}return Object(s.c)(t,e),t.prototype.sendEvent=function(e){return this._sendRequest(je(e,this._api),e)},t.prototype.sendSession=function(e){return this._sendRequest(Ee(e,this._api),e)},t.prototype._sendRequest=function(e,t){var n=this;if(this._isRateLimited(e.type))return this.recordLostEvent(V.RateLimitBackoff,e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429});var r={body:e.body,method:"POST",referrerPolicy:Object(ae.e)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new p((function(t,o){n._fetch(e.url,r).then((function(r){var i={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};n._handleResponse({requestType:e.type,response:r,headers:i,resolve:t,reject:o})})).catch(o)}))})).then(void 0,(function(t){throw t instanceof q?n.recordLostEvent(V.QueueOverflow,e.type):n.recordLostEvent(V.NetworkError,e.type),t}))},t}(Pe),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(s.c)(t,e),t.prototype.sendEvent=function(e){return this._sendRequest(je(e,this._api),e)},t.prototype.sendSession=function(e){return this._sendRequest(Ee(e,this._api),e)},t.prototype._sendRequest=function(e,t){var n=this;return this._isRateLimited(e.type)?(this.recordLostEvent(V.RateLimitBackoff,e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new p((function(t,r){var o=new XMLHttpRequest;for(var i in o.onreadystatechange=function(){if(4===o.readyState){var i={"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")};n._handleResponse({requestType:e.type,response:o,headers:i,resolve:t,reject:r})}},o.open("POST",e.url),n.options.headers)Object.prototype.hasOwnProperty.call(n.options.headers,i)&&o.setRequestHeader(i,n.options.headers[i]);o.send(e.body)}))})).then(void 0,(function(t){throw t instanceof q?n.recordLostEvent(V.QueueOverflow,e.type):n.recordLostEvent(V.NetworkError,e.type),t}))},t}(Pe),ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(s.c)(t,e),t.prototype.eventFromException=function(e,t){return we(this._options,e,t)},t.prototype.eventFromMessage=function(e,t,n){return void 0===t&&(t=c.a.Info),Se(this._options,e,t,n)},t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var t=Object(s.a)(Object(s.a)({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(t):Object(ae.b)()?new Ie(t):new Fe(t)},t}(ie),We=Object(m.a)(),Be=0;function He(){return Be>0}function Ue(){Be+=1,setTimeout((function(){Be-=1}))}function Ve(e,t,n){if(void 0===t&&(t={}),"function"!==typeof e)return e;try{if(e.__sentry__)return e;if(e.__sentry_wrapped__)return e.__sentry_wrapped__}catch(i){return e}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var o=r.map((function(e){return Ve(e,t)}));return e.handleEvent?e.handleEvent.apply(this,o):e.apply(this,o)}catch(i){throw Ue(),H((function(e){e.addEventProcessor((function(e){var n=Object(s.a)({},e);return t.mechanism&&(Object(y.b)(n,void 0,void 0),Object(y.a)(n,t.mechanism)),n.extra=Object(s.a)(Object(s.a)({},n.extra),{arguments:r}),n})),L(i)})),i}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch(a){}e.prototype=e.prototype||{},r.prototype=e.prototype,Object.defineProperty(e,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:e}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return e.name}})}catch(a){}return r}function Ge(e){if(void 0===e&&(e={}),We.document)if(e.eventId)if(e.dsn){var t=We.document.createElement("script");t.async=!0,t.src=new Re(e.dsn).getReportDialogEndpoint(e),e.onLoad&&(t.onload=e.onLoad);var n=We.document.head||We.document.body;n&&n.appendChild(t)}else _.b.error("Missing dsn option in showReportDialog call");else _.b.error("Missing eventId option in showReportDialog call")}var Ke,qe=n(167),Ye=Object(m.a)(),Je={},Xe={};function Qe(e){if(!Xe[e])switch(Xe[e]=!0,e){case"console":!function(){if(!("console"in Ye))return;["debug","info","warn","error","log","assert"].forEach((function(e){e in Ye.console&&Object(S.c)(Ye.console,e,(function(t){return function(){for(var n=[],r=0;r2?t[2]:void 0;if(r){var o=Ke,i=String(r);Ke=i,et("history",{from:o,to:i})}return e.apply(this,t)}}Ye.onpopstate=function(){for(var t=[],n=0;n"}0!==t.length&&E().addBreadcrumb({category:"ui."+e.name,message:t},{event:e.event,name:e.name,global:e.global})},e.prototype._xhrBreadcrumb=function(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;E().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;},e.prototype._fetchBreadcrumb=function(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?E().addBreadcrumb({category:"fetch",data:e.fetchData,level:c.a.Error,type:"http"},{data:e.error,input:e.args}):E().addBreadcrumb({category:"fetch",data:Object(s.a)(Object(s.a)({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))},e.prototype._historyBreadcrumb=function(e){var t=Object(m.a)(),n=e.from,r=e.to,o=Object(y.f)(t.location.href),i=Object(y.f)(n),a=Object(y.f)(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),E().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},e.id="Breadcrumbs",e}(),dt=function(e){function t(t){void 0===t&&(t={});return t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:G}],version:G},e.call(this,ze,t)||this}return Object(s.c)(t,e),t.prototype.showReportDialog=function(e){void 0===e&&(e={}),Object(m.a)().document&&(this._isEnabled()?Ge(Object(s.a)(Object(s.a)({},e),{dsn:e.dsn||this.getDsn()})):_.b.error("Trying to call showReportDialog with Sentry Client disabled"))},t.prototype._prepareEvent=function(t,n,r){return t.platform=t.platform||"javascript",e.prototype._prepareEvent.call(this,t,n,r)},t.prototype._sendEvent=function(t){var n=this.getIntegration(ut);n&&n.addSentryBreadcrumb(t),e.prototype._sendEvent.call(this,t)},t}(re),ft=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){ct=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t=0;r--){var o=e[r];if(""!==(null===(t=o)||void 0===t?void 0:t.filename)&&"[native code]"!==(null===(n=o)||void 0===n?void 0:n.filename))return o.filename||null}return null},e.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var t=e.stacktrace.frames;return this._getLastValidUrl(t)}if(e.exception){var n=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return this._getLastValidUrl(n)}return null}catch(r){return _.b.error("Cannot extract url for event "+Object(y.d)(e)),null}},e.id="InboundFilters",e}();var mt=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],gt=function(){function e(t){this.name=e.id,this._options=Object(s.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return e.prototype.setupOnce=function(){var e=Object(m.a)();(this._options.setTimeout&&Object(S.c)(e,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&Object(S.c)(e,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&Object(S.c)(e,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Object(S.c)(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget)&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:mt).forEach(this._wrapEventTarget.bind(this))},e.prototype._wrapTimeFunction=function(e){return function(){for(var t=[],n=0;n0?t:Object(lt.a)();return 0===e.exception.values[0].stacktrace.frames.length&&e.exception.values[0].stacktrace.frames.push({colno:o,filename:a,function:"?",in_app:!0,lineno:i}),e},e.id="GlobalHandlers",e}(),bt=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this._key=t.key||"cause",this._limit=t.limit||5}return e.prototype.setupOnce=function(){b((function(t,n){var r=E().getIntegration(e);if(r){var o=r._handler&&r._handler.bind(r);return"function"===typeof o?o(t,n):t}return t}))},e.prototype._handler=function(e,t){if(!e.exception||!e.exception.values||!t||!Object(u.g)(t.originalException,Error))return e;var n=this._walkErrorTree(t.originalException,this._key);return e.exception.values=Object(s.g)(n,e.exception.values),e},e.prototype._walkErrorTree=function(e,t,n){if(void 0===n&&(n=[]),!Object(u.g)(e[t],Error)||n.length+1>=this._limit)return n;var r=be(pe(e[t]));return this._walkErrorTree(e[t],t,Object(s.g)([r],n))},e.id="LinkedErrors",e}(),yt=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,n){t((function(t){var r=n().getIntegration(e);if(r){try{if(r._shouldDropEvent(t,r._previousEvent))return _.b.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){return r._previousEvent=t}return r._previousEvent=t}return t}))},e.prototype._shouldDropEvent=function(e,t){return!!t&&(!!this._isSameMessageEvent(e,t)||!!this._isSameExceptionEvent(e,t))},e.prototype._isSameMessageEvent=function(e,t){var n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!this._isSameFingerprint(e,t)&&!!this._isSameStacktrace(e,t))))},e.prototype._getFramesFromEvent=function(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}else if(e.stacktrace)return e.stacktrace.frames},e.prototype._isSameStacktrace=function(e,t){var n=this._getFramesFromEvent(e),r=this._getFramesFromEvent(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,(r=r).length!==n.length)return!1;for(var o=0;o=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var C=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function E(e){var t=C.exec(e);return t?t.slice(1):[]}function j(){for(var e=[],t=0;t=-1&&!r;o--){var i=o>=0?e[o]:"/";i&&(n=i+"/"+n,r="/"===i.charAt(0))}return(r?"/":"")+(n=O(n.split("/").filter((function(e){return!!e})),!r).join("/"))||"."}function R(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function T(e,t){var n=E(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n}var A=function(){function e(t){var n=this;void 0===t&&(t={}),this.name=e.id,this._prefix="app:///",this._iteratee=function(e){if(!e.filename)return e;var t=/^[A-Z]:\\/.test(e.filename),r=/^\//.test(e.filename);if(t||r){var o=t?e.filename.replace(/^[A-Z]:/,"").replace(/\\/g,"/"):e.filename,i=n._root?function(e,t){e=j(e).substr(1),t=j(t).substr(1);for(var n=R(e.split("/")),r=R(t.split("/")),o=Math.min(n.length,r.length),i=o,a=0;a=0;n--){var r=t[n];if(!0===r.in_app){e.transaction=this._getTransaction(r);break}}return e},e.prototype._getFramesFromEvent=function(e){var t=e.exception&&e.exception.values&&e.exception.values[0];return t&&t.stacktrace&&t.stacktrace.frames||[]},e.prototype._getTransaction=function(e){return e.module||e.function?(e.module||"?")+"/"+(e.function||"?"):""},e.id="Transaction",e}(),$=n(454),D={id:"Tracing"},N={id:"BrowserTracing"},P={activate:["activated","deactivated"],create:["beforeCreate","created"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]},I=/(?:^|[-_/])(\w)/g,F="root",z="anonymous component",W=function(){function e(t){var n=this;this.name=e.id,this._componentsCache={},this._applyTracingHooks=function(e,t){if(!e.$options.$_sentryPerfHook){e.$options.$_sentryPerfHook=!0;var r=n._getComponentName(e),a=r===F,s={},c=function(r){var o=Object($.c)();n._rootSpan?n._finishRootSpan(o,t):e.$once("hook:"+r,(function(){var e=t().getIntegration(D);if(e){n._tracingActivity=e.constructor.pushActivity("Vue Application Render");var r=e.constructor.getTransaction();r&&(n._rootSpan=r.startChild({description:"Application Render",op:"vue"}))}else{var o=function(e){if(e&&e.getScope){var t=e.getScope();if(t)return t.getTransaction()}return}(t());o&&(n._rootSpan=o.startChild({description:"Application Render",op:"vue"}))}}))},l=function(o,i){var a=Array.isArray(n._options.tracingOptions.trackComponents)?n._options.tracingOptions.trackComponents.indexOf(r)>-1:n._options.tracingOptions.trackComponents;if(n._rootSpan&&a){var c=Object($.c)(),l=s[i];l?(l.finish(),n._finishRootSpan(c,t)):e.$once("hook:"+o,(function(){n._rootSpan&&(s[i]=n._rootSpan.startChild({description:"Vue <"+r+">",op:i}))}))}};n._options.tracingOptions.hooks.forEach((function(t){var r=P[t];r?r.forEach((function(r){var i=a?c.bind(n,r):l.bind(n,r,t),s=e.$options[r];Array.isArray(s)?e.$options[r]=Object(o.g)([i],s):e.$options[r]="function"===typeof s?[i,s]:[i]})):i.b.warn("Unknown hook: "+t)}))}},i.b.log("You are still using the Vue.js integration, consider moving to @sentry/vue"),this._options=Object(o.a)(Object(o.a)({Vue:Object(a.a)().Vue,attachProps:!0,logErrors:!1,tracing:!1},t),{tracingOptions:Object(o.a)({hooks:["mount","update"],timeout:2e3,trackComponents:!1},t.tracingOptions)})}return e.prototype.setupOnce=function(e,t){this._options.Vue?(this._attachErrorHandler(t),this._options.tracing&&this._startTracing(t)):i.b.error("Vue integration is missing a Vue instance")},e.prototype._getComponentName=function(e){if(!e)return z;if(e.$root===e)return F;if(!e.$options)return z;if(e.$options.name)return e.$options.name;if(e.$options._componentTag)return e.$options._componentTag;if(e.$options.__file){var t=T(e.$options.__file.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"),".vue");return this._componentsCache[t]||(this._componentsCache[t]=t.replace(I,(function(e,t){return t?t.toUpperCase():""})))}return z},e.prototype._finishRootSpan=function(e,t){var n=this;this._rootSpanTimer&&clearTimeout(this._rootSpanTimer),this._rootSpanTimer=setTimeout((function(){if(n._tracingActivity){var r=t().getIntegration(D);r&&r.constructor.popActivity(n._tracingActivity)}n._rootSpan&&n._rootSpan.finish(e)}),this._options.tracingOptions.timeout)},e.prototype._startTracing=function(e){var t=this._applyTracingHooks;this._options.Vue.mixin({beforeCreate:function(){e().getIntegration(D)||e().getIntegration(N)?t(this,e):i.b.error("Vue integration has tracing enabled, but Tracing integration is not configured")}})},e.prototype._attachErrorHandler=function(t){var n=this,r=this._options.Vue.config.errorHandler;this._options.Vue.config.errorHandler=function(o,a,s){var c={};if(a)try{c.componentName=n._getComponentName(a),n._options.attachProps&&(c.propsData=a.$options.propsData)}catch(l){i.b.warn("Unable to extract metadata from Vue component.")}s&&(c.lifecycleHook=s),t().getIntegration(e)&&setTimeout((function(){t().withScope((function(e){e.setContext("vue",c),t().captureException(o)}))})),"function"===typeof r&&r.call(n._options.Vue,o,a,s),n._options.logErrors&&(n._options.Vue.util&&n._options.Vue.util.warn("Error in "+s+': "'+(o&&o.toString())+'"',a),console.error(o))}},e.id="Vue",e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=w(n(0)),o=_(n(355)),i=w(n(4)),a=_(n(313)),s=_(n(314)),c=w(n(357)),l=w(n(153)),u=w(n(60)),d=w(n(301)),f=w(n(380)),h=w(n(219)),p=w(n(220)),m=w(n(382)),g=w(n(61)),v=w(n(383)),b=w(n(13));function y(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==S(e)&&"function"!==typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}function S(e){return(S="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t=e[n]}))||"xs"}},{key:"onClose",value:function(){if("undefined"!==typeof window.parent&&window.parent)try{window.parent.$iframeDialog&&"function"===typeof window.parent.$iframeDialog.close?window.parent.$iframeDialog.close():window.parent.postMessage("close","*")}catch(e){window.parent.postMessage("close","*")}}}],(i=[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onResize,!0),window.addEventListener("message",this.onReceiveMessage,!1),C(A(w.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onResize,!0),window.removeEventListener("message",this.onReceiveMessage,!1),C(A(w.prototype),"componentWillUnmount",this).call(this)}},{key:"createTheme",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,h.default)(g.default.getThemeName(e))}},{key:"getThemeName",value:function(e){return e.name}},{key:"getThemeType",value:function(e){return e.palette.type}},{key:"toggleTheme",value:function(){var e=this.state.themeName,t="dark"===e?"blue":"blue"===e?"colored":"colored"===e?"light":"dark";g.default.setThemeName(t);var n=this.createTheme(t);this.setState({theme:n,themeName:this.getThemeName(n),themeType:this.getThemeType(n)})}},{key:"getSystemConfig",value:function(){return this.socket.getSystemConfig()}},{key:"getExpertMode",value:function(){return"true"===window.sessionStorage.getItem("App.expertMode")||!!this._systemConfig.expertMode}},{key:"onConnectionReady",value:function(){}},{key:"encrypt",value:function(e){for(var t="",n=0;n=43)}})).catch((function(){return!1}))}function S(e){return"boolean"===typeof m?l.resolve(m):w(e).then((function(e){return m=e}))}function k(e){var t=g[e.name],n={};n.promise=new l((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function x(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function O(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function C(e,t){return new l((function(n,r){if(g[e.name]=g[e.name]||N(),e.db){if(!t)return n(e.db);k(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=a.open.apply(a,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(p)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),x(e)}}))}function E(e){return C(e,!1)}function j(e){return C(e,!0)}function R(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function T(e){return new l((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}function A(e){return c([_(atob(e.data))],{type:e.type})}function L(e){return e&&e.__local_forage_encoded_blob}function M(e){var t=this,n=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return d(n,e,e),n}function $(e){k(e);for(var t=g[e.name],n=t.forages,r=0;r0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return l.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),j(e)})).then((function(){return $(e).then((function(){D(e,t,n,r-1)}))})).catch(n);n(i)}}function N(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function P(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=g[n.name];o||(o=N(),g[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=M);var i=[];function a(){return l.resolve()}for(var s=0;s>4,u[c++]=(15&r)<<4|o>>2,u[c++]=(3&o)<<6|63&i;return l}function pe(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=Y[(3&n[t])<<4|n[t+1]>>4],r+=Y[(15&n[t+1])<<2|n[t+2]>>6],r+=Y[63&n[t+2]];return n.length%3===2?r=r.substring(0,r.length-1)+"=":n.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}function me(e,t){var n="";if(e&&(n=fe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===fe.call(e.buffer))){var r,o=Q;e instanceof ArrayBuffer?(r=e,o+=ee):(r=e.buffer,"[object Int8Array]"===n?o+=ne:"[object Uint8Array]"===n?o+=re:"[object Uint8ClampedArray]"===n?o+=oe:"[object Int16Array]"===n?o+=ie:"[object Uint16Array]"===n?o+=se:"[object Int32Array]"===n?o+=ae:"[object Uint32Array]"===n?o+=ce:"[object Float32Array]"===n?o+=le:"[object Float64Array]"===n?o+=ue:t(new Error("Failed to get type for BinaryArray"))),t(o+pe(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=J+e.type+"~"+pe(this.result);t(Q+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function ge(e){if(e.substring(0,Z)!==Q)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(Z,de);if(r===te&&X.test(n)){var o=n.match(X);t=o[1],n=n.substring(o[0].length)}var i=he(n);switch(r){case ee:return i;case te:return c([i],{type:t});case ne:return new Int8Array(i);case re:return new Uint8Array(i);case oe:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case se:return new Uint16Array(i);case ae:return new Int32Array(i);case ce:return new Uint32Array(i);case le:return new Float32Array(i);case ue:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}}var ve={serialize:me,deserialize:ge,stringToBuffer:he,bufferToString:pe};function be(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function ye(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!==typeof e[r]?e[r].toString():e[r];var o=new l((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(o){return r(o)}n.db.transaction((function(o){be(o,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=ve,o}function _e(e,t,n,r,o,i){e.executeSql(n,r,o,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?i(e,a):be(e,t,(function(){e.executeSql(n,r,o,i)}),i)}),i):i(e,a)}),i)}function we(e,t){var n=this;e=f(e);var r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Se(e,t){var n=this,r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName,[],(function(n,r){for(var i=r.rows,a=i.length,s=0;s0)return void i(ke.apply(o,[e,s,n,r-1]));a(t)}}))}))})).catch(a)}));return u(i,n),i}function xe(e,t,n){return ke.apply(this,[e,t,n,1])}function Oe(e,t){var n=this;e=f(e);var r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Ce(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function Ee(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function je(e,t){var n=this,r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Re(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],o=0;o '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var o=[],i=0;i0}function Pe(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=$e(e,t._defaultConfig),Ne()?(t._dbInfo=n,n.serializer=ve,l.resolve()):l.reject()}function Ie(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return u(n,e),n}function Fe(e,t){var n=this;e=f(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return u(r,t),r}function ze(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):l.reject("Invalid arguments"),t),r}var Ke={_driver:"localStorageWrapper",_initStorage:Pe,_support:Me(),iterate:ze,getItem:Fe,setItem:Ve,removeItem:Ue,clear:Ie,length:He,key:We,keys:Be,dropInstance:Ge},qe=function(e,t){return e===t||"number"===typeof e&&"number"===typeof t&&isNaN(e)&&isNaN(t)},Ye=function(e,t){for(var n=e.length,r=0;r=0)return 1;return 0}();var o=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function i(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:c(s(e))}function l(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),d=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?u:10===e?d:u||d}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function m(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||h(e.firstElementChild)===e)}(a)?a:h(a);var s=p(e);return s.host?m(s.host,t):m(e,p(t).host)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(t,"top"),o=g(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function b(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,r=f(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},S=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=f(10),o="HTML"===t.nodeName,i=C(e),s=C(t),l=c(e),u=a(t),d=parseFloat(u.borderTopWidth),h=parseFloat(u.borderLeftWidth);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=O({top:i.top-s.top-d,left:i.left-s.left-h,width:i.width,height:i.height});if(p.marginTop=0,p.marginLeft=0,!r&&o){var m=parseFloat(u.marginTop),g=parseFloat(u.marginLeft);p.top-=d-m,p.bottom-=d-m,p.left-=h-g,p.right-=h-g,p.marginTop=m,p.marginLeft=g}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(p=v(p,t)),p}function j(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=E(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:g(n),s=t?0:g(n,"left"),c={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return O(c)}function R(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&R(n)}function T(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?T(e):m(e,l(t));if("viewport"===r)i=j(a,o);else{var u=void 0;"scrollParent"===r?"BODY"===(u=c(s(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===r?e.ownerDocument.documentElement:r;var d=E(u,a,o);if("HTML"!==u.nodeName||R(a))i=d;else{var f=_(e.ownerDocument),h=f.height,p=f.width;i.top+=d.top-d.marginTop,i.bottom=h+d.top,i.left+=d.left-d.marginLeft,i.right=p+d.left}}var g="number"===typeof(n=n||0);return i.left+=g?n:n.left||0,i.top+=g?n:n.top||0,i.right-=g?n:n.right||0,i.bottom-=g?n:n.bottom||0,i}function L(e){return e.width*e.height}function M(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=A(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(s).map((function(e){return x({key:e},s[e],{area:L(s[e])})})).sort((function(e,t){return t.area-e.area})),l=c.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=l.length>0?l[0].key:c[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function $(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?T(t):m(t,l(n));return E(n,o,r)}function D(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function N(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function P(e,t,n){n=n.split("-")[0];var r=D(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",c=i?"height":"width",l=i?"width":"height";return o[a]=t[a]+t[c]/2-r[c]/2,o[s]=n===s?t[s]-r[l]:t[N(s)],o}function I(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function F(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=I(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offsets.reference),t=n(t,e))})),t}function z(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=$(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=M(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=P(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=F(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function B(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=ee.indexOf(e),r=ee.slice(n+1).concat(ee.slice(0,n));return t?r.reverse():r}var ne="flip",re="clockwise",oe="counterclockwise";function ie(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(I(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return(l=l.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return O(s)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){Y(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var ae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",l=s?"width":"height",u={start:k({},c,i[c]),end:k({},c,i[c]+i[l]-a[l])};e.offsets.popper=x({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],c=void 0;return c=Y(+n)?[+n,0]:ie(n,i,a,s),"left"===s?(i.top+=c[0],i.left-=c[1]):"right"===s?(i.top+=c[0],i.left+=c[1]):"top"===s?(i.left+=c[0],i.top-=c[1]):"bottom"===s&&(i.left+=c[0],i.top+=c[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var r=B("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var c=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=c;var l=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]c[e]&&!t.escapeWithReference&&(r=Math.min(u[n],c[e]-("right"===e?u.width:u.height))),k({},n,r)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=x({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",c=a?"left":"top",l=a?"width":"height";return n[s]i(r[s])&&(e.offsets.popper[c]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,s=i.popper,c=i.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",d=l?"Top":"Left",f=d.toLowerCase(),h=l?"left":"top",p=l?"bottom":"right",m=D(r)[u];c[p]-ms[p]&&(e.offsets.popper[f]+=c[f]+m-s[p]),e.offsets.popper=O(e.offsets.popper);var g=c[f]+c[u]/2-m/2,v=a(e.instance.popper),b=parseFloat(v["margin"+d]),y=parseFloat(v["border"+d+"Width"]),_=g-e.offsets.popper[f]-b-y;return _=Math.max(Math.min(s[u]-m,_),0),e.arrowElement=r,e.offsets.arrow=(k(n={},f,Math.round(_)),k(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=N(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ne:a=[r,o];break;case re:a=te(r);break;case oe:a=te(r,!0);break;default:a=t.behavior}return a.forEach((function(s,c){if(r!==s||a.length===c+1)return e;r=e.placement.split("-")[0],o=N(r);var l=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="left"===r&&d(l.right)>d(u.left)||"right"===r&&d(l.left)d(u.top)||"bottom"===r&&d(l.top)d(n.right),m=d(l.top)d(n.bottom),v="left"===r&&h||"right"===r&&p||"top"===r&&m||"bottom"===r&&g,b=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(b&&"start"===i&&h||b&&"end"===i&&p||!b&&"start"===i&&m||!b&&"end"===i&&g),_=!!t.flipVariationsByContent&&(b&&"start"===i&&p||b&&"end"===i&&h||!b&&"start"===i&&g||!b&&"end"===i&&m),w=y||_;(f||v||w)&&(e.flipped=!0,(f||v)&&(r=a[c+1]),w&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=x({},e.offsets.popper,P(e.instance.popper,e.offsets.reference,e.placement)),e=F(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=N(t),e.offsets.popper=O(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=I(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=o(this.update.bind(this)),this.options=x({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(x({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){r.options.modifiers[t]=x({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return x({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&i(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return S(e,[{key:"update",value:function(){return z.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return K.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),e}();se.Utils=("undefined"!==typeof window?window:e).PopperUtils,se.placements=Z,se.Defaults=ae,t.a=se}).call(this,n(69))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diff=t.split=void 0;var r=n(410),o=n(411);t.diff=o.default;var i=n(312);t.split=i.default,t.default=r.default},function(e,t,n){"use strict";var r=n(415),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,c,l,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),c=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),c.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),l&&document.body.removeChild(l),a()}return u}},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}),"FileCopy");t.default=a},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.default=a},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"}),"ImportExport");t.default=a},,function(e,t,n){"use strict";n.d(t,"a",(function(){return se}));var r=n(0),o=n.n(r),i=n(4),a=n.n(i);function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;var u=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function d(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=u.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"===typeof t?t:"string"===typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var f=[".DS_Store","Thumbs.db"];function h(e){return(null!==e.target&&e.target.files?g(e.target.files):[]).map((function(e){return d(e)}))}function p(e,t){return s(this,void 0,void 0,(function(){var n;return c(this,(function(r){switch(r.label){case 0:return e.items?(n=g(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(v))]):[3,2];case 1:return[2,m(b(r.sent()))];case 2:return[2,m(g(e.files).map((function(e){return d(e)})))]}}))}))}function m(e){return e.filter((function(e){return-1===f.indexOf(e.name)}))}function g(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,L(n)];if(e.sizen)return[!1,L(n)]}return[!0,null]}function P(e){return void 0!==e&&null!==e}function I(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=O(D(e,n),1)[0],i=O(N(e,r,o),1)[0];return t&&i}))}function F(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function z(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function W(e){e.preventDefault()}function B(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function H(e){return-1!==e.indexOf("Edge/")}function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return B(e)||H(e)}function V(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var oe=Object(r.forwardRef)((function(e,t){var n=e.children,i=se(re(e,G)),a=i.open,s=re(i,K);return Object(r.useImperativeHandle)(t,(function(){return{open:a}}),[a]),o.a.createElement(r.Fragment,null,n(te(te({},s),{},{open:a})))}));oe.displayName="Dropzone";var ie={disabled:!1,getFilesFromEvent:function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?p(e.dataTransfer,e.type):h(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null};oe.defaultProps=ie,oe.propTypes={children:a.a.func,accept:a.a.oneOfType([a.a.string,a.a.arrayOf(a.a.string)]),multiple:a.a.bool,preventDropOnDocument:a.a.bool,noClick:a.a.bool,noKeyboard:a.a.bool,noDrag:a.a.bool,noDragEventsBubbling:a.a.bool,minSize:a.a.number,maxSize:a.a.number,maxFiles:a.a.number,disabled:a.a.bool,getFilesFromEvent:a.a.func,onFileDialogCancel:a.a.func,onDragEnter:a.a.func,onDragLeave:a.a.func,onDragOver:a.a.func,onDrop:a.a.func,onDropAccepted:a.a.func,onDropRejected:a.a.func,validator:a.a.func};var ae={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=te(te({},ie),e),n=t.accept,o=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,c=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,h=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,v=t.preventDropOnDocument,b=t.noClick,y=t.noKeyboard,_=t.noDrag,w=t.noDragEventsBubbling,S=t.validator,k=Object(r.useRef)(null),x=Object(r.useRef)(null),O=Object(r.useReducer)(ce,ae),C=X(O,2),E=C[0],j=C[1],R=E.isFocused,T=E.isFileDialogActive,A=E.draggedFiles,L=Object(r.useCallback)((function(){x.current&&(j({type:"openDialog"}),x.current.value=null,x.current.click())}),[j]),M=function(){T&&setTimeout((function(){x.current&&(x.current.files.length||(j({type:"closeDialog"}),"function"===typeof g&&g()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",M,!1),function(){window.removeEventListener("focus",M,!1)}}),[x,T,g]);var P=Object(r.useCallback)((function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))}),[k,x]),B=Object(r.useCallback)((function(){j({type:"focus"})}),[]),H=Object(r.useCallback)((function(){j({type:"blur"})}),[]),G=Object(r.useCallback)((function(){b||(U()?setTimeout(L,0):L())}),[x,b]),K=Object(r.useRef)([]),Q=function(e){k.current&&k.current.contains(e.target)||(e.preventDefault(),K.current=[])};Object(r.useEffect)((function(){return v&&(document.addEventListener("dragover",W,!1),document.addEventListener("drop",Q,!1)),function(){v&&(document.removeEventListener("dragover",W),document.removeEventListener("drop",Q))}}),[k,v]);var Z=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),fe(e),K.current=[].concat(J(K.current),[e.target]),z(e)&&Promise.resolve(i(e)).then((function(t){F(e)&&!w||(j({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e))}))}),[i,u,w]),ee=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),fe(e);var t=z(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&f&&f(e),!1}),[f,w]),oe=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),fe(e);var t=K.current.filter((function(e){return k.current&&k.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),K.current=t,t.length>0||(j({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),z(e)&&d&&d(e))}),[k,d,w]),se=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),fe(e),K.current=[],z(e)&&Promise.resolve(i(e)).then((function(t){if(!F(e)||w){var r=[],o=[];t.forEach((function(e){var t=X(D(e,n),2),i=t[0],c=t[1],l=X(N(e,s,a),2),u=l[0],d=l[1],f=S?S(e):null;if(i&&u&&!f)r.push(e);else{var h=[c,d];f&&(h=h.concat(f)),o.push({file:e,errors:h.filter((function(e){return e}))})}})),(!c&&r.length>1||c&&l>=1&&r.length>l)&&(r.forEach((function(e){o.push({file:e,errors:[$]})})),r.splice(0)),j({acceptedFiles:r,fileRejections:o,type:"setFiles"}),h&&h(r,o,e),o.length>0&&m&&m(o,e),r.length>0&&p&&p(r,e)}})),j({type:"reset"})}),[c,n,s,a,l,i,h,p,m,w,S]),le=function(e){return o?null:e},ue=function(e){return y?null:le(e)},de=function(e){return _?null:le(e)},fe=function(e){w&&e.stopPropagation()},he=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onKeyDown,i=e.onFocus,a=e.onBlur,s=e.onClick,c=e.onDragEnter,l=e.onDragOver,u=e.onDragLeave,d=e.onDrop,f=re(e,q);return te(te(ne({onKeyDown:ue(V(r,P)),onFocus:ue(V(i,B)),onBlur:ue(V(a,H)),onClick:le(V(s,G)),onDragEnter:de(V(c,Z)),onDragOver:de(V(l,ee)),onDragLeave:de(V(u,oe)),onDrop:de(V(d,se))},n,k),o||y?{}:{tabIndex:0}),f)}}),[k,P,B,H,G,Z,ee,oe,se,y,_,o]),pe=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),me=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,i=e.onClick,a=re(e,Y),s=ne({accept:n,multiple:c,type:"file",style:{display:"none"},onChange:le(V(o,se)),onClick:le(V(i,pe)),autoComplete:"off",tabIndex:-1},r,x);return te(te({},s),a)}}),[x,n,c,se,o]),ge=A.length,ve=ge>0&&I({files:A,accept:n,minSize:s,maxSize:a,multiple:c,maxFiles:l}),be=ge>0&&!ve;return te(te({},E),{},{isDragAccept:ve,isDragReject:be,isFocused:R&&!o,getRootProps:he,getInputProps:me,rootRef:k,inputRef:x,open:le(L)})}function ce(e,t){switch(t.type){case"focus":return te(te({},e),{},{isFocused:!0});case"blur":return te(te({},e),{},{isFocused:!1});case"openDialog":return te(te({},e),{},{isFileDialogActive:!0});case"closeDialog":return te(te({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return te(te({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return te(te({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return te({},ae);default:return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(76);function o(e,t,n){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(166),o=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,i=e.productionPrefix,a=void 0===i?"jss":i,s=e.seed,c=void 0===s?"":s,l=""===c?"":"".concat(c,"-"),u=0,d=function(){return u+=1};return function(e,t){var i=t.options.name;if(i&&0===i.indexOf("Mui")&&!t.options.link&&!n){if(-1!==o.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(l).concat(i,"-").concat(e.key);return t.options.theme[r.a]&&""===c?"".concat(s,"-").concat(d()):s}return"".concat(l).concat(a).concat(d())}}},function(e,t,n){"use strict";var r=n(0),o=n(15),i=(n(4),n(20)),a=n(14),s=n(18);function c(e){return e.substring(2).toLowerCase()}t.a=function(e){var t=e.children,n=e.disableReactTree,l=void 0!==n&&n,u=e.mouseEvent,d=void 0===u?"onClick":u,f=e.onClickAway,h=e.touchEvent,p=void 0===h?"onTouchEnd":h,m=r.useRef(!1),g=r.useRef(null),v=r.useRef(!1),b=r.useRef(!1);r.useEffect((function(){return setTimeout((function(){v.current=!0}),0),function(){v.current=!1}}),[]);var y=r.useCallback((function(e){g.current=o.findDOMNode(e)}),[]),_=Object(a.a)(t.ref,y),w=Object(s.a)((function(e){var t=b.current;if(b.current=!1,v.current&&g.current&&!function(e){return document.documentElement.clientWidth-1;else n=!Object(i.a)(g.current).documentElement.contains(e.target)||g.current.contains(e.target);n||!l&&t||f(e)}})),S=function(e){return function(n){b.current=!0;var r=t.props[e];r&&r(n)}},k={ref:_};return!1!==p&&(k[p]=S(p)),r.useEffect((function(){if(!1!==p){var e=c(p),t=Object(i.a)(g.current),n=function(){m.current=!0};return t.addEventListener(e,w),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,w),t.removeEventListener("touchmove",n)}}}),[w,p]),!1!==d&&(k[d]=S(d)),r.useEffect((function(){if(!1!==d){var e=c(d),t=Object(i.a)(g.current);return t.addEventListener(e,w),function(){t.removeEventListener(e,w)}}}),[w,d]),r.createElement(r.Fragment,null,r.cloneElement(t,k))}},function(e,t,n){"use strict";var r=n(1),o=n(23),i=n(3),a=n(0),s=(n(4),n(175)),c=n(21),l=n(17),u=n(26),d=n(14),f={entering:{opacity:1},entered:{opacity:1}},h={enter:c.b.enteringScreen,exit:c.b.leavingScreen},p=a.forwardRef((function(e,t){var n=e.children,c=e.disableStrictModeCompat,p=void 0!==c&&c,m=e.in,g=e.onEnter,v=e.onEntered,b=e.onEntering,y=e.onExit,_=e.onExited,w=e.onExiting,S=e.style,k=e.TransitionComponent,x=void 0===k?s.a:k,O=e.timeout,C=void 0===O?h:O,E=Object(i.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),j=Object(l.a)(),R=j.unstable_strictMode&&!p,T=a.useRef(null),A=Object(d.a)(n.ref,t),L=Object(d.a)(R?T:void 0,A),M=function(e){return function(t,n){if(e){var r=R?[T.current,t]:[t,n],i=Object(o.a)(r,2),a=i[0],s=i[1];void 0===s?e(a):e(a,s)}}},$=M(b),D=M((function(e,t){Object(u.b)(e);var n=Object(u.a)({style:S,timeout:C},{mode:"enter"});e.style.webkitTransition=j.transitions.create("opacity",n),e.style.transition=j.transitions.create("opacity",n),g&&g(e,t)})),N=M(v),P=M(w),I=M((function(e){var t=Object(u.a)({style:S,timeout:C},{mode:"exit"});e.style.webkitTransition=j.transitions.create("opacity",t),e.style.transition=j.transitions.create("opacity",t),y&&y(e)})),F=M(_);return a.createElement(x,Object(r.a)({appear:!0,in:m,nodeRef:R?T:void 0,onEnter:D,onEntered:N,onEntering:$,onExit:I,onExited:F,onExiting:P,timeout:C},E),(function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,visibility:"exited"!==e||m?void 0:"hidden"},f[e],S,n.props.style),ref:L},t))}))}));t.a=p},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(342),c=n(5),l=i.forwardRef((function(e,t){var n=e.disableUnderline,c=e.classes,l=e.fullWidth,u=void 0!==l&&l,d=e.inputComponent,f=void 0===d?"input":d,h=e.multiline,p=void 0!==h&&h,m=e.type,g=void 0===m?"text":m,v=Object(o.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return i.createElement(s.a,Object(r.a)({classes:Object(r.a)({},c,{root:Object(a.a)(c.root,!n&&c.underline),underline:null}),fullWidth:u,inputComponent:f,multiline:p,ref:t,type:g},v))}));l.muiName="Input",t.a=Object(c.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(l)},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(131),a=n(0),s=(n(4),n(2)),c=n(49),l=n(57),u=n(5),d=n(8),f=n(14),h=n(440),p=n(80),m="undefined"===typeof window?a.useEffect:a.useLayoutEffect,g=a.forwardRef((function(e,t){var n=e["aria-describedby"],u=e.autoComplete,g=e.autoFocus,v=e.classes,b=e.className,y=(e.color,e.defaultValue),_=e.disabled,w=e.endAdornment,S=(e.error,e.fullWidth),k=void 0!==S&&S,x=e.id,O=e.inputComponent,C=void 0===O?"input":O,E=e.inputProps,j=void 0===E?{}:E,R=e.inputRef,T=(e.margin,e.multiline),A=void 0!==T&&T,L=e.name,M=e.onBlur,$=e.onChange,D=e.onClick,N=e.onFocus,P=e.onKeyDown,I=e.onKeyUp,F=e.placeholder,z=e.readOnly,W=e.renderSuffix,B=e.rows,H=e.rowsMax,U=e.rowsMin,V=e.maxRows,G=e.minRows,K=e.startAdornment,q=e.type,Y=void 0===q?"text":q,J=e.value,X=Object(r.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),Q=null!=j.value?j.value:J,Z=a.useRef(null!=Q).current,ee=a.useRef(),te=a.useCallback((function(e){0}),[]),ne=Object(f.a)(j.ref,te),re=Object(f.a)(R,ne),oe=Object(f.a)(ee,re),ie=a.useState(!1),ae=ie[0],se=ie[1],ce=Object(l.b)();var le=Object(c.a)({props:e,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});le.focused=ce?ce.focused:ae,a.useEffect((function(){!ce&&_&&ae&&(se(!1),M&&M())}),[ce,_,ae,M]);var ue=ce&&ce.onFilled,de=ce&&ce.onEmpty,fe=a.useCallback((function(e){Object(p.b)(e)?ue&&ue():de&&de()}),[ue,de]);m((function(){Z&&fe({value:Q})}),[Q,fe,Z]);a.useEffect((function(){fe(ee.current)}),[]);var he=C,pe=Object(o.a)({},j,{ref:oe});"string"!==typeof he?pe=Object(o.a)({inputRef:oe,type:Y},pe,{ref:null}):A?!B||V||G||H||U?(pe=Object(o.a)({minRows:B||G,rowsMax:H,maxRows:V},pe),he=h.a):he="textarea":pe=Object(o.a)({type:Y},pe);return a.useEffect((function(){ce&&ce.setAdornedStart(Boolean(K))}),[ce,K]),a.createElement("div",Object(o.a)({className:Object(s.a)(v.root,v["color".concat(Object(d.a)(le.color||"primary"))],b,le.disabled&&v.disabled,le.error&&v.error,k&&v.fullWidth,le.focused&&v.focused,ce&&v.formControl,A&&v.multiline,K&&v.adornedStart,w&&v.adornedEnd,"dense"===le.margin&&v.marginDense),onClick:function(e){ee.current&&e.currentTarget===e.target&&ee.current.focus(),D&&D(e)},ref:t},X),K,a.createElement(l.a.Provider,{value:null},a.createElement(he,Object(o.a)({"aria-invalid":le.error,"aria-describedby":n,autoComplete:u,autoFocus:g,defaultValue:y,disabled:le.disabled,id:x,onAnimationStart:function(e){fe("mui-auto-fill-cancel"===e.animationName?ee.current:{value:"x"})},name:L,placeholder:F,readOnly:z,required:le.required,rows:B,value:Q,onKeyDown:P,onKeyUp:I},pe,{className:Object(s.a)(v.input,j.className,le.disabled&&v.disabled,A&&v.inputMultiline,le.hiddenLabel&&v.inputHiddenLabel,K&&v.inputAdornedStart,w&&v.inputAdornedEnd,"search"===Y&&v.inputTypeSearch,"dense"===le.margin&&v.inputMarginDense),onBlur:function(e){M&&M(e),j.onBlur&&j.onBlur(e),ce&&ce.onBlur?ce.onBlur(e):se(!1)},onChange:function(e){if(!Z){var t=e.target||ee.current;if(null==t)throw new Error(Object(i.a)(1));fe({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o-1){var o=ge[e];if(!Array.isArray(o))return U+ee(o)in t&&V+o;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i
|/);\r\n if (m) {\r\n const result = [];\r\n let key = 1;\r\n do {\r\n const p = text.split(m[0]);\r\n p[0] && result.push({p[0]});\r\n\r\n if (m[0].startsWith(');\r\n } else {\r\n let href = m[0].match(/href=\"([^\"]+)\"/) || m[0].match(/href='([^']+)'/);\r\n let target = m[0].match(/target=\"([^\"]+)\"/) || m[0].match(/target='([^']+)'/);\r\n let rel = m[0].match(/rel=\"([^\"]+)\"/) || m[0].match(/rel='([^']+)'/);\r\n const title = m[0].match(/>([^<]*){title ? title[1] : ''});\r\n }\r\n\r\n text = p[1];\r\n\r\n m = text && text.match(/|/);\r\n if (!m) {\r\n p[1] && result.push({p[1]});\r\n }\r\n } while (m);\r\n\r\n return result;\r\n } else {\r\n return text;\r\n }\r\n }\r\n\r\n /**\r\n * Get the smart name of the given state.\r\n * @param {Record | ioBroker.StateObject} states\r\n * @param {string} id\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static getSmartName(states, id, instanceId, noCommon) {\r\n if (!id) {\r\n if (!noCommon) {\r\n if (!states.common) {\r\n return states.smartName;\r\n } else {\r\n if (states && !states.common) {\r\n return states.smartName;\r\n } else {\r\n return states.common.smartName;\r\n }\r\n }\r\n } else {\r\n if (states && !states.common) {\r\n return states.smartName;\r\n } else {\r\n return (states &&\r\n states.common &&\r\n states.common.custom &&\r\n states.common.custom[instanceId]) ?\r\n states.common.custom[instanceId].smartName : undefined;\r\n }\r\n }\r\n } else\r\n if (!noCommon) {\r\n return states[id].common.smartName;\r\n } else {\r\n return (states[id] &&\r\n states[id].common &&\r\n states[id].common.custom &&\r\n states[id].common.custom[instanceId]) ?\r\n states[id].common.custom[instanceId].smartName || null : null;\r\n }\r\n }\r\n\r\n /**\r\n * Get the smart name from a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static getSmartNameFromObj(obj, instanceId, noCommon) {\r\n if (!noCommon) {\r\n if (!obj.common) {\r\n return obj.smartName;\r\n } else {\r\n if (obj && !obj.common) {\r\n return obj.smartName;\r\n } else {\r\n return obj.common.smartName;\r\n }\r\n }\r\n } else {\r\n if (obj && !obj.common) {\r\n return obj.smartName;\r\n } else {\r\n return (obj &&\r\n obj.common &&\r\n obj.common.custom &&\r\n obj.common.custom[instanceId]) ?\r\n obj.common.custom[instanceId].smartName : undefined;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Enable smart name for a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static enableSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = {};\r\n } else {\r\n obj.common.smartName = {};\r\n }\r\n }\r\n\r\n /**\r\n * Completely remove smart name from a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string | number} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static removeSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n if (obj.common && obj.common.custom && obj.common.custom[instanceId]) {\r\n obj.common.custom[instanceId] = null;\r\n }\r\n } else {\r\n obj.common.smartName = null;\r\n }\r\n }\r\n\r\n /**\r\n * Update the smartname of a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} newSmartName\r\n * @param {string | undefined} byON\r\n * @param {string | undefined} smartType\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static updateSmartName(obj, newSmartName, byON, smartType, instanceId, noCommon) {\r\n const language = I18n.getLanguage();\r\n\r\n // convert Old format\r\n if (typeof obj.common.smartName === 'string') {\r\n const nnn = obj.common.smartName;\r\n obj.common.smartName = {};\r\n obj.common.smartName[language] = nnn;\r\n }\r\n\r\n // convert old settings\r\n if (obj.native && obj.native.byON) {\r\n delete obj.native.byON;\r\n let _smartName = obj.common.smartName;\r\n\r\n if (!_smartName || typeof _smartName !== 'object') {\r\n _smartName = {en: _smartName};\r\n _smartName[language] = _smartName.en;\r\n }\r\n obj.common.smartName = _smartName;\r\n }\r\n if (smartType !== undefined) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n if (!smartType) {\r\n delete obj.common.custom[instanceId].smartName.smartType;\r\n } else {\r\n obj.common.custom[instanceId].smartName.smartType = smartType;\r\n }\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n if (!smartType) {\r\n delete obj.common.smartName.smartType;\r\n } else {\r\n obj.common.smartName.smartType = smartType;\r\n }\r\n\r\n }\r\n }\r\n if (byON !== undefined) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n obj.common.custom[instanceId].smartName.byON = byON;\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n obj.common.smartName.byON = byON;\r\n }\r\n }\r\n if (newSmartName !== undefined) {\r\n let smartName;\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n smartName = obj.common.custom[instanceId].smartName;\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n smartName = obj.common.smartName;\r\n }\r\n smartName[language] = newSmartName;\r\n\r\n // If smart name deleted\r\n if (smartName && (!smartName[language] ||\r\n (smartName[language] === obj.common.name &&\r\n (!obj.common.role || obj.common.role.indexOf('button') >= 0)))) {\r\n delete smartName[language];\r\n let empty = true;\r\n // Check if structure has any definitions\r\n for (const key in smartName) {\r\n if (smartName.hasOwnProperty(key)) {\r\n empty = false;\r\n break;\r\n }\r\n }\r\n // If empty => delete smartName completely\r\n if (empty) {\r\n if (noCommon) {\r\n if (obj.common.custom[instanceId].smartName.byON === undefined) {\r\n delete obj.common.custom[instanceId];\r\n } else {\r\n delete obj.common.custom[instanceId].en;\r\n delete obj.common.custom[instanceId].de;\r\n delete obj.common.custom[instanceId].ru;\r\n delete obj.common.custom[instanceId].nl;\r\n delete obj.common.custom[instanceId].pl;\r\n delete obj.common.custom[instanceId].it;\r\n delete obj.common.custom[instanceId].fr;\r\n delete obj.common.custom[instanceId].pt;\r\n delete obj.common.custom[instanceId].es;\r\n delete obj.common.custom[instanceId]['zh-cn'];\r\n }\r\n } else {\r\n if (obj.common.smartName.byON !== undefined) {\r\n delete obj.common.smartName.en;\r\n delete obj.common.smartName.de;\r\n delete obj.common.smartName.ru;\r\n delete obj.common.smartName.nl;\r\n delete obj.common.smartName.pl;\r\n delete obj.common.smartName.it;\r\n delete obj.common.smartName.fr;\r\n delete obj.common.smartName.pt;\r\n delete obj.common.smartName.es;\r\n delete obj.common.smartName['zh-cn'];\r\n } else {\r\n obj.common.smartName = null;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Disable the smart name of a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static disableSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = false;\r\n } else {\r\n obj.common.smartName = false;\r\n }\r\n }\r\n\r\n /**\r\n * Copy text to the clipboard.\r\n * @param {string} text\r\n * @param {Event} [e]\r\n */\r\n static copyToClipboard(text, e) {\r\n const el = window.document.createElement('textarea');\r\n el.value = text;\r\n window.document.body.appendChild(el);\r\n el.select();\r\n window.document.execCommand('copy');\r\n window.document.body.removeChild(el);\r\n console.log(text);\r\n e && e.stopPropagation();\r\n e && e.preventDefault();\r\n }\r\n\r\n /**\r\n * Gets the extension of a file name.\r\n * @param {string | null} [fileName] the file name.\r\n * @returns {string | null} The extension in lower case.\r\n */\r\n static getFileExtension(fileName) {\r\n const pos = (fileName || '').lastIndexOf('.');\r\n if (pos !== -1) {\r\n return fileName.substring(pos + 1).toLowerCase();\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Format number of bytes as a string with B, KB, MB or GB.\r\n * The base for all calculations is 1024.\r\n * @param {number} bytes The number of bytes.\r\n * @returns {string} The formatted string (e.g. '723.5 KB')\r\n */\r\n static formatBytes(bytes) {\r\n if (Math.abs(bytes) < 1024) {\r\n return bytes + ' B';\r\n }\r\n\r\n const units = ['KB','MB','GB'];\r\n //const units = ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];\r\n let u = -1;\r\n\r\n do {\r\n bytes /= 1024;\r\n ++u;\r\n } while (Math.abs(bytes) >= 1024 && u < units.length - 1);\r\n\r\n return bytes.toFixed(1) + ' ' + units[u];\r\n }\r\n\r\n /**\r\n * Invert the given color according to theme type to get the inverted text color for background\r\n * @param {string} color Color in the format '#rrggbb' or '#rgb' (or without hash)\r\n * @param {string} themeType theme type\r\n * @param {string} invert dark theme has light color in control or light theme has light color in control\r\n * @returns {string}\r\n */\r\n static getInvertedColor(color, themeType, invert) {\r\n if (!color) {\r\n return undefined;\r\n } else {\r\n const invertedColor = Utils.invertColor(color, true);\r\n if (invertedColor === '#FFFFFF' && (themeType === 'dark' || (invert && themeType === 'light'))) {\r\n return '#DDD';\r\n } else\r\n if (invertedColor === '#000000' && (themeType === 'light' || (invert && themeType === 'dark'))) {\r\n return '#222';\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n // Big thanks to: https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color\r\n /**\r\n * Invert the given color\r\n * @param {string} hex Color in the format '#rrggbb' or '#rgb' (or without hash)\r\n * @param {boolean} bw Set to black or white.\r\n * @returns {string}\r\n */\r\n static invertColor(hex, bw) {\r\n if (hex === undefined || hex === null || hex === '' || typeof hex !== 'string') {\r\n return '';\r\n }\r\n if (hex.startsWith('rgba')) {\r\n const m = hex.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*([.\\d]+)\\)/);\r\n if (m) {\r\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0');\r\n }\r\n } else if (hex.startsWith('rgba')) {\r\n const m = hex.match(/rgb?\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)/);\r\n if (m) {\r\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0');\r\n }\r\n } else\r\n if (hex.startsWith('#')) {\r\n hex = hex.slice(1);\r\n }\r\n // convert 3-digit hex to 6-digits.\r\n if (hex.length === 3) {\r\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\r\n }\r\n if (hex.length !== 6) {\r\n console.warn('Cannot invert color: ' + hex);\r\n return hex;\r\n }\r\n let r = parseInt(hex.slice(0, 2), 16);\r\n let g = parseInt(hex.slice(2, 4), 16);\r\n let b = parseInt(hex.slice(4, 6), 16);\r\n\r\n if (bw) {\r\n // http://stackoverflow.com/a/3943023/112731\r\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\r\n ? '#000000'\r\n : '#FFFFFF';\r\n }\r\n // invert color components\r\n r = (255 - r).toString(16);\r\n g = (255 - g).toString(16);\r\n b = (255 - b).toString(16);\r\n // pad each with zeros and return\r\n return '#' + r.padStart(2, '0') + g.padStart(2, '0') + b.padStart(2, '0');\r\n }\r\n\r\n // https://github.com/lukeed/clsx/blob/master/src/index.js\r\n // License\r\n // MIT © Luke Edwards\r\n /**\r\n * @private\r\n * @param {any} mix\r\n * @returns {string}\r\n */\r\n static _toVal(mix) {\r\n let k, y, str='';\r\n\r\n if (typeof mix === 'string' || typeof mix === 'number') {\r\n str += mix;\r\n } else if (typeof mix === 'object') {\r\n if (Array.isArray(mix)) {\r\n for (k=0; k < mix.length; k++) {\r\n if (mix[k]) {\r\n if ((y = Utils._toVal(mix[k]))) {\r\n str && (str += ' ');\r\n str += y;\r\n }\r\n }\r\n }\r\n } else {\r\n for (k in mix) {\r\n if (mix[k]) {\r\n str && (str += ' ');\r\n str += k;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n // https://github.com/lukeed/clsx/blob/master/src/index.js\r\n // License\r\n // MIT © Luke Edwards\r\n /**\r\n * Convert any object to a string with its values.\r\n * @returns {string}\r\n */\r\n static clsx () {\r\n let i = 0;\r\n let tmp;\r\n let x;\r\n let str = '';\r\n while (i < arguments.length) {\r\n if ((tmp = arguments[i++])) {\r\n if ((x = Utils._toVal(tmp))) {\r\n str && (str += ' ');\r\n str += x\r\n }\r\n }\r\n }\r\n return str;\r\n }\r\n\r\n /**\r\n * Get the current theme name (either from local storage or the browser settings).\r\n * @param {string} [themeName]\r\n * @returns {string}\r\n */\r\n static getThemeName(themeName = '') {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return window.vendorPrefix;\r\n }\r\n\r\n return themeName ? themeName : window.localStorage && window.localStorage.getItem('App.themeName') ?\r\n window.localStorage.getItem('App.themeName') : window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'colored';\r\n }\r\n\r\n /**\r\n * Get the type of theme.\r\n * @param {string} [themeName]\r\n * @returns {'dark' | 'light'}\r\n */\r\n static getThemeType(themeName = '') {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return 'light';\r\n }\r\n\r\n themeName = themeName || (window.localStorage && window.localStorage.getItem('App.themeName'));\r\n return themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light';\r\n }\r\n\r\n /**\r\n * Set the theme name and theme type.\r\n * @param {string} themeName\r\n */\r\n static setThemeName(themeName) {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return; // ignore\r\n }\r\n window.localStorage.setItem('App.themeName', themeName);\r\n window.localStorage.setItem('App.theme', themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light');\r\n }\r\n\r\n /**\r\n * Toggle the theme name between 'dark' and 'colored'.\r\n * @param {string | null} themeName\r\n * @returns {string} the new theme name.\r\n */\r\n static toggleTheme(themeName) {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return window.vendorPrefix;\r\n }\r\n themeName = themeName || (window.localStorage && window.localStorage.getItem('App.themeName'));\r\n\r\n // dark => blue => colored => light => dark\r\n const themes = Utils.getThemeNames();\r\n const pos = themes.indexOf(themeName);\r\n let newTheme;\r\n if (pos !== -1) {\r\n newTheme = themes[(pos + 1) % themes.length];\r\n } else {\r\n newTheme = themes[0];\r\n }\r\n Utils.setThemeName(newTheme);\r\n\r\n return newTheme;\r\n }\r\n\r\n /**\r\n * Get the list of themes\r\n * @returns {array} list of possible themes\r\n */\r\n static getThemeNames() {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return [window.vendorPrefix];\r\n }\r\n\r\n return ['light', 'dark', 'blue', 'colored'];\r\n }\r\n\r\n /**\r\n * Parse a query string into its parts.\r\n * @param {string} query\r\n * @returns {Record}\r\n */\r\n static parseQuery(query) {\r\n query = (query || '').toString().replace(/^\\?/, '');\r\n /** @type {Record} */\r\n const result = {};\r\n query.split('&').forEach(part => {\r\n part = part.trim();\r\n if (part) {\r\n const parts = part.split('=');\r\n const attr = decodeURIComponent(parts[0]).trim();\r\n if (parts.length > 1) {\r\n result[attr] = decodeURIComponent(parts[1]);\r\n if (result[attr] === 'true') {\r\n result[attr] = true;\r\n } else if (result[attr] === 'false') {\r\n result[attr] = false;\r\n } else {\r\n const f = parseFloat(result[attr]);\r\n if (f.toString() === result[attr]) {\r\n result[attr] = f;\r\n }\r\n }\r\n } else {\r\n result[attr] = true;\r\n }\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns parent ID.\r\n * @param {string} id\r\n * @returns {string | null} parent ID or null if no parent\r\n */\r\n static getParentId(id) {\r\n const p = (id || '').toString().split('.');\r\n if (p.length > 1) {\r\n p.pop();\r\n return p.join('.');\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n static formatDate(dateObj, dateFormat) {\r\n // format could be DD.MM.YYYY, YYYY.MM.DD or MM/DD/YYYY\r\n\r\n if (!dateObj) {\r\n return '';\r\n }\r\n\r\n let text;\r\n let mm = dateObj.getMonth() + 1;\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n\r\n let dd = dateObj.getDate();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n\r\n if (dateFormat === 'MM/DD/YYYY') {\r\n text = mm + '/' + dd + '/' + dateObj.getFullYear();\r\n } else {\r\n text = dateObj.getFullYear() + '-' + mm + '-' + dd;\r\n }\r\n\r\n // time\r\n let v = dateObj.getHours();\r\n if (v < 10) {\r\n text += ' 0' + v;\r\n } else {\r\n text += ' ' + v;\r\n }\r\n v = dateObj.getMinutes();\r\n if (v < 10) {\r\n text += ':0' + v;\r\n } else {\r\n text += ':' + v;\r\n }\r\n\r\n v = dateObj.getSeconds();\r\n if (v < 10) {\r\n text += ':0' + v;\r\n } else {\r\n text += ':' + v;\r\n }\r\n\r\n v = dateObj.getMilliseconds();\r\n if (v < 10) {\r\n text += '.00' + v;\r\n } else if (v < 100) {\r\n text += '.0' + v;\r\n } else {\r\n text += '.' + v;\r\n }\r\n\r\n return text;\r\n }\r\n\r\n static formatTime(seconds) {\r\n if (seconds) {\r\n seconds = Math.round(seconds);\r\n const d = Math.floor(seconds / (3600 * 24));\r\n const h = Math.floor((seconds % (3600 * 24)) / 3600);\r\n const m = Math.floor((seconds % 3600) / 60);\r\n const s = seconds % 60;\r\n if (d) {\r\n return `${d}.${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n } else if (h) {\r\n return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n } else {\r\n return `0:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n }\r\n } else {\r\n return '0:00:00';\r\n }\r\n }\r\n\r\n static MDtext2link(text) {\r\n const m = text.match(/\\d+\\.\\)\\s/);\r\n if (m) {\r\n text = text.replace(m[0], m[0].replace(/\\s/, ' '));\r\n }\r\n\r\n return text.replace(/[^a-zA-Zа-яА-Я0-9]/g, '').trim().replace(/\\s/g, '').toLowerCase();\r\n }\r\n\r\n static openLink(url, target) {\r\n if (target === 'this') {\r\n window.location = url;\r\n } else {\r\n window.open(url, target || '_blank');\r\n }\r\n }\r\n\r\n static MDgetTitle(text) {\r\n let {body, header} = Utils.extractHeader(text);\r\n if (!header.title) {\r\n // remove {docsify-bla}\r\n body = body.replace(/{[^}]*}/g, '');\r\n body = body.trim();\r\n const lines = body.replace(/\\r/g, '').split('\\n');\r\n for (let i = 0; i < lines.length; i++) {\r\n if (lines[i].startsWith('# ')) {\r\n return lines[i].substring(2).trim();\r\n }\r\n }\r\n return '';\r\n } else {\r\n return header.title;\r\n }\r\n }\r\n\r\n static MDextractHeader(text) {\r\n const attrs = {};\r\n if (text.substring(0, 3) === '---') {\r\n const pos = text.substring(3).indexOf('\\n---');\r\n if (pos !== -1) {\r\n const _header = text.substring(3, pos + 3);\r\n const lines = _header.replace(/\\r/g, '').split('\\n');\r\n lines.forEach(line => {\r\n if (!line.trim()) {\r\n return;\r\n }\r\n const pos = line.indexOf(':');\r\n if (pos !== -1) {\r\n const attr = line.substring(0, pos).trim();\r\n attrs[attr] = line.substring(pos + 1).trim();\r\n attrs[attr] = attrs[attr].replace(/^['\"]|['\"]$/g, '');\r\n if (attrs[attr] === 'true') {\r\n attrs[attr] = true;\r\n } else if (attrs[attr] === 'false') {\r\n attrs[attr] = false;\r\n } else if (parseFloat(attrs[attr]).toString() === attrs[attr]) {\r\n attrs[attr] = parseFloat(attrs[attr]);\r\n }\r\n } else {\r\n attrs[line.trim()] = true;\r\n }\r\n });\r\n text = text.substring(pos + 7);\r\n }\r\n }\r\n return {header: attrs, body: text};\r\n }\r\n\r\n static MDremoveDocsify(text) {\r\n const m = text.match(/{docsify-[^}]*}/g);\r\n if (m) {\r\n m.forEach(doc => text = text.replace(doc, ''));\r\n }\r\n return text;\r\n }\r\n\r\n /**\r\n * Generate the json file on the file for download.\r\n * @param {string} filename file name\r\n * @returns {object} json structure (not stringified)\r\n */\r\n static generateFile(filename, json) {\r\n let el = document.createElement('a');\r\n el.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(json, null, 2)));\r\n el.setAttribute('download', filename);\r\n\r\n el.style.display = 'none';\r\n document.body.appendChild(el);\r\n\r\n el.click();\r\n\r\n document.body.removeChild(el);\r\n }\r\n\r\n /**\r\n * Convert quality code into text\r\n * @param {number} quality code\r\n * @returns {array} lines that decode qulity\r\n */\r\n static quality2text(quality) {\r\n const custom = quality & 0xFFFF0000;\r\n const text = QUALITY_BITS[quality];\r\n let result;\r\n if (text) {\r\n result = [text];\r\n } else if (quality & 0x01) {\r\n result = [QUALITY_BITS[0x01], '0x' + (quality & (0xFFFF & ~1)).toString(16)];\r\n } else if (quality & 0x02) {\r\n result = [QUALITY_BITS[0x02], '0x' + (quality & (0xFFFF & ~2)).toString(16)];\r\n } else {\r\n result = ['0x' + quality.toString(16)];\r\n }\r\n if (custom) {\r\n result.push('0x' + (custom >> 16).toString(16).toUpperCase());\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Deep copy object\r\n * @param {object} object\r\n * @returns {object}\r\n */\r\n static clone(object) {\r\n return JSON.parse(JSON.stringify(object));\r\n }\r\n\r\n /**\r\n * Get states of object\r\n * @param {object} obj\r\n * @returns {object} states as an object in form {\"value1\": \"label1\", \"value2\": \"label2\"} or null\r\n */\r\n static getStates(obj) {\r\n let states = obj?.common?.states;\r\n if (states) {\r\n if (typeof states === 'string' && states[0] === '{') {\r\n try {\r\n states = JSON.parse(states);\r\n } catch (ex) {\r\n console.error(`Cannot parse states: ${states}`);\r\n states = null;\r\n }\r\n } else\r\n // if old format val1:text1;val2:text2\r\n if (typeof states === 'string') {\r\n const parts = states.split(';');\r\n states = {};\r\n for (let p = 0; p < parts.length; p++) {\r\n const s = parts[p].split(':');\r\n states[s[0]] = s[1];\r\n }\r\n } else if (Array.isArray(states)) {\r\n const result = {};\r\n states.forEach((value, key) => result[key] = value);\r\n return result;\r\n }\r\n }\r\n return states;\r\n }\r\n\r\n /**\r\n * Get svg file as text\r\n * @param {string} url URL of SVG file\r\n * @returns {object} Promise with \"data:image...\"\r\n */\r\n static getSvg(url) {\r\n return fetch(url)\r\n .then(response => response.blob())\r\n .then(blob => {\r\n return new Promise(resolve => {\r\n const reader = new FileReader();\r\n reader.onload = function() { // do not optimize this function. \"this\" is important.\r\n resolve(this.result);\r\n };\r\n reader.readAsDataURL(blob);\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport default Utils;\r\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import * as React from 'react';\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nexport default function useId(idOverride) {\n var _React$useState = React.useState(idOverride),\n defaultId = _React$useState[0],\n setDefaultId = _React$useState[1];\n\n var id = idOverride || defaultId;\n React.useEffect(function () {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the random value for client-side rendering only.\n // We can't use it server-side.\n setDefaultId(\"mui-\".concat(Math.round(Math.random() * 1e5)));\n }\n }, [defaultId]);\n return id;\n}","import { deepmerge } from '@material-ui/utils';\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n\n });\n}\n\nexport default merge;","export { default } from './Button';","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc.defaultView || window;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","export { default } from './Dialog';","export { default } from './DialogActions';","export { default } from './DialogContent';","export { default } from './DialogContentText';","export { default } from './DialogTitle';","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return _extends({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return _extends({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, _defineProperty({}, breakpoints.up('sm'), _extends({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, _defineProperty(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), _defineProperty(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\nimport { deepmerge } from '@material-ui/utils';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport indigo from '../colors/indigo';\nimport pink from '../colors/pink';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport green from '../colors/green';\nimport { darken, getContrastRatio, lighten } from './colorManipulator';\nexport var light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: grey[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport var dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: grey[800],\n default: '#303030'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\n\nexport default function createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: indigo[300],\n main: indigo[500],\n dark: indigo[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: pink.A200,\n main: pink.A400,\n dark: pink.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: red[300],\n main: red[500],\n dark: red[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: orange[300],\n main: orange[500],\n dark: orange[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: blue[300],\n main: blue[500],\n dark: blue[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: green[300],\n main: green[500],\n dark: green[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = _objectWithoutProperties(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n\n function getContrastText(background) {\n var contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = getContrastRatio(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = _extends({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : _formatMuiErrorMessage(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: common,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nexport default function createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = _objectWithoutProperties(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return _extends({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return deepmerge(_extends({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","var shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","var shape = {\n borderRadius: 4\n};\nexport default shape;","import { createUnarySpacing } from '@material-ui/system';\nvar warnOnce;\nexport default function createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = createUnarySpacing({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\nimport createBreakpoints from './createBreakpoints';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport transitions from './transitions';\nimport zIndex from './zIndex';\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = _objectWithoutProperties(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n\n var palette = createPalette(paletteInput);\n var breakpoints = createBreakpoints(breakpointsInput);\n var spacing = createSpacing(spacingInput);\n var muiTheme = deepmerge({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: createMixins(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: shadows,\n typography: createTypography(palette, typographyInput),\n spacing: spacing,\n shape: shape,\n transitions: transitions,\n zIndex: zIndex\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return deepmerge(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: _defineProperty({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\nexport function createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\nexport default createTheme;","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","var common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj) {\n var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\"\n}), 'Delete');\n\nexports.default = _default;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\nexport default isBrowser;\n","import { isRegExp, isString } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n // eslint-disable-next-line no-param-reassign\n colno = ll;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString: string): string {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n","export { default } from './FormControl';\nexport { default as useFormControl } from './useFormControl';","export { default } from './Modal';\nexport { default as ModalManager } from './ModalManager';","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport PropTypes from 'prop-types';\nimport merge from './merge'; // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nvar values = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n};\nvar defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: function up(key) {\n return \"@media (min-width:\".concat(values[key], \"px)\");\n }\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n if (process.env.NODE_ENV !== 'production') {\n if (!props.theme) {\n console.error('Material-UI: You are calling a style function without a theme value.');\n }\n }\n\n if (Array.isArray(propValue)) {\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n return propValue.reduce(function (acc, item, index) {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (_typeof(propValue) === 'object') {\n var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n\n return Object.keys(propValue).reduce(function (acc, breakpoint) {\n acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);\n return acc;\n }, {});\n }\n\n var output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var base = styleFunction(props);\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n var extended = themeBreakpoints.keys.reduce(function (acc, key) {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme: props.theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return merge(base, extended);\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n\nexport default breakpoints;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","import React from 'react';\nimport { ProviderContext } from '.';\n\n// @ts-ignore\nexport default React.createContext();\n","import Slide from '@material-ui/core/Slide';\nimport { SnackbarClassKey } from '@material-ui/core/Snackbar';\nimport { CloseReason, ContainerClassKey, SnackbarProviderProps, VariantType, SnackbarOrigin, VariantClassKey } from '../index';\nimport { SnackbarItemProps } from '../SnackbarItem';\nimport { Snack } from '../SnackbarProvider';\n\nexport const allClasses: {\n mui: Record;\n container: Record;\n} = {\n mui: {\n root: {},\n anchorOriginTopCenter: {},\n anchorOriginBottomCenter: {},\n anchorOriginTopRight: {},\n anchorOriginBottomRight: {},\n anchorOriginTopLeft: {},\n anchorOriginBottomLeft: {},\n },\n container: {\n containerRoot: {},\n containerAnchorOriginTopCenter: {},\n containerAnchorOriginBottomCenter: {},\n containerAnchorOriginTopRight: {},\n containerAnchorOriginBottomRight: {},\n containerAnchorOriginTopLeft: {},\n containerAnchorOriginBottomLeft: {},\n },\n};\n\nexport const MESSAGES = {\n NO_PERSIST_ALL: 'WARNING - notistack: Reached maxSnack while all enqueued snackbars have \\'persist\\' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented.',\n};\n\nexport const SNACKBAR_INDENTS = {\n view: { default: 20, dense: 4 },\n snackbar: { default: 6, dense: 2 },\n};\n\nexport const DEFAULTS = {\n maxSnack: 3,\n dense: false,\n hideIconVariant: false,\n variant: 'default' as VariantType,\n autoHideDuration: 5000,\n anchorOrigin: { vertical: 'bottom', horizontal: 'left' } as SnackbarOrigin,\n TransitionComponent: Slide,\n transitionDuration: {\n enter: 225,\n exit: 195,\n },\n};\n\nexport const capitalise = (text: string): string => text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const originKeyExtractor = (anchor: Snack['anchorOrigin']): string => (\n `${capitalise(anchor.vertical)}${capitalise(anchor.horizontal)}`\n);\n\n/**\n * Omit SnackbarContainer class keys that are not needed for SnackbarItem\n */\nexport const omitContainerKeys = (classes: SnackbarProviderProps['classes']): SnackbarItemProps['classes'] => (\n // @ts-ignore\n Object.keys(classes).filter(key => !allClasses.container[key]).reduce((obj, key) => ({ ...obj, [key]: classes[key] }), {})\n);\n\nexport const REASONS: { [key: string]: CloseReason } = {\n TIMEOUT: 'timeout',\n CLICKAWAY: 'clickaway',\n MAXSNACK: 'maxsnack',\n INSTRUCTED: 'instructed',\n};\n\n/** Tranforms classes name */\nexport const transformer = {\n toContainerAnchorOrigin: (origin: string) => `containerAnchorOrigin${origin}` as ContainerClassKey,\n toAnchorOrigin: ({ vertical, horizontal }: SnackbarOrigin) => (\n `anchorOrigin${capitalise(vertical)}${capitalise(horizontal)}` as SnackbarClassKey\n ),\n toVariant: (variant: VariantType) => `variant${capitalise(variant)}` as VariantClassKey,\n};\n\nexport const isDefined = (value: string | null | undefined | number): boolean => (!!value || value === 0);\n\nconst numberOrNull = (numberish?: number | null) => (\n typeof numberish === 'number' || numberish === null\n);\n\n// @ts-ignore\nexport const merge = (options, props, defaults) => (name: keyof Snack): any => {\n if (name === 'autoHideDuration') {\n if (numberOrNull(options.autoHideDuration)) return options.autoHideDuration;\n if (numberOrNull(props.autoHideDuration)) return props.autoHideDuration;\n return DEFAULTS.autoHideDuration;\n }\n\n return options[name] || props[name] || defaults[name];\n};\n\nexport function objectMerge(options = {}, props = {}, defaults = {}) {\n return {\n ...defaults,\n ...props,\n ...options,\n };\n}\n","import React, { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { createStyles, Theme, withStyles, WithStyles } from '@material-ui/core/styles';\nimport { SnackbarContentProps } from '../index';\n\nconst styles = (theme: Theme) => createStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n flexGrow: 1,\n [theme.breakpoints.up('sm')]: {\n flexGrow: 'initial',\n minWidth: 288,\n },\n }\n});\n\ninterface Props extends WithStyles, SnackbarContentProps { }\n\nconst SnackbarContent = forwardRef(({ classes, className, ...props }, ref) => (\n
\n))\n\nexport default withStyles(styles)(SnackbarContent);\n","import { Snack } from '../SnackbarProvider';\n\nconst DIRECTION = {\n right: 'left',\n left: 'right',\n bottom: 'up',\n top: 'down',\n} as const;\nexport type DirectionType = typeof DIRECTION[keyof typeof DIRECTION]\n\nexport const getTransitionDirection = (anchorOrigin: Snack['anchorOrigin']): DirectionType => {\n if (anchorOrigin.horizontal !== 'center') {\n return DIRECTION[anchorOrigin.horizontal];\n }\n return DIRECTION[anchorOrigin.vertical];\n};\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\nimport { IconVariant } from '../index';\n\ntype Icon = (props: SvgIconProps) => JSX.Element;\n\nconst CheckIcon: Icon = props => (\n \n \n \n);\n\nconst WarningIcon: Icon = props => (\n \n \n \n);\n\nconst ErrorIcon: Icon = props => (\n \n \n \n);\n\nconst InfoIcon: Icon = props => (\n \n \n \n);\n\nconst iconStyles = {\n fontSize: 20,\n marginInlineEnd: 8,\n};\n\nconst defaultIconVariants: IconVariant = {\n default: undefined,\n success: ,\n warning: ,\n error: ,\n info: ,\n};\n\nexport default defaultIconVariants;\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/createChainedFunction.js\n */\nexport default function createChainedFunction(funcs, extraArg) {\n return funcs.reduce((acc, func) => {\n if (func == null) return acc;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof func !== 'function') {\n // eslint-disable-next-line no-console\n console.error('Invalid Argument Type. must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction(...args) {\n const argums = [...args];\n if (extraArg && argums.indexOf(extraArg) === -1) {\n argums.push(extraArg);\n }\n acc.apply(this, argums);\n func.apply(this, argums);\n };\n }, () => { });\n}\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/useEventCallback.js\n */\nimport * as React from 'react';\n\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\nexport default function useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useCallback((...args) => (0, ref.current)(...args), []);\n}\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Snackbar/Snackbar.js\n */\nimport * as React from 'react';\nimport ClickAwayListener from '@material-ui/core/ClickAwayListener';\nimport { REASONS } from '../utils/constants';\nimport useEventCallback from '../utils/useEventCallback';\n\nconst Snackbar = React.forwardRef((props, ref) => {\n const {\n children,\n autoHideDuration,\n ClickAwayListenerProps,\n disableWindowBlurListener = false,\n onClose,\n onMouseEnter,\n onMouseLeave,\n open,\n resumeHideDuration,\n ...other\n } = props;\n\n const timerAutoHide = React.useRef();\n\n const handleClose = useEventCallback((...args) => {\n if (onClose) {\n onClose(...args);\n }\n });\n\n const setAutoHideTimer = useEventCallback((autoHideDurationParam) => {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(() => {\n handleClose(null, REASONS.TIMEOUT);\n }, autoHideDurationParam);\n });\n\n React.useEffect(() => {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return () => {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]);\n\n /**\n * Pause the timer when the user is interacting with the Snackbar\n * or when the user hide the window.\n */\n const handlePause = () => {\n clearTimeout(timerAutoHide.current);\n };\n\n /**\n * Restart the timer when the user is no longer interacting with the Snackbar\n * or when the window is shown back.\n */\n const handleResume = React.useCallback(() => {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n const handleMouseEnter = (event) => {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n handlePause();\n };\n\n const handleMouseLeave = (event) => {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n handleResume();\n };\n\n const handleClickAway = (event) => {\n if (onClose) {\n onClose(event, REASONS.CLICKAWAY);\n }\n };\n\n React.useEffect(() => {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n\n return () => {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]);\n\n return (\n \n
\n {children}\n
\n
\n );\n});\n\nexport default Snackbar;\n","import React, { useState, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport { withStyles, WithStyles, createStyles, Theme, emphasize } from '@material-ui/core/styles';\nimport Collapse from '@material-ui/core/Collapse';\nimport SnackbarContent from '../SnackbarContent';\nimport { getTransitionDirection } from './SnackbarItem.util';\nimport { allClasses, REASONS, objectMerge, DEFAULTS, transformer } from '../utils/constants';\nimport { SharedProps, RequiredBy, TransitionHandlerProps, SnackbarProviderProps as ProviderProps } from '../index';\nimport defaultIconVariants from '../utils/defaultIconVariants';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport { Snack } from '../SnackbarProvider';\nimport Snackbar from './Snackbar';\n\nconst styles = (theme: Theme) => {\n // @ts-ignore\n const mode = theme.palette.mode || theme.palette.type;\n const backgroundColor = emphasize(theme.palette.background.default, mode === 'light' ? 0.8 : 0.98);\n return createStyles({\n ...allClasses.mui,\n contentRoot: {\n ...theme.typography.body2,\n backgroundColor,\n color: theme.palette.getContrastText(backgroundColor),\n alignItems: 'center',\n padding: '6px 16px',\n borderRadius: '4px',\n boxShadow: '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)',\n },\n lessPadding: {\n paddingLeft: 8 * 2.5,\n },\n variantSuccess: {\n backgroundColor: '#43a047', // green\n color: '#fff',\n },\n variantError: {\n backgroundColor: '#d32f2f', // dark red\n color: '#fff',\n },\n variantInfo: {\n backgroundColor: '#2196f3', // nice blue\n color: '#fff',\n },\n variantWarning: {\n backgroundColor: '#ff9800', // amber\n color: '#fff',\n },\n message: {\n display: 'flex',\n alignItems: 'center',\n padding: '8px 0',\n },\n action: {\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: 16,\n marginRight: -8,\n },\n wrappedRoot: {\n position: 'relative',\n transform: 'translateX(0)',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n },\n });\n}\n\n\ntype RemovedProps =\n | 'variant' // the one received from Provider is processed and passed to snack prop \n | 'anchorOrigin' // same as above\n | 'autoHideDuration' // same as above\n | 'preventDuplicate' // the one recevied from enqueueSnackbar is processed in provider, therefore shouldn't be passed to SnackbarItem */\n\n\nexport interface SnackbarItemProps extends WithStyles, RequiredBy, 'onEntered' | 'onExited' | 'onClose'> {\n snack: Snack;\n dense: ProviderProps['dense'];\n iconVariant: ProviderProps['iconVariant'];\n hideIconVariant: ProviderProps['hideIconVariant'];\n}\n\nconst SnackbarItem: React.FC = ({ classes, ...props }) => {\n const timeout = useRef>();\n const [collapsed, setCollapsed] = useState(true);\n\n useEffect(() => (): void => {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n }, []);\n\n const handleClose = createChainedFunction([props.snack.onClose, props.onClose], props.snack.key);\n\n const handleEntered: TransitionHandlerProps['onEntered'] = () => {\n if (props.snack.requestClose) {\n handleClose(null, REASONS.INSTRCUTED);\n }\n };\n\n const handleExitedScreen = (): void => {\n timeout.current = setTimeout(() => {\n setCollapsed(!collapsed);\n }, 125);\n };\n\n const {\n style,\n dense,\n ariaAttributes: otherAriaAttributes,\n className: otherClassName,\n hideIconVariant,\n iconVariant,\n snack,\n action: otherAction,\n content: otherContent,\n TransitionComponent: otherTranComponent,\n TransitionProps: otherTranProps,\n transitionDuration: otherTranDuration,\n onEnter: ignoredOnEnter,\n onEntered: ignoredOnEntered,\n onEntering: ignoredOnEntering,\n onExit: ignoredOnExit,\n onExited: ignoredOnExited,\n onExiting: ignoredOnExiting,\n ...other\n } = props;\n\n const {\n persist,\n key,\n open,\n entered,\n requestClose,\n className: singleClassName,\n variant,\n content: singleContent,\n action: singleAction,\n ariaAttributes: singleAriaAttributes,\n anchorOrigin,\n message: snackMessage,\n TransitionComponent: singleTranComponent,\n TransitionProps: singleTranProps,\n transitionDuration: singleTranDuration,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n ...singleSnackProps\n } = snack;\n\n const icon = {\n ...defaultIconVariants,\n ...iconVariant,\n }[variant];\n\n const ariaAttributes = {\n 'aria-describedby': 'notistack-snackbar',\n ...objectMerge(singleAriaAttributes, otherAriaAttributes),\n };\n\n const TransitionComponent = singleTranComponent || otherTranComponent || DEFAULTS.TransitionComponent;\n const transitionDuration = objectMerge(singleTranDuration, otherTranDuration, DEFAULTS.transitionDuration);\n const transitionProps = {\n direction: getTransitionDirection(anchorOrigin),\n ...objectMerge(singleTranProps, otherTranProps),\n };\n\n let action = singleAction || otherAction;\n if (typeof action === 'function') {\n action = action(key);\n }\n\n let content = singleContent || otherContent;\n if (typeof content === 'function') {\n content = content(key, snack.message);\n }\n\n const callbacks: { [key in keyof TransitionHandlerProps]?: any } =\n ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].reduce((acc, cbName) => ({\n ...acc,\n // @ts-ignore\n [cbName]: createChainedFunction([props.snack[cbName], props[cbName]], props.snack.key),\n }), {});\n\n return (\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n {content || (\n \n
\n {!hideIconVariant ? icon : null}\n {snackMessage}\n
\n {action && (\n
{action}
\n )}\n \n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(SnackbarItem);\n","import React from 'react';\nimport clsx from 'clsx';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { SNACKBAR_INDENTS } from './utils/constants';\nimport { SnackbarProviderProps } from '.';\n\nconst collapse = {\n // Material-UI 4.12.x and above uses MuiCollapse-root; earlier versions use\n // Mui-Collapse-container. https://github.com/mui-org/material-ui/pull/24084\n container: '& > .MuiCollapse-container, & > .MuiCollapse-root',\n wrapper: '& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper',\n};\n\nconst xsWidthMargin = 16;\n\nconst useStyle = makeStyles((theme) => ({\n root: {\n boxSizing: 'border-box',\n display: 'flex',\n maxHeight: '100%',\n position: 'fixed',\n zIndex: theme.zIndex.snackbar,\n height: 'auto',\n width: 'auto',\n transition: 'top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms',\n // container itself is invisible and should not block clicks, clicks should be passed to its children\n pointerEvents: 'none',\n [collapse.container]: {\n pointerEvents: 'all',\n },\n [collapse.wrapper]: {\n padding: `${SNACKBAR_INDENTS.snackbar.default}px 0px`,\n transition: 'padding 300ms ease 0ms',\n },\n maxWidth: `calc(100% - ${SNACKBAR_INDENTS.view.default * 2}px)`,\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n maxWidth: `calc(100% - ${xsWidthMargin * 2}px)`,\n },\n },\n rootDense: {\n [collapse.wrapper]: {\n padding: `${SNACKBAR_INDENTS.snackbar.dense}px 0px`,\n },\n },\n top: {\n top: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default,\n flexDirection: 'column',\n },\n bottom: {\n bottom: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default,\n flexDirection: 'column-reverse',\n },\n left: {\n left: SNACKBAR_INDENTS.view.default,\n [theme.breakpoints.up('sm')]: {\n alignItems: 'flex-start',\n },\n [theme.breakpoints.down('xs')]: {\n left: `${xsWidthMargin}px`,\n },\n },\n right: {\n right: SNACKBAR_INDENTS.view.default,\n [theme.breakpoints.up('sm')]: {\n alignItems: 'flex-end',\n },\n [theme.breakpoints.down('xs')]: {\n right: `${xsWidthMargin}px`,\n },\n },\n center: {\n left: '50%',\n transform: 'translateX(-50%)',\n [theme.breakpoints.up('sm')]: {\n alignItems: 'center',\n },\n },\n}));\n\ninterface SnackbarContainerProps {\n children: JSX.Element | JSX.Element[];\n className?: string;\n dense: SnackbarProviderProps['dense'];\n anchorOrigin: NonNullable;\n}\n\nconst SnackbarContainer: React.FC = (props) => {\n const classes = useStyle();\n const { className, anchorOrigin, dense, ...other } = props;\n\n const combinedClassname = clsx(\n classes[anchorOrigin.vertical],\n classes[anchorOrigin.horizontal],\n { [classes.rootDense]: dense },\n classes.root, // root should come after others to override maxWidth\n className,\n );\n\n return (\n
\n );\n};\n\nexport default React.memo(SnackbarContainer);\n","import React, { Component } from 'react';\nimport { createPortal } from 'react-dom';\nimport clsx from 'clsx';\nimport SnackbarContext from './SnackbarContext';\nimport { MESSAGES, REASONS, originKeyExtractor, omitContainerKeys, DEFAULTS, merge, transformer, isDefined } from './utils/constants';\nimport SnackbarItem from './SnackbarItem';\nimport SnackbarContainer from './SnackbarContainer';\nimport warning from './utils/warning';\nimport { SnackbarProviderProps, SnackbarKey, SnackbarMessage, OptionsObject, RequiredBy, ProviderContext, TransitionHandlerProps } from '.';\nimport createChainedFunction from './utils/createChainedFunction';\n\ntype Reducer = (state: State) => State;\ntype SnacksByPosition = { [key: string]: Snack[] };\n\nexport interface Snack extends RequiredBy {\n message: SnackbarMessage;\n open: boolean;\n entered: boolean;\n requestClose: boolean;\n}\n\ninterface State {\n snacks: Snack[];\n queue: Snack[];\n contextValue: ProviderContext;\n}\n\nclass SnackbarProvider extends Component {\n constructor(props: SnackbarProviderProps) {\n super(props);\n this.state = {\n snacks: [],\n queue: [], // eslint-disable-line react/no-unused-state\n contextValue: {\n enqueueSnackbar: this.enqueueSnackbar,\n closeSnackbar: this.closeSnackbar,\n },\n };\n }\n\n get maxSnack(): number {\n return this.props.maxSnack || DEFAULTS.maxSnack;\n }\n\n /**\n * Adds a new snackbar to the queue to be presented.\n * Returns generated or user defined key referencing the new snackbar or null\n */\n enqueueSnackbar = (message: SnackbarMessage, opts: OptionsObject = {}): SnackbarKey => {\n const {\n key,\n preventDuplicate,\n ...options\n } = opts;\n\n const hasSpecifiedKey = isDefined(key);\n const id = hasSpecifiedKey ? (key as SnackbarKey) : new Date().getTime() + Math.random();\n\n const merger = merge(options, this.props, DEFAULTS);\n const snack: Snack = {\n key: id,\n ...options,\n message,\n open: true,\n entered: false,\n requestClose: false,\n variant: merger('variant'),\n anchorOrigin: merger('anchorOrigin'),\n autoHideDuration: merger('autoHideDuration'),\n };\n\n if (options.persist) {\n snack.autoHideDuration = undefined;\n }\n\n this.setState((state) => {\n if ((preventDuplicate === undefined && this.props.preventDuplicate) || preventDuplicate) {\n const compareFunction = (item: Snack): boolean => (\n hasSpecifiedKey ? item.key === key : item.message === message\n );\n\n const inQueue = state.queue.findIndex(compareFunction) > -1;\n const inView = state.snacks.findIndex(compareFunction) > -1;\n if (inQueue || inView) {\n return state;\n }\n }\n\n return this.handleDisplaySnack({\n ...state,\n queue: [...state.queue, snack],\n });\n });\n\n return id;\n };\n\n /**\n * Reducer: Display snack if there's space for it. Otherwise, immediately\n * begin dismissing the oldest message to start showing the new one.\n */\n handleDisplaySnack: Reducer = (state) => {\n const { snacks } = state;\n if (snacks.length >= this.maxSnack) {\n return this.handleDismissOldest(state);\n }\n return this.processQueue(state);\n };\n\n /**\n * Reducer: Display items (notifications) in the queue if there's space for them.\n */\n processQueue: Reducer = (state) => {\n const { queue, snacks } = state;\n if (queue.length > 0) {\n return {\n ...state,\n snacks: [...snacks, queue[0]],\n queue: queue.slice(1, queue.length),\n };\n }\n return state;\n };\n\n /**\n * Reducer: Hide oldest snackbar on the screen because there exists a new one which we have to display.\n * (ignoring the one with 'persist' flag. i.e. explicitly told by user not to get dismissed).\n *\n * Note 1: If there is already a message leaving the screen, no new messages are dismissed.\n * Note 2: If the oldest message has not yet entered the screen, only a request to close the\n * snackbar is made. Once it entered the screen, it will be immediately dismissed.\n */\n handleDismissOldest: Reducer = (state) => {\n if (state.snacks.some(item => !item.open || item.requestClose)) {\n return state;\n }\n\n let popped = false;\n let ignore = false;\n\n const persistentCount = state.snacks.reduce((acc, current) => (\n acc + (current.open && current.persist ? 1 : 0)\n ), 0);\n\n if (persistentCount === this.maxSnack) {\n warning(MESSAGES.NO_PERSIST_ALL);\n ignore = true;\n }\n\n const snacks = state.snacks.map((item) => {\n if (!popped && (!item.persist || ignore)) {\n popped = true;\n\n if (!item.entered) {\n return {\n ...item,\n requestClose: true,\n };\n }\n\n if (item.onClose) item.onClose(null, REASONS.MAXSNACK, item.key);\n if (this.props.onClose) this.props.onClose(null, REASONS.MAXSNACK, item.key);\n\n return {\n ...item,\n open: false,\n };\n }\n\n return { ...item };\n });\n\n return { ...state, snacks };\n };\n\n /**\n * Set the entered state of the snackbar with the given key.\n */\n handleEnteredSnack: TransitionHandlerProps['onEntered'] = (node, isAppearing, key) => {\n if (!isDefined(key)) {\n throw new Error('handleEnteredSnack Cannot be called with undefined key');\n }\n\n this.setState(({ snacks }) => ({\n snacks: snacks.map(item => (\n item.key === key ? { ...item, entered: true } : { ...item }\n )),\n }));\n }\n\n /**\n * Hide a snackbar after its timeout.\n */\n handleCloseSnack: TransitionHandlerProps['onClose'] = (event, reason, key) => {\n // should not use createChainedFunction for onClose.\n // because this.closeSnackbar called this function\n if (this.props.onClose) {\n this.props.onClose(event, reason, key);\n }\n\n if (reason === REASONS.CLICKAWAY) return;\n const shouldCloseAll = key === undefined;\n\n this.setState(({ snacks, queue }) => ({\n snacks: snacks.map((item) => {\n if (!shouldCloseAll && item.key !== key) {\n return { ...item };\n }\n\n return item.entered\n ? { ...item, open: false }\n : { ...item, requestClose: true };\n }),\n queue: queue.filter(item => item.key !== key), // eslint-disable-line react/no-unused-state\n }));\n };\n\n /**\n * Close snackbar with the given key\n */\n closeSnackbar: ProviderContext['closeSnackbar'] = (key) => {\n // call individual snackbar onClose callback passed through options parameter\n const toBeClosed = this.state.snacks.find(item => item.key === key);\n if (isDefined(key) && toBeClosed && toBeClosed.onClose) {\n toBeClosed.onClose(null, REASONS.INSTRUCTED, key);\n }\n\n this.handleCloseSnack(null, REASONS.INSTRUCTED, key);\n }\n\n /**\n * When we set open attribute of a snackbar to false (i.e. after we hide a snackbar),\n * it leaves the screen and immediately after leaving animation is done, this method\n * gets called. We remove the hidden snackbar from state and then display notifications\n * waiting in the queue (if any). If after this process the queue is not empty, the\n * oldest message is dismissed.\n */\n // @ts-ignore\n handleExitedSnack: TransitionHandlerProps['onExited'] = (event, key1, key2) => {\n const key = key1 || key2;\n if (!isDefined(key)) {\n throw new Error('handleExitedSnack Cannot be called with undefined key');\n }\n\n this.setState((state) => {\n const newState = this.processQueue({\n ...state,\n snacks: state.snacks.filter(item => item.key !== key),\n });\n\n if (newState.queue.length === 0) {\n return newState;\n }\n\n return this.handleDismissOldest(newState);\n });\n };\n\n render(): JSX.Element {\n const { contextValue } = this.state;\n const {\n maxSnack: dontspread1,\n preventDuplicate: dontspread2,\n variant: dontspread3,\n anchorOrigin: dontspread4,\n iconVariant,\n dense = DEFAULTS.dense,\n hideIconVariant = DEFAULTS.hideIconVariant,\n domRoot,\n children,\n classes = {},\n ...props\n } = this.props;\n\n const categ = this.state.snacks.reduce((acc, current) => {\n const category = originKeyExtractor(current.anchorOrigin);\n const existingOfCategory = acc[category] || [];\n return {\n ...acc,\n [category]: [...existingOfCategory, current],\n };\n }, {});\n\n const snackbars = Object.keys(categ).map((origin) => {\n const snacks = categ[origin];\n return (\n \n {snacks.map(snack => (\n \n ))}\n \n );\n });\n\n return (\n \n {children}\n {domRoot ? createPortal(snackbars, domRoot) : snackbars}\n \n );\n }\n}\n\nexport default SnackbarProvider;\n","import { useContext } from 'react';\nimport SnackbarContext from './SnackbarContext';\nimport { ProviderContext } from '.';\n\nexport default (): ProviderContext => useContext(SnackbarContext);\n","var grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nexport default grey;","var indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nexport default indigo;","var pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nexport default pink;","var red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","var orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","var blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","var green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport useControlled from '../utils/useControlled';\nimport useFormControl from '../FormControl/useFormControl';\nimport withStyles from '../styles/withStyles';\nimport IconButton from '../IconButton';\nexport var styles = {\n root: {\n padding: 9\n },\n checked: {},\n disabled: {},\n input: {\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n var autoFocus = props.autoFocus,\n checkedProp = props.checked,\n checkedIcon = props.checkedIcon,\n classes = props.classes,\n className = props.className,\n defaultChecked = props.defaultChecked,\n disabledProp = props.disabled,\n icon = props.icon,\n id = props.id,\n inputProps = props.inputProps,\n inputRef = props.inputRef,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onFocus = props.onFocus,\n readOnly = props.readOnly,\n required = props.required,\n tabIndex = props.tabIndex,\n type = props.type,\n value = props.value,\n other = _objectWithoutProperties(props, [\"autoFocus\", \"checked\", \"checkedIcon\", \"classes\", \"className\", \"defaultChecked\", \"disabled\", \"icon\", \"id\", \"inputProps\", \"inputRef\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"readOnly\", \"required\", \"tabIndex\", \"type\", \"value\"]);\n\n var _useControlled = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n checked = _useControlled2[0],\n setCheckedState = _useControlled2[1];\n\n var muiFormControl = useFormControl();\n\n var handleFocus = function handleFocus(event) {\n if (onFocus) {\n onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n\n var handleInputChange = function handleInputChange(event) {\n var newChecked = event.target.checked;\n setCheckedState(newChecked);\n\n if (onChange) {\n // TODO v5: remove the second argument.\n onChange(event, newChecked);\n }\n };\n\n var disabled = disabledProp;\n\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n\n var hasLabelFor = type === 'checkbox' || type === 'radio';\n return /*#__PURE__*/React.createElement(IconButton, _extends({\n component: \"span\",\n className: clsx(classes.root, className, checked && classes.checked, disabled && classes.disabled),\n disabled: disabled,\n tabIndex: null,\n role: undefined,\n onFocus: handleFocus,\n onBlur: handleBlur,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"input\", _extends({\n autoFocus: autoFocus,\n checked: checkedProp,\n defaultChecked: defaultChecked,\n className: classes.input,\n disabled: disabled,\n id: hasLabelFor && id,\n name: name,\n onChange: handleInputChange,\n readOnly: readOnly,\n ref: inputRef,\n required: required,\n tabIndex: tabIndex,\n type: type,\n value: value\n }, inputProps)), checked ? checkedIcon : icon);\n}); // NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\n\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /*\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwitchBase'\n})(SwitchBase);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Clear');\n\nexports.default = _default;","import React from 'react';\nexport default React.createContext(null);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: theme.typography.pxToRem(24),\n transition: theme.transitions.create('fill', {\n duration: theme.transitions.duration.shorter\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(35)\n }\n };\n};\nvar SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'svg' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n htmlColor = props.htmlColor,\n titleAccess = props.titleAccess,\n _props$viewBox = props.viewBox,\n viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"titleAccess\", \"viewBox\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n focusable: \"false\",\n viewBox: viewBox,\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, other), children, titleAccess ? /*#__PURE__*/React.createElement(\"title\", null, titleAccess) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n */\n color: PropTypes.oneOf(['action', 'disabled', 'error', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this property.\n */\n shapeRendering: PropTypes.string,\n\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default withStyles(styles, {\n name: 'MuiSvgIcon'\n})(SvgIcon);","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useEventCallback from '../utils/useEventCallback';\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = React.useState(false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = useEventCallback(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: childClassName\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Ripple from './Ripple';\nvar DURATION = 550;\nexport var DELAY_RIPPLE = 80;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n },\n\n /* Styles applied to the internal `Ripple` components `ripple` class. */\n ripple: {\n opacity: 0,\n position: 'absolute'\n },\n\n /* Styles applied to the internal `Ripple` components `rippleVisible` class. */\n rippleVisible: {\n opacity: 0.3,\n transform: 'scale(1)',\n animation: \"$enter \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */\n ripplePulsate: {\n animationDuration: \"\".concat(theme.transitions.duration.shorter, \"ms\")\n },\n\n /* Styles applied to the internal `Ripple` components `child` class. */\n child: {\n opacity: 1,\n display: 'block',\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the internal `Ripple` components `childLeaving` class. */\n childLeaving: {\n opacity: 0,\n animation: \"$exit \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `childPulsate` class. */\n childPulsate: {\n position: 'absolute',\n left: 0,\n top: 0,\n animation: \"$pulsate 2500ms \".concat(theme.transitions.easing.easeInOut, \" 200ms infinite\")\n },\n '@keyframes enter': {\n '0%': {\n transform: 'scale(0)',\n opacity: 0.1\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.3\n }\n },\n '@keyframes exit': {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n },\n '@keyframes pulsate': {\n '0%': {\n transform: 'scale(1)'\n },\n '50%': {\n transform: 'scale(0.92)'\n },\n '100%': {\n transform: 'scale(1)'\n }\n }\n };\n};\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nvar TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(props, ref) {\n var _props$center = props.center,\n centerProp = _props$center === void 0 ? false : _props$center,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"center\", \"classes\", \"className\"]);\n\n var _React$useState = React.useState([]),\n ripples = _React$useState[0],\n setRipples = _React$useState[1];\n\n var nextKey = React.useRef(0);\n var rippleCallback = React.useRef(null);\n React.useEffect(function () {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n var ignoringMouseDown = React.useRef(false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n var startTimer = React.useRef(null); // This is the hook called once the previous timeout is ready.\n\n var startTimerCommit = React.useRef(null);\n var container = React.useRef(null);\n React.useEffect(function () {\n return function () {\n clearTimeout(startTimer.current);\n };\n }, []);\n var startCommit = React.useCallback(function (params) {\n var pulsate = params.pulsate,\n rippleX = params.rippleX,\n rippleY = params.rippleY,\n rippleSize = params.rippleSize,\n cb = params.cb;\n setRipples(function (oldRipples) {\n return [].concat(_toConsumableArray(oldRipples), [/*#__PURE__*/React.createElement(Ripple, {\n key: nextKey.current,\n classes: classes,\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n })]);\n });\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n var start = React.useCallback(function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cb = arguments.length > 2 ? arguments[2] : undefined;\n var _options$pulsate = options.pulsate,\n pulsate = _options$pulsate === void 0 ? false : _options$pulsate,\n _options$center = options.center,\n center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,\n _options$fakeElement = options.fakeElement,\n fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n var element = fakeElement ? null : container.current;\n var rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n var rippleX;\n var rippleY;\n var rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n var _ref = event.touches ? event.touches[0] : event,\n clientX = _ref.clientX,\n clientY = _ref.clientY;\n\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = function () {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(function () {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }\n }, [centerProp, startCommit]);\n var pulsate = React.useCallback(function () {\n start({}, {\n pulsate: true\n });\n }, [start]);\n var stop = React.useCallback(function (event, cb) {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n event.persist();\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(function () {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(function (oldRipples) {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n React.useImperativeHandle(ref, function () {\n return {\n pulsate: pulsate,\n start: start,\n stop: stop\n };\n }, [pulsate, start, stop]);\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, className),\n ref: container\n }, other), /*#__PURE__*/React.createElement(TransitionGroup, {\n component: null,\n exit: true\n }, ripples));\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiTouchRipple'\n})( /*#__PURE__*/React.memo(TouchRipple));","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport clsx from 'clsx';\nimport { elementTypeAcceptingRef, refType } from '@material-ui/utils';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport TouchRipple from './TouchRipple';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = _objectWithoutProperties(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = React.useRef(null);\n\n function getButtonNode() {\n // #StrictMode ready\n return ReactDOM.findDOMNode(buttonRef.current);\n }\n\n var rippleRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n React.useImperativeHandle(action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n React.useEffect(function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return useEventCallback(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = useEventCallback(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = React.useRef(false);\n var handleKeyDown = useEventCallback(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = useEventCallback(function (event) {\n // calling preventDefault in keyUp on a \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _styles = require(\"@material-ui/styles\");\n\nvar _defaultTheme = _interopRequireDefault(require(\"./defaultTheme\"));\n\nfunction withStyles(stylesOrCreator, options) {\n return (0, _styles.withStyles)(stylesOrCreator, (0, _extends2.default)({\n defaultTheme: _defaultTheme.default\n }, options));\n}\n\nvar _default = withStyles;\nexports.default = _default;","/** @license Material-UI v4.12.1\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport { default as borders } from './borders';\nexport * from './borders';\nexport { default as breakpoints } from './breakpoints';\nexport { default as compose } from './compose';\nexport { default as styleFunctionSx } from './styleFunctionSx';\nexport * from './styleFunctionSx';\nexport { default as display } from './display';\nexport { default as flexbox } from './flexbox';\nexport * from './flexbox';\nexport { default as grid } from './grid';\nexport * from './grid';\nexport { default as palette } from './palette';\nexport * from './palette';\nexport { default as positions } from './positions';\nexport * from './positions';\nexport { default as shadows } from './shadows';\nexport { default as sizing } from './sizing';\nexport * from './sizing';\nexport { default as spacing } from './spacing';\nexport * from './spacing';\nexport { default as style } from './style';\nexport { default as typography } from './typography';\nexport * from './typography';","export default function requirePropFactory(componentNameInError) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n var requireProp = function requireProp(requiredProp) {\n return function (props, propName, componentName, location, propFullName) {\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameInError, \"` must be used on `\").concat(requiredProp, \"`.\"));\n }\n\n return null;\n };\n };\n\n return requireProp;\n}","import { borders, compose, display, flexbox, grid, palette, positions, shadows, sizing, spacing, typography, styleFunctionSx } from '@material-ui/system';\nimport styled from '../styles/styled';\nexport var styleFunction = styleFunctionSx(compose(borders, display, flexbox, grid, positions, palette, shadows, sizing, spacing, typography));\n/**\n * @ignore - do not document.\n */\n\nvar Box = styled('div')(styleFunction, {\n name: 'MuiBox'\n});\nexport default Box;","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { makeStyles as makeStylesWithoutDefault } from '@material-ui/styles';\nimport defaultTheme from './defaultTheme';\n\nfunction makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return makeStylesWithoutDefault(stylesOrCreator, _extends({\n defaultTheme: defaultTheme\n }, options));\n}\n\nexport default makeStyles;","import style from './style';\nimport compose from './compose';\nexport var displayPrint = style({\n prop: 'displayPrint',\n cssProperty: false,\n transform: function transform(value) {\n return {\n '@media print': {\n display: value\n }\n };\n }\n});\nexport var displayRaw = style({\n prop: 'display'\n});\nexport var overflow = style({\n prop: 'overflow'\n});\nexport var textOverflow = style({\n prop: 'textOverflow'\n});\nexport var visibility = style({\n prop: 'visibility'\n});\nexport var whiteSpace = style({\n prop: 'whiteSpace'\n});\nexport default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);","import style from './style';\nvar boxShadow = style({\n prop: 'boxShadow',\n themeKey: 'shadows'\n});\nexport default boxShadow;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 12,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE 11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -12,\n '$sizeSmall&': {\n marginLeft: -3\n }\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -12,\n '$sizeSmall&': {\n marginRight: -3\n }\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: 3,\n fontSize: theme.typography.pxToRem(18)\n },\n\n /* Styles applied to the children container element. */\n label: {\n width: '100%',\n display: 'flex',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n }\n };\n};\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nvar IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {\n var _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"edge\", \"children\", \"classes\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], disabled && classes.disabled, size === \"small\" && classes[\"size\".concat(capitalize(size))], {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge]),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes = {\n /**\n * The icon element.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n var found = React.Children.toArray(props.children).some(function (child) {\n return /*#__PURE__*/React.isValidElement(child) && child.props.onClick;\n });\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener ' + 'to a child of a button element.', 'Firefox will never trigger the event.', 'You should move the onClick listener to the parent button element.', 'https://github.com/mui-org/material-ui/issues/13957'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['start', 'end', false]),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiIconButton'\n})(IconButton);","import { createTheme } from '@material-ui/core/styles';\n\nimport orange from '@material-ui/core/colors/orange';\n\nconst step = (16 - 5) / 23 / 100;\n\n/**\n * Convert hex color in the format '#rrggbb' or '#rgb' to an RGB object.\n * @param {string} hex\n * @returns {{r: number, g: number, b: number}}\n */\nfunction toInt(hex) {\n const rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n\n if (hex.length === 7) {\n rgb.r = parseInt(hex.substr(1, 2), 16);\n rgb.g = parseInt(hex.substr(3, 2), 16);\n rgb.b = parseInt(hex.substr(5, 2), 16);\n } else if (hex.length === 4) {\n\n const r = hex.substr(1, 1);\n const g = hex.substr(2, 1);\n const b = hex.substr(3, 1);\n\n rgb.r = parseInt(r + r, 16);\n rgb.g = parseInt(g + g, 16);\n rgb.b = parseInt(b + b, 16);\n }\n\n return rgb;\n}\n\n/**\n * Convert an RGB object to a hex color string in the format '#rrggbb'.\n * @param {{r: number, g: number, b: number}} int\n * @returns {string}\n */\nfunction toHex(int) {\n return '#' + Math.round(int.r).toString(16) + Math.round(int.g).toString(16) + Math.round(int.b).toString(16);\n}\n\n/**\n * @param {string} color color in the format '#rrggbb' or '#rgb'\n * @param {string} overlayColor overlay color in the format '#rrggbb' or '#rgb'\n * @param {number} elevation elevation as an integer starting with 1\n * @returns {string} the hex color string in the format '#rrggbb'\n */\nfunction getElevation(color, overlayColor, elevation) {\n const rgb = toInt(color);\n const overlay = toInt(overlayColor);\n\n rgb.r += overlay.r * (0.05 + step * (elevation - 1));\n rgb.g += overlay.g * (0.05 + step * (elevation - 1));\n rgb.b += overlay.b * (0.05 + step * (elevation - 1));\n\n return toHex(rgb);\n}\n\n/**\n * Get all 24 elevations of the given color and overlay.\n * @param {string} color color in the format '#rrggbb' or '#rgb'\n * @param {string} overlay overlay color in the format '#rrggbb' or '#rgb'\n * @returns {import('@material-ui/core/styles/withStyles').CSSProperties}\n */\nfunction getElevations(color, overlay) {\n /** @type {import('@material-ui/core/styles/withStyles').CSSProperties} */\n const elevations = {};\n\n for(let i = 1; i <= 24; i++) {\n elevations['elevation' + i] = {\n backgroundColor: getElevation(color, overlay, i)\n }\n }\n\n return elevations;\n}\n\n/**\n * The theme creation factory function.\n * @param {string} type\n * @returns {import('./types').Theme}\n */\nconst Theme = type => {\n let theme;\n if (type === 'dark') {\n theme = {\n name: type,\n palette: {\n type: 'dark',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n primary: {\n main: '#4dabf5'\n },\n secondary: {\n main: '#436a93'\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff'\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#272727'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100]\n }\n }\n },\n MuiPaper: getElevations('#121212', '#fff')\n }\n };\n } else if (type === 'blue') {\n theme = {\n name: type,\n palette: {\n type: 'dark',\n background: {\n paper: '#151d21',\n default: '#151d21'\n },\n primary: {\n main: '#4dabf5'\n },\n secondary: {\n main: '#436a93'\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff'\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#2a3135'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100]\n }\n }\n },\n MuiPaper: getElevations('#151d21', '#fff')\n }\n };\n } else if (type === 'colored') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#3399CC'\n },\n secondary: {\n main: '#164477'\n },\n expert: '#96fc96'\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#3399CC'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else if (type === 'PT') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#0F99DE'\n },\n secondary: {\n main: '#88A536'\n },\n expert: '#BD1B24'\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#0F99DE'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else if (type === 'DX') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#F5F5F7'\n },\n secondary: {\n main: '#a9a9a9'\n },\n expert: '#BD1B24',\n text: {\n primary: '#007AFE',\n secondary: '#007AFE',\n disabled: '#007AFEAA',\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#a9a9a9'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#3399CC'\n },\n secondary: {\n main: '#164477'\n },\n expert: '#14bb00'\n },\n overrides: {\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n }\n\n theme.toolbar = {\n height: 48\n };\n\n // add save toolbar\n theme.saveToolbar = {\n background: theme.palette.primary.main,\n button: {\n borderRadius: 3,\n height: 32\n }\n };\n\n return createTheme(theme);\n};\n\nexport default Theme;\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport './loader.css'\n\nconst styles = theme => ({\n\n});\n\n/**\n * @typedef {object} LoaderProps\n * @property {string} [key] The key to identify this component.\n * @property {number} [size] The size in pixels of this loader.\n * @property {string} [themeType] The chosen theme type.\n * @property {string} [theme] The chosen theme.\n *\n * @extends {React.Component}\n */\nclass Loader extends React.Component {\n /**\n * @param {LoaderProps} props\n */\n constructor(props) {\n super(props);\n this.size = this.props.size || 234;\n }\n\n render() {\n const theme = this.props.themeType || this.props.theme || 'light';\n return
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
;\n }\n}\n\nLoader.propTypes = {\n size: PropTypes.number,\n themeType: PropTypes.string\n};\n\n/** @type {typeof Loader} */\nconst _export = withStyles(styles)(Loader);\nexport default _export;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z\"\n}), 'Save');\n\nexports.default = _default;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { isFilled, isAdornedStart } from '../InputBase/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport isMuiElement from '../utils/isMuiElement';\nimport FormControlContext from './FormControlContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top' // Fix alignment issue on Safari.\n\n },\n\n /* Styles applied to the root element if `margin=\"normal\"`. */\n marginNormal: {\n marginTop: 16,\n marginBottom: 8\n },\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n marginTop: 8,\n marginBottom: 4\n },\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n }\n};\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/components/text-fields/#components).\n *\n * ```jsx\n * \n * Email address\n * \n * We'll never share your email.\n * \n * ```\n *\n * ⚠️Only one input can be used within a FormControl.\n */\n\nvar FormControl = /*#__PURE__*/React.forwardRef(function FormControl(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n visuallyFocused = props.focused,\n _props$hiddenLabel = props.hiddenLabel,\n hiddenLabel = _props$hiddenLabel === void 0 ? false : _props$hiddenLabel,\n _props$margin = props.margin,\n margin = _props$margin === void 0 ? 'none' : _props$margin,\n _props$required = props.required,\n required = _props$required === void 0 ? false : _props$required,\n size = props.size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"fullWidth\", \"focused\", \"hiddenLabel\", \"margin\", \"required\", \"size\", \"variant\"]);\n\n var _React$useState = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialAdornedStart = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n var input = isMuiElement(child, ['Select']) ? child.props.input : child;\n\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n\n return initialAdornedStart;\n }),\n adornedStart = _React$useState[0],\n setAdornedStart = _React$useState[1];\n\n var _React$useState2 = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialFilled = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n if (isFilled(child.props, true)) {\n initialFilled = true;\n }\n });\n }\n\n return initialFilled;\n }),\n filled = _React$useState2[0],\n setFilled = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _focused = _React$useState3[0],\n setFocused = _React$useState3[1];\n\n var focused = visuallyFocused !== undefined ? visuallyFocused : _focused;\n\n if (disabled && focused) {\n setFocused(false);\n }\n\n var registerEffect;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var registeredInput = React.useRef(false);\n\n registerEffect = function registerEffect() {\n if (registeredInput.current) {\n console.error(['Material-UI: There are multiple InputBase components inside a FormControl.', 'This is not supported. It might cause infinite rendering loops.', 'Only use one InputBase.'].join('\\n'));\n }\n\n registeredInput.current = true;\n return function () {\n registeredInput.current = false;\n };\n };\n }\n\n var onFilled = React.useCallback(function () {\n setFilled(true);\n }, []);\n var onEmpty = React.useCallback(function () {\n setFilled(false);\n }, []);\n var childContext = {\n adornedStart: adornedStart,\n setAdornedStart: setAdornedStart,\n color: color,\n disabled: disabled,\n error: error,\n filled: filled,\n focused: focused,\n fullWidth: fullWidth,\n hiddenLabel: hiddenLabel,\n margin: (size === 'small' ? 'dense' : undefined) || margin,\n onBlur: function onBlur() {\n setFocused(false);\n },\n onEmpty: onEmpty,\n onFilled: onFilled,\n onFocus: function onFocus() {\n setFocused(true);\n },\n registerEffect: registerEffect,\n required: required,\n variant: variant\n };\n return /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: childContext\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, margin !== 'none' && classes[\"margin\".concat(capitalize(margin))], fullWidth && classes.fullWidth),\n ref: ref\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The contents of the form control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label should be displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the component will be displayed in focused state.\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the component will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label will be hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, the label will indicate that the input is required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the text field.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormControl'\n})(FormControl);","import { getGlobalObject } from './global';\nimport { isString } from './is';\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown, keyAttrs?: string[]): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n // eslint-disable-next-line no-plusplus\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n const elem = el as {\n tagName?: string;\n id?: string;\n className?: string;\n getAttribute(key: string): string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs = keyAttrs?.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs?.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n const global = getGlobalObject();\n try {\n return global.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n","import { getGlobalObject } from './global';\nimport { logger } from './logger';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === `function`) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (global as any).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsv2json = exports.json2tsv = void 0;\nconst json2tsv_1 = require(\"./json2tsv\");\nvar json2tsv_2 = require(\"./json2tsv\");\nObject.defineProperty(exports, \"json2tsv\", { enumerable: true, get: function () { return json2tsv_2.json2tsv; } });\nconst tsv2json_1 = require(\"./tsv2json\");\nvar tsv2json_2 = require(\"./tsv2json\");\nObject.defineProperty(exports, \"tsv2json\", { enumerable: true, get: function () { return tsv2json_2.tsv2json; } });\n// eslint-disable-next-line import/no-anonymous-default-export\nexports.default = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\n// For CommonJS default export support\nmodule.exports = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\nmodule.exports.default = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\n//# sourceMappingURL=index.js.map","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\n\nfunction getScale(value) {\n return \"scale(\".concat(value, \", \").concat(Math.pow(value, 2), \")\");\n}\n\nvar styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n/**\n * The Grow transition is used by the [Tooltip](/components/tooltips/) and\n * [Popover](/components/popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? 'auto' : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var timer = React.useRef();\n var autoTimeout = React.useRef();\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var _getTransitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration,\n delay = _getTransitionProps.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay\n })].join(',');\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var _getTransitionProps2 = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration,\n delay = _getTransitionProps2.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay || duration * 0.333\n })].join(',');\n node.style.opacity = '0';\n node.style.transform = getScale(0.75);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTimeout.current || 0);\n }\n };\n\n React.useEffect(function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, show the component; triggers the enter or exit animation.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;","/* eslint-disable import/prefer-default-export */\n// Global index counter to preserve source order.\n// We create the style sheet during the creation of the component,\n// children are handled after the parents, so the order of style elements would be parent->child.\n// It is a problem though when a parent passes a className\n// which needs to override any child's styles.\n// StyleSheet of the child has a higher specificity, because of the source order.\n// So our solution is to render sheets them in the reverse order child->sheet, so\n// that parent has a higher specificity.\nvar indexCounter = -1e9;\nexport function increment() {\n indexCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (indexCounter >= 0) {\n console.warn(['Material-UI: You might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join('\\n'));\n }\n }\n\n return indexCounter;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { deepmerge } from '@material-ui/utils';\nimport noopTheme from './noopTheme';\nexport default function getStylesCreator(stylesOrCreator) {\n var themingEnabled = typeof stylesOrCreator === 'function';\n\n if (process.env.NODE_ENV !== 'production') {\n if (_typeof(stylesOrCreator) !== 'object' && !themingEnabled) {\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You need to provide a function generating the styles or a styles object.'].join('\\n'));\n }\n }\n\n return {\n create: function create(theme, name) {\n var styles;\n\n try {\n styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n if (themingEnabled === true && theme === noopTheme) {\n // TODO: prepend error message/name instead\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n throw err;\n }\n\n if (!name || !theme.overrides || !theme.overrides[name]) {\n return styles;\n }\n\n var overrides = theme.overrides[name];\n\n var stylesWithOverrides = _extends({}, styles);\n\n Object.keys(overrides).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!stylesWithOverrides[key]) {\n console.warn(['Material-UI: You are trying to override a style that does not exist.', \"Fix the `\".concat(key, \"` key of `theme.overrides.\").concat(name, \"`.\")].join('\\n'));\n }\n }\n\n stylesWithOverrides[key] = deepmerge(stylesWithOverrides[key], overrides[key]);\n });\n return stylesWithOverrides;\n },\n options: {}\n };\n}","// We use the same empty object to ref count the styles that don't need a theme object.\nvar noopTheme = {};\nexport default noopTheme;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { getDynamicStyles } from 'jss';\nimport mergeClasses from '../mergeClasses';\nimport multiKeyStore from './multiKeyStore';\nimport useTheme from '../useTheme';\nimport { StylesContext } from '../StylesProvider';\nimport { increment } from './indexCounter';\nimport getStylesCreator from '../getStylesCreator';\nimport noopTheme from '../getStylesCreator/noopTheme';\n\nfunction getClasses(_ref, classes, Component) {\n var state = _ref.state,\n stylesOptions = _ref.stylesOptions;\n\n if (stylesOptions.disableGeneration) {\n return classes || {};\n }\n\n if (!state.cacheClasses) {\n state.cacheClasses = {\n // Cache for the finalized classes value.\n value: null,\n // Cache for the last used classes prop pointer.\n lastProp: null,\n // Cache for the last used rendered classes pointer.\n lastJSS: {}\n };\n } // Tracks if either the rendered classes or classes prop has changed,\n // requiring the generation of a new finalized classes object.\n\n\n var generate = false;\n\n if (state.classes !== state.cacheClasses.lastJSS) {\n state.cacheClasses.lastJSS = state.classes;\n generate = true;\n }\n\n if (classes !== state.cacheClasses.lastProp) {\n state.cacheClasses.lastProp = classes;\n generate = true;\n }\n\n if (generate) {\n state.cacheClasses.value = mergeClasses({\n baseClasses: state.cacheClasses.lastJSS,\n newClasses: classes,\n Component: Component\n });\n }\n\n return state.cacheClasses.value;\n}\n\nfunction attach(_ref2, props) {\n var state = _ref2.state,\n theme = _ref2.theme,\n stylesOptions = _ref2.stylesOptions,\n stylesCreator = _ref2.stylesCreator,\n name = _ref2.name;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n\n if (!sheetManager) {\n sheetManager = {\n refs: 0,\n staticSheet: null,\n dynamicStyles: null\n };\n multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);\n }\n\n var options = _extends({}, stylesCreator.options, stylesOptions, {\n theme: theme,\n flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'\n });\n\n options.generateId = options.serverGenerateClassName || options.generateClassName;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n var staticSheet;\n\n if (stylesOptions.sheetsCache) {\n staticSheet = multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);\n }\n\n var styles = stylesCreator.create(theme, name);\n\n if (!staticSheet) {\n staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({\n link: false\n }, options));\n staticSheet.attach();\n\n if (stylesOptions.sheetsCache) {\n multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);\n }\n }\n\n if (sheetsRegistry) {\n sheetsRegistry.add(staticSheet);\n }\n\n sheetManager.staticSheet = staticSheet;\n sheetManager.dynamicStyles = getDynamicStyles(styles);\n }\n\n if (sheetManager.dynamicStyles) {\n var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({\n link: true\n }, options));\n dynamicSheet.update(props);\n dynamicSheet.attach();\n state.dynamicSheet = dynamicSheet;\n state.classes = mergeClasses({\n baseClasses: sheetManager.staticSheet.classes,\n newClasses: dynamicSheet.classes\n });\n\n if (sheetsRegistry) {\n sheetsRegistry.add(dynamicSheet);\n }\n } else {\n state.classes = sheetManager.staticSheet.classes;\n }\n\n sheetManager.refs += 1;\n}\n\nfunction update(_ref3, props) {\n var state = _ref3.state;\n\n if (state.dynamicSheet) {\n state.dynamicSheet.update(props);\n }\n}\n\nfunction detach(_ref4) {\n var state = _ref4.state,\n theme = _ref4.theme,\n stylesOptions = _ref4.stylesOptions,\n stylesCreator = _ref4.stylesCreator;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n sheetManager.refs -= 1;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);\n stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(sheetManager.staticSheet);\n }\n }\n\n if (state.dynamicSheet) {\n stylesOptions.jss.removeStyleSheet(state.dynamicSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(state.dynamicSheet);\n }\n }\n}\n\nfunction useSynchronousEffect(func, values) {\n var key = React.useRef([]);\n var output; // Store \"generation\" key. Just returns a new object every time\n\n var currentKey = React.useMemo(function () {\n return {};\n }, values); // eslint-disable-line react-hooks/exhaustive-deps\n // \"the first render\", or \"memo dropped the value\"\n\n if (key.current !== currentKey) {\n key.current = currentKey;\n output = func();\n }\n\n React.useEffect(function () {\n return function () {\n if (output) {\n output();\n }\n };\n }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n\nexport default function makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n classNamePrefixOption = options.classNamePrefix,\n Component = options.Component,\n _options$defaultTheme = options.defaultTheme,\n defaultTheme = _options$defaultTheme === void 0 ? noopTheme : _options$defaultTheme,\n stylesOptions2 = _objectWithoutProperties(options, [\"name\", \"classNamePrefix\", \"Component\", \"defaultTheme\"]);\n\n var stylesCreator = getStylesCreator(stylesOrCreator);\n var classNamePrefix = name || classNamePrefixOption || 'makeStyles';\n stylesCreator.options = {\n index: increment(),\n name: name,\n meta: classNamePrefix,\n classNamePrefix: classNamePrefix\n };\n\n var useStyles = function useStyles() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var theme = useTheme() || defaultTheme;\n\n var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2);\n\n var instance = React.useRef();\n var shouldUpdate = React.useRef();\n useSynchronousEffect(function () {\n var current = {\n name: name,\n state: {},\n stylesCreator: stylesCreator,\n stylesOptions: stylesOptions,\n theme: theme\n };\n attach(current, props);\n shouldUpdate.current = false;\n instance.current = current;\n return function () {\n detach(current);\n };\n }, [theme, stylesCreator]);\n React.useEffect(function () {\n if (shouldUpdate.current) {\n update(instance.current, props);\n }\n\n shouldUpdate.current = true;\n });\n var classes = getClasses(instance.current, props.classes, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(classes);\n }\n\n return classes;\n };\n\n return useStyles;\n}","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nvar _default = orange;\nexports.default = _default;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.text.primary,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n },\n '&$disabled': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // Ensure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `variant=\"text\"`. */\n text: {\n padding: '6px 8px'\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"primary\"`. */\n textPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"secondary\"`. */\n textSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n padding: '5px 15px',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabledBackground)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(alpha(theme.palette.primary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.primary.main),\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(alpha(theme.palette.secondary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.secondary.main),\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabled)\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&:active': {\n boxShadow: theme.shadows[8]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"primary\"`. */\n containedPrimary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"secondary\"`. */\n containedSecondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n '&$focusVisible': {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n '&$disabled': {\n boxShadow: 'none'\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit',\n borderColor: 'currentColor'\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"text\"`. */\n textSizeSmall: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"text\"`. */\n textSizeLarge: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"outlined\"`. */\n outlinedSizeSmall: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"outlined\"`. */\n outlinedSizeLarge: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"contained\"`. */\n containedSizeSmall: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"contained\"`. */\n containedSizeLarge: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {},\n\n /* Styles applied to the root element if `size=\"large\"`. */\n sizeLarge: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the startIcon element if supplied. */\n startIcon: {\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n '&$iconSizeSmall': {\n marginLeft: -2\n }\n },\n\n /* Styles applied to the endIcon element if supplied. */\n endIcon: {\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n '&$iconSizeSmall': {\n marginRight: -2\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"small\"`. */\n iconSizeSmall: {\n '& > *:first-child': {\n fontSize: 18\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"medium\"`. */\n iconSizeMedium: {\n '& > *:first-child': {\n fontSize: 20\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"large\"`. */\n iconSizeLarge: {\n '& > *:first-child': {\n fontSize: 22\n }\n }\n };\n};\nvar Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n endIconProp = props.endIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n startIconProp = props.startIcon,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'text' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"]);\n\n var startIcon = startIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.startIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, startIconProp);\n var endIcon = endIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.endIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, endIconProp);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes[\"\".concat(variant).concat(capitalize(color))], size !== 'medium' && [classes[\"\".concat(variant, \"Size\").concat(capitalize(size))], classes[\"size\".concat(capitalize(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, startIcon, children, endIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButton'\n})(Button);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport Modal from '../Modal';\nimport Backdrop from '../Backdrop';\nimport Fade from '../Fade';\nimport { duration } from '../styles/transitions';\nimport Paper from '../Paper';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n '@media print': {\n // Use !important to override the Modal inline-style.\n position: 'absolute !important'\n }\n },\n\n /* Styles applied to the container element if `scroll=\"paper\"`. */\n scrollPaper: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the container element if `scroll=\"body\"`. */\n scrollBody: {\n overflowY: 'auto',\n overflowX: 'hidden',\n textAlign: 'center',\n '&:after': {\n content: '\"\"',\n display: 'inline-block',\n verticalAlign: 'middle',\n height: '100%',\n width: '0'\n }\n },\n\n /* Styles applied to the container element. */\n container: {\n height: '100%',\n '@media print': {\n height: 'auto'\n },\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n margin: 32,\n position: 'relative',\n overflowY: 'auto',\n // Fix IE 11 issue, to remove at some point.\n '@media print': {\n overflowY: 'visible',\n boxShadow: 'none'\n }\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"paper\"`. */\n paperScrollPaper: {\n display: 'flex',\n flexDirection: 'column',\n maxHeight: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"body\"`. */\n paperScrollBody: {\n display: 'inline-block',\n verticalAlign: 'middle',\n textAlign: 'left' // 'initial' doesn't work on IE 11\n\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=false`. */\n paperWidthFalse: {\n maxWidth: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xs\"`. */\n paperWidthXs: {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444),\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"sm\"`. */\n paperWidthSm: {\n maxWidth: theme.breakpoints.values.sm,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.sm + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"md\"`. */\n paperWidthMd: {\n maxWidth: theme.breakpoints.values.md,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.md + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"lg\"`. */\n paperWidthLg: {\n maxWidth: theme.breakpoints.values.lg,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.lg + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xl\"`. */\n paperWidthXl: {\n maxWidth: theme.breakpoints.values.xl,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.xl + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `fullWidth={true}`. */\n paperFullWidth: {\n width: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `fullScreen={true}`. */\n paperFullScreen: {\n margin: 0,\n width: '100%',\n maxWidth: '100%',\n height: '100%',\n maxHeight: 'none',\n borderRadius: 0,\n '&$paperScrollBody': {\n margin: 0,\n maxWidth: '100%'\n }\n }\n };\n};\nvar defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * Dialogs are overlaid modal paper based components with a backdrop.\n */\n\nvar Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {\n var BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableBackdro = props.disableBackdropClick,\n disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableEscapeK = props.disableEscapeKeyDown,\n disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK,\n _props$fullScreen = props.fullScreen,\n fullScreen = _props$fullScreen === void 0 ? false : _props$fullScreen,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'sm' : _props$maxWidth,\n onBackdropClick = props.onBackdropClick,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onEscapeKeyDown = props.onEscapeKeyDown,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n open = props.open,\n _props$PaperComponent = props.PaperComponent,\n PaperComponent = _props$PaperComponent === void 0 ? Paper : _props$PaperComponent,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n _props$scroll = props.scroll,\n scroll = _props$scroll === void 0 ? 'paper' : _props$scroll,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Fade : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n ariaDescribedby = props['aria-describedby'],\n ariaLabelledby = props['aria-labelledby'],\n other = _objectWithoutProperties(props, [\"BackdropProps\", \"children\", \"classes\", \"className\", \"disableBackdropClick\", \"disableEscapeKeyDown\", \"fullScreen\", \"fullWidth\", \"maxWidth\", \"onBackdropClick\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onEscapeKeyDown\", \"onExit\", \"onExited\", \"onExiting\", \"open\", \"PaperComponent\", \"PaperProps\", \"scroll\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"aria-describedby\", \"aria-labelledby\"]);\n\n var mouseDownTarget = React.useRef();\n\n var handleMouseDown = function handleMouseDown(event) {\n mouseDownTarget.current = event.target;\n };\n\n var handleBackdropClick = function handleBackdropClick(event) {\n // Ignore the events not coming from the \"backdrop\"\n // We don't want to close the dialog when clicking the dialog content.\n if (event.target !== event.currentTarget) {\n return;\n } // Make sure the event starts and ends on the same DOM element.\n\n\n if (event.target !== mouseDownTarget.current) {\n return;\n }\n\n mouseDownTarget.current = null;\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (!disableBackdropClick && onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n return /*#__PURE__*/React.createElement(Modal, _extends({\n className: clsx(classes.root, className),\n BackdropComponent: Backdrop,\n BackdropProps: _extends({\n transitionDuration: transitionDuration\n }, BackdropProps),\n closeAfterTransition: true\n }, disableBackdropClick ? {\n disableBackdropClick: disableBackdropClick\n } : {}, {\n disableEscapeKeyDown: disableEscapeKeyDown,\n onEscapeKeyDown: onEscapeKeyDown,\n onClose: onClose,\n open: open,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n timeout: transitionDuration,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n onExit: onExit,\n onExiting: onExiting,\n onExited: onExited,\n role: \"none presentation\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.container, classes[\"scroll\".concat(capitalize(scroll))]),\n onMouseUp: handleBackdropClick,\n onMouseDown: handleMouseDown\n }, /*#__PURE__*/React.createElement(PaperComponent, _extends({\n elevation: 24,\n role: \"dialog\",\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": ariaLabelledby\n }, PaperProps, {\n className: clsx(classes.paper, classes[\"paperScroll\".concat(capitalize(scroll))], classes[\"paperWidth\".concat(capitalize(String(maxWidth)))], PaperProps.className, fullScreen && classes.paperFullScreen, fullWidth && classes.paperFullWidth)\n }), children))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Dialog.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The id(s) of the element(s) that describe the dialog.\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * The id(s) of the element(s) that label the dialog.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * Dialog children, usually the included sub-components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, clicking the backdrop will not fire the `onClose` callback.\n * @deprecated Use the onClose prop with the `reason` argument to filter the `backdropClick` events.\n */\n disableBackdropClick: deprecatedPropType(PropTypes.bool, 'Use the onClose prop with the `reason` argument to filter the `backdropClick` events.'),\n\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n */\n disableEscapeKeyDown: PropTypes.bool,\n\n /**\n * If `true`, the dialog will be full-screen\n */\n fullScreen: PropTypes.bool,\n\n /**\n * If `true`, the dialog stretches to `maxWidth`.\n *\n * Notice that the dialog width grow is limited by the default margin.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * Determine the max-width of the dialog.\n * The dialog width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false]),\n\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the onClose prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `backdropClick` events.'),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the dialog enters.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the escape key is pressed,\n * `disableKeyboard` is false and the modal is in focus.\n * @deprecated Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.\n */\n onEscapeKeyDown: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.'),\n\n /**\n * Callback fired before the dialog exits.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * If `true`, the Dialog is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * The component used to render the body of the dialog.\n */\n PaperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Determine the container for scrolling the dialog.\n */\n scroll: PropTypes.oneOf(['body', 'paper']),\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialog'\n})(Dialog);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogActions'\n})(DialogActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n overflowY: 'auto',\n padding: '8px 24px',\n '&:first-child': {\n // dialog without title\n paddingTop: 20\n }\n },\n\n /* Styles applied to the root element if `dividers={true}`. */\n dividers: {\n padding: '16px 24px',\n borderTop: \"1px solid \".concat(theme.palette.divider),\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n }\n };\n};\nvar DialogContent = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$dividers = props.dividers,\n dividers = _props$dividers === void 0 ? false : _props$dividers,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"dividers\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dividers && classes.dividers),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display the top and bottom dividers.\n */\n dividers: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogContent'\n})(DialogContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n marginBottom: 12\n }\n};\nvar DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(props, ref) {\n return /*#__PURE__*/React.createElement(Typography, _extends({\n component: \"p\",\n variant: \"body1\",\n color: \"textSecondary\",\n ref: ref\n }, props));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContentText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogContentText'\n})(DialogContentText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n margin: 0,\n padding: '16px 24px',\n flex: '0 0 auto'\n }\n};\nvar DialogTitle = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), disableTypography ? children : /*#__PURE__*/React.createElement(Typography, {\n component: \"h2\",\n variant: \"h6\"\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogTitle.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a typography component.\n * For instance, this can be useful to render an h4 instead of the default h2.\n */\n disableTypography: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogTitle'\n})(DialogTitle);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { duration } from '../styles/transitions';\nimport ClickAwayListener from '../ClickAwayListener';\nimport useEventCallback from '../utils/useEventCallback';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport Grow from '../Grow';\nimport SnackbarContent from '../SnackbarContent';\nexport var styles = function styles(theme) {\n var top1 = {\n top: 8\n };\n var bottom1 = {\n bottom: 8\n };\n var right = {\n justifyContent: 'flex-end'\n };\n var left = {\n justifyContent: 'flex-start'\n };\n var top3 = {\n top: 24\n };\n var bottom3 = {\n bottom: 24\n };\n var right3 = {\n right: 24\n };\n var left3 = {\n left: 24\n };\n var center = {\n left: '50%',\n right: 'auto',\n transform: 'translateX(-50%)'\n };\n return {\n /* Styles applied to the root element. */\n root: {\n zIndex: theme.zIndex.snackbar,\n position: 'fixed',\n display: 'flex',\n left: 8,\n right: 8,\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */\n anchorOriginTopCenter: _extends({}, top1, _defineProperty({}, theme.breakpoints.up('sm'), _extends({}, top3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */\n anchorOriginBottomCenter: _extends({}, bottom1, _defineProperty({}, theme.breakpoints.up('sm'), _extends({}, bottom3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */\n anchorOriginTopRight: _extends({}, top1, right, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n left: 'auto'\n }, top3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */\n anchorOriginBottomRight: _extends({}, bottom1, right, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n left: 'auto'\n }, bottom3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */\n anchorOriginTopLeft: _extends({}, top1, left, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n right: 'auto'\n }, top3, left3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */\n anchorOriginBottomLeft: _extends({}, bottom1, left, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n right: 'auto'\n }, bottom3, left3)))\n };\n};\nvar Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(props, ref) {\n var action = props.action,\n _props$anchorOrigin = props.anchorOrigin;\n _props$anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'bottom',\n horizontal: 'center'\n } : _props$anchorOrigin;\n\n var vertical = _props$anchorOrigin.vertical,\n horizontal = _props$anchorOrigin.horizontal,\n _props$autoHideDurati = props.autoHideDuration,\n autoHideDuration = _props$autoHideDurati === void 0 ? null : _props$autoHideDurati,\n children = props.children,\n classes = props.classes,\n className = props.className,\n ClickAwayListenerProps = props.ClickAwayListenerProps,\n ContentProps = props.ContentProps,\n _props$disableWindowB = props.disableWindowBlurListener,\n disableWindowBlurListener = _props$disableWindowB === void 0 ? false : _props$disableWindowB,\n message = props.message,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n open = props.open,\n resumeHideDuration = props.resumeHideDuration,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n } : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"action\", \"anchorOrigin\", \"autoHideDuration\", \"children\", \"classes\", \"className\", \"ClickAwayListenerProps\", \"ContentProps\", \"disableWindowBlurListener\", \"message\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"onMouseEnter\", \"onMouseLeave\", \"open\", \"resumeHideDuration\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n var timerAutoHide = React.useRef();\n\n var _React$useState = React.useState(true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var handleClose = useEventCallback(function () {\n if (onClose) {\n onClose.apply(void 0, arguments);\n }\n });\n var setAutoHideTimer = useEventCallback(function (autoHideDurationParam) {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(function () {\n handleClose(null, 'timeout');\n }, autoHideDurationParam);\n });\n React.useEffect(function () {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return function () {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]); // Pause the timer when the user is interacting with the Snackbar\n // or when the user hide the window.\n\n var handlePause = function handlePause() {\n clearTimeout(timerAutoHide.current);\n }; // Restart the timer when the user is no longer interacting with the Snackbar\n // or when the window is shown back.\n\n\n var handleResume = React.useCallback(function () {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n var handleMouseEnter = function handleMouseEnter(event) {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n\n handlePause();\n };\n\n var handleMouseLeave = function handleMouseLeave(event) {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n\n handleResume();\n };\n\n var handleClickAway = function handleClickAway(event) {\n if (onClose) {\n onClose(event, 'clickaway');\n }\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n };\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n React.useEffect(function () {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n return function () {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]); // So we only render active snackbars.\n\n if (!open && exited) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(ClickAwayListener, _extends({\n onClickAway: handleClickAway\n }, ClickAwayListenerProps), /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"anchorOrigin\".concat(capitalize(vertical)).concat(capitalize(horizontal))], className),\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEnter: createChainedFunction(handleEnter, onEnter),\n onEntered: onEntered,\n onEntering: onEntering,\n onExit: onExit,\n onExited: createChainedFunction(handleExited, onExited),\n onExiting: onExiting,\n timeout: transitionDuration,\n direction: vertical === 'top' ? 'down' : 'up'\n }, TransitionProps), children || /*#__PURE__*/React.createElement(SnackbarContent, _extends({\n message: message,\n action: action\n }, ContentProps)))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Snackbar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display. It renders after the message, at the end of the snackbar.\n */\n action: PropTypes.node,\n\n /**\n * The anchor of the `Snackbar`.\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['center', 'left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onClose` function. `onClose` should then set the state of the `open`\n * prop to hide the Snackbar. This behavior is disabled by default with\n * the `null` value.\n */\n autoHideDuration: PropTypes.number,\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children: PropTypes.element,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Props applied to the `ClickAwayListener` element.\n */\n ClickAwayListenerProps: PropTypes.object,\n\n /**\n * Props applied to the [`SnackbarContent`](/api/snackbar-content/) element.\n */\n ContentProps: PropTypes.object,\n\n /**\n * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.\n */\n disableWindowBlurListener: PropTypes.bool,\n\n /**\n * When displaying multiple consecutive Snackbars from a parent rendering a single\n * , add the key prop to ensure independent treatment of each message.\n * e.g. , otherwise, the message may update-in-place and\n * features such as autoHideDuration may be canceled.\n */\n key: PropTypes.any,\n\n /**\n * The message to display.\n */\n message: PropTypes.node,\n\n /**\n * Callback fired when the component requests to be closed.\n * Typically `onClose` is used to set state in the parent component,\n * which is used to control the `Snackbar` `open` prop.\n * The `reason` parameter can optionally be used to control the response to `onClose`,\n * for example ignoring `clickaway`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"timeout\"` (`autoHideDuration` expired), `\"clickaway\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the transition is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired before the transition is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * @ignore\n */\n onMouseEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n\n /**\n * If `true`, `Snackbar` is open.\n */\n open: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before dismissing after user interaction.\n * If `autoHideDuration` prop isn't specified, it does nothing.\n * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,\n * we default to `autoHideDuration / 2` ms.\n */\n resumeHideDuration: PropTypes.number,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiSnackbar'\n})(Snackbar);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');\n\nexports.default = _default;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minHeight: 36,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n borderRadius: '50%',\n padding: 0,\n minWidth: 0,\n width: 56,\n height: 56,\n boxShadow: theme.shadows[6],\n '&:active': {\n boxShadow: theme.shadows[12]\n },\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n },\n textDecoration: 'none'\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // assure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n primary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n secondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"extended\"`. */\n extended: {\n borderRadius: 48 / 2,\n padding: '0 16px',\n width: 'auto',\n minHeight: 'auto',\n minWidth: 48,\n height: 48,\n '&$sizeSmall': {\n width: 'auto',\n padding: '0 8px',\n borderRadius: 34 / 2,\n minWidth: 34,\n height: 34\n },\n '&$sizeMedium': {\n width: 'auto',\n padding: '0 16px',\n borderRadius: 40 / 2,\n minWidth: 40,\n height: 40\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `size=\"small\"``. */\n sizeSmall: {\n width: 40,\n height: 40\n },\n\n /* Styles applied to the root element if `size=\"medium\"``. */\n sizeMedium: {\n width: 48,\n height: 48\n }\n };\n};\nvar Fab = /*#__PURE__*/React.forwardRef(function Fab(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$size = props.size,\n size = _props$size === void 0 ? 'large' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circular' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableFocusRipple\", \"focusVisibleClassName\", \"size\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, size !== 'large' && classes[\"size\".concat(capitalize(size))], disabled && classes.disabled, variant === 'extended' && classes.extended, {\n 'primary': classes.primary,\n 'secondary': classes.secondary,\n 'inherit': classes.colorInherit\n }[color]),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? Fab.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n * 'round' is deprecated, use 'circular' instead.\n */\n variant: chainPropTypes(PropTypes.oneOf(['extended', 'circular', 'round']), function (props) {\n if (props.variant === 'round') {\n throw new Error('Material-UI: variant=\"round\" was renamed variant=\"circular\" for consistency.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFab'\n})(Fab);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `disableGutters={false}`. */\n gutters: _defineProperty({\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2)\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `variant=\"regular\"`. */\n regular: theme.mixins.toolbar,\n\n /* Styles applied to the root element if `variant=\"dense\"`. */\n dense: {\n minHeight: 48\n }\n };\n};\nvar Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'regular' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes[variant], className, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Toolbar.propTypes = {\n /**\n * Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, disables gutter padding.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['regular', 'dense'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiToolbar'\n})(Toolbar);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport SVG from 'react-inlinesvg';\n\nimport IconSystem from '@material-ui/icons/SettingsApplications';\nimport IconPhoto from '@material-ui/icons/Photo';\nimport IconGroup from '@material-ui/icons/SupervisedUserCircle';\nimport IconUser from '@material-ui/icons/PersonOutlined';\nimport IconHost from '@material-ui/icons/Router';\nimport IconConnection from '@material-ui/icons/Wifi';\nimport IconInfo from '@material-ui/icons/Info';\nimport IconMeta from '@material-ui/icons/Description';\nimport IconAlias from '../icons/IconAlias';\n\nimport Utils from './Utils';\n\nexport function getSystemIcon(obj) {\n let icon;\n const id = obj?._id;\n\n if (!id) {\n return null;\n }\n\n // system or design have special icons\n if (id.startsWith('_design/') || (id === 'system')) {\n icon = ;\n } else if (id === '0_userdata' || id === '0_userdata.0') {\n icon = ;\n } else if (id === 'alias' || id === 'alias.0') {\n icon = ;\n } else if (id === 'system.adapter') {\n icon = ;\n } else if (id === 'system.group') {\n icon = ;\n } else if (id === 'system.user') {\n icon = ;\n } else if (id === 'system.host') {\n icon = ;\n } else if (id.endsWith('.connection') || id.endsWith('.connected')) {\n icon = ;\n } else if (id.endsWith('.info')) {\n icon = ;\n } else if (obj?.type === 'meta') {\n icon = ;\n }\n\n return icon || null;\n}\n\nexport function getSelectIdIcon(obj, imagePrefix) {\n imagePrefix = imagePrefix || '.';//http://localhost:8081';\n let src = '';\n const common = obj?.common;\n\n if (common) {\n const cIcon = common.icon;\n if (cIcon) {\n if (!cIcon.startsWith('data:image/')) {\n if (cIcon.includes('.')) {\n let instance;\n if (obj.type === 'instance' || obj.type === 'adapter') {\n src = imagePrefix + '/adapter/' + common.name + '/' + cIcon;\n } else if (obj._id && obj._id.startsWith('system.adapter.')) {\n instance = obj._id.split('.', 3);\n if (cIcon[0] === '/') {\n instance[2] += cIcon;\n } else {\n instance[2] += '/' + cIcon;\n }\n src = imagePrefix + '/adapter/' + instance[2];\n } else {\n instance = obj._id.split('.', 2);\n if (cIcon[0] === '/') {\n instance[0] += cIcon;\n } else {\n instance[0] += '/' + cIcon;\n }\n src = imagePrefix + '/adapter/' + instance[0];\n }\n } else {\n return null;\n }\n } else {\n // base 64 image\n src = cIcon;\n }\n }\n }\n\n return src || null;\n}\n\nclass Icon extends React.Component {\n render() {\n if (this.props.src) {\n if (typeof this.props.src === 'string') {\n if (this.props.src.length < 3) {\n return {this.props.src}; // utf-8 char\n } else {\n if (this.props.src.startsWith('data:image/svg')) {\n return ;\n } else {\n return \"\";\n }\n }\n } else {\n return this.props.src;\n }\n } else {\n return null;\n }\n }\n}\n\nIcon.propTypes = {\n color: PropTypes.string,\n title: PropTypes.string,\n src: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n className: PropTypes.string,\n imagePrefix: PropTypes.string,\n style: PropTypes.object,\n styleUTF8: PropTypes.object,\n};\n\nexport default Icon;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.json2tsv = void 0;\nfunction assertString2DArray(arg) {\n if (!Array.isArray(arg)) {\n throw new TypeError(`Expected string[][], got ${typeof arg}`);\n }\n for (const x of arg) {\n if (!Array.isArray(x)) {\n throw new TypeError(`Expected string[][], got ${typeof x}[]`);\n }\n for (const y of x) {\n if (typeof y !== 'string') {\n throw new TypeError(`Expected string[][], got ${typeof y}[][]`);\n }\n }\n }\n}\nconst SPECIAL_CHAR_REGEX = /[\\t\\n\"]/;\nfunction hasSpecialChar(string) {\n return SPECIAL_CHAR_REGEX.test(string);\n}\nfunction json2tsv(json) {\n assertString2DArray(json);\n return json.map(row => {\n return row.map(cell => {\n return hasSpecialChar(cell) ? `\"${cell.replace(/\"/g, '\"\"')}\"` : cell;\n }).join('\\t');\n }).join('\\n');\n}\nexports.json2tsv = json2tsv;\n//# sourceMappingURL=json2tsv.js.map","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsv2json = void 0;\n/**\n * Modifies the given array, removing the extracted prefix.\n *\n * Assumes the array is nonempty.\n *\n * Here's how it works:\n * If a cell does not start with \", it is a 'raw' cell and everything is read verbatim until a \\t or \\n is found, which ends the cell.\n * If a cell starts with \", it starts in 'escaped' mode, ignoring this first \". In escaped mode, \\t and \\n are treated as normal characters. Once another \" is found, unless it is not a \"\", the escaped mode is over (but the cell isn't necessarily over yet - it will be over on the next \\t or \\n).\n * If the full tsv data finishes with a cell in escaped mode, then that cell is over.\n */\nfunction extractFirstCell(tsvCharacters) {\n const result = [];\n let escapedMode = tsvCharacters[0] === '\"';\n let index = escapedMode ? 1 : 0;\n function done(lineIsOver) {\n tsvCharacters.splice(0, index + 1);\n return { cell: result.join(''), lineIsOver };\n }\n while (index < tsvCharacters.length) {\n const char = tsvCharacters[index];\n const nextChar = tsvCharacters[index + 1];\n if (escapedMode) {\n if (char === '\"') {\n if (nextChar === '\"') {\n result.push('\"');\n index++;\n }\n else {\n escapedMode = false;\n }\n }\n else {\n result.push(char);\n }\n }\n else {\n if (char === '\\r' && nextChar === '\\n') {\n index++;\n return done(true);\n }\n if (char === '\\n')\n return done(true);\n if (char === '\\t')\n return done(false);\n result.push(char);\n }\n index++;\n }\n return done(true);\n}\nfunction tsv2json(tsv) {\n if (typeof tsv !== 'string')\n throw new TypeError(`Expected string, got ${typeof tsv}`);\n if (tsv === '')\n return [[]];\n const characters = [...tsv]; // Account for surrogate pairs\n const result = [];\n let currentRow = [];\n while (characters.length > 0) {\n const { cell, lineIsOver } = extractFirstCell(characters);\n currentRow.push(cell);\n if (lineIsOver) {\n result.push(currentRow);\n currentRow = [];\n }\n }\n return result;\n}\nexports.tsv2json = tsv2json;\n//# sourceMappingURL=tsv2json.js.map","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAceInstance = exports.debounce = exports.editorEvents = exports.editorOptions = void 0;\nvar editorOptions = [\n \"minLines\",\n \"maxLines\",\n \"readOnly\",\n \"highlightActiveLine\",\n \"tabSize\",\n \"enableBasicAutocompletion\",\n \"enableLiveAutocompletion\",\n \"enableSnippets\"\n];\nexports.editorOptions = editorOptions;\nvar editorEvents = [\n \"onChange\",\n \"onFocus\",\n \"onInput\",\n \"onBlur\",\n \"onCopy\",\n \"onPaste\",\n \"onSelectionChange\",\n \"onCursorChange\",\n \"onScroll\",\n \"handleOptions\",\n \"updateRef\"\n];\nexports.editorEvents = editorEvents;\nvar getAceInstance = function () {\n var ace;\n if (typeof window === \"undefined\") {\n // ace-builds just needs some window object to attach ace to.\n // During SSR even just an empty object will work.\n global.window = {};\n ace = require(\"ace-builds\");\n // And it can be discarded immediately afterward to avoid confusing\n // other libraries that might detect SSR the same way we did.\n delete global.window;\n }\n else if (window.ace) {\n // Fallback for ace.require when vanilla ACE is hosted over a CDN\n ace = window.ace;\n ace.acequire = window.ace.require || window.ace.acequire;\n }\n else {\n ace = require(\"ace-builds\");\n }\n return ace;\n};\nexports.getAceInstance = getAceInstance;\nvar debounce = function (fn, delay) {\n var timer = null;\n // tslint:disable-next-line\n return function () {\n var context = this;\n var args = arguments;\n clearTimeout(timer);\n timer = setTimeout(function () {\n fn.apply(context, args);\n }, delay);\n };\n};\nexports.debounce = debounce;\n//# sourceMappingURL=editorOptions.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar editorOptions_1 = require(\"./editorOptions\");\nvar ace = (0, editorOptions_1.getAceInstance)();\nvar ace_builds_1 = require(\"ace-builds\");\nvar ext_split_1 = require(\"ace-builds/src-noconflict/ext-split\");\nvar PropTypes = require(\"prop-types\");\nvar React = require(\"react\");\nvar isEqual = require(\"lodash.isequal\");\nvar get = require(\"lodash.get\");\nvar SplitComponent = /** @class */ (function (_super) {\n __extends(SplitComponent, _super);\n function SplitComponent(props) {\n var _this = _super.call(this, props) || this;\n editorOptions_1.editorEvents.forEach(function (method) {\n _this[method] = _this[method].bind(_this);\n });\n _this.debounce = editorOptions_1.debounce;\n return _this;\n }\n SplitComponent.prototype.isInShadow = function (node) {\n var parent = node && node.parentNode;\n while (parent) {\n if (parent.toString() === \"[object ShadowRoot]\") {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n };\n SplitComponent.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, className = _a.className, onBeforeLoad = _a.onBeforeLoad, mode = _a.mode, focus = _a.focus, theme = _a.theme, fontSize = _a.fontSize, value = _a.value, defaultValue = _a.defaultValue, cursorStart = _a.cursorStart, showGutter = _a.showGutter, wrapEnabled = _a.wrapEnabled, showPrintMargin = _a.showPrintMargin, _b = _a.scrollMargin, scrollMargin = _b === void 0 ? [0, 0, 0, 0] : _b, keyboardHandler = _a.keyboardHandler, onLoad = _a.onLoad, commands = _a.commands, annotations = _a.annotations, markers = _a.markers, splits = _a.splits;\n this.editor = ace.edit(this.refEditor);\n if (this.isInShadow(this.refEditor)) {\n this.editor.renderer.attachToShadowRoot();\n }\n this.editor.setTheme(\"ace/theme/\" + theme);\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n var editorProps = Object.keys(this.props.editorProps);\n var split = new ext_split_1.Split(this.editor.container, \"ace/theme/\" + theme, splits);\n this.editor.env.split = split;\n this.splitEditor = split.getEditor(0);\n this.split = split;\n // in a split scenario we don't want a print margin for the entire application\n this.editor.setShowPrintMargin(false);\n this.editor.renderer.setShowGutter(false);\n // get a list of possible options to avoid 'misspelled option errors'\n var availableOptions = this.splitEditor.$options;\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(this.onChange, this.props.debounceChangePeriod);\n }\n split.forEach(function (editor, index) {\n for (var i = 0; i < editorProps.length; i++) {\n editor[editorProps[i]] = _this.props.editorProps[editorProps[i]];\n }\n var defaultValueForEditor = get(defaultValue, index);\n var valueForEditor = get(value, index, \"\");\n editor.session.setUndoManager(new ace.UndoManager());\n editor.setTheme(\"ace/theme/\" + theme);\n editor.renderer.setScrollMargin(scrollMargin[0], scrollMargin[1], scrollMargin[2], scrollMargin[3]);\n editor.getSession().setMode(\"ace/mode/\" + mode);\n editor.setFontSize(fontSize);\n editor.renderer.setShowGutter(showGutter);\n editor.getSession().setUseWrapMode(wrapEnabled);\n editor.setShowPrintMargin(showPrintMargin);\n editor.on(\"focus\", _this.onFocus);\n editor.on(\"blur\", _this.onBlur);\n editor.on(\"input\", _this.onInput);\n editor.on(\"copy\", _this.onCopy);\n editor.on(\"paste\", _this.onPaste);\n editor.on(\"change\", _this.onChange);\n editor\n .getSession()\n .selection.on(\"changeSelection\", _this.onSelectionChange);\n editor.getSession().selection.on(\"changeCursor\", _this.onCursorChange);\n editor.session.on(\"changeScrollTop\", _this.onScroll);\n editor.setValue(defaultValueForEditor === undefined\n ? valueForEditor\n : defaultValueForEditor, cursorStart);\n var newAnnotations = get(annotations, index, []);\n var newMarkers = get(markers, index, []);\n editor.getSession().setAnnotations(newAnnotations);\n if (newMarkers && newMarkers.length > 0) {\n _this.handleMarkers(newMarkers, editor);\n }\n for (var i = 0; i < editorOptions_1.editorOptions.length; i++) {\n var option = editorOptions_1.editorOptions[i];\n if (availableOptions.hasOwnProperty(option)) {\n editor.setOption(option, _this.props[option]);\n }\n else if (_this.props[option]) {\n console.warn(\"ReaceAce: editor option \" + option + \" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?\");\n }\n }\n _this.handleOptions(_this.props, editor);\n if (Array.isArray(commands)) {\n commands.forEach(function (command) {\n if (typeof command.exec === \"string\") {\n editor.commands.bindKey(command.bindKey, command.exec);\n }\n else {\n editor.commands.addCommand(command);\n }\n });\n }\n if (keyboardHandler) {\n editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n });\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n if (focus) {\n this.splitEditor.focus();\n }\n var sp = this.editor.env.split;\n sp.setOrientation(this.props.orientation === \"below\" ? sp.BELOW : sp.BESIDE);\n sp.resize(true);\n if (onLoad) {\n onLoad(sp);\n }\n };\n SplitComponent.prototype.componentDidUpdate = function (prevProps) {\n var _this = this;\n var oldProps = prevProps;\n var nextProps = this.props;\n var split = this.editor.env.split;\n if (nextProps.splits !== oldProps.splits) {\n split.setSplits(nextProps.splits);\n }\n if (nextProps.orientation !== oldProps.orientation) {\n split.setOrientation(nextProps.orientation === \"below\" ? split.BELOW : split.BESIDE);\n }\n split.forEach(function (editor, index) {\n if (nextProps.mode !== oldProps.mode) {\n editor.getSession().setMode(\"ace/mode/\" + nextProps.mode);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n editor.setKeyboardHandler(\"ace/keyboard/\" + nextProps.keyboardHandler);\n }\n else {\n editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n editor.setFontSize(nextProps.fontSize);\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n editor.renderer.setShowGutter(nextProps.showGutter);\n }\n for (var i = 0; i < editorOptions_1.editorOptions.length; i++) {\n var option = editorOptions_1.editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n editor.setOption(option, nextProps[option]);\n }\n }\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n _this.handleOptions(nextProps, editor);\n }\n var nextValue = get(nextProps.value, index, \"\");\n if (editor.getValue() !== nextValue) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n _this.silent = true;\n var pos = editor.session.selection.toJSON();\n editor.setValue(nextValue, nextProps.cursorStart);\n editor.session.selection.fromJSON(pos);\n _this.silent = false;\n }\n var newAnnotations = get(nextProps.annotations, index, []);\n var oldAnnotations = get(oldProps.annotations, index, []);\n if (!isEqual(newAnnotations, oldAnnotations)) {\n editor.getSession().setAnnotations(newAnnotations);\n }\n var newMarkers = get(nextProps.markers, index, []);\n var oldMarkers = get(oldProps.markers, index, []);\n if (!isEqual(newMarkers, oldMarkers) && Array.isArray(newMarkers)) {\n _this.handleMarkers(newMarkers, editor);\n }\n });\n if (nextProps.className !== oldProps.className) {\n var appliedClasses = this.refEditor.className;\n var appliedClassesArray_1 = appliedClasses.trim().split(\" \");\n var oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(function (oldClass) {\n var index = appliedClassesArray_1.indexOf(oldClass);\n appliedClassesArray_1.splice(index, 1);\n });\n this.refEditor.className =\n \" \" + nextProps.className + \" \" + appliedClassesArray_1.join(\" \");\n }\n if (nextProps.theme !== oldProps.theme) {\n split.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n if (nextProps.focus && !oldProps.focus) {\n this.splitEditor.focus();\n }\n if (nextProps.height !== this.props.height ||\n nextProps.width !== this.props.width) {\n this.editor.resize();\n }\n };\n SplitComponent.prototype.componentWillUnmount = function () {\n this.editor.destroy();\n this.editor = null;\n };\n SplitComponent.prototype.onChange = function (event) {\n if (this.props.onChange && !this.silent) {\n var value_1 = [];\n this.editor.env.split.forEach(function (editor) {\n value_1.push(editor.getValue());\n });\n this.props.onChange(value_1, event);\n }\n };\n SplitComponent.prototype.onSelectionChange = function (event) {\n if (this.props.onSelectionChange) {\n var value_2 = [];\n this.editor.env.split.forEach(function (editor) {\n value_2.push(editor.getSelection());\n });\n this.props.onSelectionChange(value_2, event);\n }\n };\n SplitComponent.prototype.onCursorChange = function (event) {\n if (this.props.onCursorChange) {\n var value_3 = [];\n this.editor.env.split.forEach(function (editor) {\n value_3.push(editor.getSelection());\n });\n this.props.onCursorChange(value_3, event);\n }\n };\n SplitComponent.prototype.onFocus = function (event) {\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n SplitComponent.prototype.onInput = function (event) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n };\n SplitComponent.prototype.onBlur = function (event) {\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n };\n SplitComponent.prototype.onCopy = function (text) {\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n };\n SplitComponent.prototype.onPaste = function (text) {\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n };\n SplitComponent.prototype.onScroll = function () {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n };\n SplitComponent.prototype.handleOptions = function (props, editor) {\n var setOptions = Object.keys(props.setOptions);\n for (var y = 0; y < setOptions.length; y++) {\n editor.setOption(setOptions[y], props.setOptions[setOptions[y]]);\n }\n };\n SplitComponent.prototype.handleMarkers = function (markers, editor) {\n // remove foreground markers\n var currentMarkers = editor.getSession().getMarkers(true);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers\n currentMarkers = editor.getSession().getMarkers(false);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // add new markers\n markers.forEach(function (_a) {\n var startRow = _a.startRow, startCol = _a.startCol, endRow = _a.endRow, endCol = _a.endCol, className = _a.className, type = _a.type, _b = _a.inFront, inFront = _b === void 0 ? false : _b;\n var range = new ace_builds_1.Range(startRow, startCol, endRow, endCol);\n editor\n .getSession()\n .addMarker(range, className, type, inFront);\n });\n };\n SplitComponent.prototype.updateRef = function (item) {\n this.refEditor = item;\n };\n SplitComponent.prototype.render = function () {\n var _a = this.props, name = _a.name, width = _a.width, height = _a.height, style = _a.style;\n var divStyle = __assign({ width: width, height: height }, style);\n return React.createElement(\"div\", { ref: this.updateRef, id: name, style: divStyle });\n };\n SplitComponent.propTypes = {\n className: PropTypes.string,\n debounceChangePeriod: PropTypes.number,\n defaultValue: PropTypes.arrayOf(PropTypes.string),\n focus: PropTypes.bool,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.string,\n mode: PropTypes.string,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n orientation: PropTypes.string,\n showGutter: PropTypes.bool,\n splits: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.arrayOf(PropTypes.string),\n width: PropTypes.string,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n enableLiveAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n commands: PropTypes.array\n };\n SplitComponent.defaultProps = {\n name: \"ace-editor\",\n focus: false,\n orientation: \"beside\",\n splits: 2,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n value: [],\n fontSize: 12,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false\n };\n return SplitComponent;\n}(React.Component));\nexports.default = SplitComponent;\n//# sourceMappingURL=split.js.map","/** The status of an event. */\n// eslint-disable-next-line import/export\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error occurred during submission. */\n Failed = 'failed',\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace, import/export\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n /** Pending */\n PENDING = 'PENDING',\n /** Resolved / OK */\n RESOLVED = 'RESOLVED',\n /** Rejected / Error */\n REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<{\n done: boolean;\n onfulfilled?: ((value: T) => T | PromiseLike) | null;\n onrejected?: ((reason: any) => any) | null;\n }> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public static resolve(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n }\n\n /** JSDoc */\n public static reject(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n }\n\n /** JSDoc */\n public static all(collection: Array>): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n if (!Array.isArray(collection)) {\n reject(new TypeError(`Promise.all requires an array as input.`));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n let counter = collection.length;\n const resolvedCollection: U[] = [];\n\n collection.forEach((item, index) => {\n void SyncPromise.resolve(item)\n .then(value => {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._attachHandler({\n done: false,\n onfulfilled: result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: reason => {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve((val as unknown) as any);\n });\n });\n }\n\n /** JSDoc */\n public toString(): string {\n return '[object SyncPromise]';\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n // TODO: FIXME\n /** JSDoc */\n private readonly _attachHandler = (handler: {\n /** JSDoc */\n done: boolean;\n /** JSDoc */\n onfulfilled?(value: T): any;\n /** JSDoc */\n onrejected?(reason: any): any;\n }) => {\n this._handlers = this._handlers.concat(handler);\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler.done) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n if (handler.onfulfilled) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler.onfulfilled((this._value as unknown) as any);\n }\n }\n\n if (this._state === States.REJECTED) {\n if (handler.onrejected) {\n handler.onrejected(this._value);\n }\n }\n\n handler.done = true;\n });\n };\n}\n\nexport { SyncPromise };\n","import { Session as SessionInterface, SessionContext, SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n\n/**\n * @inheritdoc\n */\nexport class Session implements SessionInterface {\n public userAgent?: string;\n public errors: number = 0;\n public release?: string;\n public sid: string = uuid4();\n public did?: string;\n public timestamp: number;\n public started: number;\n public duration?: number = 0;\n public status: SessionStatus = SessionStatus.Ok;\n public environment?: string;\n public ipAddress?: string;\n public init: boolean = true;\n public ignoreDuration: boolean = false;\n\n public constructor(context?: Omit) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n this.timestamp = startingTime;\n this.started = startingTime;\n if (context) {\n this.update(context);\n }\n }\n\n /** JSDoc */\n // eslint-disable-next-line complexity\n public update(context: SessionContext = {}): void {\n if (context.user) {\n if (!this.ipAddress && context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n\n if (!this.did && !context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n this.timestamp = context.timestamp || timestampInSeconds();\n if (context.ignoreDuration) {\n this.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n this.init = context.init;\n }\n if (!this.did && context.did) {\n this.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n if (this.ignoreDuration) {\n this.duration = undefined;\n } else if (typeof context.duration === 'number') {\n this.duration = context.duration;\n } else {\n const duration = this.timestamp - this.started;\n this.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n this.release = context.release;\n }\n if (context.environment) {\n this.environment = context.environment;\n }\n if (!this.ipAddress && context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n if (!this.userAgent && context.userAgent) {\n this.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n if (context.status) {\n this.status = context.status;\n }\n }\n\n /** JSDoc */\n public close(status?: Exclude): void {\n if (status) {\n this.update({ status });\n } else if (this.status === SessionStatus.Ok) {\n this.update({ status: SessionStatus.Exited });\n } else {\n this.update();\n }\n }\n\n /** JSDoc */\n public toJSON(): {\n init: boolean;\n sid: string;\n did?: string;\n timestamp: string;\n started: string;\n duration?: number;\n status: SessionStatus;\n errors: number;\n attrs?: {\n release?: string;\n environment?: string;\n user_agent?: string;\n ip_address?: string;\n };\n } {\n return dropUndefinedKeys({\n sid: `${this.sid}`,\n init: this.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(this.started * 1000).toISOString(),\n timestamp: new Date(this.timestamp * 1000).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? `${this.did}` : undefined,\n duration: this.duration,\n attrs: dropUndefinedKeys({\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent,\n }),\n });\n }\n}\n","/* eslint-disable max-lines */\nimport {\n Breadcrumb,\n CaptureContext,\n Context,\n Contexts,\n Event,\n EventHint,\n EventProcessor,\n Extra,\n Extras,\n Primitive,\n RequestSession,\n Scope as ScopeInterface,\n ScopeContext,\n Severity,\n Span,\n Transaction,\n User,\n} from '@sentry/types';\nimport { dateTimestampInSeconds, getGlobalObject, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n\nimport { Session } from './session';\n\n/**\n * Absolute maximum number of breadcrumbs added to an event.\n * The `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: Primitive } = {};\n\n /** Extra */\n protected _extra: Extras = {};\n\n /** Contexts */\n protected _contexts: Contexts = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction Name */\n protected _transactionName?: string;\n\n /** Span */\n protected _span?: Span;\n\n /** Session */\n protected _session?: Session;\n\n /** Request Mode Session Status */\n protected _requestSession?: RequestSession;\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n if (this._session) {\n this._session.update({ user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n public getRequestSession(): RequestSession | undefined {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n public setRequestSession(requestSession?: RequestSession): this {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n public setTransaction(name?: string): this {\n return this.setTransactionName(name);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts = { ...this._contexts, [key]: context };\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n public getTransaction(): Transaction | undefined {\n // often, this span will be a transaction, but it's not guaranteed to be\n const span = this.getSpan() as undefined | (Span & { spanRecorder: { spans: Span[] } });\n\n // try it the new way first\n if (span?.transaction) {\n return span?.transaction;\n }\n\n // fallback to the old way (known bug: this only finds transactions with sampled = true)\n if (span?.spanRecorder?.spans[0]) {\n return span.spanRecorder.spans[0] as Transaction;\n }\n\n // neither way found a transaction\n return undefined;\n }\n\n /**\n * @inheritDoc\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext as (scope: T) => T)(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext as ScopeContext;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n this._breadcrumbs = [...this._breadcrumbs, mergedBreadcrumb].slice(-maxCrumbs);\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional information about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transactionName = this._span.transaction?.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n void (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n","/* eslint-disable max-lines */\nimport {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n CustomSamplingContext,\n Event,\n EventHint,\n Extra,\n Extras,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Primitive,\n SessionContext,\n SessionStatus,\n Severity,\n Span,\n SpanContext,\n Transaction,\n TransactionContext,\n User,\n} from '@sentry/types';\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isNodeEnv, logger, uuid4 } from '@sentry/utils';\n\nimport { Scope } from './scope';\nimport { Session } from './session';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * A layer in the process stack.\n * @hidden\n */\nexport interface Layer {\n client?: Client;\n scope?: Scope;\n}\n\n/**\n * An object that contains a hub and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: {\n hub?: Hub;\n /**\n * Extra Hub properties injected by various SDKs\n */\n integrations?: Integration[];\n extensions?: {\n /** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n domain?: { [key: string]: any };\n } & {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n };\n}\n\n/**\n * @hidden\n * @deprecated Can be removed once `Hub.getActiveDomain` is removed.\n */\nexport interface DomainAsCarrier extends Carrier {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n members: { [key: string]: any }[];\n}\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [{}];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this.getStackTop().scope = scope;\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = uuid4();\n if (event.type !== 'transaction') {\n this._lastEventId = eventId;\n }\n\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const { scope, client } = this.getStackTop();\n\n if (!scope || !client) return;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const scope = this.getScope();\n if (scope) scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): void {\n const scope = this.getScope();\n if (scope) scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): void {\n const scope = this.getScope();\n if (scope) scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): void {\n const scope = this.getScope();\n if (scope) scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): void {\n const scope = this.getScope();\n if (scope) scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const scope = this.getScope();\n if (scope) scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const { scope, client } = this.getStackTop();\n if (scope && client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(context: SpanContext): Span {\n return this._callExtensionMethod('startSpan', context);\n }\n\n /**\n * @inheritDoc\n */\n public startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(endSession: boolean = false): void {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n public endSession(): void {\n this.getStackTop()\n ?.scope?.getSession()\n ?.close();\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n this.getStackTop()?.scope?.setSession();\n }\n\n /**\n * @inheritDoc\n */\n public startSession(context?: SessionContext): Session {\n const { scope, client } = this.getStackTop();\n const { release, environment } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const global = getGlobalObject<{ navigator?: { userAgent?: string } }>();\n const { userAgent } = global.navigator || {};\n\n const session = new Session({\n release,\n environment,\n ...(scope && { user: scope.getUser() }),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n if (scope) {\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === SessionStatus.Ok) {\n currentSession.update({ status: SessionStatus.Exited });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n }\n\n return session;\n }\n\n /**\n * Sends the current Session on the scope\n */\n private _sendSessionUpdate(): void {\n const { scope, client } = this.getStackTop();\n if (!scope) return;\n\n const session = scope.getSession && scope.getSession();\n if (session) {\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _invokeClient(method: M, ...args: any[]): void {\n const { scope, client } = this.getStackTop();\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (client as any)[method](...args, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Returns the active domain, if one exists\n * @deprecated No longer used; remove in v7\n * @returns The domain, or undefined if there is no active domain\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function getActiveDomain(): DomainAsCarrier | undefined {\n logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n\n const sentry = getMainCarrier().__SENTRY__;\n\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n const activeDomain = getMainCarrier().__SENTRY__?.extensions?.domain?.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\n/* eslint-disable @typescript-eslint/no-use-before-define */\nimport * as React from 'react';\nimport { noTextChildNodes, possibleStandardNames, randomString, styleToObject } from './helpers';\nfunction parseAttributes(node, reactKey) {\n var attributes = {\n key: reactKey,\n };\n /* istanbul ignore else */\n if (node instanceof Element) {\n var nodeClassNames = node.getAttribute('class');\n if (nodeClassNames) {\n attributes.className = nodeClassNames;\n }\n __spreadArray([], __read(node.attributes)).forEach(function (d) {\n switch (d.name) {\n // this is manually handled above, so break;\n case 'class':\n break;\n case 'style':\n attributes[d.name] = styleToObject(d.value);\n break;\n case 'allowfullscreen':\n case 'allowpaymentrequest':\n case 'async':\n case 'autofocus':\n case 'autoplay':\n case 'checked':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'formnovalidate':\n case 'hidden':\n case 'ismap':\n case 'itemscope':\n case 'loop':\n case 'multiple':\n case 'muted':\n case 'nomodule':\n case 'novalidate':\n case 'open':\n case 'readonly':\n case 'required':\n case 'reversed':\n case 'selected':\n case 'typemustmatch':\n attributes[possibleStandardNames[d.name] || d.name] = true;\n break;\n default:\n attributes[possibleStandardNames[d.name] || d.name] = d.value;\n }\n });\n }\n return attributes;\n}\nfunction parseChildren(childNodeList, level, options) {\n var children = __spreadArray([], __read(childNodeList)).map(function (node, index) {\n return convertFromNode(node, __assign(__assign({}, options), { index: index, level: level + 1 }));\n })\n .filter(Boolean);\n if (!children.length) {\n return null;\n }\n return children;\n}\nfunction parseName(nodeName) {\n if (/[a-z]+[A-Z]+[a-z]+/.test(nodeName)) {\n return nodeName;\n }\n return nodeName.toLowerCase();\n}\nexport function convertFromNode(input, options) {\n var _a;\n if (options === void 0) { options = {}; }\n if (!input || !(input instanceof Node)) {\n return null;\n }\n var _b = options.actions, actions = _b === void 0 ? [] : _b, _c = options.index, index = _c === void 0 ? 0 : _c, _d = options.level, level = _d === void 0 ? 0 : _d, randomKey = options.randomKey;\n var node = input;\n var key = level + \"-\" + index;\n var result = [];\n if (randomKey && level === 0) {\n key = randomString() + \"-\" + key;\n }\n /* istanbul ignore else */\n if (Array.isArray(actions)) {\n actions.forEach(function (action) {\n if (action.condition(node, key, level)) {\n if (typeof action.pre === 'function') {\n node = action.pre(node, key, level);\n if (!(node instanceof Node)) {\n node = input;\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)');\n }\n }\n }\n if (typeof action.post === 'function') {\n result.push(action.post(node, key, level));\n }\n }\n });\n }\n if (result.length) {\n return result;\n }\n switch (node.nodeType) {\n case 1: {\n // regular dom-node\n return React.createElement(parseName(node.nodeName), parseAttributes(node, key), parseChildren(node.childNodes, level, options));\n }\n case 3: {\n // textnode\n var nodeText = ((_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.toString()) || '';\n /* istanbul ignore else */\n if (/^\\s+$/.test(nodeText) && !/[\\u202F\\u00A0]/.test(nodeText)) {\n return null;\n }\n /* istanbul ignore next */\n if (!node.parentNode) {\n return nodeText;\n }\n var parentNodeName = node.parentNode.nodeName.toLowerCase();\n if (noTextChildNodes.indexOf(parentNodeName) !== -1) {\n /* istanbul ignore else */\n if (/\\S/.test(nodeText)) {\n // eslint-disable-next-line no-console\n console.warn(\"A textNode is not allowed inside '\" + parentNodeName + \"'. Your text \\\"\" + nodeText + \"\\\" will be ignored\");\n }\n return null;\n }\n return nodeText;\n }\n case 8: {\n // html-comment\n return null;\n }\n /* istanbul ignore next */\n default: {\n return null;\n }\n }\n}\nexport function convertFromString(input, options) {\n if (options === void 0) { options = {}; }\n if (!input || typeof input !== 'string') {\n return null;\n }\n var _a = options.nodeOnly, nodeOnly = _a === void 0 ? false : _a, _b = options.selector, selector = _b === void 0 ? 'body > *' : _b, _c = options.type, type = _c === void 0 ? 'text/html' : _c;\n try {\n var parser = new DOMParser();\n var doc = parser.parseFromString(input, type);\n var node = doc.querySelector(selector);\n if (!(node instanceof Node)) {\n throw new Error('Error parsing input');\n }\n if (nodeOnly) {\n return node;\n }\n return convertFromNode(node, options);\n }\n catch (error) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n return null;\n}\nexport default function convert(input, options) {\n if (options === void 0) { options = {}; }\n if (typeof input === 'string') {\n return convertFromString(input, options);\n }\n if (input instanceof Node) {\n return convertFromNode(input, options);\n }\n return null;\n}\n//# sourceMappingURL=index.js.map","// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata\nexport const SDK_NAME = 'sentry.javascript.browser';\n","import { DsnLike } from './dsn';\nimport { Event } from './event';\nimport { SentryRequestType } from './request';\nimport { Response } from './response';\nimport { SdkMetadata } from './sdkmetadata';\nimport { Session, SessionAggregates } from './session';\n\nexport enum Outcome {\n BeforeSend = 'before_send',\n EventProcessor = 'event_processor',\n NetworkError = 'network_error',\n QueueOverflow = 'queue_overflow',\n RateLimitBackoff = 'ratelimit_backoff',\n SampleRate = 'sample_rate',\n}\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the event to the Store endpoint in Sentry.\n *\n * @param event Event that should be sent to Sentry.\n */\n sendEvent(event: Event): PromiseLike;\n\n /**\n * Sends the session to the Envelope endpoint in Sentry.\n *\n * @param session Session that should be sent to Sentry | Session Aggregates that should be sent to Sentry.\n */\n sendSession?(session: Session | SessionAggregates): PromiseLike;\n\n /**\n * Wait for all events to be sent or the timeout to expire, whichever comes first.\n *\n * @param timeout Maximum time in ms the transport should wait for events to be flushed. Omitting this parameter will\n * cause the transport to wait until all events are sent before resolving the promise.\n * @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are\n * still events in the queue when the timeout is reached.\n */\n close(timeout?: number): PromiseLike;\n\n /**\n * Increment the counter for the specific client outcome\n */\n recordLostEvent?(type: Outcome, category: SentryRequestType): void;\n}\n\n/** JSDoc */\nexport type TransportClass = new (options: TransportOptions) => T;\n\n/** JSDoc */\nexport interface TransportOptions {\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: { [key: string]: string };\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n /** Fetch API init parameters */\n fetchParameters?: { [key: string]: string };\n /** The envelope tunnel to use. */\n tunnel?: string;\n /** Send SDK Client Reports. Enabled by default. */\n sendClientReports?: boolean;\n /**\n * Set of metadata about the SDK that can be internally used to enhance envelopes and events,\n * and provide additional data about every request.\n * */\n _metadata?: SdkMetadata;\n}\n","export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n /** Protocol used to connect to Sentry. */\n public protocol!: DsnProtocol;\n /** Public authorization key (deprecated, renamed to publicKey). */\n public user!: string;\n /** Public authorization key. */\n public publicKey!: string;\n /** Private authorization key (deprecated, optional). */\n public pass!: string;\n /** Hostname of the Sentry instance. */\n public host!: string;\n /** Port of the Sentry instance. */\n public port!: string;\n /** Path */\n public path!: string;\n /** Project ID */\n public projectId!: string;\n\n /** Creates a new Dsn component */\n public constructor(from: DsnLike) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n public toString(withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = this;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }\n\n /** Parses a string into this Dsn. */\n private _fromString(str: string): void {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n }\n\n /** Maps Dsn components into this instance. */\n private _fromComponents(components: DsnComponents): void {\n // TODO this is for backwards compatibility, and can be removed in a future version\n if ('user' in components && !('publicKey' in components)) {\n components.publicKey = components.user;\n }\n this.user = components.publicKey || '';\n\n this.protocol = components.protocol;\n this.publicKey = components.publicKey || '';\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n }\n\n /** Validates this Dsn and throws on error. */\n private _validate(): void {\n ['protocol', 'publicKey', 'host', 'projectId'].forEach(component => {\n if (!this[component as keyof DsnComponents]) {\n throw new SentryError(`${ERROR_MESSAGE}: ${component} missing`);\n }\n });\n\n if (!this.projectId.match(/^\\d+$/)) {\n throw new SentryError(`${ERROR_MESSAGE}: Invalid projectId ${this.projectId}`);\n }\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(`${ERROR_MESSAGE}: Invalid protocol ${this.protocol}`);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(`${ERROR_MESSAGE}: Invalid port ${this.port}`);\n }\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n} & { initialized?: boolean };\n\n/**\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n return integrations.reduce((acc, integrations) => {\n if (acc.every(accIntegration => integrations.name !== accIntegration.name)) {\n acc.push(integrations);\n }\n return acc;\n }, [] as Integration[]);\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n\n let integrations: Integration[] = [...filterDuplicates(defaultIntegrations)];\n\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = [\n ...integrations.filter(integrations =>\n userIntegrations.every(userIntegration => userIntegration.name !== integrations.name),\n ),\n // And filter out duplicated user options integrations\n ...filterDuplicates(userIntegrations),\n ];\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n Object.defineProperty(integrations, 'initialized', { value: true });\n return integrations;\n}\n","/* eslint-disable max-lines */\nimport { Scope, Session } from '@sentry/hub';\nimport {\n Client,\n Event,\n EventHint,\n Integration,\n IntegrationClass,\n Options,\n Outcome,\n SessionStatus,\n Severity,\n Transport,\n} from '@sentry/types';\nimport {\n checkOrSetAlreadyCaught,\n dateTimestampInSeconds,\n Dsn,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n normalize,\n SentryError,\n SyncPromise,\n truncate,\n uuid4,\n} from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the environment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: Dsn;\n\n /** Array of used integrations. */\n protected _integrations: IntegrationIndex = {};\n\n /** Number of calls being processed */\n protected _numProcessing: number = 0;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!this._isEnabled()) {\n logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n\n if (!(typeof session.release === 'string')) {\n logger.warn('Discarded session because of missing or non-string release');\n } else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): Dsn | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._getBackend().getTransport();\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return this.getTransport()\n .close(timeout)\n .then(transportFlushed => clientFinished && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n if (this._isEnabled() && !this._integrations.initialized) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === SessionStatus.Ok;\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n session.update({\n ...(crashed && { status: SessionStatus.Crashed }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /** Deliver captured session to Sentry */\n protected _sendSession(session: Session): void {\n this._getBackend().sendSession(session);\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { normalizeDepth = 3 } = this.getOptions();\n const prepared: Event = {\n ...event,\n event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = SyncPromise.resolve(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n\n const { _experiments = {} } = this.getOptions();\n if (_experiments.ensureNoCircularStructures) {\n return normalize(normalized);\n }\n\n return normalized;\n }\n\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n protected _applyClientOptions(event: Event): void {\n const options = this.getOptions();\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\n protected _applyIntegrationsMetadata(event: Event): void {\n const integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationsArray];\n }\n }\n\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n protected _sendEvent(event: Event): void {\n this._getBackend().sendEvent(event);\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n logger.error(reason);\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { beforeSend, sampleRate } = this.getOptions();\n const transport = this.getTransport();\n\n if (!this._isEnabled()) {\n return SyncPromise.reject(new SentryError('SDK not enabled, will not capture event.'));\n }\n\n const isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n transport.recordLostEvent?.(Outcome.SampleRate, 'event');\n return SyncPromise.reject(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n ),\n );\n }\n\n return this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n transport.recordLostEvent?.(Outcome.EventProcessor, event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n\n const isInternalException = hint && hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n return this._ensureBeforeSendRv(beforeSendResult);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n transport.recordLostEvent?.(Outcome.BeforeSend, event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n\n const session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing += 1;\n void promise.then(\n value => {\n this._numProcessing -= 1;\n return value;\n },\n reason => {\n this._numProcessing -= 1;\n return reason;\n },\n );\n }\n\n /**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\n protected _ensureBeforeSendRv(\n rv: PromiseLike | Event | null,\n ): PromiseLike | Event | null {\n const nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return (rv as PromiseLike).then(\n event => {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n },\n e => {\n throw new SentryError(`beforeSend rejected with ${e}`);\n },\n );\n } else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n }\n}\n","import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return SyncPromise.resolve({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: Status.Skipped,\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return SyncPromise.resolve(true);\n }\n}\n","import { Event, EventHint, Options, Session, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instantiate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates a {@link Event} from an exception. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates a {@link Event} from a plain message. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /** Submits the session to Sentry */\n sendSession(session: Session): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instantiate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n void this._transport.sendEvent(event).then(null, reason => {\n logger.error(`Error while sending event: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): void {\n if (!this._transport.sendSession) {\n logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n\n void this._transport.sendSession(session).then(null, reason => {\n logger.error(`Error while sending session: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n}\n","/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access, max-lines */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n args: string[];\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function computeStackTrace(ex: any): StackTrace {\n let stack = null;\n let popSize = 0;\n\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n popSize = ex.framesToPop;\n } else if (reactMinifiedRegexp.test(ex.message)) {\n popSize = 1;\n }\n }\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (let i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n\n // Arpad: Working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n let url = parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2];\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, url] = extractSafariExtensionDetails(func, url);\n\n element = {\n url,\n func,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = (ex.columnNumber as number) + 1;\n }\n\n let url = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, url] = extractSafariExtensionDetails(func, url);\n\n element = {\n url,\n func,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\((.*)\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunatelly \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, url: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${url}` : `safari-web-extension:${url}`,\n ]\n : [func, url];\n};\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(\n exception: Record,\n syntheticException?: Error,\n rejection?: boolean,\n): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .reverse();\n}\n","import { Event, EventHint, Options, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n SyncPromise,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nexport function eventFromException(options: Options, exception: unknown, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n options: Options,\n message: string,\n level: Severity = Severity.Info,\n hint?: EventHint,\n): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n rejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n // eslint-disable-next-line no-param-reassign\n exception = errorEvent.error;\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name, code, and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n const domException = exception as DOMException;\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n if ('code' in domException) {\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const objectException = exception as Record;\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n","import { Event, SdkInfo, SentryRequest, SentryRequestType, Session, SessionAggregates } from '@sentry/types';\n\nimport { API } from './api';\n\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api: API): SdkInfo | undefined {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n const { name, version } = api.metadata.sdk;\n return { name, version };\n}\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event: Event, sdkInfo?: SdkInfo): Event {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session: Session | SessionAggregates, api: API): SentryRequest {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n const envelopeHeaders = JSON.stringify({\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(api.forceEnvelope() && { dsn: api.getDsn().toString() }),\n });\n // I know this is hacky but we don't want to add `session` to request type since it's never rate limited\n const type: SentryRequestType = 'aggregates' in session ? ('sessions' as SentryRequestType) : 'session';\n const itemHeaders = JSON.stringify({\n type,\n });\n\n return {\n body: `${envelopeHeaders}\\n${itemHeaders}\\n${JSON.stringify(session)}`,\n type,\n url: api.getEnvelopeEndpointWithUrlEncodedAuth(),\n };\n}\n\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event: Event, api: API): SentryRequest {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n const eventType = event.type || 'event';\n const useEnvelope = eventType === 'transaction' || api.forceEnvelope();\n\n const { transactionSampling, ...metadata } = event.debug_meta || {};\n const { method: samplingMethod, rate: sampleRate } = transactionSampling || {};\n if (Object.keys(metadata).length === 0) {\n delete event.debug_meta;\n } else {\n event.debug_meta = metadata;\n }\n\n const req: SentryRequest = {\n body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n type: eventType,\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n\n // https://develop.sentry.dev/sdk/envelopes/\n\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n const envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(api.forceEnvelope() && { dsn: api.getDsn().toString() }),\n });\n const itemHeaders = JSON.stringify({\n type: eventType,\n\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n\n // The content-type is assumed to be 'application/json' and not part of\n // the current spec for transaction items, so we don't bloat the request\n // body with it.\n //\n // content_type: 'application/json',\n //\n // The length is optional. It must be the number of bytes in req.Body\n // encoded as UTF-8. Since the server can figure this out and would\n // otherwise refuse events that report the length incorrectly, we decided\n // not to send the length to avoid problems related to reporting the wrong\n // size and to reduce request body size.\n //\n // length: new TextEncoder().encode(req.body).length,\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}`;\n req.body = envelope;\n }\n\n return req;\n}\n","import { DsnLike, SdkMetadata } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n **/\nexport class API {\n /** The DSN as passed to Sentry.init() */\n public dsn: DsnLike;\n\n /** Metadata about the SDK (name, version, etc) for inclusion in envelope headers */\n public metadata: SdkMetadata;\n\n /** The internally used Dsn object. */\n private readonly _dsnObject: Dsn;\n\n /** The envelope tunnel to use. */\n private readonly _tunnel?: string;\n\n /** Create a new instance of API */\n public constructor(dsn: DsnLike, metadata: SdkMetadata = {}, tunnel?: string) {\n this.dsn = dsn;\n this._dsnObject = new Dsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n\n /** Returns the Dsn object. */\n public getDsn(): Dsn {\n return this._dsnObject;\n }\n\n /** Does this transport force envelopes? */\n public forceEnvelope(): boolean {\n return !!this._tunnel;\n }\n\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n public getBaseApiEndpoint(): string {\n const dsn = this.getDsn();\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n }\n\n /** Returns the store endpoint URL. */\n public getStoreEndpoint(): string {\n return this._getIngestEndpoint('store');\n }\n\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n return `${this.getStoreEndpoint()}?${this._encodedAuth()}`;\n }\n\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n public getEnvelopeEndpointWithUrlEncodedAuth(): string {\n if (this.forceEnvelope()) {\n return this._tunnel as string;\n }\n\n return `${this._getEnvelopeEndpoint()}?${this._encodedAuth()}`;\n }\n\n /** Returns only the path component for the store endpoint. */\n public getStoreEndpointPath(): string {\n const dsn = this.getDsn();\n return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n }\n\n /**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\n public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n const dsn = this.getDsn();\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.publicKey}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n }\n\n /** Returns the url to the report dialog endpoint. */\n public getReportDialogEndpoint(\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n } = {},\n ): string {\n const dsn = this.getDsn();\n const endpoint = `${this.getBaseApiEndpoint()}embed/error-page/`;\n\n const encodedOptions = [];\n encodedOptions.push(`dsn=${dsn.toString()}`);\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n }\n } else {\n encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n }\n }\n if (encodedOptions.length) {\n return `${endpoint}?${encodedOptions.join('&')}`;\n }\n\n return endpoint;\n }\n\n /** Returns the envelope endpoint URL. */\n private _getEnvelopeEndpoint(): string {\n return this._getIngestEndpoint('envelope');\n }\n\n /** Returns the ingest API endpoint for target. */\n private _getIngestEndpoint(target: 'store' | 'envelope'): string {\n if (this._tunnel) {\n return this._tunnel;\n }\n const base = this.getBaseApiEndpoint();\n const dsn = this.getDsn();\n return `${base}${dsn.projectId}/${target}/`;\n }\n\n /** Returns a URL-encoded string with auth config suitable for a query string. */\n private _encodedAuth(): string {\n const dsn = this.getDsn();\n const auth = {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n };\n return urlEncode(auth);\n }\n}\n","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer {\n /** Internal set of queued Promises */\n private readonly _buffer: Array> = [];\n\n public constructor(protected _limit?: number) {}\n\n /**\n * Says if the buffer is ready to take more requests\n */\n public isReady(): boolean {\n return this._limit === undefined || this.length() < this._limit;\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n public add(taskProducer: () => PromiseLike): PromiseLike {\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n void task\n .then(() => this.remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n this.remove(task).then(null, () => {\n // We have to add another catch here because `this.remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n public remove(task: PromiseLike): PromiseLike {\n const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n }\n\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n public length(): number {\n return this._buffer.length;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n public drain(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n void SyncPromise.all(this._buffer)\n .then(() => {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, () => {\n resolve(true);\n });\n });\n }\n}\n","import { forget, getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\n\nconst global = getGlobalObject();\nlet cachedFetchImpl: FetchImpl;\n\nexport type FetchImpl = typeof fetch;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation(): FetchImpl {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n\n const document = global.document;\n let fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (typeof document?.createElement === `function`) {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n if (sandbox.contentWindow?.fetch) {\n fetchImpl = sandbox.contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url: string, body: string): void {\n const isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n const hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n const sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n\n if (supportsFetch()) {\n const fetch = getNativeFetchImplementation();\n return forget(\n fetch(url, {\n body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }),\n );\n }\n}\n","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forget(promise: PromiseLike): void {\n void promise.then(null, e => {\n // TODO: Use a better logging mechanism\n // eslint-disable-next-line no-console\n console.error(e);\n });\n}\n","import { API } from '@sentry/core';\nimport {\n Event,\n Outcome,\n Response as SentryResponse,\n SentryRequestType,\n Status,\n Transport,\n TransportOptions,\n} from '@sentry/types';\nimport {\n dateTimestampInSeconds,\n getGlobalObject,\n logger,\n parseRetryAfterHeader,\n PromiseBuffer,\n SentryError,\n} from '@sentry/utils';\n\nimport { sendReport } from './utils';\n\nconst CATEGORY_MAPPING: {\n [key in SentryRequestType]: string;\n} = {\n event: 'error',\n transaction: 'transaction',\n session: 'session',\n attachment: 'attachment',\n};\n\nconst global = getGlobalObject();\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @deprecated\n */\n public url: string;\n\n /** Helper to get Sentry API endpoints. */\n protected readonly _api: API;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n /** Locks transport after receiving rate limits in a response */\n protected readonly _rateLimits: Record = {};\n\n protected _outcomes: { [key: string]: number } = {};\n\n public constructor(public options: TransportOptions) {\n this._api = new API(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = this._api.getStoreEndpointWithUrlEncodedAuth();\n\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', () => {\n if (global.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n\n /**\n * @inheritDoc\n */\n public recordLostEvent(reason: Outcome, category: SentryRequestType): void {\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n const key = `${CATEGORY_MAPPING[category]}:${reason}`;\n logger.log(`Adding outcome: ${key}`);\n this._outcomes[key] = (this._outcomes[key] ?? 0) + 1;\n }\n\n /**\n * Send outcomes as an envelope\n */\n protected _flushOutcomes(): void {\n if (!this.options.sendClientReports) {\n return;\n }\n\n const outcomes = this._outcomes;\n this._outcomes = {};\n\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n logger.log('No outcomes to flush');\n return;\n }\n\n logger.log(`Flushing outcomes:\\n${JSON.stringify(outcomes, null, 2)}`);\n\n const url = this._api.getEnvelopeEndpointWithUrlEncodedAuth();\n // Envelope header is required to be at least an empty object\n const envelopeHeader = JSON.stringify({ ...(this.options.tunnel && { dsn: this._api.getDsn().toString() }) });\n const itemHeaders = JSON.stringify({\n type: 'client_report',\n });\n const item = JSON.stringify({\n timestamp: dateTimestampInSeconds(),\n discarded_events: Object.keys(outcomes).map(key => {\n const [category, reason] = key.split(':');\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n }),\n });\n const envelope = `${envelopeHeader}\\n${itemHeaders}\\n${item}`;\n\n try {\n sendReport(url, envelope);\n } catch (e) {\n logger.error(e);\n }\n }\n\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n protected _handleResponse({\n requestType,\n response,\n headers,\n resolve,\n reject,\n }: {\n requestType: SentryRequestType;\n response: Response | XMLHttpRequest;\n headers: Record;\n resolve: (value?: SentryResponse | PromiseLike | null | undefined) => void;\n reject: (reason?: unknown) => void;\n }): void {\n const status = Status.fromHttpCode(response.status);\n /**\n * \"The name is case-insensitive.\"\n * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n */\n const limited = this._handleRateLimit(headers);\n if (limited)\n logger.warn(`Too many ${requestType} requests, backing off until: ${this._disabledUntil(requestType)}`);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n reject(response);\n }\n\n /**\n * Gets the time that given category is disabled until for rate limiting\n */\n protected _disabledUntil(requestType: SentryRequestType): Date {\n const category = CATEGORY_MAPPING[requestType];\n return this._rateLimits[category] || this._rateLimits.all;\n }\n\n /**\n * Checks if a category is rate limited\n */\n protected _isRateLimited(requestType: SentryRequestType): boolean {\n return this._disabledUntil(requestType) > new Date(Date.now());\n }\n\n /**\n * Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.\n */\n protected _handleRateLimit(headers: Record): boolean {\n const now = Date.now();\n const rlHeader = headers['x-sentry-rate-limits'];\n const raHeader = headers['retry-after'];\n\n if (rlHeader) {\n // rate limit headers are of the form\n //
,
,..\n // where each
is of the form\n // : : : \n // where\n // is a delay in ms\n // is the event type(s) (error, transaction, etc) being rate limited and is of the form\n // ;;...\n // is what's being limited (org, project, or key) - ignored by SDK\n // is an arbitrary string like \"org_quota\" - ignored by SDK\n for (const limit of rlHeader.trim().split(',')) {\n const parameters = limit.split(':', 2);\n const headerDelay = parseInt(parameters[0], 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n for (const category of parameters[1].split(';')) {\n this._rateLimits[category || 'all'] = new Date(now + delay);\n }\n }\n return true;\n } else if (raHeader) {\n this._rateLimits.all = new Date(now + parseRetryAfterHeader(now, raHeader));\n return true;\n }\n return false;\n }\n}\n","import { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { Event, Outcome, Response, SentryRequest, Session, TransportOptions } from '@sentry/types';\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\nimport { FetchImpl, getNativeFetchImplementation } from './utils';\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /**\n * Fetch API reference which always points to native browser implementation.\n */\n private _fetch: typeof fetch;\n\n public constructor(options: TransportOptions, fetchImpl: FetchImpl = getNativeFetchImplementation()) {\n super(options);\n this._fetch = fetchImpl;\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): PromiseLike {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n }\n\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n private _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike {\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent(Outcome.RateLimitBackoff, sentryRequest.type);\n\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: `Transport for ${sentryRequest.type} requests locked till ${this._disabledUntil(\n sentryRequest.type,\n )} due to too many requests.`,\n status: 429,\n });\n }\n\n const options: RequestInit = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n\n return this._buffer\n .add(\n () =>\n new SyncPromise((resolve, reject) => {\n void this._fetch(sentryRequest.url, options)\n .then(response => {\n const headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n this._handleResponse({\n requestType: sentryRequest.type,\n response,\n headers,\n resolve,\n reject,\n });\n })\n .catch(reject);\n }),\n )\n .then(undefined, reason => {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n this.recordLostEvent(Outcome.QueueOverflow, sentryRequest.type);\n } else {\n this.recordLostEvent(Outcome.NetworkError, sentryRequest.type);\n }\n throw reason;\n });\n }\n}\n","import { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { Event, Outcome, Response, SentryRequest, Session } from '@sentry/types';\nimport { SentryError, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): PromiseLike {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n }\n\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n private _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike {\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent(Outcome.RateLimitBackoff, sentryRequest.type);\n\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: `Transport for ${sentryRequest.type} requests locked till ${this._disabledUntil(\n sentryRequest.type,\n )} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer\n .add(\n () =>\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = (): void => {\n if (request.readyState === 4) {\n const headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n this._handleResponse({ requestType: sentryRequest.type, response: request, headers, resolve, reject });\n }\n };\n\n request.open('POST', sentryRequest.url);\n for (const header in this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(this.options.headers, header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n }),\n )\n .then(undefined, reason => {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n this.recordLostEvent(Outcome.QueueOverflow, sentryRequest.type);\n } else {\n this.recordLostEvent(Outcome.NetworkError, sentryRequest.type);\n }\n throw reason;\n });\n }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\n\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.denyUrls}.\n * By default, all errors will be sent.\n */\n allowUrls?: Array;\n\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To allow certain errors instead, use {@link Options.allowUrls}.\n * By default, all errors will be sent.\n */\n denyUrls?: Array;\n\n /** @deprecated use {@link Options.allowUrls} instead. */\n whitelistUrls?: Array;\n\n /** @deprecated use {@link Options.denyUrls} instead. */\n blacklistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike {\n return eventFromException(this._options, exception, hint);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n return eventFromMessage(this._options, message, level, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n tunnel: this._options.tunnel,\n sendClientReports: this._options.sendClientReports,\n _metadata: this._options._metadata,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n}\n","import { canUseDOM as canUseDOMFlag } from 'exenv';\nexport var STATUS = {\n FAILED: 'failed',\n LOADED: 'loaded',\n LOADING: 'loading',\n PENDING: 'pending',\n READY: 'ready',\n UNSUPPORTED: 'unsupported',\n};\nexport function canUseDOM() {\n return canUseDOMFlag;\n}\nexport function isSupportedEnvironment() {\n return supportsInlineSVG() && typeof window !== 'undefined' && window !== null;\n}\nexport function supportsInlineSVG() {\n /* istanbul ignore next */\n if (!document) {\n return false;\n }\n var div = document.createElement('div');\n div.innerHTML = '';\n return !!div.firstChild && div.firstChild.namespaceURI === 'http://www.w3.org/2000/svg';\n}\nexport function randomString(length) {\n var letters = 'abcdefghijklmnopqrstuvwxyz';\n var numbers = '1234567890';\n var charset = \"\" + letters + letters.toUpperCase() + numbers;\n var randomCharacter = function (character) {\n return character[Math.floor(Math.random() * character.length)];\n };\n var R = '';\n for (var i = 0; i < length; i++) {\n R += randomCharacter(charset);\n }\n return R;\n}\n/**\n * Remove properties from an object\n */\nexport function removeProperties(input) {\n var filter = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n filter[_i - 1] = arguments[_i];\n }\n var output = {};\n for (var key in input) {\n /* istanbul ignore else */\n if ({}.hasOwnProperty.call(input, key)) {\n if (!filter.includes(key)) {\n output[key] = input[key];\n }\n }\n }\n return output;\n}\n//# sourceMappingURL=helpers.js.map","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { WrappedFunction } from '@sentry/types';\n\nimport { getGlobalObject } from './global';\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n type: InstrumentHandlerType;\n callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n return function(...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function(originalFetch: () => void): () => void {\n return function(...args: any[]): void {\n const handlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\ntype XHRSendInput = null | Blob | BufferSource | FormData | URLSearchParams | string;\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n body?: XHRSendInput;\n };\n}\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n // Poor man's implementation of ES6 `Map`, tracking and keeping in sync key and value separately.\n const requestKeys: XMLHttpRequest[] = [];\n const requestValues: Array[] = [];\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const url = args[1];\n xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = function(): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n\n try {\n const requestPos = requestKeys.indexOf(xhr);\n if (requestPos !== -1) {\n // Make sure to pop both key and value to keep it in sync.\n requestKeys.splice(requestPos);\n const args = requestValues.splice(requestPos)[0];\n if (xhr.__sentry_xhr__ && args[0] !== undefined) {\n xhr.__sentry_xhr__.body = args[0] as XHRSendInput;\n }\n }\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr,\n });\n }\n };\n\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function(original: WrappedFunction): Function {\n return function(...readyStateArgs: any[]): void {\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n } else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n return originalOpen.apply(xhr, args);\n };\n });\n\n fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n requestKeys.push(this);\n requestValues.push(args);\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function(this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\nconst debounceDuration = 1000;\nlet debounceTimerID: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous: Event | undefined, current: Event): boolean {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event: Event): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n\n try {\n const target = event.target as HTMLElement;\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {\n return (event: Event): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = global.setTimeout(() => {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: Function;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n global.document.addEventListener('click', globalDOMEventHandler, false);\n global.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (global as any)[target] && (global as any)[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(originalAddEventListener: AddEventListener): AddEventListener {\n return function(\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount += 1;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(proto, 'removeEventListener', function(originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function(\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount -= 1;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n });\n });\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function(e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n const context = this.__sentry_original__ || this;\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n parseUrl,\n safeJoin,\n} from '@sentry/utils';\n\n/** JSDoc */\ninterface BreadcrumbsOptions {\n console: boolean;\n dom: boolean | { serializeAttribute: string | string[] };\n fetch: boolean;\n history: boolean;\n sentry: boolean;\n xhr: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /** JSDoc */\n private readonly _options: BreadcrumbsOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n public addSentryBreadcrumb(event: Event): void {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._consoleBreadcrumb(...args);\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._domBreadcrumb(...args);\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._xhrBreadcrumb(...args);\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._fetchBreadcrumb(...args);\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._historyBreadcrumb(...args);\n },\n type: 'history',\n });\n }\n }\n\n /**\n * Creates breadcrumbs from console API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }\n\n /**\n * Creates breadcrumbs from DOM API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n let keyAttrs = typeof this._options.dom === 'object' ? this._options.dom.serializeAttribute : undefined;\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node, keyAttrs)\n : htmlTreeAsString((handlerData.event as unknown) as Node, keyAttrs);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n /**\n * Creates breadcrumbs from XHR API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {};\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: {\n method,\n url,\n status_code,\n },\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n input: body,\n },\n );\n\n return;\n }\n }\n\n /**\n * Creates breadcrumbs from fetch API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }\n\n /**\n * Creates breadcrumbs from history API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }\n}\n","import { BaseClient, Scope, SDK_VERSION } from '@sentry/core';\nimport { Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { injectReportDialog, ReportDialogOptions } from './helpers';\nimport { Breadcrumbs } from './integrations';\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(BrowserBackend, options);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n\n injectReportDialog({\n ...options,\n dsn: options.dsn || this.getDsn(),\n });\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _sendEvent(event: Event): void {\n const integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n super._sendEvent(event);\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration, StackFrame } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n allowUrls: Array;\n denyUrls: Array;\n ignoreErrors: Array;\n ignoreInternal: boolean;\n\n /** @deprecated use {@link InboundFiltersOptions.allowUrls} instead. */\n whitelistUrls: Array;\n /** @deprecated use {@link InboundFiltersOptions.denyUrls} instead. */\n blacklistUrls: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n\n public constructor(private readonly _options: Partial = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n // This checks prevents most of the occurrences of the bug linked below:\n // https://github.com/getsentry/sentry-javascript/issues/2622\n // The bug is caused by multiple SDK instances, where one is minified and one is using non-mangled code.\n // Unfortunatelly we cannot fix it reliably (thus reserved property in rollup's terser config),\n // as we cannot force people using multiple instances in their apps to sync SDK versions.\n const options = typeof self._mergeOptions === 'function' ? self._mergeOptions(clientOptions) : {};\n if (typeof self._shouldDropEvent !== 'function') {\n return event;\n }\n return self._shouldDropEvent(event, options) ? null : event;\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: Partial): boolean {\n if (this._isSentryError(event, options)) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (this._isDeniedUrl(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!this._isAllowedUrl(event, options)) {\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: Partial): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return (\n (event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false\n );\n } catch (_oO) {\n return false;\n }\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: Partial): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isDeniedUrl(event: Event, options: Partial): boolean {\n // TODO: Use Glob instead?\n if (!options.denyUrls || !options.denyUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.denyUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isAllowedUrl(event: Event, options: Partial): boolean {\n // TODO: Use Glob instead?\n if (!options.allowUrls || !options.allowUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.allowUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: Partial = {}): Partial {\n return {\n allowUrls: [\n // eslint-disable-next-line deprecation/deprecation\n ...(this._options.whitelistUrls || []),\n ...(this._options.allowUrls || []),\n // eslint-disable-next-line deprecation/deprecation\n ...(clientOptions.whitelistUrls || []),\n ...(clientOptions.allowUrls || []),\n ],\n denyUrls: [\n // eslint-disable-next-line deprecation/deprecation\n ...(this._options.blacklistUrls || []),\n ...(this._options.denyUrls || []),\n // eslint-disable-next-line deprecation/deprecation\n ...(clientOptions.blacklistUrls || []),\n ...(clientOptions.denyUrls || []),\n ],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame?.filename !== '' && frame?.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n const frames = event.stacktrace.frames;\n return this._getLastValidUrl(frames);\n }\n if (event.exception) {\n const frames =\n event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return this._getLastValidUrl(frames);\n }\n return null;\n } catch (oO) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** JSDoc */\ninterface TryCatchOptions {\n setTimeout: boolean;\n setInterval: boolean;\n requestAnimationFrame: boolean;\n XMLHttpRequest: boolean;\n eventTarget: boolean | string[];\n}\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /** JSDoc */\n private readonly _options: TryCatchOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n const global = getGlobalObject();\n\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n }\n\n if (this._options.setInterval) {\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n }\n\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n if (this._options.eventTarget) {\n const eventTarget = Array.isArray(this._options.eventTarget) ? this._options.eventTarget : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(this._wrapEventTarget.bind(this));\n }\n }\n\n /** JSDoc */\n private _wrapTimeFunction(original: () => void): () => number {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n }\n\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _wrapRAF(original: any): (callback: () => void) => any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(this: any, callback: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.call(\n this,\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n }\n\n /** JSDoc */\n private _wrapEventTarget(target: string): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const global = getGlobalObject() as { [key: string]: any };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = global[target] && global[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n return function(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap((fn as any) as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(proto, 'removeEventListener', function(\n originalRemoveEventListener: () => void,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = (fn as unknown) as WrappedFunction;\n try {\n const originalEventHandler = wrappedEventHandler?.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n }\n\n /** JSDoc */\n private _wrapXHR(originalSend: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(this: XMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function(original: WrappedFunction): () => any {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n }\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Primitive, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n onerror: boolean;\n onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /** JSDoc */\n private _onErrorHandlerInstalled: boolean = false;\n\n /** JSDoc */\n private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n }\n\n /** JSDoc */\n private _installGlobalOnErrorHandler(): void {\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const error = data.error;\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n const client = currentHub.getClient();\n const event =\n error === undefined && isString(data.msg)\n ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : this._enhanceEventWithInitialFrame(\n eventFromUnknownInput(error || data.msg, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }),\n data.url,\n data.line,\n data.column,\n );\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n\n this._onErrorHandlerInstalled = true;\n }\n\n /** JSDoc */\n private _installGlobalOnUnhandledRejectionHandler(): void {\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: (e: any) => {\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n\n event.level = Severity.Error;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n\n return;\n },\n type: 'unhandledrejection',\n });\n\n this._onUnhandledRejectionHandlerInstalled = true;\n }\n\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name;\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n }\n\n /**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\n private _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n }\n\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n const handler = self._handler && self._handler.bind(self);\n return typeof handler === 'function' ? handler(event, hint) : event;\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n }\n\n /**\n * @inheritDoc\n */\n private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, [exception, ...stack]);\n }\n}\n","import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string = Dedupe.id;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((currentEvent: Event) => {\n const self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (self._shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(`Event dropped due to being a duplicate of previously captured event.`);\n return null;\n }\n } catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (this._isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (this._isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n }\n\n /** JSDoc */\n private _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n }\n\n /** JSDoc */\n private _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n } else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n }\n\n /** JSDoc */\n private _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = this._getFramesFromEvent(currentEvent);\n let previousFrames = this._getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n /** JSDoc */\n private _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n }\n\n /** JSDoc */\n private _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = this._getExceptionFromEvent(previousEvent);\n const currentException = this._getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n }\n\n /** JSDoc */\n private _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n\n // grab as much info as exists and add it to the event\n const url = event.request?.url || global.location?.href;\n const { referrer } = global.document || {};\n const { userAgent } = global.navigator || {};\n\n const headers = {\n ...event.request?.headers,\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...(url && { url }), headers };\n\n return { ...event, request };\n }\n return event;\n });\n }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { addInstrumentationHandler, getGlobalObject, logger, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient } from './client';\nimport { ReportDialogOptions, wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n initAndBind(BrowserClient, options);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n const client = hub.getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n logger.warn('Cannot flush events. No client defined.');\n return SyncPromise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n logger.warn('Cannot flush events and disable SDK. No client defined.');\n return SyncPromise.resolve(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn: (...args: any) => any): any {\n return internalWrap(fn)();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking(): void {\n const window = getGlobalObject();\n const document = window.document;\n\n if (typeof document === 'undefined') {\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (typeof hub.startSession !== 'function' || typeof hub.captureSession !== 'function') {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler({\n callback: ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (from === undefined || from === to) {\n return;\n }\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n },\n type: 'history',\n });\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, supportsReportingObserver } from '@sentry/utils';\n\n/** JSDoc */\ninterface Report {\n [key: string]: any;\n type: ReportTypes;\n url: string;\n body?: ReportBody;\n}\n\n/** JSDoc */\nenum ReportTypes {\n /** JSDoc */\n Crash = 'crash',\n /** JSDoc */\n Deprecation = 'deprecation',\n /** JSDoc */\n Intervention = 'intervention',\n}\n\n/** JSDoc */\ntype ReportBody = CrashReportBody | DeprecationReportBody | InterventionReportBody;\n\n/** JSDoc */\ninterface CrashReportBody {\n [key: string]: any;\n crashId: string;\n reason?: string;\n}\n\n/** JSDoc */\ninterface DeprecationReportBody {\n [key: string]: any;\n id: string;\n anticipatedRemoval?: Date;\n message: string;\n sourceFile?: string;\n lineNumber?: number;\n columnNumber?: number;\n}\n\n/** JSDoc */\ninterface InterventionReportBody {\n [key: string]: any;\n id: string;\n message: string;\n sourceFile?: string;\n lineNumber?: number;\n columnNumber?: number;\n}\n\n/** Reporting API integration - https://w3c.github.io/reporting/ */\nexport class ReportingObserver implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ReportingObserver';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = ReportingObserver.id;\n\n /**\n * Returns current hub.\n */\n private _getCurrentHub?: () => Hub;\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n types?: ReportTypes[];\n } = {\n types: [ReportTypes.Crash, ReportTypes.Deprecation, ReportTypes.Intervention],\n },\n ) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!supportsReportingObserver()) {\n return;\n }\n\n this._getCurrentHub = getCurrentHub;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const observer = new (getGlobalObject().ReportingObserver)(this.handler.bind(this), {\n buffered: true,\n types: this._options.types,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n observer.observe();\n }\n\n /**\n * @inheritDoc\n */\n public handler(reports: Report[]): void {\n const hub = this._getCurrentHub && this._getCurrentHub();\n if (!hub || !hub.getIntegration(ReportingObserver)) {\n return;\n }\n for (const report of reports) {\n hub.withScope(scope => {\n scope.setExtra('url', report.url);\n\n const label = `ReportingObserver [${report.type}]`;\n let details = 'No details available';\n\n if (report.body) {\n // Object.keys doesn't work on ReportBody, as all properties are inheirted\n const plainBody: {\n [key: string]: any;\n } = {};\n\n // eslint-disable-next-line guard-for-in\n for (const prop in report.body) {\n plainBody[prop] = report.body[prop];\n }\n\n scope.setExtra('body', plainBody);\n\n if (report.type === ReportTypes.Crash) {\n const body = report.body as CrashReportBody;\n // A fancy way to create a message out of crashId OR reason OR both OR fallback\n details = [body.crashId || '', body.reason || ''].join(' ').trim() || details;\n } else {\n const body = report.body as DeprecationReportBody | InterventionReportBody;\n details = body.message || details;\n }\n }\n\n hub.captureMessage(`${label}: ${details}`);\n });\n }\n }\n}\n","import { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\n// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js\nconst angularPattern = /^\\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\\] (.*?)\\n?(\\S+)$/;\n\n/**\n * AngularJS integration\n *\n * Provides an $exceptionHandler for AngularJS\n */\nexport class Angular implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'AngularJS';\n\n /**\n * moduleName used in Angular's DI resolution algorithm\n */\n public static moduleName: string = 'ngSentry';\n\n /**\n * @inheritDoc\n */\n public name: string = Angular.id;\n\n /**\n * Angular's instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _angular: any;\n\n /**\n * ngSentry module instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _module: any;\n\n /**\n * Returns current hub.\n */\n private _getCurrentHub?: () => Hub;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(options: { angular?: any } = {}) {\n logger.log('You are still using the Angular integration, consider moving to @sentry/angular');\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this._angular = options.angular || getGlobalObject().angular;\n\n if (!this._angular) {\n logger.error('AngularIntegration is missing an Angular instance');\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._module = this._angular.module(Angular.moduleName, []);\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._module) {\n return;\n }\n\n this._getCurrentHub = getCurrentHub;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._module.config([\n '$provide',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ($provide: any): void => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n $provide.decorator('$exceptionHandler', ['$delegate', this._$exceptionHandlerDecorator.bind(this)]);\n },\n ]);\n }\n\n /**\n * Angular's exceptionHandler for Sentry integration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _$exceptionHandlerDecorator($delegate: any): any {\n return (exception: Error, cause?: string): void => {\n const hub = this._getCurrentHub && this._getCurrentHub();\n\n if (hub && hub.getIntegration(Angular)) {\n hub.withScope(scope => {\n if (cause) {\n scope.setExtra('cause', cause);\n }\n\n scope.addEventProcessor((event: Event) => {\n const ex = event.exception && event.exception.values && event.exception.values[0];\n\n if (ex) {\n const matches = angularPattern.exec(ex.value || '');\n\n if (matches) {\n // This type now becomes something like: $rootScope:inprog\n ex.type = matches[1];\n ex.value = matches[2];\n event.message = `${ex.type}: ${ex.value}`;\n // auto set a new tag specifically for the angular error url\n event.extra = {\n ...event.extra,\n angularDocs: matches[3].substr(0, 250),\n };\n }\n }\n\n return event;\n });\n\n hub.captureException(exception);\n });\n }\n $delegate(exception, cause);\n };\n }\n}\n","import { EventProcessor, Hub, Integration, Severity } from '@sentry/types';\nimport { fill, getGlobalObject, safeJoin } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** Send Console API calls as Sentry Events */\nexport class CaptureConsole implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'CaptureConsole';\n\n /**\n * @inheritDoc\n */\n public name: string = CaptureConsole.id;\n\n /**\n * @inheritDoc\n */\n private readonly _levels: string[] = ['log', 'info', 'warn', 'error', 'debug', 'assert'];\n\n /**\n * @inheritDoc\n */\n public constructor(options: { levels?: string[] } = {}) {\n if (options.levels) {\n this._levels = options.levels;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!('console' in global)) {\n return;\n }\n\n this._levels.forEach((level: string) => {\n if (!(level in global.console)) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(global.console, level, (originalConsoleLevel: () => any) => (...args: any[]): void => {\n const hub = getCurrentHub();\n\n if (hub.getIntegration(CaptureConsole)) {\n hub.withScope(scope => {\n scope.setLevel(Severity.fromString(level));\n scope.setExtra('arguments', args);\n scope.addEventProcessor(event => {\n event.logger = 'console';\n return event;\n });\n\n let message = safeJoin(args, ' ');\n if (level === 'assert') {\n if (args[0] === false) {\n message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;\n scope.setExtra('arguments', args.slice(1));\n hub.captureMessage(message);\n }\n } else if (level === 'error' && args[0] instanceof Error) {\n hub.captureException(args[0]);\n } else {\n hub.captureMessage(message);\n }\n });\n }\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n });\n });\n }\n}\n","import { Event, EventHint, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { consoleSandbox } from '@sentry/utils';\n\n/** JSDoc */\ninterface DebugOptions {\n stringify?: boolean;\n debugger?: boolean;\n}\n\n/** JSDoc */\nexport class Debug implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Debug';\n\n /**\n * @inheritDoc\n */\n public name: string = Debug.id;\n\n /** JSDoc */\n private readonly _options: DebugOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: DebugOptions) {\n this._options = {\n debugger: false,\n stringify: false,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(Debug);\n if (self) {\n if (self._options.debugger) {\n // eslint-disable-next-line no-debugger\n debugger;\n }\n\n /* eslint-disable no-console */\n consoleSandbox(() => {\n if (self._options.stringify) {\n console.log(JSON.stringify(event, null, 2));\n if (hint) {\n console.log(JSON.stringify(hint, null, 2));\n }\n } else {\n console.log(event);\n if (hint) {\n console.log(hint);\n }\n }\n });\n /* eslint-enable no-console */\n }\n return event;\n });\n }\n}\n","import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string = Dedupe.id;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((currentEvent: Event) => {\n const self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (self._shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(`Event dropped due to being a duplicate of previously captured event.`);\n return null;\n }\n } catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (this._isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (this._isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n }\n\n /** JSDoc */\n private _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n }\n\n /** JSDoc */\n private _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n } else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n }\n\n /** JSDoc */\n private _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = this._getFramesFromEvent(currentEvent);\n let previousFrames = this._getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n /** JSDoc */\n private _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n }\n\n /** JSDoc */\n private _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = this._getExceptionFromEvent(previousEvent);\n const currentException = this._getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n }\n\n /** JSDoc */\n private _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n }\n}\n","import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, isInstanceOf, logger } from '@sentry/utils';\n\n/** JSDoc */\nexport class Ember implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Ember';\n\n /**\n * @inheritDoc\n */\n public name: string = Ember.id;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any\n private readonly _Ember: any;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(options: { Ember?: any } = {}) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this._Ember = options.Ember || getGlobalObject().Ember;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._Ember) {\n logger.error('EmberIntegration is missing an Ember instance');\n return;\n }\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n const oldOnError = this._Ember.onerror;\n\n this._Ember.onerror = (error: Error): void => {\n if (getCurrentHub().getIntegration(Ember)) {\n getCurrentHub().captureException(error, { originalException: error });\n }\n\n if (typeof oldOnError === 'function') {\n oldOnError.call(this._Ember, error);\n } else if (this._Ember.testing) {\n throw error;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._Ember.RSVP.on('error', (reason: unknown): void => {\n if (getCurrentHub().getIntegration(Ember)) {\n getCurrentHub().withScope(scope => {\n if (isInstanceOf(reason, Error)) {\n scope.setExtra('context', 'Unhandled Promise error detected');\n getCurrentHub().captureException(reason, { originalException: reason as Error });\n } else {\n scope.setExtra('reason', reason);\n getCurrentHub().captureMessage('Unhandled Promise error detected');\n }\n });\n }\n });\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n","import { Event, EventHint, EventProcessor, ExtendedError, Hub, Integration } from '@sentry/types';\nimport { isError, isPlainObject, logger, normalize } from '@sentry/utils';\n\n/** JSDoc */\ninterface ExtraErrorDataOptions {\n depth?: number;\n}\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class ExtraErrorData implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ExtraErrorData';\n\n /**\n * @inheritDoc\n */\n public name: string = ExtraErrorData.id;\n\n /**\n * @inheritDoc\n */\n public constructor(private readonly _options: ExtraErrorDataOptions = { depth: 3 }) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(ExtraErrorData);\n if (!self) {\n return event;\n }\n return self.enhanceEventWithErrorData(event, hint);\n });\n }\n\n /**\n * Attaches extracted information from the Error object to extra field in the Event\n */\n public enhanceEventWithErrorData(event: Event, hint?: EventHint): Event {\n if (!hint || !hint.originalException || !isError(hint.originalException)) {\n return event;\n }\n const name = (hint.originalException as ExtendedError).name || hint.originalException.constructor.name;\n\n const errorData = this._extractErrorData(hint.originalException as ExtendedError);\n\n if (errorData) {\n let contexts = {\n ...event.contexts,\n };\n\n const normalizedErrorData = normalize(errorData, this._options.depth);\n if (isPlainObject(normalizedErrorData)) {\n contexts = {\n ...event.contexts,\n [name]: {\n ...normalizedErrorData,\n },\n };\n }\n\n return {\n ...event,\n contexts,\n };\n }\n\n return event;\n }\n\n /**\n * Extract extra information from the Error object\n */\n private _extractErrorData(error: ExtendedError): Record | null {\n // We are trying to enhance already existing event, so no harm done if it won't succeed\n try {\n const nativeKeys = [\n 'name',\n 'message',\n 'stack',\n 'line',\n 'column',\n 'fileName',\n 'lineNumber',\n 'columnNumber',\n 'toJSON',\n ];\n\n const extraErrorInfo: Record = {};\n\n // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n for (const key of Object.keys(error)) {\n if (nativeKeys.indexOf(key) !== -1) {\n continue;\n }\n const value = error[key];\n extraErrorInfo[key] = isError(value) ? (value as Error).toString() : value;\n }\n\n // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n if (typeof error.toJSON === 'function') {\n const serializedError = error.toJSON() as Record;\n\n for (const key of Object.keys(serializedError)) {\n const value = serializedError[key];\n extraErrorInfo[key] = isError(value) ? (value as Error).toString() : value;\n }\n }\n\n return extraErrorInfo;\n } catch (oO) {\n logger.error('Unable to extract extra data from the Error object:', oO);\n }\n\n return null;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, logger, normalize, uuid4 } from '@sentry/utils';\nimport localForage from 'localforage';\n\ntype LocalForage = {\n setItem(key: string, value: T, callback?: (err: any, value: T) => void): Promise;\n iterate(\n iteratee: (value: T, key: string, iterationNumber: number) => U,\n callback?: (err: any, result: U) => void,\n ): Promise;\n removeItem(key: string, callback?: (err: any) => void): Promise;\n};\n\n/**\n * cache offline errors and send when connected\n */\nexport class Offline implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Offline';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = Offline.id;\n\n /**\n * the global instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public global: any;\n\n /**\n * the current hub instance\n */\n public hub?: Hub;\n\n /**\n * maximum number of events to store while offline\n */\n public maxStoredEvents: number;\n\n /**\n * event cache\n */\n public offlineEventStore: LocalForage;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { maxStoredEvents?: number } = {}) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.global = getGlobalObject();\n this.maxStoredEvents = options.maxStoredEvents || 30; // set a reasonable default\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this.offlineEventStore = localForage.createInstance({\n name: 'sentry/offlineEventStore',\n });\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n this.hub = getCurrentHub();\n\n if ('addEventListener' in this.global) {\n this.global.addEventListener('online', () => {\n void this._sendEvents().catch(() => {\n logger.warn('could not send cached events');\n });\n });\n }\n\n addGlobalEventProcessor((event: Event) => {\n if (this.hub && this.hub.getIntegration(Offline)) {\n // cache if we are positively offline\n if ('navigator' in this.global && 'onLine' in this.global.navigator && !this.global.navigator.onLine) {\n void this._cacheEvent(event)\n .then((_event: Event): Promise => this._enforceMaxEvents())\n .catch((_error): void => {\n logger.warn('could not cache event while offline');\n });\n\n // return null on success or failure, because being offline will still result in an error\n return null;\n }\n }\n\n return event;\n });\n\n // if online now, send any events stored in a previous offline session\n if ('navigator' in this.global && 'onLine' in this.global.navigator && this.global.navigator.onLine) {\n void this._sendEvents().catch(() => {\n logger.warn('could not send cached events');\n });\n }\n }\n\n /**\n * cache an event to send later\n * @param event an event\n */\n private async _cacheEvent(event: Event): Promise {\n return this.offlineEventStore.setItem(uuid4(), normalize(event));\n }\n\n /**\n * purge excess events if necessary\n */\n private async _enforceMaxEvents(): Promise {\n const events: Array<{ event: Event; cacheKey: string }> = [];\n\n return this.offlineEventStore\n .iterate((event: Event, cacheKey: string, _index: number): void => {\n // aggregate events\n events.push({ cacheKey, event });\n })\n .then(\n (): Promise =>\n // this promise resolves when the iteration is finished\n this._purgeEvents(\n // purge all events past maxStoredEvents in reverse chronological order\n events\n .sort((a, b) => (b.event.timestamp || 0) - (a.event.timestamp || 0))\n .slice(this.maxStoredEvents < events.length ? this.maxStoredEvents : events.length)\n .map(event => event.cacheKey),\n ),\n )\n .catch((_error): void => {\n logger.warn('could not enforce max events');\n });\n }\n\n /**\n * purge event from cache\n */\n private async _purgeEvent(cacheKey: string): Promise {\n return this.offlineEventStore.removeItem(cacheKey);\n }\n\n /**\n * purge events from cache\n */\n private async _purgeEvents(cacheKeys: string[]): Promise {\n // trail with .then to ensure the return type as void and not void|void[]\n return Promise.all(cacheKeys.map(cacheKey => this._purgeEvent(cacheKey))).then();\n }\n\n /**\n * send all events\n */\n private async _sendEvents(): Promise {\n return this.offlineEventStore.iterate((event: Event, cacheKey: string, _index: number): void => {\n if (this.hub) {\n this.hub.captureEvent(event);\n\n void this._purgeEvent(cacheKey).catch((_error): void => {\n logger.warn('could not purge event from cache');\n });\n } else {\n logger.warn('no hub found - could not send cached event');\n }\n });\n }\n}\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up++;\n } else if (up) {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n // eslint-disable-next-line no-plusplus\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(\n resolvedPath.split('/').filter(p => !!p),\n !resolvedAbsolute,\n ).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n /* eslint-disable no-param-reassign */\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n /* eslint-enable no-param-reassign */\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(\n path.split('/').filter(p => !!p),\n !isPathAbsolute,\n ).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n","import { Event, EventProcessor, Hub, Integration, StackFrame, Stacktrace } from '@sentry/types';\nimport { basename, relative } from '@sentry/utils';\n\ntype StackFrameIteratee = (frame: StackFrame) => StackFrame;\n\n/** Rewrite event frames paths */\nexport class RewriteFrames implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'RewriteFrames';\n\n /**\n * @inheritDoc\n */\n public name: string = RewriteFrames.id;\n\n /**\n * @inheritDoc\n */\n private readonly _root?: string;\n\n /**\n * @inheritDoc\n */\n private readonly _prefix: string = 'app:///';\n\n /**\n * @inheritDoc\n */\n public constructor(options: { root?: string; prefix?: string; iteratee?: StackFrameIteratee } = {}) {\n if (options.root) {\n this._root = options.root;\n }\n if (options.prefix) {\n this._prefix = options.prefix;\n }\n if (options.iteratee) {\n this._iteratee = options.iteratee;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(RewriteFrames);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /** JSDoc */\n public process(originalEvent: Event): Event {\n let processedEvent = originalEvent;\n\n if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n processedEvent = this._processExceptionsEvent(processedEvent);\n }\n\n if (originalEvent.stacktrace) {\n processedEvent = this._processStacktraceEvent(processedEvent);\n }\n\n return processedEvent;\n }\n\n /**\n * @inheritDoc\n */\n private readonly _iteratee: StackFrameIteratee = (frame: StackFrame) => {\n if (!frame.filename) {\n return frame;\n }\n // Check if the frame filename begins with `/` or a Windows-style prefix such as `C:\\`\n const isWindowsFrame = /^[A-Z]:\\\\/.test(frame.filename);\n const startsWithSlash = /^\\//.test(frame.filename);\n if (isWindowsFrame || startsWithSlash) {\n const filename = isWindowsFrame\n ? frame.filename\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n : frame.filename;\n const base = this._root ? relative(this._root, filename) : basename(filename);\n frame.filename = `${this._prefix}${base}`;\n }\n return frame;\n };\n\n /** JSDoc */\n private _processExceptionsEvent(event: Event): Event {\n try {\n return {\n ...event,\n exception: {\n ...event.exception,\n // The check for this is performed inside `process` call itself, safe to skip here\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n values: event.exception!.values!.map(value => ({\n ...value,\n stacktrace: this._processStacktrace(value.stacktrace),\n })),\n },\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n private _processStacktraceEvent(event: Event): Event {\n try {\n return {\n ...event,\n stacktrace: this._processStacktrace(event.stacktrace),\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n private _processStacktrace(stacktrace?: Stacktrace): Stacktrace {\n return {\n ...stacktrace,\n frames: stacktrace && stacktrace.frames && stacktrace.frames.map(f => this._iteratee(f)),\n };\n }\n}\n","import { Event, EventProcessor, Hub, Integration } from '@sentry/types';\n\n/** This function adds duration since Sentry was initialized till the time event was sent */\nexport class SessionTiming implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'SessionTiming';\n\n /**\n * @inheritDoc\n */\n public name: string = SessionTiming.id;\n\n /** Exact time Client was initialized expressed in milliseconds since Unix Epoch. */\n protected readonly _startTime: number = Date.now();\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(SessionTiming);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public process(event: Event): Event {\n const now = Date.now();\n\n return {\n ...event,\n extra: {\n ...event.extra,\n ['session:start']: this._startTime,\n ['session:duration']: now - this._startTime,\n ['session:end']: now,\n },\n };\n }\n}\n","import { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types';\n\n/** Add node transaction to the event */\nexport class Transaction implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Transaction';\n\n /**\n * @inheritDoc\n */\n public name: string = Transaction.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(Transaction);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public process(event: Event): Event {\n const frames = this._getFramesFromEvent(event);\n\n // use for loop so we don't have to reverse whole frames array\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame.in_app === true) {\n event.transaction = this._getTransaction(frame);\n break;\n }\n }\n\n return event;\n }\n\n /** JSDoc */\n private _getFramesFromEvent(event: Event): StackFrame[] {\n const exception = event.exception && event.exception.values && event.exception.values[0];\n return (exception && exception.stacktrace && exception.stacktrace.frames) || [];\n }\n\n /** JSDoc */\n private _getTransaction(frame: StackFrame): string {\n return frame.module || frame.function ? `${frame.module || '?'}/${frame.function || '?'}` : '';\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventProcessor, Hub, Integration, IntegrationClass, Scope, Span, Transaction } from '@sentry/types';\nimport { basename, getGlobalObject, logger, timestampWithMs } from '@sentry/utils';\n\n/**\n * Used to extract Tracing integration from the current client,\n * without the need to import `Tracing` itself from the @sentry/apm package.\n * @deprecated as @sentry/tracing should be used over @sentry/apm.\n */\nconst TRACING_GETTER = ({\n id: 'Tracing',\n} as any) as IntegrationClass;\n\n/**\n * Used to extract BrowserTracing integration from @sentry/tracing\n */\nconst BROWSER_TRACING_GETTER = ({\n id: 'BrowserTracing',\n} as any) as IntegrationClass;\n\n/** Global Vue object limited to the methods/attributes we require */\ninterface VueInstance {\n config: {\n errorHandler?(error: Error, vm?: ViewModel, info?: string): void;\n };\n util?: {\n warn(...input: any): void;\n };\n mixin(hooks: { [key: string]: () => void }): void;\n}\n\n/** Representation of Vue component internals */\ninterface ViewModel {\n [key: string]: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n $root: object;\n $options: {\n [key: string]: any;\n name?: string;\n propsData?: { [key: string]: any };\n _componentTag?: string;\n __file?: string;\n $_sentryPerfHook?: boolean;\n };\n $once(hook: string, cb: () => void): void;\n}\n\n/** Vue Integration configuration */\ninterface IntegrationOptions {\n /** Vue instance to be used inside the integration */\n Vue: VueInstance;\n\n /**\n * When set to `false`, Sentry will suppress reporting of all props data\n * from your Vue components for privacy concerns.\n */\n attachProps: boolean;\n /**\n * When set to `true`, original Vue's `logError` will be called as well.\n * https://github.com/vuejs/vue/blob/c2b1cfe9ccd08835f2d99f6ce60f67b4de55187f/src/core/util/error.js#L38-L48\n */\n logErrors: boolean;\n\n /**\n * When set to `true`, enables tracking of components lifecycle performance.\n * It requires `Tracing` integration to be also enabled.\n */\n tracing: boolean;\n\n /** {@link TracingOptions} */\n tracingOptions: TracingOptions;\n}\n\n/** Vue specific configuration for Tracing Integration */\ninterface TracingOptions {\n /**\n * Decides whether to track components by hooking into its lifecycle methods.\n * Can be either set to `boolean` to enable/disable tracking for all of them.\n * Or to an array of specific component names (case-sensitive).\n */\n trackComponents: boolean | string[];\n /** How long to wait until the tracked root activity is marked as finished and sent of to Sentry */\n timeout: number;\n /**\n * List of hooks to keep track of during component lifecycle.\n * Available hooks: 'activate' | 'create' | 'destroy' | 'mount' | 'update'\n * Based on https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\n */\n hooks: Operation[];\n}\n\n/** Optional metadata attached to Sentry Event */\ninterface Metadata {\n [key: string]: any;\n componentName?: string;\n propsData?: { [key: string]: any };\n lifecycleHook?: string;\n}\n\n// https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\ntype Hook =\n | 'activated'\n | 'beforeCreate'\n | 'beforeDestroy'\n | 'beforeMount'\n | 'beforeUpdate'\n | 'created'\n | 'deactivated'\n | 'destroyed'\n | 'mounted'\n | 'updated';\n\ntype Operation = 'activate' | 'create' | 'destroy' | 'mount' | 'update';\n\n// Mappings from operation to corresponding lifecycle hook.\nconst HOOKS: { [key in Operation]: Hook[] } = {\n activate: ['activated', 'deactivated'],\n create: ['beforeCreate', 'created'],\n destroy: ['beforeDestroy', 'destroyed'],\n mount: ['beforeMount', 'mounted'],\n update: ['beforeUpdate', 'updated'],\n};\n\nconst COMPONENT_NAME_REGEXP = /(?:^|[-_/])(\\w)/g;\nconst ROOT_COMPONENT_NAME = 'root';\nconst ANONYMOUS_COMPONENT_NAME = 'anonymous component';\n\n/** JSDoc */\nexport class Vue implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Vue';\n\n /**\n * @inheritDoc\n */\n public name: string = Vue.id;\n\n private readonly _options: IntegrationOptions;\n\n /**\n * Cache holding already processed component names\n */\n private readonly _componentsCache: { [key: string]: string } = {};\n private _rootSpan?: Span;\n private _rootSpanTimer?: ReturnType;\n private _tracingActivity?: number;\n\n /**\n * @inheritDoc\n */\n public constructor(\n options: Partial & { tracingOptions: Partial }>,\n ) {\n logger.log('You are still using the Vue.js integration, consider moving to @sentry/vue');\n this._options = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Vue: getGlobalObject().Vue,\n attachProps: true,\n logErrors: false,\n tracing: false,\n ...options,\n tracingOptions: {\n hooks: ['mount', 'update'],\n timeout: 2000,\n trackComponents: false,\n ...options.tracingOptions,\n },\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._options.Vue) {\n logger.error('Vue integration is missing a Vue instance');\n return;\n }\n\n this._attachErrorHandler(getCurrentHub);\n\n if (this._options.tracing) {\n this._startTracing(getCurrentHub);\n }\n }\n\n /**\n * Extract component name from the ViewModel\n */\n private _getComponentName(vm: ViewModel): string {\n // Such level of granularity is most likely not necessary, but better safe than sorry. — Kamil\n if (!vm) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$root === vm) {\n return ROOT_COMPONENT_NAME;\n }\n\n if (!vm.$options) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$options.name) {\n return vm.$options.name;\n }\n\n if (vm.$options._componentTag) {\n return vm.$options._componentTag;\n }\n\n // injected by vue-loader\n if (vm.$options.__file) {\n const unifiedFile = vm.$options.__file.replace(/^[a-zA-Z]:/, '').replace(/\\\\/g, '/');\n const filename = basename(unifiedFile, '.vue');\n return (\n this._componentsCache[filename] ||\n (this._componentsCache[filename] = filename.replace(COMPONENT_NAME_REGEXP, (_, c: string) =>\n c ? c.toUpperCase() : '',\n ))\n );\n }\n\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n /** Keep it as attribute function, to keep correct `this` binding inside the hooks callbacks */\n // eslint-disable-next-line @typescript-eslint/typedef\n private readonly _applyTracingHooks = (vm: ViewModel, getCurrentHub: () => Hub): void => {\n // Don't attach twice, just in case\n if (vm.$options.$_sentryPerfHook) {\n return;\n }\n vm.$options.$_sentryPerfHook = true;\n\n const name = this._getComponentName(vm);\n const rootMount = name === ROOT_COMPONENT_NAME;\n const spans: { [key: string]: Span } = {};\n\n // Render hook starts after once event is emitted,\n // but it ends before the second event of the same type.\n //\n // Because of this, we start measuring inside the first event,\n // but finish it before it triggers, to skip the event emitter timing itself.\n const rootHandler = (hook: Hook): void => {\n const now = timestampWithMs();\n\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (this._rootSpan) {\n this._finishRootSpan(now, getCurrentHub);\n } else {\n vm.$once(`hook:${hook}`, () => {\n // Create an activity on the first event call. There'll be no second call, as rootSpan will be in place,\n // thus new event handler won't be attached.\n\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line deprecation/deprecation\n const tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n this._tracingActivity = (tracingIntegration as any).constructor.pushActivity('Vue Application Render');\n const transaction = (tracingIntegration as any).constructor.getTransaction();\n if (transaction) {\n this._rootSpan = transaction.startChild({\n description: 'Application Render',\n op: 'vue',\n });\n }\n // Use functionality from @sentry/tracing\n } else {\n const activeTransaction = getActiveTransaction(getCurrentHub());\n if (activeTransaction) {\n this._rootSpan = activeTransaction.startChild({\n description: 'Application Render',\n op: 'vue',\n });\n }\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n });\n }\n };\n\n const childHandler = (hook: Hook, operation: Operation): void => {\n // Skip components that we don't want to track to minimize the noise and give a more granular control to the user\n const shouldTrack = Array.isArray(this._options.tracingOptions.trackComponents)\n ? this._options.tracingOptions.trackComponents.indexOf(name) > -1\n : this._options.tracingOptions.trackComponents;\n\n if (!this._rootSpan || !shouldTrack) {\n return;\n }\n\n const now = timestampWithMs();\n const span = spans[operation];\n\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (span) {\n span.finish();\n this._finishRootSpan(now, getCurrentHub);\n } else {\n vm.$once(`hook:${hook}`, () => {\n if (this._rootSpan) {\n spans[operation] = this._rootSpan.startChild({\n description: `Vue <${name}>`,\n op: operation,\n });\n }\n });\n }\n };\n\n // Each component has it's own scope, so all activities are only related to one of them\n this._options.tracingOptions.hooks.forEach(operation => {\n // Retrieve corresponding hooks from Vue lifecycle.\n // eg. mount => ['beforeMount', 'mounted']\n const internalHooks = HOOKS[operation];\n\n if (!internalHooks) {\n logger.warn(`Unknown hook: ${operation}`);\n return;\n }\n\n internalHooks.forEach(internalHook => {\n const handler = rootMount\n ? rootHandler.bind(this, internalHook)\n : childHandler.bind(this, internalHook, operation);\n const currentValue = vm.$options[internalHook];\n\n if (Array.isArray(currentValue)) {\n vm.$options[internalHook] = [handler, ...currentValue];\n } else if (typeof currentValue === 'function') {\n vm.$options[internalHook] = [handler, currentValue];\n } else {\n vm.$options[internalHook] = [handler];\n }\n });\n });\n };\n\n /** Finish top-level span and activity with a debounce configured using `timeout` option */\n private _finishRootSpan(timestamp: number, getCurrentHub: () => Hub): void {\n if (this._rootSpanTimer) {\n clearTimeout(this._rootSpanTimer);\n }\n\n this._rootSpanTimer = setTimeout(() => {\n if (this._tracingActivity) {\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n // eslint-disable-next-line deprecation/deprecation\n const tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (tracingIntegration as any).constructor.popActivity(this._tracingActivity);\n }\n }\n\n // We should always finish the span, only should pop activity if using @sentry/apm\n if (this._rootSpan) {\n this._rootSpan.finish(timestamp);\n }\n }, this._options.tracingOptions.timeout);\n }\n\n /** Inject configured tracing hooks into Vue's component lifecycles */\n private _startTracing(getCurrentHub: () => Hub): void {\n const applyTracingHooks = this._applyTracingHooks;\n\n this._options.Vue.mixin({\n beforeCreate(this: ViewModel): void {\n // eslint-disable-next-line deprecation/deprecation\n if (getCurrentHub().getIntegration(TRACING_GETTER) || getCurrentHub().getIntegration(BROWSER_TRACING_GETTER)) {\n // `this` points to currently rendered component\n applyTracingHooks(this, getCurrentHub);\n } else {\n logger.error('Vue integration has tracing enabled, but Tracing integration is not configured');\n }\n },\n });\n }\n\n /** Inject Sentry's handler into owns Vue's error handler */\n private _attachErrorHandler(getCurrentHub: () => Hub): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const currentErrorHandler = this._options.Vue.config.errorHandler;\n\n this._options.Vue.config.errorHandler = (error: Error, vm?: ViewModel, info?: string): void => {\n const metadata: Metadata = {};\n\n if (vm) {\n try {\n metadata.componentName = this._getComponentName(vm);\n\n if (this._options.attachProps) {\n metadata.propsData = vm.$options.propsData;\n }\n } catch (_oO) {\n logger.warn('Unable to extract metadata from Vue component.');\n }\n }\n\n if (info) {\n metadata.lifecycleHook = info;\n }\n\n if (getCurrentHub().getIntegration(Vue)) {\n // Capture exception in the next event loop, to make sure that all breadcrumbs are recorded in time.\n setTimeout(() => {\n getCurrentHub().withScope(scope => {\n scope.setContext('vue', metadata);\n getCurrentHub().captureException(error);\n });\n });\n }\n\n if (typeof currentErrorHandler === 'function') {\n currentErrorHandler.call(this._options.Vue, error, vm, info);\n }\n\n if (this._options.logErrors) {\n if (this._options.Vue.util) {\n this._options.Vue.util.warn(`Error in ${info}: \"${error && error.toString()}\"`, vm);\n }\n // eslint-disable-next-line no-console\n console.error(error);\n }\n };\n }\n}\n\ninterface HubType extends Hub {\n getScope?(): Scope | undefined;\n}\n\n/** Grabs active transaction off scope */\nexport function getActiveTransaction(hub: HubType): T | undefined {\n if (hub && hub.getScope) {\n const scope = hub.getScope() as Scope;\n if (scope) {\n return scope.getTransaction() as T | undefined;\n }\n }\n\n return undefined;\n}\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport Connection, {PROGRESS} from './Connection';\nimport PropTypes from 'prop-types';\nimport * as Sentry from '@sentry/browser';\nimport * as SentryIntegrations from '@sentry/integrations';\n\nimport DialogError from './Dialogs/Error';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport IconClose from '@material-ui/icons/Close';\n\nimport printPrompt from './Prompt';\nimport theme from './Theme';\nimport Loader from './Components/Loader';\nimport Router from './Components/Router';\nimport Utils from './Components/Utils';\nimport SaveCloseButtons from './Components/SaveCloseButtons';\nimport I18n from './i18n';\n\nimport './index.css';\n\nif (!window.localStorage) {\n window.localStorage = {\n getItem: () => null,\n setItem: () => null,\n };\n}\n\n/**\n * @extends {Router}\n */\nclass GenericApp extends Router {\n /**\n * @param {import('./types').GenericAppProps} props\n * @param {import('./types').GenericAppSettings | undefined} settings\n */\n constructor(props, settings) {\n // Remove `!Connection.isWeb() && window.adapterName !== 'material'` when iobroker.socket will support native ws\n if (!Connection.isWeb() && window.io && window.location.port === '3000') {\n try {\n const io = new window.SocketClient();\n delete window.io;\n window.io = io;\n } catch (e) {\n // ignore\n }\n }\n\n super(props);\n\n printPrompt();\n\n let query = (window.location.search || '').replace(/^\\?/, '').replace(/#.*$/, '');\n let args = {};\n query.trim().split('&').filter(t => t.trim()).forEach(b => {\n const parts = b.split('=');\n args[parts[0]] = parts.length === 2 ? parts[1] : true;\n if (args[parts[0]] === 'true') {\n args[parts[0]] = true;\n } else if (args[parts[0]] === 'false') {\n args[parts[0]] = false;\n }\n });\n\n // extract instance from URL\n this.instance = args.instance !== undefined ? parseInt(args.instance, 10) || 0 : (parseInt(window.location.search.slice(1), 10) || 0);\n // extract adapter name from URL\n const tmp = window.location.pathname.split('/');\n this.adapterName = settings?.adapterName || props.adapterName || window.adapterName || tmp[tmp.length - 2] || 'iot';\n this.instanceId = `system.adapter.${this.adapterName}.${this.instance}`;\n this.newReact = args.newReact === true; // it is admin5\n\n const location = Router.getLocation();\n location.tab = location.tab || window.localStorage.getItem(this.adapterName + '-adapter') || '';\n\n const themeInstance = this.createTheme();\n\n this.state = {\n selectedTab: window.localStorage.getItem(this.adapterName + '-adapter') || '',\n selectedTabNum: -1,\n native: {},\n errorText: '',\n changed: false,\n connected: false,\n loaded: false,\n isConfigurationError: '',\n expertMode: false,\n toast: '',\n theme: themeInstance,\n themeName: this.getThemeName(themeInstance),\n themeType: this.getThemeType(themeInstance),\n bottomButtons: (settings && settings.bottomButtons) === false ? false : ((props && props.bottomButtons) === false ? false : true),\n width: GenericApp.getWidth(),\n };\n\n // init translations\n const translations = {\n 'en': require('./i18n/en.json'),\n 'de': require('./i18n/de.json'),\n 'ru': require('./i18n/ru.json'),\n 'pt': require('./i18n/pt.json'),\n 'nl': require('./i18n/nl.json'),\n 'fr': require('./i18n/fr.json'),\n 'it': require('./i18n/it.json'),\n 'es': require('./i18n/es.json'),\n 'pl': require('./i18n/pl.json'),\n 'zh-cn': require('./i18n/zh-cn.json'),\n };\n\n // merge together\n if (settings && settings.translations) {\n Object.keys(settings.translations).forEach(lang => translations[lang] = Object.assign(translations[lang], settings.translations[lang]));\n } else if (props.translations) {\n Object.keys(props.translations).forEach(lang => translations[lang] = Object.assign(translations[lang], props.translations[lang]));\n }\n\n I18n.setTranslations(translations);\n\n this.savedNative = {}; // to detect if the config changed\n\n this.encryptedFields = props.encryptedFields || settings?.encryptedFields || [];\n\n this.sentryDSN = (settings && settings.sentryDSN) || props.sentryDSN;\n\n this.socket = new Connection({\n ...(props?.socket || settings?.socket),\n name: this.adapterName,\n doNotLoadAllObjects: settings?.doNotLoadAllObjects,\n onProgress: progress => {\n if (progress === PROGRESS.CONNECTING) {\n this.setState({connected: false});\n } else if (progress === PROGRESS.READY) {\n this.setState({connected: true});\n } else {\n this.setState({connected: true});\n }\n },\n onReady: (objects, scripts) => {\n I18n.setLanguage(this.socket.systemLang);\n\n // subscribe because of language and expert mode\n this.socket.subscribeObject('system.config', this.onSystemConfigChanged)\n .then(() => this.getSystemConfig())\n .then(obj => {\n this._secret = (typeof obj !== 'undefined' && obj.native && obj.native.secret) || 'Zgfr56gFe87jJOM';\n this._systemConfig = obj?.common || {};\n return this.socket.getObject(this.instanceId);\n })\n .then(instanceObj => {\n let waitPromise;\n\n const sentryEnabled =\n this._systemConfig.diag !== 'none' &&\n instanceObj &&\n instanceObj.common &&\n instanceObj.common.name &&\n instanceObj.common.version &&\n !instanceObj.common.disableDataReporting &&\n window.location.host !== 'localhost:3000';\n\n // activate sentry plugin\n if (!this.sentryStarted && this.sentryDSN && sentryEnabled) {\n this.sentryStarted = true;\n\n Sentry.init({\n dsn: this.sentryDSN,\n release: `iobroker.${instanceObj.common.name}@${instanceObj.common.version}`,\n integrations: [\n new SentryIntegrations.Dedupe()\n ]\n });\n }\n\n // read UUID and init sentry with it.\n // for backward compatibility it will be processed separately from above logic: some adapters could still have this.sentryDSN as undefined\n if (!this.sentryInited && sentryEnabled) {\n this.sentryInited = true;\n\n waitPromise = this.socket.getObject('system.meta.uuid')\n .then(uuidObj => {\n if (uuidObj && uuidObj.native && uuidObj.native.uuid) {\n Sentry.configureScope(scope =>\n scope.setUser({id: uuidObj.native.uuid}));\n }\n });\n }\n\n waitPromise = waitPromise || Promise.resolve();\n\n waitPromise\n .then(() => {\n if (instanceObj) {\n this.common = instanceObj?.common;\n this.onPrepareLoad(instanceObj.native, instanceObj.encryptedNative); // decode all secrets\n this.savedNative = JSON.parse(JSON.stringify(instanceObj.native));\n this.setState({native: instanceObj.native, loaded: true, expertMode: this.getExpertMode()}, () =>\n this.onConnectionReady && this.onConnectionReady());\n } else {\n console.warn('Cannot load instance settings');\n this.setState({native: {}, loaded: true, expertMode: this.getExpertMode()}, () => this.onConnectionReady && this.onConnectionReady());\n }\n });\n });\n },\n onError: err => {\n console.error(err);\n this.showError(err);\n }\n });\n }\n\n onSystemConfigChanged = (id, obj) => {\n if (obj && id === 'system.config') {\n if (this.socket.systemLang !== obj?.common.language) {\n this.socket.systemLang = obj?.common.language || 'en';\n I18n.setLanguage(this.socket.systemLang);\n }\n\n if (this._systemConfig.expertMode !== !!obj?.common?.expertMode) {\n this._systemConfig = obj?.common || {};\n this.setState({expertMode: this.getExpertMode()});\n } else {\n this._systemConfig = obj?.common || {};\n }\n }\n }\n\n /**\n * Called immediately after a component is mounted. Setting state here will trigger re-rendering.\n */\n componentDidMount() {\n window.addEventListener('resize', this.onResize, true);\n window.addEventListener('message', this.onReceiveMessage, false);\n super.componentDidMount();\n }\n\n /**\n * Called immediately before a component is destroyed.\n */\n componentWillUnmount() {\n window.removeEventListener('resize', this.onResize, true);\n window.removeEventListener('message', this.onReceiveMessage, false);\n super.componentWillUnmount();\n }\n\n onReceiveMessage = message => {\n if (message?.data) {\n if (message.data === 'updateTheme') {\n const newThemeName = Utils.getThemeName()\n Utils.setThemeName(Utils.getThemeName());\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n }, () => {\n this.props.onThemeChange && this.props.onThemeChange(newThemeName);\n this.onThemeChanged && this.onThemeChanged(newThemeName);\n });\n } else if (message.data === 'updateExpertMode') {\n this.onToggleExpertMode && this.onToggleExpertMode(this.getExpertMode());\n } else {\n console.warn('Received unknown message: ' + JSON.stringify(message.data));\n }\n }\n };\n\n /**\n * @private\n */\n onResize = () => {\n this.resizeTimer && clearTimeout(this.resizeTimer);\n this.resizeTimer = setTimeout(() => {\n this.resizeTimer = null;\n this.setState({width: GenericApp.getWidth()});\n }, 200);\n };\n\n /**\n * Gets the width depending on the window inner width.\n * @returns {import('./types').Width}\n */\n static getWidth() {\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n const SIZES = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n };\n const width = window.innerWidth;\n const keys = Object.keys(SIZES).reverse();\n const widthComputed = keys.find(key => width >= SIZES[key]);\n\n return widthComputed || 'xs';\n }\n\n /**\n * Get a theme\n * @param {string} name Theme name\n * @returns {import('./types').Theme}\n */\n createTheme(name = '') {\n return theme(Utils.getThemeName(name));\n }\n\n /**\n * Get the theme name\n * @param {import('./types').Theme} theme Theme\n * @returns {string} Theme name\n */\n getThemeName(theme) {\n return theme.name;\n }\n\n /**\n * Get the theme type\n * @param {import('./types').Theme} theme Theme\n * @returns {string} Theme type\n */\n getThemeType(theme) {\n return theme.palette.type;\n }\n\n /**\n * Changes the current theme\n */\n toggleTheme() {\n const themeName = this.state.themeName;\n\n // dark => blue => colored => light => dark\n const newThemeName = themeName === 'dark' ? 'blue' :\n (themeName === 'blue' ? 'colored' :\n (themeName === 'colored' ? 'light' : 'dark'));\n\n Utils.setThemeName(newThemeName);\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n });\n }\n\n /**\n * Gets the system configuration.\n * @returns {Promise}\n */\n getSystemConfig() {\n return this.socket.getSystemConfig();\n }\n\n /**\n * Get current expert mode\n * @returns {boolean}\n */\n getExpertMode() {\n return window.sessionStorage.getItem('App.expertMode') === 'true' || !!this._systemConfig.expertMode;\n }\n\n /**\n * Gets called when the socket.io connection is ready.\n * You can overload this function to execute own commands.\n */\n onConnectionReady() {\n }\n\n /**\n * Encrypts a string.\n * @param {string} value\n * @returns {string}\n */\n encrypt(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(this._secret[i % this._secret.length].charCodeAt(0) ^ value.charCodeAt(i));\n }\n return result;\n }\n\n /**\n * Decrypts a string.\n * @param {string} value\n * @returns {string}\n */\n decrypt(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(this._secret[i % this._secret.length].charCodeAt(0) ^ value.charCodeAt(i));\n }\n return result;\n }\n\n /**\n * Gets called when the navigation hash changes.\n * You may override this if needed.\n */\n onHashChanged() {\n const location = Router.getLocation();\n if (location.tab !== this.state.selectedTab) {\n this.selectTab(location.tab);\n }\n }\n\n /**\n * Selects the given tab.\n * @param {string} tab\n * @param {number} [index]\n */\n selectTab(tab, index) {\n window.localStorage[this.adapterName + '-adapter'] = tab;\n this.setState({selectedTab: tab, selectedTabNum: index})\n }\n\n /**\n * Gets called before the settings are saved.\n * You may override this if needed.\n * @param {Record} settings\n */\n onPrepareSave(settings) {\n // here you can encode values\n this.encryptedFields && this.encryptedFields.forEach(attr => {\n if (settings[attr]) {\n settings[attr] = this.encrypt(settings[attr]);\n }\n });\n\n return true;\n }\n\n /**\n * Gets called after the settings are loaded.\n * You may override this if needed.\n * @param {Record} settings\n * @param {string[]} encryptedNative optional list of fields to be decrypted\n */\n onPrepareLoad(settings, encryptedNative) {\n // here you can encode values\n this.encryptedFields && this.encryptedFields.forEach(attr => {\n if (settings[attr]) {\n settings[attr] = this.decrypt(settings[attr]);\n }\n });\n encryptedNative && encryptedNative.forEach(attr => {\n this.encryptedFields = this.encryptedFields || [];\n !this.encryptedFields.includes(attr) && this.encryptedFields.push(attr);\n if (settings[attr]) {\n settings[attr] = this.decrypt(settings[attr]);\n }\n });\n }\n\n /**\n * Gets the extendable instances.\n * @returns {Promise}\n */\n getExtendableInstances() {\n return new Promise(resolve => {\n this.socket._socket.emit('getObjectView', 'system', 'instance', null, (err, doc) => {\n if (err) {\n resolve([]);\n } else {\n resolve(doc.rows.filter(item => item.value.common.webExtendable).map(item => item.value));\n }\n });\n });\n }\n\n /**\n * Gets the IP addresses of the given host.\n * @param {string} host\n */\n getIpAddresses(host) {\n return new Promise((resolve, reject) => {\n this.socket._socket.emit('getHostByIp', host || this.common.host, (ip, _host) => {\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - ' + I18n.t('ra_Listen on all IPs'), address: '0.0.0.0', family: 'ipv4'}];\n const IPs6 = [{name: '[IPv6] ::', address: '::', family: 'ipv6'}];\n if (_host) {\n host = _host;\n if (host.native.hardware && host.native.hardware.networkInterfaces) {\n Object.keys(host.native.hardware.networkInterfaces).forEach(eth =>\n host.native.hardware.networkInterfaces[eth].forEach(inter => {\n if (inter.family !== 'IPv6') {\n IPs4.push({name: '[' + inter.family + '] ' + inter.address + ' - ' + eth, address: inter.address, family: 'ipv4'});\n } else {\n IPs6.push({name: '[' + inter.family + '] ' + inter.address + ' - ' + eth, address: inter.address, family: 'ipv6'});\n }\n }));\n }\n IPs6.forEach(ip => IPs4.push(ip));\n }\n resolve(IPs4);\n });\n });\n }\n\n /**\n * Saves the settings to the server.\n * @param {boolean} isClose True if the user is closing the dialog.\n */\n onSave(isClose) {\n let oldObj;\n if (this.state.isConfigurationError) {\n this.setState({errorText: this.state.isConfigurationError});\n return;\n }\n\n this.socket.getObject(this.instanceId)\n .then(_oldObj => {\n oldObj = _oldObj || {};\n\n for (const a in this.state.native) {\n if (this.state.native.hasOwnProperty(a)) {\n if (this.state.native[a] === null) {\n oldObj.native[a] = null;\n } else\n if (this.state.native[a] !== undefined) {\n oldObj.native[a] = JSON.parse(JSON.stringify(this.state.native[a]));\n } else {\n delete oldObj.native[a];\n }\n }\n }\n\n if (this.state.common) {\n for (const b in this.state.common) {\n if (this.state.common[b] === null) {\n oldObj.common[b] = null;\n } else\n if (this.state.common[b] !== undefined) {\n oldObj.common[b] = JSON.parse(JSON.stringify(this.state.common[b]));\n } else {\n delete oldObj.common[b];\n }\n }\n }\n\n if (this.onPrepareSave(oldObj.native) !== false) {\n return this.socket.setObject(this.instanceId, oldObj);\n } else {\n return Promise.reject('Invalid configuration');\n }\n })\n .then(() => {\n this.savedNative = oldObj.native;\n globalThis.changed = false;\n this.setState({changed: false});\n isClose && GenericApp.onClose();\n })\n .catch(e => {\n console.error(`Cannot save configuration: ${e}`);\n });\n }\n\n /**\n * Renders the toast.\n * @returns {JSX.Element | null} The JSX element.\n */\n renderToast() {\n if (!this.state.toast) return null;\n return (\n this.setState({toast: ''})}\n ContentProps={{\n 'aria-describedby': 'message-id',\n }}\n message={{this.state.toast}}\n action={[\n this.setState({toast: ''})}\n >\n \n ,\n ]}\n />);\n }\n\n /**\n * Closes the dialog.\n * @private\n */\n static onClose() {\n if (typeof window.parent !== 'undefined' && window.parent) {\n try {\n if (window.parent.$iframeDialog && typeof window.parent.$iframeDialog.close === 'function') {\n window.parent.$iframeDialog.close();\n } else {\n window.parent.postMessage('close', '*');\n }\n } catch (e) {\n window.parent.postMessage('close', '*');\n }\n }\n }\n\n /**\n * Renders the error dialog.\n * @returns {JSX.Element | null} The JSX element.\n */\n renderError() {\n if (!this.state.errorText) {\n return null;\n } else {\n return this.setState({errorText: ''})}/>;\n }\n }\n\n /**\n * Checks if the configuration has changed.\n * @param {Record} [native] the new state\n */\n getIsChanged(native) {\n native = native || this.state.native;\n const isChanged = JSON.stringify(native) !== JSON.stringify(this.savedNative);\n\n if(isChanged) {\n globalThis.changed = true;\n } else {\n globalThis.changed = false;\n }\n\n return isChanged;\n }\n\n /**\n * Gets called when loading the configuration.\n * @param {Record} newNative The new configuration object.\n */\n onLoadConfig(newNative) {\n if (JSON.stringify(newNative) !== JSON.stringify(this.state.native)) {\n this.setState({native: newNative, changed: this.getIsChanged(newNative)})\n }\n }\n\n /**\n * Sets the configuration error.\n * @param {string} errorText\n */\n setConfigurationError(errorText) {\n if (this.state.isConfigurationError !== errorText) {\n this.setState({isConfigurationError: errorText});\n }\n }\n\n /**\n * Renders the save and close buttons.\n * @returns {JSX.Element | undefined} The JSX element.\n */\n renderSaveCloseButtons() {\n if (this.state.bottomButtons) {\n return this.onSave(isClose)}\n onClose={() => GenericApp.onClose()}\n />;\n } else {\n return null;\n }\n }\n\n /**\n * @private\n * @param {Record} obj\n * @param {any} attrs\n * @param {any} value\n * @returns {boolean | undefined}\n */\n _updateNativeValue(obj, attrs, value) {\n if (typeof attrs !== 'object') {\n attrs = attrs.split('.');\n }\n const attr = attrs.shift();\n if (!attrs.length) {\n if (value && typeof value === 'object') {\n if (JSON.stringify(obj[attr]) !== JSON.stringify(value)) {\n obj[attr] = value;\n return true;\n }\n } else if (obj[attr] !== value) {\n obj[attr] = value;\n return true;\n } else {\n return false;\n }\n\n } else {\n obj[attr] = obj[attr] || {};\n if (typeof obj[attr] !== 'object') {\n throw new Error('attribute ' + attr + ' is no object, but ' + typeof obj[attr]);\n }\n return this._updateNativeValue(obj[attr], attrs, value);\n }\n }\n\n /**\n * Update the native value\n * @param {string} attr The attribute name with dots as delimiter.\n * @param {any} value The new value.\n * @param {(() => void)} [cb] Callback which will be called upon completion.\n */\n updateNativeValue(attr, value, cb) {\n const native = JSON.parse(JSON.stringify(this.state.native));\n if (this._updateNativeValue(native, attr, value)) {\n const changed = this.getIsChanged(native);\n this.setState({native, changed}, cb);\n }\n }\n\n /**\n * Set the error text to be shown.\n * @param {string | JSX.Element} text\n */\n showError(text) {\n this.setState({errorText: text});\n }\n\n /**\n * Sets the toast to be shown.\n * @param {string} toast\n */\n showToast(toast) {\n this.setState({toast});\n }\n\n /**\n * Renders this component.\n * @returns {JSX.Element} The JSX element.\n */\n render() {\n if (!this.state.loaded) {\n return ;\n }\n\n return
\n {this.renderError()}\n {this.renderToast()}\n {this.renderSaveCloseButtons()}\n
;\n }\n}\n\nGenericApp.propTypes = {\n adapterName: PropTypes.string, // (optional) name of adapter\n onThemeChange: PropTypes.func, // (optional) called by theme change\n socket: PropTypes.object, // (optional) socket information (host, port)\n encryptedFields: PropTypes.array, // (optional) list of native attributes, that must be encrypted\n bottomButtons: PropTypes.bool, // If the bottom buttons (Save/Close) must be shown\n};\n\nexport default GenericApp;\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n /** Determines if WeakSet is available */\n private readonly _hasWeakSet: boolean;\n /** Either WeakSet or Array */\n private readonly _inner: any;\n\n public constructor() {\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n public memoize(obj: any): boolean {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < this._inner.length; i++) {\n const value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n }\n\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n public unmemoize(obj: any): void {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (let i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n }\n}\n","/*!\n localForage -- Offline Storage, Improved\n Version 1.10.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {\n return;\n }\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb || !idb.open) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support\n // (see: https://github.com/pouchdb/pouchdb/issues/5572).\n // Safari 10.1 shipped with fetch, we can use that to detect it.\n // Note: this creates issues with `window.fetch` polyfills and\n // overrides; see:\n // https://github.com/localForage/localForage/issues/856\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n // See: https://github.com/mozilla/localForage/issues/128\n // See: https://github.com/mozilla/localForage/issues/272\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\nfunction normalizeKey(key) {\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n return key;\n}\n\nfunction getCallback() {\n if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n return arguments[arguments.length - 1];\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs = void 0;\nvar dbContexts = {};\nvar toString = Object.prototype.toString;\n\n// Transaction Modes\nvar READ_ONLY = 'readonly';\nvar READ_WRITE = 'readwrite';\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve, reject) {\n deferredOperation.resolve = resolve;\n deferredOperation.reject = reject;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n return deferredOperation.promise;\n }\n}\n\nfunction _rejectReadiness(dbInfo, err) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Reject its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.reject(err);\n return deferredOperation.promise;\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n var db = openreq.result;\n db.onversionchange = function (e) {\n // Triggered when the database is modified (e.g. adding an objectStore) or\n // deleted (even when initiated by other sessions in different tabs).\n // Closing the connection here prevents those operations from being blocked.\n // If the database is accessed again later by this instance, the connection\n // will be reopened or the database recreated as needed.\n e.target.close();\n };\n resolve(db);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Try to establish a new db connection to replace the\n// current one which is broken (i.e. experiencing\n// InvalidStateError while creating a transaction).\nfunction _tryReconnect(dbInfo) {\n _deferReadiness(dbInfo);\n\n var dbContext = dbContexts[dbInfo.name];\n var forages = dbContext.forages;\n\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n if (forage._dbInfo.db) {\n forage._dbInfo.db.close();\n forage._dbInfo.db = null;\n }\n }\n dbInfo.db = null;\n\n return _getOriginalConnection(dbInfo).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n // store the latest db reference\n // in case the db was upgraded\n dbInfo.db = dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n })[\"catch\"](function (err) {\n _rejectReadiness(dbInfo, err);\n throw err;\n });\n}\n\n// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n// so we have to do it with callbacks\nfunction createTransaction(dbInfo, mode, callback, retries) {\n if (retries === undefined) {\n retries = 1;\n }\n\n try {\n var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n callback(null, tx);\n } catch (err) {\n if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n return Promise$1.resolve().then(function () {\n if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n // increase the db version, to create the new ObjectStore\n if (dbInfo.db) {\n dbInfo.version = dbInfo.db.version + 1;\n }\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n }).then(function () {\n return _tryReconnect(dbInfo).then(function () {\n createTransaction(dbInfo, mode, callback, retries - 1);\n });\n })[\"catch\"](callback);\n }\n\n callback(err);\n }\n}\n\nfunction createDbContext() {\n return {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = createDbContext();\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n // when the iterator callback returns any\n // (non-`undefined`) value, then we stop\n // the iteration immediately\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n var req = store.put(value, key);\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var advanced = false;\n var req = store.openKeyCursor();\n\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openKeyCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\n var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n return db;\n });\n\n if (!options.storeName) {\n promise = dbPromise.then(function (db) {\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n }\n\n var dropDBPromise = new Promise$1(function (resolve, reject) {\n var req = idb.deleteDatabase(options.name);\n\n req.onerror = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n reject(req.error);\n };\n\n req.onblocked = function () {\n // Closing all open connections in onversionchange handler should prevent this situation, but if\n // we do get here, it just means the request remains pending - eventually it will succeed or error\n console.warn('dropInstance blocked for database \"' + options.name + '\" until all open connections are closed');\n };\n\n req.onsuccess = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n resolve(db);\n };\n });\n\n return dropDBPromise.then(function (db) {\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n var _forage = forages[i];\n _advanceReadiness(_forage._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n } else {\n promise = dbPromise.then(function (db) {\n if (!db.objectStoreNames.contains(options.storeName)) {\n return;\n }\n\n var newVersion = db.version + 1;\n\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n forage._dbInfo.version = newVersion;\n }\n\n var dropObjectPromise = new Promise$1(function (resolve, reject) {\n var req = idb.open(options.name, newVersion);\n\n req.onerror = function (err) {\n var db = req.result;\n db.close();\n reject(err);\n };\n\n req.onupgradeneeded = function () {\n var db = req.result;\n db.deleteObjectStore(options.storeName);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n db.close();\n resolve(db);\n };\n });\n\n return dropObjectPromise.then(function (db) {\n dbContext.db = db;\n for (var j = 0; j < forages.length; j++) {\n var _forage2 = forages[j];\n _forage2._dbInfo.db = db;\n _advanceReadiness(_forage2._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n }\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n _support: isIndexedDBValid(),\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys,\n dropInstance: dropInstance\n};\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n\nfunction createDbTable(t, dbInfo, callback, errorCallback) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n}\n\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n createDbTable(t, dbInfo, function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n }, reject);\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n t.executeSql(sqlStatement, args, callback, function (t, error) {\n if (error.code === error.SYNTAX_ERR) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n if (!results.rows.length) {\n // if the table is missing (was deleted)\n // re-create it table and retry\n createDbTable(t, dbInfo, function () {\n t.executeSql(sqlStatement, args, callback, errorCallback);\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// https://www.w3.org/TR/webdatabase/#databases\n// > There is no way to enumerate or delete the databases available for an origin from this API.\nfunction getAllStoreNames(db) {\n return new Promise$1(function (resolve, reject) {\n db.transaction(function (t) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n var storeNames = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n storeNames.push(results.rows.item(i).name);\n }\n\n resolve({\n db: db,\n storeNames: storeNames\n });\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n}\n\nfunction dropInstance$1(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n var db;\n if (options.name === currentConfig.name) {\n // use the db reference of the current instance\n db = self._dbInfo.db;\n } else {\n db = openDatabase(options.name, '', '', 0);\n }\n\n if (!options.storeName) {\n // drop all database tables\n resolve(getAllStoreNames(db));\n } else {\n resolve({\n db: db,\n storeNames: [options.storeName]\n });\n }\n }).then(function (operationInfo) {\n return new Promise$1(function (resolve, reject) {\n operationInfo.db.transaction(function (t) {\n function dropTable(storeName) {\n return new Promise$1(function (resolve, reject) {\n t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n }\n\n var operations = [];\n for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n operations.push(dropTable(operationInfo.storeNames[i]));\n }\n\n Promise$1.all(operations).then(function () {\n resolve();\n })[\"catch\"](function (e) {\n reject(e);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n _support: isWebSQLValid(),\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1,\n dropInstance: dropInstance$1\n};\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n // in IE8 typeof localStorage.setItem === 'object'\n !!localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getKeyPrefix(options, defaultConfig) {\n var keyPrefix = options.name + '/';\n\n if (options.storeName !== defaultConfig.storeName) {\n keyPrefix += options.storeName + '/';\n }\n return keyPrefix;\n}\n\n// Check if localStorage throws when saving an item\nfunction checkIfLocalStorageThrows() {\n var localStorageTestKey = '_localforage_support_test';\n\n try {\n localStorage.setItem(localStorageTestKey, true);\n localStorage.removeItem(localStorageTestKey);\n\n return false;\n } catch (e) {\n return true;\n }\n}\n\n// Check if localStorage is usable and allows to save an item\n// This method checks if localStorage is usable in Safari Private Browsing\n// mode, or in any other case where the available quota for localStorage\n// is 0 and there wasn't any saved items yet.\nfunction _isLocalStorageUsable() {\n return !checkIfLocalStorageThrows() || localStorage.length > 0;\n}\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\n if (!_isLocalStorageUsable()) {\n return Promise$1.reject();\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n var itemKey = localStorage.key(i);\n if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance$2(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n var currentConfig = this.config();\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n if (!options.storeName) {\n resolve(options.name + '/');\n } else {\n resolve(_getKeyPrefix(options, self._defaultConfig));\n }\n }).then(function (keyPrefix) {\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n _support: isLocalStorageValid(),\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2,\n dropInstance: dropInstance$2\n};\n\nvar sameValue = function sameValue(x, y) {\n return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n};\n\nvar includes = function includes(array, searchElement) {\n var len = array.length;\n var i = 0;\n while (i < len) {\n if (sameValue(array[i], searchElement)) {\n return true;\n }\n i++;\n }\n\n return false;\n};\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\n// Drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar DefinedDrivers = {};\n\nvar DriverSupport = {};\n\nvar DefaultDrivers = {\n INDEXEDDB: asyncStorage,\n WEBSQL: webSQLStorage,\n LOCALSTORAGE: localStorageWrapper\n};\n\nvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\nvar OptionalDriverMethods = ['dropInstance'];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var _key in arg) {\n if (arg.hasOwnProperty(_key)) {\n if (isArray(arg[_key])) {\n arguments[0][_key] = arg[_key].slice();\n } else {\n arguments[0][_key] = arg[_key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n for (var driverTypeKey in DefaultDrivers) {\n if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n var driver = DefaultDrivers[driverTypeKey];\n var driverName = driver._driver;\n this[driverTypeKey] = driverName;\n\n if (!DefinedDrivers[driverName]) {\n // we don't need to wait for the promise,\n // since the default drivers can be defined\n // in a blocking manner\n this.defineDriver(driver);\n }\n }\n }\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n\n var driverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0, len = driverMethods.length; i < len; i++) {\n var driverMethodName = driverMethods[i];\n\n // when the property is there,\n // it should be a method even when optional\n var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var configureMissingMethods = function configureMissingMethods() {\n var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n return function () {\n var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n var promise = Promise$1.reject(error);\n executeCallback(promise, arguments[arguments.length - 1]);\n return promise;\n };\n };\n\n for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n var optionalDriverMethod = OptionalDriverMethods[_i];\n if (!driverObject[optionalDriverMethod]) {\n driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n }\n }\n };\n\n configureMissingMethods();\n\n var setDriverSupport = function setDriverSupport(support) {\n if (DefinedDrivers[driverName]) {\n console.info('Redefining LocalForage driver: ' + driverName);\n }\n DefinedDrivers[driverName] = driverObject;\n DriverSupport[driverName] = support;\n // don't use a then, so that we can define\n // drivers that have simple _support methods\n // in a blocking manner\n resolve();\n };\n\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n driverObject._support().then(setDriverSupport, reject);\n } else {\n setDriverSupport(!!driverObject._support);\n }\n } else {\n setDriverSupport(true);\n }\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!DriverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (file, acceptedFiles) {\n if (file && acceptedFiles) {\n var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');\n var fileName = file.name || '';\n var mimeType = (file.type || '').toLowerCase();\n var baseMimeType = mimeType.replace(/\\/.*$/, '');\n return acceptedFilesArray.some(function (type) {\n var validType = type.trim().toLowerCase();\n\n if (validType.charAt(0) === '.') {\n return fileName.toLowerCase().endsWith(validType);\n } else if (validType.endsWith('/*')) {\n // This is something like a image/* mime type\n return baseMimeType === validType.replace(/\\/.*$/, '');\n }\n\n return mimeType === validType;\n });\n }\n\n return true;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport NativeSelectInput from './NativeSelectInput';\nimport withStyles from '../styles/withStyles';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the select component `root` class. */\n root: {},\n\n /* Styles applied to the select component `select` class. */\n select: {\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n minWidth: 16,\n // So it doesn't collapse.\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE 11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n '&$disabled': {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n '&&': {\n paddingRight: 24\n }\n },\n\n /* Styles applied to the select component if `variant=\"filled\"`. */\n filled: {\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component if `variant=\"outlined\"`. */\n outlined: {\n borderRadius: theme.shape.borderRadius,\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component `selectMenu` class. */\n selectMenu: {\n height: 'auto',\n // Resets for multpile select with chips\n minHeight: '1.1876em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n\n /* Pseudo-class applied to the select component `disabled` class. */\n disabled: {},\n\n /* Styles applied to the icon component. */\n icon: {\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - 12px)',\n // Center vertically\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the icon component if the popup is open. */\n iconOpen: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the icon component if `variant=\"filled\"`. */\n iconFilled: {\n right: 7\n },\n\n /* Styles applied to the icon component if `variant=\"outlined\"`. */\n iconOutlined: {\n right: 7\n },\n\n /* Styles applied to the underlying native input component. */\n nativeInput: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%'\n }\n };\n};\nvar defaultInput = /*#__PURE__*/React.createElement(Input, null);\n/**\n * An alternative to `;\n\n if (this.props.dense) {\n return select;\n } else {\n return \n {this.props.label}\n {select}\n ;\n\n }\n }\n}\n\nSelectWithIcon.propTypes = {\n t: PropTypes.func,\n lang: PropTypes.string,\n themeType: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n list: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n options: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n label: PropTypes.string,\n different: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n fullWidth: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n removePrefix: PropTypes.string,\n allowNone: PropTypes.bool,\n inputProps: PropTypes.object,\n};\n\nexport default withStyles(styles)(SelectWithIcon);","export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n","import isBrowser from './isBrowser';\n\nconst timeoutDuration = (function(){\n const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}());\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nexport default function getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`]) +\n parseFloat(styles[`border${sideB}Width`])\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.width;\n const height =\n sizes.height || element.clientHeight || result.height;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop);\n const marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getReferenceNode from './getReferenceNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\nimport getReferenceNode from './getReferenceNode';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n constructor(reference, popper, options = {}) {\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = { ...Popper.Defaults, ...options };\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: [],\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n scheduleUpdate = () => requestAnimationFrame(this.update);\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\n}\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z\"\n}), 'FileCopy');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z\"\n}), 'ImportExport');\n\nexports.default = _default;","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export var COMMON_MIME_TYPES = new Map([\n ['avi', 'video/avi'],\n ['gif', 'image/gif'],\n ['ico', 'image/x-icon'],\n ['jpeg', 'image/jpeg'],\n ['jpg', 'image/jpeg'],\n ['mkv', 'video/x-matroska'],\n ['mov', 'video/quicktime'],\n ['mp4', 'video/mp4'],\n ['pdf', 'application/pdf'],\n ['png', 'image/png'],\n ['zip', 'application/zip'],\n ['doc', 'application/msword'],\n ['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document']\n]);\nexport function toFileWithPath(file, path) {\n var f = withMimeType(file);\n if (typeof f.path !== 'string') { // on electron, path is already set to the absolute path\n var webkitRelativePath = file.webkitRelativePath;\n Object.defineProperty(f, 'path', {\n value: typeof path === 'string'\n ? path\n // If is set,\n // the File will have a {webkitRelativePath} property\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory\n : typeof webkitRelativePath === 'string' && webkitRelativePath.length > 0\n ? webkitRelativePath\n : file.name,\n writable: false,\n configurable: false,\n enumerable: true\n });\n }\n return f;\n}\nfunction withMimeType(file) {\n var name = file.name;\n var hasExtension = name && name.lastIndexOf('.') !== -1;\n if (hasExtension && !file.type) {\n var ext = name.split('.')\n .pop().toLowerCase();\n var type = COMMON_MIME_TYPES.get(ext);\n if (type) {\n Object.defineProperty(file, 'type', {\n value: type,\n writable: false,\n configurable: false,\n enumerable: true\n });\n }\n }\n return file;\n}\n//# sourceMappingURL=file.js.map","import { __awaiter, __generator, __read, __spread } from \"tslib\";\nimport { toFileWithPath } from './file';\nvar FILES_TO_IGNORE = [\n // Thumbnail cache files for macOS and Windows\n '.DS_Store',\n 'Thumbs.db' // Windows\n];\n/**\n * Convert a DragEvent's DataTrasfer object to a list of File objects\n * NOTE: If some of the items are folders,\n * everything will be flattened and placed in the same list but the paths will be kept as a {path} property.\n * @param evt\n */\nexport function fromEvent(evt) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, isDragEvt(evt) && evt.dataTransfer\n ? getDataTransferFiles(evt.dataTransfer, evt.type)\n : getInputFiles(evt)];\n });\n });\n}\nfunction isDragEvt(value) {\n return !!value.dataTransfer;\n}\nfunction getInputFiles(evt) {\n var files = isInput(evt.target)\n ? evt.target.files\n ? fromList(evt.target.files)\n : []\n : [];\n return files.map(function (file) { return toFileWithPath(file); });\n}\nfunction isInput(value) {\n return value !== null;\n}\nfunction getDataTransferFiles(dt, type) {\n return __awaiter(this, void 0, void 0, function () {\n var items, files;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!dt.items) return [3 /*break*/, 2];\n items = fromList(dt.items)\n .filter(function (item) { return item.kind === 'file'; });\n // According to https://html.spec.whatwg.org/multipage/dnd.html#dndevents,\n // only 'dragstart' and 'drop' has access to the data (source node)\n if (type !== 'drop') {\n return [2 /*return*/, items];\n }\n return [4 /*yield*/, Promise.all(items.map(toFilePromises))];\n case 1:\n files = _a.sent();\n return [2 /*return*/, noIgnoredFiles(flatten(files))];\n case 2: return [2 /*return*/, noIgnoredFiles(fromList(dt.files)\n .map(function (file) { return toFileWithPath(file); }))];\n }\n });\n });\n}\nfunction noIgnoredFiles(files) {\n return files.filter(function (file) { return FILES_TO_IGNORE.indexOf(file.name) === -1; });\n}\n// IE11 does not support Array.from()\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Browser_compatibility\n// https://developer.mozilla.org/en-US/docs/Web/API/FileList\n// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList\nfunction fromList(items) {\n var files = [];\n // tslint:disable: prefer-for-of\n for (var i = 0; i < items.length; i++) {\n var file = items[i];\n files.push(file);\n }\n return files;\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem\nfunction toFilePromises(item) {\n if (typeof item.webkitGetAsEntry !== 'function') {\n return fromDataTransferItem(item);\n }\n var entry = item.webkitGetAsEntry();\n // Safari supports dropping an image node from a different window and can be retrieved using\n // the DataTransferItem.getAsFile() API\n // NOTE: FileSystemEntry.file() throws if trying to get the file\n if (entry && entry.isDirectory) {\n return fromDirEntry(entry);\n }\n return fromDataTransferItem(item);\n}\nfunction flatten(items) {\n return items.reduce(function (acc, files) { return __spread(acc, (Array.isArray(files) ? flatten(files) : [files])); }, []);\n}\nfunction fromDataTransferItem(item) {\n var file = item.getAsFile();\n if (!file) {\n return Promise.reject(item + \" is not a File\");\n }\n var fwp = toFileWithPath(file);\n return Promise.resolve(fwp);\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry\nfunction fromEntry(entry) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry)];\n });\n });\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry\nfunction fromDirEntry(entry) {\n var reader = entry.createReader();\n return new Promise(function (resolve, reject) {\n var entries = [];\n function readEntries() {\n var _this = this;\n // https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry/createReader\n // https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader/readEntries\n reader.readEntries(function (batch) { return __awaiter(_this, void 0, void 0, function () {\n var files, err_1, items;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!batch.length) return [3 /*break*/, 5];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, Promise.all(entries)];\n case 2:\n files = _a.sent();\n resolve(files);\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n reject(err_1);\n return [3 /*break*/, 4];\n case 4: return [3 /*break*/, 6];\n case 5:\n items = Promise.all(batch.map(fromEntry));\n entries.push(items);\n // Continue reading\n readEntries();\n _a.label = 6;\n case 6: return [2 /*return*/];\n }\n });\n }); }, function (err) {\n reject(err);\n });\n }\n readEntries();\n });\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry\nfunction fromFileEntry(entry) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n entry.file(function (file) {\n var fwp = toFileWithPath(file, entry.fullPath);\n resolve(fwp);\n }, function (err) {\n reject(err);\n });\n })];\n });\n });\n}\n//# sourceMappingURL=file-selector.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport accepts from 'attr-accept'; // Error codes\n\nexport var FILE_INVALID_TYPE = 'file-invalid-type';\nexport var FILE_TOO_LARGE = 'file-too-large';\nexport var FILE_TOO_SMALL = 'file-too-small';\nexport var TOO_MANY_FILES = 'too-many-files';\nexport var ErrorCode = {\n FileInvalidType: FILE_INVALID_TYPE,\n FileTooLarge: FILE_TOO_LARGE,\n FileTooSmall: FILE_TOO_SMALL,\n TooManyFiles: TOO_MANY_FILES\n}; // File Errors\n\nexport var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr(accept) {\n accept = Array.isArray(accept) && accept.length === 1 ? accept[0] : accept;\n var messageSuffix = Array.isArray(accept) ? \"one of \".concat(accept.join(', ')) : accept;\n return {\n code: FILE_INVALID_TYPE,\n message: \"File type must be \".concat(messageSuffix)\n };\n};\nexport var getTooLargeRejectionErr = function getTooLargeRejectionErr(maxSize) {\n return {\n code: FILE_TOO_LARGE,\n message: \"File is larger than \".concat(maxSize, \" bytes\")\n };\n};\nexport var getTooSmallRejectionErr = function getTooSmallRejectionErr(minSize) {\n return {\n code: FILE_TOO_SMALL,\n message: \"File is smaller than \".concat(minSize, \" bytes\")\n };\n};\nexport var TOO_MANY_FILES_REJECTION = {\n code: TOO_MANY_FILES,\n message: 'Too many files'\n}; // Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with\n// that MIME type will always be accepted\n\nexport function fileAccepted(file, accept) {\n var isAcceptable = file.type === 'application/x-moz-file' || accepts(file, accept);\n return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];\n}\nexport function fileMatchSize(file, minSize, maxSize) {\n if (isDefined(file.size)) {\n if (isDefined(minSize) && isDefined(maxSize)) {\n if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];\n } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n }\n\n return [true, null];\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n\nexport function allFilesAccepted(_ref) {\n var files = _ref.files,\n accept = _ref.accept,\n minSize = _ref.minSize,\n maxSize = _ref.maxSize,\n multiple = _ref.multiple,\n maxFiles = _ref.maxFiles;\n\n if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {\n return false;\n }\n\n return files.every(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 1),\n accepted = _fileAccepted2[0];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 1),\n sizeMatch = _fileMatchSize2[0];\n\n return accepted && sizeMatch;\n });\n} // React's synthetic events has event.isPropagationStopped,\n// but to remain compatibility with other libs (Preact) fall back\n// to check event.cancelBubble\n\nexport function isPropagationStopped(event) {\n if (typeof event.isPropagationStopped === 'function') {\n return event.isPropagationStopped();\n } else if (typeof event.cancelBubble !== 'undefined') {\n return event.cancelBubble;\n }\n\n return false;\n}\nexport function isEvtWithFiles(event) {\n if (!event.dataTransfer) {\n return !!event.target && !!event.target.files;\n } // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file\n\n\n return Array.prototype.some.call(event.dataTransfer.types, function (type) {\n return type === 'Files' || type === 'application/x-moz-file';\n });\n}\nexport function isKindFile(item) {\n return _typeof(item) === 'object' && item !== null && item.kind === 'file';\n} // allow the entire document to be a drag target\n\nexport function onDocumentDragOver(event) {\n event.preventDefault();\n}\n\nfunction isIe(userAgent) {\n return userAgent.indexOf('MSIE') !== -1 || userAgent.indexOf('Trident/') !== -1;\n}\n\nfunction isEdge(userAgent) {\n return userAgent.indexOf('Edge/') !== -1;\n}\n\nexport function isIeOrEdge() {\n var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.navigator.userAgent;\n return isIe(userAgent) || isEdge(userAgent);\n}\n/**\n * This is intended to be used to compose event handlers\n * They are executed in order until one of them calls `event.isPropagationStopped()`.\n * Note that the check is done on the first invoke too,\n * meaning that if propagation was stopped before invoking the fns,\n * no handlers will be executed.\n *\n * @param {Function} fns the event hanlder functions\n * @return {Function} the event handler to add to an element\n */\n\nexport function composeEventHandlers() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return fns.some(function (fn) {\n if (!isPropagationStopped(event) && fn) {\n fn.apply(void 0, [event].concat(args));\n }\n\n return isPropagationStopped(event);\n });\n };\n}","var _excluded = [\"children\"],\n _excluded2 = [\"open\"],\n _excluded3 = [\"refKey\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"onClick\", \"onDragEnter\", \"onDragOver\", \"onDragLeave\", \"onDrop\"],\n _excluded4 = [\"refKey\", \"onChange\", \"onClick\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* eslint prefer-template: 0 */\nimport React, { forwardRef, Fragment, useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { fromEvent } from 'file-selector';\nimport { allFilesAccepted, composeEventHandlers, fileAccepted, fileMatchSize, isEvtWithFiles, isIeOrEdge, isPropagationStopped, onDocumentDragOver, TOO_MANY_FILES_REJECTION } from './utils/index';\n/**\n * Convenience wrapper component for the `useDropzone` hook\n *\n * ```jsx\n * \n * {({getRootProps, getInputProps}) => (\n *
\n * \n *

Drag 'n' drop some files here, or click to select files

\n *
\n * )}\n *
\n * ```\n */\n\nvar Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n params = _objectWithoutProperties(_ref, _excluded);\n\n var _useDropzone = useDropzone(params),\n open = _useDropzone.open,\n props = _objectWithoutProperties(_useDropzone, _excluded2);\n\n useImperativeHandle(ref, function () {\n return {\n open: open\n };\n }, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element\n\n return /*#__PURE__*/React.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {\n open: open\n })));\n});\nDropzone.displayName = 'Dropzone'; // Add default props for react-docgen\n\nvar defaultProps = {\n disabled: false,\n getFilesFromEvent: fromEvent,\n maxSize: Infinity,\n minSize: 0,\n multiple: true,\n maxFiles: 0,\n preventDropOnDocument: true,\n noClick: false,\n noKeyboard: false,\n noDrag: false,\n noDragEventsBubbling: false,\n validator: null\n};\nDropzone.defaultProps = defaultProps;\nDropzone.propTypes = {\n /**\n * Render function that exposes the dropzone state and prop getter fns\n *\n * @param {object} params\n * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render\n * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render\n * @param {Function} params.open Open the native file selection dialog\n * @param {boolean} params.isFocused Dropzone area is in focus\n * @param {boolean} params.isFileDialogActive File dialog is opened\n * @param {boolean} params.isDragActive Active drag is in progress\n * @param {boolean} params.isDragAccept Dragged files are accepted\n * @param {boolean} params.isDragReject Some dragged files are rejected\n * @param {File[]} params.draggedFiles Files in active drag\n * @param {File[]} params.acceptedFiles Accepted files\n * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected\n */\n children: PropTypes.func,\n\n /**\n * Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n */\n accept: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * If true, disables click to open the native file selection dialog\n */\n noClick: PropTypes.bool,\n\n /**\n * If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n */\n noKeyboard: PropTypes.bool,\n\n /**\n * If true, disables drag 'n' drop\n */\n noDrag: PropTypes.bool,\n\n /**\n * If true, stops drag event propagation to parents\n */\n noDragEventsBubbling: PropTypes.bool,\n\n /**\n * Minimum file size (in bytes)\n */\n minSize: PropTypes.number,\n\n /**\n * Maximum file size (in bytes)\n */\n maxSize: PropTypes.number,\n\n /**\n * Maximum accepted number of files\n * The default value is 0 which means there is no limitation to how many files are accepted.\n */\n maxFiles: PropTypes.number,\n\n /**\n * Enable/disable the dropzone\n */\n disabled: PropTypes.bool,\n\n /**\n * Use this to provide a custom file aggregator\n *\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n getFilesFromEvent: PropTypes.func,\n\n /**\n * Cb for when closing the file dialog with no selection\n */\n onFileDialogCancel: PropTypes.func,\n\n /**\n * Cb for when the `dragenter` event occurs.\n *\n * @param {DragEvent} event\n */\n onDragEnter: PropTypes.func,\n\n /**\n * Cb for when the `dragleave` event occurs\n *\n * @param {DragEvent} event\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Cb for when the `dragover` event occurs\n *\n * @param {DragEvent} event\n */\n onDragOver: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n *\n * @param {File[]} acceptedFiles\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n onDrop: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n *\n * @param {File[]} files\n * @param {(DragEvent|Event)} event\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n *\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event\n */\n onDropRejected: PropTypes.func,\n\n /**\n * Custom validation function \n * @param {File} file\n * @returns {FileError|FileError[]}\n */\n validator: PropTypes.func\n};\nexport default Dropzone;\n/**\n * A function that is invoked for the `dragenter`,\n * `dragover` and `dragleave` events.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dragCb\n * @param {DragEvent} event\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dropCb\n * @param {File[]} acceptedFiles List of accepted files\n * @param {FileRejection[]} fileRejections List of rejected files and why they were rejected\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are files (such as link, text, etc.).\n *\n * @callback dropAcceptedCb\n * @param {File[]} files List of accepted files that meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n *\n * @callback dropRejectedCb\n * @param {File[]} files List of rejected files that do not meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is used aggregate files,\n * in a asynchronous fashion, from drag or input change events.\n *\n * @callback getFilesFromEvent\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n * @returns {(File[]|Promise)}\n */\n\n/**\n * An object with the current dropzone state and some helper functions.\n *\n * @typedef {object} DropzoneState\n * @property {Function} getRootProps Returns the props you should apply to the root drop container you render\n * @property {Function} getInputProps Returns the props you should apply to hidden file input you render\n * @property {Function} open Open the native file selection dialog\n * @property {boolean} isFocused Dropzone area is in focus\n * @property {boolean} isFileDialogActive File dialog is opened\n * @property {boolean} isDragActive Active drag is in progress\n * @property {boolean} isDragAccept Dragged files are accepted\n * @property {boolean} isDragReject Some dragged files are rejected\n * @property {File[]} draggedFiles Files in active drag\n * @property {File[]} acceptedFiles Accepted files\n * @property {FileRejection[]} fileRejections Rejected files and why they were rejected\n */\n\nvar initialState = {\n isFocused: false,\n isFileDialogActive: false,\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false,\n draggedFiles: [],\n acceptedFiles: [],\n fileRejections: []\n};\n/**\n * A React hook that creates a drag 'n' drop area.\n *\n * ```jsx\n * function MyDropzone(props) {\n * const {getRootProps, getInputProps} = useDropzone({\n * onDrop: acceptedFiles => {\n * // do something with the File objects, e.g. upload to some server\n * }\n * });\n * return (\n *
\n * \n *

Drag and drop some files here, or click to select files

\n *
\n * )\n * }\n * ```\n *\n * @function useDropzone\n *\n * @param {object} props\n * @param {string|string[]} [props.accept] Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n * @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window\n * @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog\n * @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n * @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop\n * @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents\n * @param {number} [props.minSize=0] Minimum file size (in bytes)\n * @param {number} [props.maxSize=Infinity] Maximum file size (in bytes)\n * @param {boolean} [props.disabled=false] Enable/disable the dropzone\n * @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator\n * @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection\n * @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs.\n * @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs\n * @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs\n * @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n * @param {dropAcceptedCb} [props.onDropAccepted]\n * @param {dropRejectedCb} [props.onDropRejected]\n *\n * @returns {DropzoneState}\n */\n\nexport function useDropzone() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _defaultProps$options = _objectSpread(_objectSpread({}, defaultProps), options),\n accept = _defaultProps$options.accept,\n disabled = _defaultProps$options.disabled,\n getFilesFromEvent = _defaultProps$options.getFilesFromEvent,\n maxSize = _defaultProps$options.maxSize,\n minSize = _defaultProps$options.minSize,\n multiple = _defaultProps$options.multiple,\n maxFiles = _defaultProps$options.maxFiles,\n onDragEnter = _defaultProps$options.onDragEnter,\n onDragLeave = _defaultProps$options.onDragLeave,\n onDragOver = _defaultProps$options.onDragOver,\n onDrop = _defaultProps$options.onDrop,\n onDropAccepted = _defaultProps$options.onDropAccepted,\n onDropRejected = _defaultProps$options.onDropRejected,\n onFileDialogCancel = _defaultProps$options.onFileDialogCancel,\n preventDropOnDocument = _defaultProps$options.preventDropOnDocument,\n noClick = _defaultProps$options.noClick,\n noKeyboard = _defaultProps$options.noKeyboard,\n noDrag = _defaultProps$options.noDrag,\n noDragEventsBubbling = _defaultProps$options.noDragEventsBubbling,\n validator = _defaultProps$options.validator;\n\n var rootRef = useRef(null);\n var inputRef = useRef(null);\n\n var _useReducer = useReducer(reducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n var isFocused = state.isFocused,\n isFileDialogActive = state.isFileDialogActive,\n draggedFiles = state.draggedFiles; // Fn for opening the file dialog programmatically\n\n var openFileDialog = useCallback(function () {\n if (inputRef.current) {\n dispatch({\n type: 'openDialog'\n });\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }, [dispatch]); // Update file dialog active state when the window is focused on\n\n var onWindowFocus = function onWindowFocus() {\n // Execute the timeout only if the file dialog is opened in the browser\n if (isFileDialogActive) {\n setTimeout(function () {\n if (inputRef.current) {\n var files = inputRef.current.files;\n\n if (!files.length) {\n dispatch({\n type: 'closeDialog'\n });\n\n if (typeof onFileDialogCancel === 'function') {\n onFileDialogCancel();\n }\n }\n }\n }, 300);\n }\n };\n\n useEffect(function () {\n window.addEventListener('focus', onWindowFocus, false);\n return function () {\n window.removeEventListener('focus', onWindowFocus, false);\n };\n }, [inputRef, isFileDialogActive, onFileDialogCancel]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone\n\n var onKeyDownCb = useCallback(function (event) {\n // Ignore keyboard events bubbling up the DOM tree\n if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {\n return;\n }\n\n if (event.keyCode === 32 || event.keyCode === 13) {\n event.preventDefault();\n openFileDialog();\n }\n }, [rootRef, inputRef]); // Update focus state for the dropzone\n\n var onFocusCb = useCallback(function () {\n dispatch({\n type: 'focus'\n });\n }, []);\n var onBlurCb = useCallback(function () {\n dispatch({\n type: 'blur'\n });\n }, []); // Cb to open the file dialog when click occurs on the dropzone\n\n var onClickCb = useCallback(function () {\n if (noClick) {\n return;\n } // In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()\n // to ensure React can handle state changes\n // See: https://github.com/react-dropzone/react-dropzone/issues/450\n\n\n if (isIeOrEdge()) {\n setTimeout(openFileDialog, 0);\n } else {\n openFileDialog();\n }\n }, [inputRef, noClick]);\n var dragTargetsRef = useRef([]);\n\n var onDocumentDrop = function onDocumentDrop(event) {\n if (rootRef.current && rootRef.current.contains(event.target)) {\n // If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return;\n }\n\n event.preventDefault();\n dragTargetsRef.current = [];\n };\n\n useEffect(function () {\n if (preventDropOnDocument) {\n document.addEventListener('dragover', onDocumentDragOver, false);\n document.addEventListener('drop', onDocumentDrop, false);\n }\n\n return function () {\n if (preventDropOnDocument) {\n document.removeEventListener('dragover', onDocumentDragOver);\n document.removeEventListener('drop', onDocumentDrop);\n }\n };\n }, [rootRef, preventDropOnDocument]);\n var onDragEnterCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (draggedFiles) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n dispatch({\n draggedFiles: draggedFiles,\n isDragActive: true,\n type: 'setDraggedFiles'\n });\n\n if (onDragEnter) {\n onDragEnter(event);\n }\n });\n }\n }, [getFilesFromEvent, onDragEnter, noDragEventsBubbling]);\n var onDragOverCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event);\n var hasFiles = isEvtWithFiles(event);\n\n if (hasFiles && event.dataTransfer) {\n try {\n event.dataTransfer.dropEffect = 'copy';\n } catch (_unused) {}\n /* eslint-disable-line no-empty */\n\n }\n\n if (hasFiles && onDragOver) {\n onDragOver(event);\n }\n\n return false;\n }, [onDragOver, noDragEventsBubbling]);\n var onDragLeaveCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event); // Only deactivate once the dropzone and all children have been left\n\n var targets = dragTargetsRef.current.filter(function (target) {\n return rootRef.current && rootRef.current.contains(target);\n }); // Make sure to remove a target present multiple times only once\n // (Firefox may fire dragenter/dragleave multiple times on the same element)\n\n var targetIdx = targets.indexOf(event.target);\n\n if (targetIdx !== -1) {\n targets.splice(targetIdx, 1);\n }\n\n dragTargetsRef.current = targets;\n\n if (targets.length > 0) {\n return;\n }\n\n dispatch({\n isDragActive: false,\n type: 'setDraggedFiles',\n draggedFiles: []\n });\n\n if (isEvtWithFiles(event) && onDragLeave) {\n onDragLeave(event);\n }\n }, [rootRef, onDragLeave, noDragEventsBubbling]);\n var onDropCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [];\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n var acceptedFiles = [];\n var fileRejections = [];\n files.forEach(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 2),\n accepted = _fileAccepted2[0],\n acceptError = _fileAccepted2[1];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2),\n sizeMatch = _fileMatchSize2[0],\n sizeError = _fileMatchSize2[1];\n\n var customErrors = validator ? validator(file) : null;\n\n if (accepted && sizeMatch && !customErrors) {\n acceptedFiles.push(file);\n } else {\n var errors = [acceptError, sizeError];\n\n if (customErrors) {\n errors = errors.concat(customErrors);\n }\n\n fileRejections.push({\n file: file,\n errors: errors.filter(function (e) {\n return e;\n })\n });\n }\n });\n\n if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {\n // Reject everything and empty accepted files\n acceptedFiles.forEach(function (file) {\n fileRejections.push({\n file: file,\n errors: [TOO_MANY_FILES_REJECTION]\n });\n });\n acceptedFiles.splice(0);\n }\n\n dispatch({\n acceptedFiles: acceptedFiles,\n fileRejections: fileRejections,\n type: 'setFiles'\n });\n\n if (onDrop) {\n onDrop(acceptedFiles, fileRejections, event);\n }\n\n if (fileRejections.length > 0 && onDropRejected) {\n onDropRejected(fileRejections, event);\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted(acceptedFiles, event);\n }\n });\n }\n\n dispatch({\n type: 'reset'\n });\n }, [multiple, accept, minSize, maxSize, maxFiles, getFilesFromEvent, onDrop, onDropAccepted, onDropRejected, noDragEventsBubbling, validator]);\n\n var composeHandler = function composeHandler(fn) {\n return disabled ? null : fn;\n };\n\n var composeKeyboardHandler = function composeKeyboardHandler(fn) {\n return noKeyboard ? null : composeHandler(fn);\n };\n\n var composeDragHandler = function composeDragHandler(fn) {\n return noDrag ? null : composeHandler(fn);\n };\n\n var stopPropagation = function stopPropagation(event) {\n if (noDragEventsBubbling) {\n event.stopPropagation();\n }\n };\n\n var getRootProps = useMemo(function () {\n return function () {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$refKey = _ref2.refKey,\n refKey = _ref2$refKey === void 0 ? 'ref' : _ref2$refKey,\n onKeyDown = _ref2.onKeyDown,\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick,\n onDragEnter = _ref2.onDragEnter,\n onDragOver = _ref2.onDragOver,\n onDragLeave = _ref2.onDragLeave,\n onDrop = _ref2.onDrop,\n rest = _objectWithoutProperties(_ref2, _excluded3);\n\n return _objectSpread(_objectSpread(_defineProperty({\n onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),\n onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),\n onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),\n onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter, onDragEnterCb)),\n onDragOver: composeDragHandler(composeEventHandlers(onDragOver, onDragOverCb)),\n onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave, onDragLeaveCb)),\n onDrop: composeDragHandler(composeEventHandlers(onDrop, onDropCb))\n }, refKey, rootRef), !disabled && !noKeyboard ? {\n tabIndex: 0\n } : {}), rest);\n };\n }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);\n var onInputElementClick = useCallback(function (event) {\n event.stopPropagation();\n }, []);\n var getInputProps = useMemo(function () {\n return function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n onChange = _ref3.onChange,\n onClick = _ref3.onClick,\n rest = _objectWithoutProperties(_ref3, _excluded4);\n\n var inputProps = _defineProperty({\n accept: accept,\n multiple: multiple,\n type: 'file',\n style: {\n display: 'none'\n },\n onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),\n autoComplete: 'off',\n tabIndex: -1\n }, refKey, inputRef);\n\n return _objectSpread(_objectSpread({}, inputProps), rest);\n };\n }, [inputRef, accept, multiple, onDropCb, disabled]);\n var fileCount = draggedFiles.length;\n var isDragAccept = fileCount > 0 && allFilesAccepted({\n files: draggedFiles,\n accept: accept,\n minSize: minSize,\n maxSize: maxSize,\n multiple: multiple,\n maxFiles: maxFiles\n });\n var isDragReject = fileCount > 0 && !isDragAccept;\n return _objectSpread(_objectSpread({}, state), {}, {\n isDragAccept: isDragAccept,\n isDragReject: isDragReject,\n isFocused: isFocused && !disabled,\n getRootProps: getRootProps,\n getInputProps: getInputProps,\n rootRef: rootRef,\n inputRef: inputRef,\n open: composeHandler(openFileDialog)\n });\n}\n\nfunction reducer(state, action) {\n /* istanbul ignore next */\n switch (action.type) {\n case 'focus':\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: true\n });\n\n case 'blur':\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: false\n });\n\n case 'openDialog':\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: true\n });\n\n case 'closeDialog':\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: false\n });\n\n case 'setDraggedFiles':\n /* eslint no-case-declarations: 0 */\n var isDragActive = action.isDragActive,\n draggedFiles = action.draggedFiles;\n return _objectSpread(_objectSpread({}, state), {}, {\n draggedFiles: draggedFiles,\n isDragActive: isDragActive\n });\n\n case 'setFiles':\n return _objectSpread(_objectSpread({}, state), {}, {\n acceptedFiles: action.acceptedFiles,\n fileRejections: action.fileRejections\n });\n\n case 'reset':\n return _objectSpread({}, initialState);\n\n default:\n return state;\n }\n}\n\nexport { ErrorCode } from './utils';","import superPropBase from \"@babel/runtime/helpers/esm/superPropBase\";\nexport default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}","import getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","import nested from '../ThemeProvider/nested';\n/**\n * This is the list of the style rule name we use as drop in replacement for the built-in\n * pseudo classes (:checked, :disabled, :focused, etc.).\n *\n * Why do they exist in the first place?\n * These classes are used at a specificity of 2.\n * It allows them to override previously definied styles as well as\n * being untouched by simple user overrides.\n */\n\nvar pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters.\n// When new generator function is created, rule counter is reset.\n// We need to reset the rule counter for SSR for each request.\n//\n// It's inspired by\n// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js\n\nexport default function createGenerateClassName() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$disableGloba = options.disableGlobal,\n disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,\n _options$productionPr = options.productionPrefix,\n productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,\n _options$seed = options.seed,\n seed = _options$seed === void 0 ? '' : _options$seed;\n var seedPrefix = seed === '' ? '' : \"\".concat(seed, \"-\");\n var ruleCounter = 0;\n\n var getNextCounterId = function getNextCounterId() {\n ruleCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (ruleCounter >= 1e10) {\n console.warn(['Material-UI: You might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join(''));\n }\n }\n\n return ruleCounter;\n };\n\n return function (rule, styleSheet) {\n var name = styleSheet.options.name; // Is a global static MUI style?\n\n if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {\n // We can use a shorthand class name, we never use the keys to style the components.\n if (pseudoClasses.indexOf(rule.key) !== -1) {\n return \"Mui-\".concat(rule.key);\n }\n\n var prefix = \"\".concat(seedPrefix).concat(name, \"-\").concat(rule.key);\n\n if (!styleSheet.options.theme[nested] || seed !== '') {\n return prefix;\n }\n\n return \"\".concat(prefix, \"-\").concat(getNextCounterId());\n }\n\n if (process.env.NODE_ENV === 'production') {\n return \"\".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId());\n }\n\n var suffix = \"\".concat(rule.key, \"-\").concat(getNextCounterId()); // Help with debuggability.\n\n if (styleSheet.options.classNamePrefix) {\n return \"\".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, \"-\").concat(suffix);\n }\n\n return \"\".concat(seedPrefix).concat(suffix);\n };\n}","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport { elementAcceptingRef, exactProp } from '@material-ui/utils';\n\nfunction mapEventPropToEvent(eventProp) {\n return eventProp.substring(2).toLowerCase();\n}\n\nfunction clickedRootScrollbar(event) {\n return document.documentElement.clientWidth < event.clientX || document.documentElement.clientHeight < event.clientY;\n}\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n */\n\n\nfunction ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = React.useRef(false);\n var nodeRef = React.useRef(null);\n var activatedRef = React.useRef(false);\n var syntheticEventRef = React.useRef(false);\n React.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = useEventCallback(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = ownerDocument(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n React.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = ownerDocument(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n React.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = ownerDocument(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ClickAwayListener.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The wrapped element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * If `true`, the React tree is ignored and only the DOM tree is considered.\n * This prop changes how portaled elements are handled.\n */\n disableReactTree: PropTypes.bool,\n\n /**\n * The mouse event to listen to. You can disable the listener by providing `false`.\n */\n mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]),\n\n /**\n * Callback fired when a \"click away\" event is detected.\n */\n onClickAway: PropTypes.func.isRequired,\n\n /**\n * The touch event to listen to. You can disable the listener by providing `false`.\n */\n touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);\n}\n\nexport default ClickAwayListener;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nvar styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\nvar defaultTimeout = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The Fade transition is used by the [Modal](/components/modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"TransitionComponent\", \"timeout\"]);\n\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport InputBase from '../InputBase';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {\n 'label + &': {\n marginTop: 16\n }\n },\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if color secondary. */\n colorSecondary: {\n '&$underline:after': {\n borderBottomColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if `disableUnderline={false}`. */\n underline: {\n '&:after': {\n borderBottom: \"2px solid \".concat(theme.palette.primary.main),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&$focused:after': {\n transform: 'scaleX(1)'\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: \"1px solid \".concat(bottomLineColor),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&:hover:not($disabled):before': {\n borderBottom: \"2px solid \".concat(theme.palette.text.primary),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: \"1px solid \".concat(bottomLineColor)\n }\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted'\n }\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {},\n\n /* Styles applied to the `input` element. */\n input: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {},\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {},\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {}\n };\n};\nvar Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {\n var disableUnderline = props.disableUnderline,\n classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = _objectWithoutProperties(props, [\"disableUnderline\", \"classes\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"]);\n\n return /*#__PURE__*/React.createElement(InputBase, _extends({\n classes: _extends({}, classes, {\n root: clsx(classes.root, !disableUnderline && classes.underline),\n underline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nInput.muiName = 'Input';\nexport default withStyles(styles, {\n name: 'MuiInput'\n})(Input);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n\n/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport formControlState from '../FormControl/formControlState';\nimport FormControlContext, { useFormControl } from '../FormControl/FormControlContext';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport useForkRef from '../utils/useForkRef';\nimport TextareaAutosize from '../TextareaAutosize';\nimport { isFilled } from './utils';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n var placeholderHidden = {\n opacity: '0 !important'\n };\n var placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return {\n '@global': {\n '@keyframes mui-auto-fill': {},\n '@keyframes mui-auto-fill-cancel': {}\n },\n\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.1876em',\n // Reset (19px), match the native input line-height\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n '&$disabled': {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n }),\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {},\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {},\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n '&$marginDense': {\n paddingTop: 4 - 1\n }\n },\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the `input` element. */\n input: {\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.1876em',\n // Reset (19px), match the native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE 11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE 11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n '-webkit-appearance': 'none'\n },\n // Show and hide the placeholder logic\n 'label[data-shrink=false] + $formControl &': {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE 11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE 11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n '&$disabled': {\n opacity: 1 // Reset iOS opacity\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 4 - 1\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n height: 'auto',\n resize: 'none',\n padding: 0\n },\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {\n // Improve type search style.\n '-moz-appearance': 'textfield',\n '-webkit-appearance': 'textfield'\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {},\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {},\n\n /* Styles applied to the `input` element if `hiddenLabel={true}`. */\n inputHiddenLabel: {}\n };\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\nvar InputBase = /*#__PURE__*/React.forwardRef(function InputBase(props, ref) {\n var ariaDescribedby = props['aria-describedby'],\n autoComplete = props.autoComplete,\n autoFocus = props.autoFocus,\n classes = props.classes,\n className = props.className,\n color = props.color,\n defaultValue = props.defaultValue,\n disabled = props.disabled,\n endAdornment = props.endAdornment,\n error = props.error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n id = props.id,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$inputProps = props.inputProps,\n inputPropsProp = _props$inputProps === void 0 ? {} : _props$inputProps,\n inputRefProp = props.inputRef,\n margin = props.margin,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n placeholder = props.placeholder,\n readOnly = props.readOnly,\n renderSuffix = props.renderSuffix,\n rows = props.rows,\n rowsMax = props.rowsMax,\n rowsMin = props.rowsMin,\n maxRows = props.maxRows,\n minRows = props.minRows,\n startAdornment = props.startAdornment,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n valueProp = props.value,\n other = _objectWithoutProperties(props, [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"classes\", \"className\", \"color\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"rowsMax\", \"rowsMin\", \"maxRows\", \"minRows\", \"startAdornment\", \"type\", \"value\"]);\n\n var value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n\n var _React$useRef = React.useRef(value != null),\n isControlled = _React$useRef.current;\n\n var inputRef = React.useRef();\n var handleInputRefWarning = React.useCallback(function (instance) {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['Material-UI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `inputRef` prop.', 'Make sure the `inputRef` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n var handleInputPropsRefProp = useForkRef(inputPropsProp.ref, handleInputRefWarning);\n var handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);\n var handleInputRef = useForkRef(inputRef, handleInputRefProp);\n\n var _React$useState = React.useState(false),\n focused = _React$useState[0],\n setFocused = _React$useState[1];\n\n var muiFormControl = useFormControl();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(function () {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'margin', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n React.useEffect(function () {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n var onFilled = muiFormControl && muiFormControl.onFilled;\n var onEmpty = muiFormControl && muiFormControl.onEmpty;\n var checkDirty = React.useCallback(function (obj) {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(function () {\n if (isControlled) {\n checkDirty({\n value: value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n var handleFocus = function handleFocus(event) {\n // Fix a bug with IE 11 where the focus/blur events are triggered\n // while the input is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n var handleChange = function handleChange(event) {\n if (!isControlled) {\n var element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.\" : _formatMuiErrorMessage(1));\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange.apply(inputPropsProp, [event].concat(args));\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange.apply(void 0, [event].concat(args));\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n React.useEffect(function () {\n checkDirty(inputRef.current);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n var handleClick = function handleClick(event) {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var InputComponent = inputComponent;\n\n var inputProps = _extends({}, inputPropsProp, {\n ref: handleInputRef\n });\n\n if (typeof InputComponent !== 'string') {\n inputProps = _extends({\n // Rename ref to inputRef as we don't know the\n // provided `inputComponent` structure.\n inputRef: handleInputRef,\n type: type\n }, inputProps, {\n ref: null\n });\n } else if (multiline) {\n if (rows && !maxRows && !minRows && !rowsMax && !rowsMin) {\n InputComponent = 'textarea';\n } else {\n inputProps = _extends({\n minRows: rows || minRows,\n rowsMax: rowsMax,\n maxRows: maxRows\n }, inputProps);\n InputComponent = TextareaAutosize;\n }\n } else {\n inputProps = _extends({\n type: type\n }, inputProps);\n }\n\n var handleAutoFill = function handleAutoFill(event) {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n React.useEffect(function () {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fullWidth && classes.fullWidth, fcs.focused && classes.focused, muiFormControl && classes.formControl, multiline && classes.multiline, startAdornment && classes.adornedStart, endAdornment && classes.adornedEnd, fcs.margin === 'dense' && classes.marginDense),\n onClick: handleClick,\n ref: ref\n }, other), startAdornment, /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: null\n }, /*#__PURE__*/React.createElement(InputComponent, _extends({\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp\n }, inputProps, {\n className: clsx(classes.input, inputPropsProp.className, fcs.disabled && classes.disabled, multiline && classes.inputMultiline, fcs.hiddenLabel && classes.inputHiddenLabel, startAdornment && classes.inputAdornedStart, endAdornment && classes.inputAdornedEnd, type === 'search' && classes.inputTypeSearch, fcs.margin === 'dense' && classes.inputMarginDense),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))), endAdornment, renderSuffix ? renderSuffix(_extends({}, fcs, {\n startAdornment: startAdornment\n })) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the input is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Maximum number of rows to display.\n * @deprecated Use `maxRows` instead.\n */\n rowsMax: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display.\n * @deprecated Use `minRows` instead.\n */\n rowsMin: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiInputBase'\n})(InputBase);","import warning from 'tiny-warning';\nimport { createRule } from 'jss';\n\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\n\nvar functionPlugin = function functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = createRule(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n }\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule;\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (process.env.NODE_ENV === 'development') {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;\n break;\n }\n }\n }\n }\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n};\n\nexport default functionPlugin;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { RuleList } from 'jss';\n\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule =\n/*#__PURE__*/\nfunction () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (rule) this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString() {\n return this.rules.toString();\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule =\n/*#__PURE__*/\nfunction () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, _extends({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n sheet.addRule(name, rules[name], _extends({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n sheet.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule, sheet) {\n if (rule.type !== 'style' || !sheet) return;\n handleNestedGlobalContainerRule(rule, sheet);\n handlePrefixedGlobalRule(rule, sheet);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\nexport default jssGlobal;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport warning from 'tiny-warning';\n\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n return rule.selector;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : void 0;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return _extends({}, prevOptions, {\n index: prevOptions.index + 1\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = _extends({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n container.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\nexport default jssNested;\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n","import { hasCSSTOMSupport } from 'jss';\n\nvar px = hasCSSTOMSupport && CSS ? CSS.px : 'px';\nvar ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';\nvar percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n 'border-block': px,\n 'border-block-end': px,\n 'border-block-end-width': px,\n 'border-block-start': px,\n 'border-block-start-width': px,\n 'border-block-width': px,\n 'border-inline': px,\n 'border-inline-end': px,\n 'border-inline-end-width': px,\n 'border-inline-start': px,\n 'border-inline-start-width': px,\n 'border-inline-width': px,\n 'border-start-start-radius': px,\n 'border-start-end-radius': px,\n 'border-end-start-radius': px,\n 'border-end-end-radius': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n 'margin-block': px,\n 'margin-block-end': px,\n 'margin-block-start': px,\n 'margin-inline': px,\n 'margin-inline-end': px,\n 'margin-inline-start': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n 'padding-block': px,\n 'padding-block-end': px,\n 'padding-block-start': px,\n 'padding-inline': px,\n 'padding-inline-end': px,\n 'padding-inline-start': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n inset: px,\n 'inset-block': px,\n 'inset-block-end': px,\n 'inset-block-start': px,\n 'inset-inline': px,\n 'inset-inline-end': px,\n 'inset-inline-start': px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-decoration-thickness': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n gap: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'row-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n\n/**\n * Clones the object and adds a camel cased property version.\n */\n\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (value == null) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n } // eslint-disable-next-line no-restricted-globals\n\n } else if (typeof value === 'number' && isNaN(value) === false) {\n var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.\n\n if (unit && !(value === 0 && unit === px)) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default defaultUnit;\n","import isInBrowser from 'is-in-browser';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\n\n// Export javascript style and css style vendor prefixes.\nvar js = '';\nvar css = '';\nvar vendor = '';\nvar browser = '';\nvar isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.\n\nif (isInBrowser) {\n // Order matters. We need to check Webkit the last one because\n // other vendors use to add Webkit prefixes to some properties\n var jsCssMap = {\n Moz: '-moz-',\n ms: '-ms-',\n O: '-o-',\n Webkit: '-webkit-'\n };\n\n var _document$createEleme = document.createElement('p'),\n style = _document$createEleme.style;\n\n var testProp = 'Transform';\n\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n js = key;\n css = jsCssMap[key];\n break;\n }\n } // Correctly detect the Edge browser.\n\n\n if (js === 'Webkit' && 'msHyphens' in style) {\n js = 'ms';\n css = jsCssMap.ms;\n browser = 'edge';\n } // Correctly detect the Safari browser.\n\n\n if (js === 'Webkit' && '-apple-trailing-word' in style) {\n vendor = 'apple';\n }\n}\n/**\n * Vendor prefix string for the current browser.\n *\n * @type {{js: String, css: String, vendor: String, browser: String}}\n * @api public\n */\n\n\nvar prefix = {\n js: js,\n css: css,\n vendor: vendor,\n browser: browser,\n isTouch: isTouch\n};\n\n/**\n * Test if a keyframe at-rule should be prefixed or not\n *\n * @param {String} vendor prefix string for the current browser.\n * @return {String}\n * @api public\n */\n\nfunction supportedKeyframes(key) {\n // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'\n if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.\n // https://caniuse.com/#search=keyframes\n\n if (prefix.js === 'ms') return key;\n return \"@\" + prefix.css + \"keyframes\" + key.substr(10);\n}\n\n// https://caniuse.com/#search=appearance\n\nvar appearence = {\n noPrefill: ['appearance'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'appearance') return false;\n if (prefix.js === 'ms') return \"-webkit-\" + prop;\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=color-adjust\n\nvar colorAdjust = {\n noPrefill: ['color-adjust'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'color-adjust') return false;\n if (prefix.js === 'Webkit') return prefix.css + \"print-\" + prop;\n return prop;\n }\n};\n\nvar regExp = /[-\\s]+(.)?/g;\n/**\n * Replaces the letter with the capital letter\n *\n * @param {String} match\n * @param {String} c\n * @return {String}\n * @api private\n */\n\nfunction toUpper(match, c) {\n return c ? c.toUpperCase() : '';\n}\n/**\n * Convert dash separated strings to camel-cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction camelize(str) {\n return str.replace(regExp, toUpper);\n}\n\n/**\n * Convert dash separated strings to pascal cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction pascalize(str) {\n return camelize(\"-\" + str);\n}\n\n// but we can use a longhand property instead.\n// https://caniuse.com/#search=mask\n\nvar mask = {\n noPrefill: ['mask'],\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^mask/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var longhand = 'mask-image';\n\n if (camelize(longhand) in style) {\n return prop;\n }\n\n if (prefix.js + pascalize(longhand) in style) {\n return prefix.css + prop;\n }\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=text-orientation\n\nvar textOrientation = {\n noPrefill: ['text-orientation'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'text-orientation') return false;\n\n if (prefix.vendor === 'apple' && !prefix.isTouch) {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=transform\n\nvar transform = {\n noPrefill: ['transform'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transform') return false;\n\n if (options.transform) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=transition\n\nvar transition = {\n noPrefill: ['transition'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transition') return false;\n\n if (options.transition) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=writing-mode\n\nvar writingMode = {\n noPrefill: ['writing-mode'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'writing-mode') return false;\n\n if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=user-select\n\nvar userSelect = {\n noPrefill: ['user-select'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'user-select') return false;\n\n if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=multicolumn\n// https://github.com/postcss/autoprefixer/issues/491\n// https://github.com/postcss/autoprefixer/issues/177\n\nvar breakPropsOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^break-/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var jsProp = \"WebkitColumn\" + pascalize(prop);\n return jsProp in style ? prefix.css + \"column-\" + prop : false;\n }\n\n if (prefix.js === 'Moz') {\n var _jsProp = \"page\" + pascalize(prop);\n\n return _jsProp in style ? \"page-\" + prop : false;\n }\n\n return false;\n }\n};\n\n// See https://github.com/postcss/autoprefixer/issues/324.\n\nvar inlineLogicalOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^(border|margin|padding)-inline/.test(prop)) return false;\n if (prefix.js === 'Moz') return prop;\n var newProp = prop.replace('-inline', '');\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\n// Camelization is required because we can't test using.\n// CSS syntax for e.g. in FF.\n\nvar unprefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n return camelize(prop) in style ? prop : false;\n }\n};\n\nvar prefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.\n\n if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.\n\n if (prop[0] === '-' && prop[1] === '-') return prop;\n if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.\n\n if (prefix.js !== 'Webkit' && \"Webkit\" + pascalized in style) return \"-webkit-\" + prop;\n return false;\n }\n};\n\n// https://caniuse.com/#search=scroll-snap\n\nvar scrollSnap = {\n supportedProperty: function supportedProperty(prop) {\n if (prop.substring(0, 11) !== 'scroll-snap') return false;\n\n if (prefix.js === 'ms') {\n return \"\" + prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=overscroll-behavior\n\nvar overscrollBehavior = {\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'overscroll-behavior') return false;\n\n if (prefix.js === 'ms') {\n return prefix.css + \"scroll-chaining\";\n }\n\n return prop;\n }\n};\n\nvar propMap = {\n 'flex-grow': 'flex-positive',\n 'flex-shrink': 'flex-negative',\n 'flex-basis': 'flex-preferred-size',\n 'justify-content': 'flex-pack',\n order: 'flex-order',\n 'align-items': 'flex-align',\n 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.\n\n}; // Support old flex spec from 2012.\n\nvar flex2012 = {\n supportedProperty: function supportedProperty(prop, style) {\n var newProp = propMap[prop];\n if (!newProp) return false;\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\nvar propMap$1 = {\n flex: 'box-flex',\n 'flex-grow': 'box-flex',\n 'flex-direction': ['box-orient', 'box-direction'],\n order: 'box-ordinal-group',\n 'align-items': 'box-align',\n 'flex-flow': ['box-orient', 'box-direction'],\n 'justify-content': 'box-pack'\n};\nvar propKeys = Object.keys(propMap$1);\n\nvar prefixCss = function prefixCss(p) {\n return prefix.css + p;\n}; // Support old flex spec from 2009.\n\n\nvar flex2009 = {\n supportedProperty: function supportedProperty(prop, style, _ref) {\n var multiple = _ref.multiple;\n\n if (propKeys.indexOf(prop) > -1) {\n var newProp = propMap$1[prop];\n\n if (!Array.isArray(newProp)) {\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n\n if (!multiple) return false;\n\n for (var i = 0; i < newProp.length; i++) {\n if (!(prefix.js + pascalize(newProp[0]) in style)) {\n return false;\n }\n }\n\n return newProp.map(prefixCss);\n }\n\n return false;\n }\n};\n\n// plugins = [\n// ...plugins,\n// breakPropsOld,\n// inlineLogicalOld,\n// unprefixed,\n// prefixed,\n// scrollSnap,\n// flex2012,\n// flex2009\n// ]\n// Plugins without 'noPrefill' value, going last.\n// 'flex-*' plugins should be at the bottom.\n// 'flex2009' going after 'flex2012'.\n// 'prefixed' going after 'unprefixed'\n\nvar plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];\nvar propertyDetectors = plugins.filter(function (p) {\n return p.supportedProperty;\n}).map(function (p) {\n return p.supportedProperty;\n});\nvar noPrefill = plugins.filter(function (p) {\n return p.noPrefill;\n}).reduce(function (a, p) {\n a.push.apply(a, _toConsumableArray(p.noPrefill));\n return a;\n}, []);\n\nvar el;\nvar cache = {};\n\nif (isInBrowser) {\n el = document.createElement('p'); // We test every property on vendor prefix requirement.\n // Once tested, result is cached. It gives us up to 70% perf boost.\n // http://jsperf.com/element-style-object-access-vs-plain-object\n //\n // Prefill cache with known css properties to reduce amount of\n // properties we need to feature test at runtime.\n // http://davidwalsh.name/vendor-prefix\n\n var computed = window.getComputedStyle(document.documentElement, '');\n\n for (var key$1 in computed) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];\n } // Properties that cannot be correctly detected using the\n // cache prefill method.\n\n\n noPrefill.forEach(function (x) {\n return delete cache[x];\n });\n}\n/**\n * Test if a property is supported, returns supported property with vendor\n * prefix if required. Returns `false` if not supported.\n *\n * @param {String} prop dash separated\n * @param {Object} [options]\n * @return {String|Boolean}\n * @api public\n */\n\n\nfunction supportedProperty(prop, options) {\n if (options === void 0) {\n options = {};\n }\n\n // For server-side rendering.\n if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {\n return cache[prop];\n } // Check if 'transition' or 'transform' natively supported in browser.\n\n\n if (prop === 'transition' || prop === 'transform') {\n options[prop] = prop in el.style;\n } // Find a plugin for current prefix property.\n\n\n for (var i = 0; i < propertyDetectors.length; i++) {\n cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.\n\n if (cache[prop]) break;\n } // Reset styles for current property.\n // Firefox can even throw an error for invalid properties, e.g., \"0\".\n\n\n try {\n el.style[prop] = '';\n } catch (err) {\n return false;\n }\n\n return cache[prop];\n}\n\nvar cache$1 = {};\nvar transitionProperties = {\n transition: 1,\n 'transition-property': 1,\n '-webkit-transition': 1,\n '-webkit-transition-property': 1\n};\nvar transPropsRegExp = /(^\\s*[\\w-]+)|, (\\s*[\\w-]+)(?![^()]*\\))/g;\nvar el$1;\n/**\n * Returns prefixed value transition/transform if needed.\n *\n * @param {String} match\n * @param {String} p1\n * @param {String} p2\n * @return {String}\n * @api private\n */\n\nfunction prefixTransitionCallback(match, p1, p2) {\n if (p1 === 'var') return 'var';\n if (p1 === 'all') return 'all';\n if (p2 === 'all') return ', all';\n var prefixedValue = p1 ? supportedProperty(p1) : \", \" + supportedProperty(p2);\n if (!prefixedValue) return p1 || p2;\n return prefixedValue;\n}\n\nif (isInBrowser) el$1 = document.createElement('p');\n/**\n * Returns prefixed value if needed. Returns `false` if value is not supported.\n *\n * @param {String} property\n * @param {String} value\n * @return {String|Boolean}\n * @api public\n */\n\nfunction supportedValue(property, value) {\n // For server-side rendering.\n var prefixedValue = value;\n if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.\n // We want only prefixable values here.\n // eslint-disable-next-line no-restricted-globals\n\n if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {\n return prefixedValue;\n } // Create cache key for current value.\n\n\n var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {\n return cache$1[cacheKey];\n } // IE can even throw an error in some cases, for e.g. style.content = 'bar'.\n\n\n try {\n // Test value as it is.\n el$1.style[property] = prefixedValue;\n } catch (err) {\n // Return false if value not supported.\n cache$1[cacheKey] = false;\n return false;\n } // If 'transition' or 'transition-property' property.\n\n\n if (transitionProperties[property]) {\n prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);\n } else if (el$1.style[property] === '') {\n // Value with a vendor prefix.\n prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert \"flex\" to \"-ms-flexbox\" for IE10.\n\n if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.\n\n el$1.style[property] = prefixedValue; // Return false if value not supported.\n\n if (el$1.style[property] === '') {\n cache$1[cacheKey] = false;\n return false;\n }\n } // Reset styles for current property.\n\n\n el$1.style[property] = ''; // Write current value to cache.\n\n cache$1[cacheKey] = prefixedValue;\n return cache$1[cacheKey];\n}\n\nexport { prefix, supportedKeyframes, supportedProperty, supportedValue };\n","import { supportedKeyframes, supportedValue, supportedProperty } from 'css-vendor';\nimport { toCssValue } from 'jss';\n\n/**\n * Add vendor prefix to a property name when needed.\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = supportedKeyframes(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = supportedProperty(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return supportedValue(prop, toCssValue(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default jssVendorPrefixer;\n","/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;\n","import functions from 'jss-plugin-rule-value-function';\nimport global from 'jss-plugin-global';\nimport nested from 'jss-plugin-nested';\nimport camelCase from 'jss-plugin-camel-case';\nimport defaultUnit from 'jss-plugin-default-unit';\nimport vendorPrefixer from 'jss-plugin-vendor-prefixer';\nimport propsSort from 'jss-plugin-props-sort'; // Subset of jss-preset-default with only the plugins the Material-UI components are using.\n\nexport default function jssPreset() {\n return {\n plugins: [functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing.\n // This way, we can get a performance boost.\n // In the documentation, we are using `autoprefixer` to solve this problem.\n typeof window === 'undefined' ? null : vendorPrefixer(), propsSort()]\n };\n}","/** @license React v17.0.2\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");u=w(\"react.memo\");v=w(\"react.lazy\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"\"+b.valueOf().toString()+\"\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0c?98:c,function(){a(!0)});gg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\r\n * Copyright 2020-2021, bluefox \r\n *\r\n * MIT License\r\n *\r\n **/\r\nimport PropTypes from 'prop-types';\r\n\r\n/** Possible progress states. */\r\nexport const PROGRESS = {\r\n /** The socket is connecting. */\r\n CONNECTING: 0,\r\n /** The socket is successfully connected. */\r\n CONNECTED: 1,\r\n /** All objects are loaded. */\r\n OBJECTS_LOADED: 2,\r\n /** The socket is ready for use. */\r\n READY: 3\r\n};\r\n\r\nconst PERMISSION_ERROR = 'permissionError';\r\nconst NOT_CONNECTED = 'notConnectedError';\r\nconst TIMEOUT_FOR_ADMIN4 = 1300;\r\n\r\nexport const ERRORS = {\r\n PERMISSION_ERROR,\r\n NOT_CONNECTED\r\n};\r\n\r\nfunction fixAdminUI(obj) {\r\n if (obj && obj.common && !obj.common.adminUI) {\r\n if (obj.common.noConfig) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'none';\r\n } else if (obj.common.jsonConfig) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'json';\r\n } else if (obj.common.materialize) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'materialize';\r\n } else {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'html';\r\n }\r\n\r\n if (obj.common.jsonCustom) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.custom = 'json';\r\n } else if (obj.common.supportCustoms) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.custom = 'json';\r\n }\r\n\r\n if (obj.common.materializeTab && obj.common.adminTab) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.tab = 'materialize';\r\n } else if (obj.common.adminTab) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.tab = 'html';\r\n }\r\n\r\n obj.common.adminUI && console.debug(`Please add to \"${obj._id.replace(/\\.\\d+$/, '')}\" common.adminUI=${JSON.stringify(obj.common.adminUI)}`);\r\n }\r\n return obj;\r\n}\r\n\r\nclass Connection {\r\n /**\r\n * @param {import('./types').ConnectionProps} props\r\n */\r\n constructor(props) {\r\n props = props || { protocol: window.location.protocol, host: window.location.hostname };\r\n this.props = props;\r\n\r\n this.autoSubscribes = this.props.autoSubscribes || [];\r\n this.autoSubscribeLog = this.props.autoSubscribeLog;\r\n\r\n this.props.protocol = this.props.protocol || window.location.protocol;\r\n this.props.host = this.props.host || window.location.hostname;\r\n this.props.port = this.props.port || (window.location.port === '3000' ? (Connection.isWeb() ? 8082 : 8081) : window.location.port);\r\n this.props.ioTimeout = Math.max(this.props.ioTimeout || 20000, 20000);\r\n this.props.cmdTimeout = Math.max(this.props.cmdTimeout || 5000, 5000);\r\n\r\n // breaking change. Do not load all objects by default is true\r\n this.doNotLoadAllObjects = this.props.doNotLoadAllObjects === undefined ? true : this.props.doNotLoadAllObjects;\r\n this.doNotLoadACL = this.props.doNotLoadACL === undefined ? true : this.props.doNotLoadACL;\r\n\r\n /** @type {Record} */\r\n this.states = {};\r\n this.objects = null;\r\n this.acl = null;\r\n this.firstConnect = true;\r\n this.waitForRestart = false;\r\n /** @type {ioBroker.Languages} */\r\n this.systemLang = 'en';\r\n this.connected = false;\r\n this._waitForFirstConnection = new Promise(resolve => { this._waitForFirstConnectionResolve = resolve });\r\n\r\n /** @type {Record} */\r\n this.statesSubscribes = {}; // subscribe for states\r\n\r\n /** @type {Record} */\r\n this.objectsSubscribes = {}; // subscribe for objects\r\n this.onProgress = this.props.onProgress || function () { };\r\n this.onError = this.props.onError || function (err) { console.error(err); };\r\n this.loaded = false;\r\n this.loadTimer = null;\r\n this.loadCounter = 0;\r\n this.admin5only = this.props.admin5only || false;\r\n\r\n /** @type {((connected: boolean) => void)[]} */\r\n this.onConnectionHandlers = [];\r\n /** @type {((message: string) => void)[]} */\r\n this.onLogHandlers = [];\r\n\r\n /** @type {Record>} */\r\n this._promises = {};\r\n this.startSocket();\r\n }\r\n\r\n /**\r\n * Checks if this connection is running in a web adapter and not in an admin.\r\n * @returns {boolean} True if running in a web adapter or in a socketio adapter.\r\n */\r\n static isWeb() {\r\n return window.adapterName === 'material' || window.socketUrl !== undefined;\r\n }\r\n\r\n /**\r\n * Starts the socket.io connection.\r\n * @returns {void}\r\n */\r\n startSocket() {\r\n // if socket io is not yet loaded\r\n if (typeof window.io === 'undefined') {\r\n // if in index.html the onLoad function not defined\r\n if (typeof window.registerSocketOnLoad !== 'function') {\r\n // poll if loaded\r\n this.scriptLoadCounter = this.scriptLoadCounter || 0;\r\n this.scriptLoadCounter++;\r\n\r\n if (this.scriptLoadCounter < 30) {\r\n // wait till the script loaded\r\n setTimeout(() => this.startSocket(), 100);\r\n return;\r\n } else {\r\n window.alert('Cannot load socket.io.js!');\r\n }\r\n } else {\r\n // register on load\r\n window.registerSocketOnLoad(() => this.startSocket());\r\n }\r\n return;\r\n } else {\r\n // socket was initialized, do not repeat\r\n if (this._socket) {\r\n return;\r\n }\r\n }\r\n\r\n let host = this.props.host;\r\n let port = this.props.port;\r\n let protocol = this.props.protocol.replace(':', '');\r\n\r\n // if web adapter, socket io could be on other port or even host\r\n if (window.socketUrl) {\r\n let parts = window.socketUrl.split(':');\r\n host = parts[0] || host;\r\n port = parts[1] || port;\r\n if (host.includes('://')) {\r\n parts = host.split('://');\r\n protocol = parts[0];\r\n host = parts[1];\r\n }\r\n }\r\n\r\n const url = `${protocol}://${host}:${port}`;\r\n\r\n this._socket = window.io.connect(\r\n url,\r\n {\r\n query: 'ws=true',\r\n name: this.props.name,\r\n timeout: this.props.ioTimeout\r\n }\r\n );\r\n\r\n this._socket.on('connect', noTimeout => {\r\n // If the user is not admin it takes some time to install the handlers, because all rights must be checked\r\n if (noTimeout !== true) {\r\n setTimeout(() =>\r\n this.getVersion()\r\n .then(info => {\r\n const [major, minor, patch] = info.version.split('.');\r\n const v = parseInt(major, 10) * 10000 + parseInt(minor, 10) * 100 + parseInt(patch, 10);\r\n if (v < 40102) {\r\n this._authTimer = null;\r\n // possible this is old version of admin\r\n this.onPreConnect(false, false);\r\n } else {\r\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\r\n }\r\n }), 500);\r\n } else {\r\n // iobroker websocket waits, till all handlers are installed\r\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\r\n }\r\n });\r\n\r\n this._socket.on('reconnect', () => {\r\n this.onProgress(PROGRESS.READY);\r\n this.connected = true;\r\n\r\n if (this.waitForRestart) {\r\n window.location.reload(false);\r\n } else {\r\n this._subscribe(true);\r\n this.onConnectionHandlers.forEach(cb => cb(true));\r\n }\r\n });\r\n\r\n this._socket.on('disconnect', () => {\r\n this.connected = false;\r\n this.subscribed = false;\r\n this.onProgress(PROGRESS.CONNECTING);\r\n this.onConnectionHandlers.forEach(cb => cb(false));\r\n });\r\n\r\n this._socket.on('reauthenticate', () =>\r\n this.authenticate());\r\n\r\n this._socket.on('log', message => {\r\n this.props.onLog && this.props.onLog(message);\r\n this.onLogHandlers.forEach(cb => cb(message));\r\n });\r\n\r\n this._socket.on('error', err => {\r\n let _err = err || '';\r\n if (typeof _err.toString !== 'function') {\r\n _err = JSON.stringify(_err);\r\n console.error(`Received strange error: ${_err}`);\r\n }\r\n _err = _err.toString();\r\n if (_err.includes('User not authorized')) {\r\n this.authenticate();\r\n } else {\r\n window.alert(`Socket Error: ${err}`);\r\n }\r\n });\r\n\r\n this._socket.on('connect_error', err =>\r\n console.error(`Connect error: ${err}`));\r\n\r\n this._socket.on('permissionError', err =>\r\n this.onError({ message: 'no permission', operation: err.operation, type: err.type, id: (err.id || '') }));\r\n\r\n this._socket.on('objectChange', (id, obj) =>\r\n setTimeout(() => this.objectChange(id, obj), 0));\r\n\r\n this._socket.on('stateChange', (id, state) =>\r\n setTimeout(() => this.stateChange(id, state), 0));\r\n\r\n this._socket.on('cmdStdout', (id, text) =>\r\n this.onCmdStdoutHandler && this.onCmdStdoutHandler(id, text));\r\n\r\n this._socket.on('cmdStderr', (id, text) =>\r\n this.onCmdStderrHandler && this.onCmdStderrHandler(id, text));\r\n\r\n this._socket.on('cmdExit', (id, exitCode) =>\r\n this.onCmdExitHandler && this.onCmdExitHandler(id, exitCode));\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {boolean} isOk\r\n * @param {boolean} isSecure\r\n */\r\n onPreConnect(isOk, isSecure) {\r\n if (this._authTimer) {\r\n clearTimeout(this._authTimer);\r\n this._authTimer = null;\r\n }\r\n\r\n this.connected = true;\r\n this.isSecure = isSecure;\r\n\r\n if (this.waitForRestart) {\r\n window.location.reload(false);\r\n } else {\r\n if (this.firstConnect) {\r\n // retry strategy\r\n this.loadTimer = setTimeout(() => {\r\n this.loadTimer = null;\r\n this.loadCounter++;\r\n if (this.loadCounter < 10) {\r\n this.onConnect();\r\n }\r\n }, 1000);\r\n\r\n if (!this.loaded) {\r\n this.onConnect();\r\n }\r\n } else {\r\n this.onProgress(PROGRESS.READY);\r\n }\r\n\r\n this._subscribe(true);\r\n this.onConnectionHandlers.forEach(cb => cb(true));\r\n }\r\n\r\n if (this._waitForFirstConnectionResolve) {\r\n this._waitForFirstConnectionResolve();\r\n this._waitForFirstConnectionResolve = null;\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the socket is connected.\r\n * @returns {boolean} true if connected.\r\n */\r\n isConnected() {\r\n return this.connected;\r\n }\r\n\r\n /**\r\n * Checks if the socket is connected.\r\n * @returns {Promise} Promise resolves if once connected.\r\n */\r\n waitForFirstConnection() {\r\n return this._waitForFirstConnection;\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n _getUserPermissions(cb) {\r\n if (this.doNotLoadACL) {\r\n return cb && cb();\r\n } else {\r\n this._socket.emit('getUserPermissions', cb);\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n onConnect() {\r\n this._getUserPermissions((err, acl) => {\r\n if (err) {\r\n return this.onError('Cannot read user permissions: ' + err);\r\n } else\r\n if (!this.doNotLoadACL) {\r\n if (this.loaded) {\r\n return;\r\n }\r\n this.loaded = true;\r\n clearTimeout(this.loadTimer);\r\n this.loadTimer = null;\r\n\r\n this.onProgress(PROGRESS.CONNECTED);\r\n this.firstConnect = false;\r\n\r\n this.acl = acl;\r\n }\r\n\r\n // Read system configuration\r\n return (this.admin5only && !window.vendorPrefix ? this.getCompactSystemConfig() : this.getSystemConfig())\r\n .then(data => {\r\n if (this.doNotLoadACL) {\r\n if (this.loaded) {\r\n return undefined;\r\n }\r\n this.loaded = true;\r\n clearTimeout(this.loadTimer);\r\n this.loadTimer = null;\r\n\r\n this.onProgress(PROGRESS.CONNECTED);\r\n this.firstConnect = false;\r\n }\r\n\r\n this.systemConfig = data;\r\n if (this.systemConfig && this.systemConfig.common) {\r\n this.systemLang = this.systemConfig.common.language;\r\n } else {\r\n this.systemLang = window.navigator.userLanguage || window.navigator.language;\r\n\r\n if (this.systemLang !== 'en' && this.systemLang !== 'de' && this.systemLang !== 'ru') {\r\n this.systemConfig.common.language = 'en';\r\n this.systemLang = 'en';\r\n }\r\n }\r\n\r\n this.props.onLanguage && this.props.onLanguage(this.systemLang);\r\n\r\n if (!this.doNotLoadAllObjects) {\r\n return this.getObjects()\r\n .then(() => {\r\n this.onProgress(PROGRESS.READY);\r\n this.props.onReady && this.props.onReady(this.objects);\r\n });\r\n } else {\r\n this.objects = this.admin5only ? {} : { 'system.config': data };\r\n this.onProgress(PROGRESS.READY);\r\n this.props.onReady && this.props.onReady(this.objects);\r\n }\r\n return undefined;\r\n })\r\n .catch(e => this.onError('Cannot read system config: ' + e));\r\n });\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n authenticate() {\r\n if (window.location.search.includes('&href=')) {\r\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}${window.location.hash}`;\r\n } else {\r\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${window.location.search}${window.location.hash}`;\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n /**\r\n * Subscribe to changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {boolean} binary Set to true if the given state is binary and requires Base64 decoding.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n subscribeState(id, binary, cb) {\r\n if (typeof binary === 'function') {\r\n cb = binary;\r\n binary = false;\r\n }\r\n\r\n if (!this.statesSubscribes[id]) {\r\n let reg = id\r\n .replace(/\\./g, '\\\\.')\r\n .replace(/\\*/g, '.*')\r\n .replace(/\\(/g, '\\\\(')\r\n .replace(/\\)/g, '\\\\)')\r\n .replace(/\\+/g, '\\\\+')\r\n .replace(/\\[/g, '\\\\[');\r\n\r\n if (reg.indexOf('*') === -1) {\r\n reg += '$';\r\n }\r\n this.statesSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\r\n this.statesSubscribes[id].cbs.push(cb);\r\n if (this.connected) {\r\n this._socket.emit('subscribe', id);\r\n }\r\n } else {\r\n !this.statesSubscribes[id].cbs.includes(cb) && this.statesSubscribes[id].cbs.push(cb);\r\n }\r\n if (typeof cb === 'function' && this.connected) {\r\n if (binary) {\r\n this.getBinaryState(id)\r\n .then(base64 => cb(id, base64))\r\n .catch(e => console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(e)}`));\r\n } else {\r\n if (Connection.isWeb()) {\r\n this._socket.emit('getStates', id, (err, states) => {\r\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\r\n states && Object.keys(states).forEach(id => cb(id, states[id]));\r\n });\r\n } else {\r\n this._socket.emit('getForeignStates', id, (err, states) => {\r\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\r\n states && Object.keys(states).forEach(id => cb(id, states[id]));\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Unsubscribes all callbacks from changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n */\r\n /**\r\n * Unsubscribes the given callback from changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n unsubscribeState(id, cb) {\r\n if (this.statesSubscribes[id]) {\r\n if (cb) {\r\n const pos = this.statesSubscribes[id].cbs.indexOf(cb);\r\n pos !== -1 && this.statesSubscribes[id].cbs.splice(pos, 1);\r\n } else {\r\n this.statesSubscribes[id].cbs = [];\r\n }\r\n\r\n if (!this.statesSubscribes[id].cbs || !this.statesSubscribes[id].cbs.length) {\r\n delete this.statesSubscribes[id];\r\n this.connected && this._socket.emit('unsubscribe', id);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @param {import('./types').ObjectChangeHandler} cb The callback.\r\n * @returns {Promise}\r\n */\r\n subscribeObject(id, cb) {\r\n if (!this.objectsSubscribes[id]) {\r\n let reg = id.replace(/\\./g, '\\\\.').replace(/\\*/g, '.*');\r\n if (!reg.includes('*')) {\r\n reg += '$';\r\n }\r\n this.objectsSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\r\n this.objectsSubscribes[id].cbs.push(cb);\r\n this.connected && this._socket.emit('subscribeObjects', id);\r\n } else {\r\n !this.objectsSubscribes[id].cbs.includes(cb) && this.objectsSubscribes[id].cbs.push(cb);\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Unsubscribes all callbacks from changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Unsubscribes the given callback from changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @param {import('./types').ObjectChangeHandler} cb The callback.\r\n * @returns {Promise}\r\n */\r\n unsubscribeObject(id, cb) {\r\n if (this.objectsSubscribes[id]) {\r\n if (cb) {\r\n const pos = this.objectsSubscribes[id].cbs.indexOf(cb);\r\n pos !== -1 && this.objectsSubscribes[id].cbs.splice(pos, 1);\r\n } else {\r\n this.objectsSubscribes[id].cbs = [];\r\n }\r\n\r\n if (this.connected && (!this.objectsSubscribes[id].cbs || !this.objectsSubscribes[id].cbs.length)) {\r\n delete this.objectsSubscribes[id];\r\n this.connected && this._socket.emit('unsubscribeObjects', id);\r\n }\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {string} id\r\n * @param {ioBroker.Object | null | undefined} obj\r\n */\r\n objectChange(id, obj) {\r\n // update main.objects cache\r\n if (!this.objects) {\r\n return;\r\n }\r\n\r\n /** @type {import(\"./types\").OldObject} */\r\n let oldObj;\r\n\r\n let changed = false;\r\n if (obj) {\r\n if (obj._rev && this.objects[id]) {\r\n this.objects[id]._rev = obj._rev;\r\n }\r\n\r\n if (this.objects[id]) {\r\n oldObj = { _id: id, type: this.objects[id].type };\r\n }\r\n\r\n if (!this.objects[id] || JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\r\n this.objects[id] = obj;\r\n changed = true;\r\n }\r\n } else if (this.objects[id]) {\r\n oldObj = { _id: id, type: this.objects[id].type };\r\n delete this.objects[id];\r\n changed = true;\r\n }\r\n\r\n Object.keys(this.objectsSubscribes).forEach(_id => {\r\n if (_id === id || this.objectsSubscribes[_id].reg.test(id)) {\r\n //@ts-ignore\r\n this.objectsSubscribes[_id].cbs.forEach(cb => cb(id, obj, oldObj));\r\n }\r\n });\r\n\r\n if (changed && this.props.onObjectChange) {\r\n this.props.onObjectChange(id, obj);\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {string} id\r\n * @param {ioBroker.State | null | undefined} state\r\n */\r\n stateChange(id, state) {\r\n for (const task in this.statesSubscribes) {\r\n if (this.statesSubscribes.hasOwnProperty(task) && this.statesSubscribes[task].reg.test(id)) {\r\n this.statesSubscribes[task].cbs.forEach(cb => cb(id, state));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets all states.\r\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\r\n * @returns {Promise>}\r\n */\r\n getStates(disableProgressUpdate) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getStates', (err, res) => {\r\n this.states = res;\r\n //@ts-ignore\r\n !disableProgressUpdate && this.onProgress(PROGRESS.STATES_LOADED);\r\n return err ? reject(err) : resolve(this.states);\r\n }));\r\n }\r\n\r\n /**\r\n * Gets the given state.\r\n * @param {string} id The state ID.\r\n * @returns {Promise}\r\n */\r\n getState(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getState', id, (err, state) => err ? reject(err) : resolve(state)));\r\n }\r\n\r\n /**\r\n * Gets the given binary state.\r\n * @param {string} id The state ID.\r\n * @returns {Promise}\r\n */\r\n getBinaryState(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n // the data will come in base64\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getBinaryState', id, (err, state) => err ? reject(err) : resolve(state)));\r\n }\r\n\r\n /**\r\n * Sets the given binary state.\r\n * @param {string} id The state ID.\r\n * @param {string} base64 The Base64 encoded binary data.\r\n * @returns {Promise}\r\n */\r\n setBinaryState(id, base64) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n // the data will come in base64\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setBinaryState', id, base64, err => err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Sets the given state value.\r\n * @param {string} id The state ID.\r\n * @param {string | number | boolean | ioBroker.State | ioBroker.SettableState | null} val The state value.\r\n * @returns {Promise}\r\n */\r\n setState(id, val) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setState', id, val, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Gets all objects.\r\n * @param {(objects?: Record) => void} update Callback that is executed when all objects are retrieved.\r\n * @returns {void}\r\n */\r\n /**\r\n * Gets all objects.\r\n * @param {boolean} update Set to true to retrieve all objects from the server (instead of using the local cache).\r\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\r\n * @returns {Promise> | undefined}\r\n */\r\n getObjects(update, disableProgressUpdate) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n } else {\r\n return new Promise((resolve, reject) => {\r\n if (!update && this.objects) {\r\n return resolve(this.objects);\r\n }\r\n\r\n this._socket.emit(Connection.isWeb() ? 'getObjects' : 'getAllObjects', (err, res) => {\r\n this.objects = res;\r\n disableProgressUpdate && this.onProgress(PROGRESS.OBJECTS_LOADED);\r\n err ? reject(err) : resolve(this.objects);\r\n });\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {boolean} isEnable\r\n */\r\n _subscribe(isEnable) {\r\n if (isEnable && !this.subscribed) {\r\n this.subscribed = true;\r\n this.autoSubscribes.forEach(id => this._socket.emit('subscribeObjects', id));\r\n // re subscribe objects\r\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('subscribeObjects', id));\r\n // re-subscribe logs\r\n this.autoSubscribeLog && this._socket.emit('requireLog', true);\r\n // re subscribe states\r\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('subscribe', id));\r\n } else if (!isEnable && this.subscribed) {\r\n this.subscribed = false;\r\n // un-subscribe objects\r\n this.autoSubscribes.forEach(id => this._socket.emit('unsubscribeObjects', id));\r\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('unsubscribeObjects', id));\r\n // un-subscribe logs\r\n this.autoSubscribeLog && this._socket.emit('requireLog', false);\r\n\r\n // un-subscribe states\r\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('unsubscribe', id));\r\n }\r\n }\r\n\r\n /**\r\n * Requests log updates.\r\n * @param {boolean} isEnabled Set to true to get logs.\r\n * @returns {Promise}\r\n */\r\n requireLog(isEnabled) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('requireLog', isEnabled, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Deletes the given object.\r\n * @param {string} id The object ID.\r\n * @param {boolean} maintenance Force deletion of non conform IDs.\r\n * @returns {Promise}\r\n */\r\n delObject(id, maintenance) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('delObject', id, { maintenance: !!maintenance }, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Deletes the given object and all its children.\r\n * @param {string} id The object ID.\r\n * @param {boolean} maintenance Force deletion of non conform IDs.\r\n * @returns {Promise}\r\n */\r\n delObjects(id, maintenance) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('delObjects', id, {maintenance: !!maintenance}, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Sets the object.\r\n * @param {string} id The object ID.\r\n * @param {ioBroker.SettableObject} obj The object.\r\n * @returns {Promise}\r\n */\r\n setObject(id, obj) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!obj) {\r\n return Promise.reject('Null object is not allowed');\r\n }\r\n\r\n obj = JSON.parse(JSON.stringify(obj));\r\n\r\n if (obj.hasOwnProperty('from')) {\r\n delete obj.from;\r\n }\r\n if (obj.hasOwnProperty('user')) {\r\n delete obj.user;\r\n }\r\n if (obj.hasOwnProperty('ts')) {\r\n delete obj.ts;\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setObject', id, obj, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Gets the object with the given id from the server.\r\n * @param {string} id The object ID.\r\n * @returns {ioBroker.GetObjectPromise} The object.\r\n */\r\n getObject(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getObject', id, (err, obj) =>\r\n err ? reject(err) : resolve(obj)));\r\n }\r\n\r\n /**\r\n * Get all adapter instances.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Get all instances of the given adapter.\r\n * @param {string} adapter The name of the adapter.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getAdapterInstances(adapter, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (typeof adapter === 'boolean') {\r\n update = adapter;\r\n adapter = '';\r\n }\r\n adapter = adapter || '';\r\n\r\n if (!update && this._promises['instances_' + adapter]) {\r\n return this._promises['instances_' + adapter];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['instances_' + adapter] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n timeout = null;\r\n this.getObjectView(\r\n `system.adapter.${adapter}.`,\r\n `system.adapter.${adapter}.\\u9999`,\r\n 'instance'\r\n )\r\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\r\n .catch(e => reject(e));\r\n }, TIMEOUT_FOR_ADMIN4);\r\n\r\n this._socket.emit('getAdapterInstances', adapter, (err, instances) => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n return err ? reject(err) : resolve(instances);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['instances_' + adapter];\r\n }\r\n\r\n /**\r\n * Get all adapters.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Get adapters with the given name.\r\n * @param {string} adapter The name of the adapter.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getAdapters(adapter, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (typeof adapter === 'boolean') {\r\n update = adapter;\r\n adapter = '';\r\n }\r\n\r\n adapter = adapter || '';\r\n\r\n if (!update && this._promises['adapter_' + adapter]) {\r\n return this._promises['adapter_' + adapter];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['adapter_' + adapter] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n timeout = null;\r\n this.getObjectView(\r\n `system.adapter.${adapter}.`,\r\n `system.adapter.${adapter}.\\u9999`,\r\n 'adapter'\r\n )\r\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\r\n .catch(e => reject(e));\r\n }, TIMEOUT_FOR_ADMIN4);\r\n\r\n this._socket.emit('getAdapters', adapter, (err, adapters) => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n return err ? reject(err) : resolve(adapters);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['adapter_' + adapter];\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {any[]} objs\r\n * @param {(err?: any) => void} cb\r\n */\r\n _renameGroups(objs, cb) {\r\n if (!objs || !objs.length) {\r\n cb && cb();\r\n } else {\r\n let obj = objs.pop();\r\n let oldId = obj._id;\r\n obj._id = obj.newId;\r\n delete obj.newId;\r\n\r\n this.setObject(obj._id, obj)\r\n .then(() => this.delObject(oldId))\r\n .then(() => setTimeout(() => this._renameGroups(objs, cb), 0))\r\n .catch(err => cb && cb(err));\r\n }\r\n }\r\n\r\n /**\r\n * Rename a group.\r\n * @param {string} id The id.\r\n * @param {string} newId The new id.\r\n * @param {string | { [lang in ioBroker.Languages]?: string; }} newName The new name.\r\n */\r\n renameGroup(id, newId, newName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n return this.getGroups(true)\r\n .then(groups => {\r\n if (groups.length) {\r\n // find all elements\r\n const groupsToRename = groups\r\n .filter(group => group._id.startsWith(id + '.'));\r\n\r\n groupsToRename.forEach(group => group.newId = newId + group._id.substring(id.length));\r\n\r\n return new Promise((resolve, reject) =>\r\n this._renameGroups(groupsToRename, err => err ? reject(err) : resolve()))\r\n .then(() => {\r\n const obj = groups.find(group => group._id === id);\r\n\r\n if (obj) {\r\n obj._id = newId;\r\n if (newName !== undefined) {\r\n obj.common = obj.common || {};\r\n obj.common.name = newName;\r\n }\r\n\r\n return this.setObject(obj._id, obj)\r\n .then(() => this.delObject(id));\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Sends a message to a specific instance or all instances of some specific adapter.\r\n * @param {string} instance The instance to send this message to.\r\n * @param {string} [command] Command name of the target instance.\r\n * @param {ioBroker.MessagePayload} [data] The message data to send.\r\n * @returns {Promise}\r\n */\r\n sendTo(instance, command, data) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendTo', instance, command, data, result =>\r\n resolve(result)));\r\n }\r\n\r\n /**\r\n * Extend an object and create it if it might not exist.\r\n * @param {string} id The id.\r\n * @param {ioBroker.PartialObject} obj The object.\r\n */\r\n extendObject(id, obj) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n obj = JSON.parse(JSON.stringify(obj));\r\n\r\n if (obj.hasOwnProperty('from')) {\r\n delete obj.from;\r\n }\r\n if (obj.hasOwnProperty('user')) {\r\n delete obj.user;\r\n }\r\n if (obj.hasOwnProperty('ts')) {\r\n delete obj.ts;\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('extendObject', id, obj, err => err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Register a handler for log messages.\r\n * @param {(message: string) => void} handler The handler.\r\n */\r\n registerLogHandler(handler) {\r\n !this.onLogHandlers.includes(handler) && this.onLogHandlers.push(handler);\r\n }\r\n\r\n /**\r\n * Unregister a handler for log messages.\r\n * @param {(message: string) => void} handler The handler.\r\n */\r\n unregisterLogHandler(handler) {\r\n const pos = this.onLogHandlers.indexOf(handler);\r\n pos !== -1 && this.onLogHandlers.splice(pos, 1);\r\n }\r\n\r\n /**\r\n * Register a handler for the connection state.\r\n * @param {(connected: boolean) => void} handler The handler.\r\n */\r\n registerConnectionHandler(handler) {\r\n !this.onConnectionHandlers.includes(handler) && this.onConnectionHandlers.push(handler);\r\n }\r\n\r\n /**\r\n * Unregister a handler for the connection state.\r\n * @param {(connected: boolean) => void} handler The handler.\r\n */\r\n unregisterConnectionHandler(handler) {\r\n const pos = this.onConnectionHandlers.indexOf(handler);\r\n pos !== -1 && this.onConnectionHandlers.splice(pos, 1);\r\n }\r\n\r\n /**\r\n * Set the handler for standard output of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n registerCmdStdoutHandler(handler) {\r\n this.onCmdStdoutHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for standard output of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n unregisterCmdStdoutHandler(handler) {\r\n this.onCmdStdoutHandler = null;\r\n }\r\n\r\n /**\r\n * Set the handler for standard error of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n registerCmdStderrHandler(handler) {\r\n this.onCmdStderrHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for standard error of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n unregisterCmdStderrHandler(handler) {\r\n this.onCmdStderrHandler = null;\r\n }\r\n\r\n /**\r\n * Set the handler for exit of a command.\r\n * @param {(id: string, exitCode: number) => void} handler The handler.\r\n */\r\n registerCmdExitHandler(handler) {\r\n this.onCmdExitHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for exit of a command.\r\n * @param {(id: string, exitCode: number) => void} handler The handler.\r\n */\r\n unregisterCmdExitHandler(handler) {\r\n this.onCmdExitHandler = null;\r\n }\r\n\r\n /**\r\n * Get all enums with the given name.\r\n * @param {string} [_enum] The name of the enum\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise>}\r\n */\r\n getEnums(_enum, update) {\r\n if (!update && this._promises['enums_' + (_enum || 'all')]) {\r\n return this._promises['enums_' + (_enum || 'all')];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['enums_' + (_enum || 'all')] = new Promise((resolve, reject) => {\r\n this._socket.emit('getObjectView', 'system', 'enum', { startkey: 'enum.' + (_enum || ''), endkey: 'enum.' + (_enum ? (_enum + '.') : '') + '\\u9999' }, (err, res) => {\r\n if (!err && res) {\r\n const _res = {};\r\n for (let i = 0; i < res.rows.length; i++) {\r\n if (_enum && res.rows[i].id === 'enum.' + _enum) {\r\n continue;\r\n }\r\n _res[res.rows[i].id] = res.rows[i].value;\r\n }\r\n resolve(_res);\r\n } else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['enums_' + (_enum || 'all')];\r\n }\r\n\r\n /**\r\n * Query a predefined object view.\r\n * @param {string} start The start ID.\r\n * @param {string} end The end ID.\r\n * @param {string} type The type of object.\r\n * @returns {Promise>}\r\n */\r\n getObjectView(start, end, type) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n start = start || '';\r\n end = end || '\\u9999';\r\n\r\n return new Promise((resolve, reject) => {\r\n this._socket.emit('getObjectView', 'system', type, { startkey: start, endkey: end }, (err, res) => {\r\n if (!err) {\r\n const _res = {};\r\n if (res && res.rows) {\r\n for (let i = 0; i < res.rows.length; i++) {\r\n _res[res.rows[i].id] = res.rows[i].value;\r\n }\r\n }\r\n resolve(_res);\r\n } else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Get the stored certificates.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise<{name: string; type: 'public' | 'private' | 'chained'}[]>}\r\n */\r\n getCertificates(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (this._promises.cert && !update) {\r\n return this._promises.cert;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.cert = this.getObject('system.certificates')\r\n .then(res => {\r\n const certs = [];\r\n if (res && res.native && res.native.certificates) {\r\n Object.keys(res.native.certificates).forEach(c => {\r\n const cert = res.native.certificates[c];\r\n if (!cert) {\r\n return;\r\n }\r\n const _cert = {\r\n name: c,\r\n type: ''\r\n };\r\n // If it is filename, it could be everything\r\n if (cert.length < 700 && (cert.indexOf('/') !== -1 || cert.indexOf('\\\\') !== -1)) {\r\n if (c.toLowerCase().includes('private')) {\r\n _cert.type = 'private';\r\n } else if (cert.toLowerCase().includes('private')) {\r\n _cert.type = 'private';\r\n } else if (c.toLowerCase().includes('public')) {\r\n _cert.type = 'public';\r\n } else if (cert.toLowerCase().includes('public')) {\r\n _cert.type = 'public';\r\n }\r\n certs.push(_cert);\r\n } else {\r\n _cert.type = (cert.substring(0, '-----BEGIN RSA PRIVATE KEY'.length) === '-----BEGIN RSA PRIVATE KEY' || cert.substring(0, '-----BEGIN PRIVATE KEY'.length) === '-----BEGIN PRIVATE KEY') ? 'private' : 'public';\r\n\r\n if (_cert.type === 'public') {\r\n const m = cert.split('-----END CERTIFICATE-----');\r\n if (m.filter(t => t.replace(/\\r\\n|\\r|\\n/, '').trim()).length > 1) {\r\n _cert.type = 'chained';\r\n }\r\n }\r\n\r\n certs.push(_cert);\r\n }\r\n });\r\n }\r\n return certs;\r\n });\r\n\r\n return this._promises.cert;\r\n }\r\n\r\n /**\r\n * Get the logs from a host (only for admin connection).\r\n * @param {string} host\r\n * @param {number} [linesNumber]\r\n * @returns {Promise}\r\n */\r\n getLogs(host, linesNumber) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'getLogs', linesNumber || 200, lines =>\r\n resolve(lines)));\r\n }\r\n\r\n /**\r\n * Get the log files (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getLogsFiles(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('readLogs', host, (err, files) =>\r\n err ? reject(err) : resolve(files)));\r\n }\r\n\r\n /**\r\n * Delete the logs from a host (only for admin connection).\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n delLogs(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('sendToHost', host, 'delLogs', null, error =>\r\n error ? reject(error) : resolve()));\r\n }\r\n\r\n /**\r\n * Read the meta items.\r\n * @returns {Promise}\r\n */\r\n readMetaItems() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getObjectView', 'system', 'meta', { startkey: '', endkey: '\\u9999' }, (err, objs) =>\r\n err ? reject(err) : resolve(objs.rows && objs.rows.map(obj => obj.value))));\r\n }\r\n\r\n /**\r\n * Read the directory of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The directory name.\r\n * @returns {Promise}\r\n */\r\n readDir(adapter, fileName) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('readDir', adapter, fileName, (err, files) =>\r\n err ? reject(err) : resolve(files)));\r\n }\r\n\r\n readFile(adapter, fileName, base64) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (!base64) {\r\n this._socket.emit('readFile', adapter, fileName, (err, data, type) => {\r\n //@ts-ignore\r\n err ? reject(err) : resolve(data, type);\r\n });\r\n } else {\r\n this._socket.emit('readFile64', adapter, fileName, base64, (err, data) =>\r\n err ? reject(err) : resolve(data));\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Write a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @param {Buffer | string} data The data (if it's a Buffer, it will be converted to Base64).\r\n * @returns {Promise}\r\n */\r\n writeFile64(adapter, fileName, data) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (typeof data === 'string') {\r\n this._socket.emit('writeFile', adapter, fileName, data, err =>\r\n err ? reject(err) : resolve());\r\n } else {\r\n const base64 = btoa(\r\n new Uint8Array(data)\r\n .reduce((data, byte) => data + String.fromCharCode(byte), '')\r\n );\r\n\r\n this._socket.emit('writeFile64', adapter, fileName, base64, err =>\r\n err ? reject(err) : resolve());\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Delete a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @returns {Promise}\r\n */\r\n deleteFile(adapter, fileName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('deleteFile', adapter, fileName, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Delete a folder of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} folderName The folder name.\r\n * @returns {Promise}\r\n */\r\n deleteFolder(adapter, folderName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('deleteFolder', adapter, folderName, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Get the list of all hosts.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getHosts(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.hosts) {\r\n return this._promises.hosts;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.hosts = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'host',\r\n {startkey: 'system.host.', endkey: 'system.host.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.hosts;\r\n }\r\n\r\n /**\r\n * Get the list of all users.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getUsers(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.users) {\r\n return this._promises.users;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.users = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'user',\r\n {startkey: 'system.user.', endkey: 'system.user.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.users;\r\n }\r\n\r\n /**\r\n * Get the list of all groups.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getGroups(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.groups) {\r\n return this._promises.groups;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.groups = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'group',\r\n {startkey: 'system.group.', endkey: 'system.group.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.groups;\r\n }\r\n\r\n /**\r\n * Get the host information.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] optional read timeout.\r\n * @returns {Promise}\r\n */\r\n getHostInfo(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['hostInfo' + host]) {\r\n return this._promises['hostInfo' + host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['hostInfo' + host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getHostInfo timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getHostInfo', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getHostInfo\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getHostInfo\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises['hostInfo' + host];\r\n }\r\n\r\n /**\r\n * Get the host information (short version).\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] optional read timeout.\r\n * @returns {Promise}\r\n */\r\n getHostInfoShort(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['hostInfoShort' + host]) {\r\n return this._promises['hostInfoShort' + host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['hostInfoShort' + host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('hostInfoShort timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getHostInfoShort', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getHostInfoShort\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getHostInfoShort\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises['hostInfoShort' + host];\r\n }\r\n\r\n /**\r\n * Get the repository.\r\n * @param {string} host\r\n * @param {any} [args]\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] timeout in ms.\r\n * @returns {Promise}\r\n */\r\n getRepository(host, args, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.repo) {\r\n return this._promises.repo;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.repo = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getRepository timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getRepository', args, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getRepository\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getRepository\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.repo;\r\n }\r\n\r\n /**\r\n * Get the installed.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [cmdTimeout] timeout in ms (optional)\r\n * @returns {Promise}\r\n */\r\n getInstalled(host, update, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n this._promises.installed = this._promises.installed || {};\r\n\r\n if (!update && this._promises.installed[host]) {\r\n return this._promises.installed[host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.installed[host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getInstalled timeout');\r\n }\r\n }, cmdTimeout || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getInstalled', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getInstalled\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getInstalled\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.installed[host];\r\n }\r\n\r\n /**\r\n * Execute a command on a host.\r\n * @param {string} host The host name.\r\n * @param {string} cmd The command.\r\n * @param {string} cmdId The command ID.\r\n * @param {number} cmdTimeout Timeout of command in ms\r\n * @returns {Promise}\r\n */\r\n cmdExec(host, cmd, cmdId, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith(host)) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n let timeout = cmdTimeout && setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('cmdExec timeout');\r\n }\r\n }, cmdTimeout);\r\n\r\n this._socket.emit('cmdExec', host, cmdId, cmd, null, err => {\r\n if (!cmdTimeout || timeout) {\r\n timeout && clearTimeout(timeout);\r\n timeout = null;\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a given feature is supported.\r\n * @param {string} feature The feature to check.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n checkFeatureSupported(feature, update) {\r\n if (!update && this._promises['supportedFeatures_' + feature]) {\r\n return this._promises['supportedFeatures_' + feature];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['supportedFeatures_' + feature] = new Promise((resolve, reject) =>\r\n this._socket.emit('checkFeatureSupported', feature, (err, features) => {\r\n err ? reject(err) : resolve(features)\r\n }));\r\n\r\n return this._promises['supportedFeatures_' + feature];\r\n }\r\n\r\n /**\r\n * Read the base settings of a given host.\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n readBaseSettings(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\r\n .then(result => {\r\n if (result) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('readBaseSettings timeout');\r\n }\r\n }, this.props.cmdTimeout);\r\n\r\n if (host.startsWith('system.host.')) {\r\n host = host.replace(/^system\\.host\\./, '');\r\n }\r\n\r\n this._socket.emit('sendToHost', host, 'readBaseSettings', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"BaseSettings\"');\r\n } else if (!data) {\r\n reject('Cannot read \"BaseSettings\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n return Promise.reject('Not supported');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Write the base settings of a given host.\r\n * @param {string} host\r\n * @param {any} config\r\n * @returns {Promise}\r\n */\r\n writeBaseSettings(host, config) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\r\n .then(result => {\r\n if (result) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('writeBaseSettings timeout');\r\n }\r\n }, this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'writeBaseSettings', config, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not write \"BaseSettings\"');\r\n } else if (!data) {\r\n reject('Cannot write \"BaseSettings\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n return Promise.reject('Not supported');\r\n }\r\n })\r\n }\r\n\r\n /**\r\n * Send command to restart the iobroker on host\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n restartController(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) => {\r\n this._socket.emit('sendToHost', host, 'restartController', null, error => {\r\n error ? reject(error) : resolve(true);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Read statistics information from host\r\n * @param {string} host\r\n * @param {string} typeOfDiag one of none, normal, no-city, extended\r\n * @returns {Promise}\r\n */\r\n getDiagData(host, typeOfDiag) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise(resolve => {\r\n this._socket.emit('sendToHost', host, 'getDiagData', typeOfDiag, result =>\r\n resolve(result));\r\n });\r\n }\r\n\r\n /**\r\n * Read all states (which might not belong to this adapter) which match the given pattern.\r\n * @param {string} pattern\r\n * @returns {ioBroker.GetStatesPromise}\r\n */\r\n getForeignStates(pattern) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n if (Connection.isWeb()) {\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getStates', pattern || '*', (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n } else {\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getForeignStates', pattern || '*', (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n }\r\n }\r\n\r\n /**\r\n * Get foreign objects by pattern, by specific type and resolve their enums.\r\n * @param {string} pattern\r\n * @param {string} [type]\r\n * @returns {ioBroker.GetObjectsPromise}\r\n */\r\n getForeignObjects(pattern, type) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getForeignObjects', pattern || '*', type, (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n }\r\n\r\n /**\r\n * Gets the system configuration.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getSystemConfig(update) {\r\n if (!update && this._promises.systemConfig) {\r\n return this._promises.systemConfig;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.systemConfig = this.getObject('system.config')\r\n .then(systemConfig => {\r\n //@ts-ignore\r\n systemConfig = systemConfig || {};\r\n //@ts-ignore\r\n systemConfig.common = systemConfig.common || {};\r\n //@ts-ignore\r\n systemConfig.native = systemConfig.native || {};\r\n return systemConfig;\r\n });\r\n\r\n return this._promises.systemConfig;\r\n }\r\n\r\n /**\r\n * Sets the system configuration.\r\n * @param {ioBroker.SettableObjectWorker} obj\r\n * @returns {Promise>}\r\n */\r\n setSystemConfig(obj) {\r\n return this.setObject('system.config', obj)\r\n .then(() => this._promises.systemConfig = Promise.resolve(obj));\r\n }\r\n\r\n /**\r\n * Get the raw socket.io socket.\r\n * @returns {any}\r\n */\r\n getRawSocket() {\r\n return this._socket;\r\n }\r\n\r\n /**\r\n * Get the history of a given state.\r\n * @param {string} id\r\n * @param {ioBroker.GetHistoryOptions} options\r\n * @returns {Promise}\r\n */\r\n getHistory(id, options) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getHistory', id, options, (err, values) =>\r\n err ? reject(err) : resolve(values)));\r\n }\r\n\r\n /**\r\n * Get the history of a given state.\r\n * @param {string} id\r\n * @param {ioBroker.GetHistoryOptions} options\r\n * @returns {Promise<{values: ioBroker.GetHistoryResult; sesionId: string; stepIgnore: number}>}\r\n */\r\n getHistoryEx(id, options) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getHistory', id, options, (err, values, stepIgnore, sessionId) =>\r\n err ? reject(err) : resolve({ values, sessionId, stepIgnore })));\r\n }\r\n\r\n /**\r\n * Change the password of the given user.\r\n * @param {string} user\r\n * @param {string} password\r\n * @returns {Promise}\r\n */\r\n changePassword(user, password) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('changePassword', user, password, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Get the IP addresses of the given host.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getIpAddresses(host, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host = 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['IPs_' + host]) {\r\n return this._promises['IPs_' + host];\r\n }\r\n this._promises['IPs_' + host] = this.getObject(host)\r\n .then(obj => obj && obj.common ? obj.common.address || [] : []);\r\n\r\n return this._promises['IPs_' + host];\r\n }\r\n\r\n /**\r\n * Get the IP addresses with interface names of the given host or find host by IP.\r\n * @param {string} ipOrHostName\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise]>}\r\n */\r\n getHostByIp(ipOrHostName, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (ipOrHostName.startsWith('system.host.')) {\r\n ipOrHostName = ipOrHostName.replace(/^system\\.host\\./, '');\r\n }\r\n\r\n if (!update && this._promises['rIPs_' + ipOrHostName]) {\r\n return this._promises['rIPs_' + ipOrHostName];\r\n }\r\n this._promises['rIPs_' + ipOrHostName] = new Promise(resolve =>\r\n this._socket.emit('getHostByIp', ipOrHostName, (ip, host) => {\r\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - Listen on all IPs', address: '0.0.0.0', family: 'ipv4'}];\r\n const IPs6 = [{name: '[IPv6] :: - Listen on all IPs', address: '::', family: 'ipv6'}];\r\n if (host.native?.hardware?.networkInterfaces) {\r\n for (const eth in host.native.hardware.networkInterfaces) {\r\n if (!host.native.hardware.networkInterfaces.hasOwnProperty(eth)) {\r\n continue;\r\n }\r\n for (let num = 0; num < host.native.hardware.networkInterfaces[eth].length; num++) {\r\n if (host.native.hardware.networkInterfaces[eth][num].family !== 'IPv6') {\r\n IPs4.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv4'});\r\n } else {\r\n IPs6.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv6'});\r\n }\r\n }\r\n }\r\n }\r\n for (let i = 0; i < IPs6.length; i++) {\r\n IPs4.push(IPs6[i]);\r\n }\r\n resolve(IPs4);\r\n }));\r\n\r\n return this._promises['rIPs_' + ipOrHostName];\r\n }\r\n\r\n /**\r\n * Encrypt a text\r\n * @param {string} text\r\n * @returns {Promise}\r\n */\r\n encrypt(text) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('encrypt', text, (err, text) =>\r\n err ? reject(err) : resolve(text)));\r\n }\r\n\r\n /**\r\n * Decrypt a text\r\n * @param {string} encryptedText\r\n * @returns {Promise}\r\n */\r\n decrypt(encryptedText) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('decrypt', encryptedText, (err, text) =>\r\n err ? reject(err) : resolve(text)));\r\n }\r\n\r\n /**\r\n * Gets the version.\r\n * @returns {Promise<{version: string; serverName: string}>}\r\n */\r\n getVersion() {\r\n this._promises.version = this._promises.version || new Promise((resolve, reject) =>\r\n this._socket.emit('getVersion', (err, version, serverName) => {\r\n // support of old socket.io\r\n if (err && !version && typeof err === 'string' && err.match(/\\d+\\.\\d+\\.\\d+/)) {\r\n resolve({ version: err, serverName: 'socketio' });\r\n } else {\r\n return err ? reject(err) : resolve({ version, serverName });\r\n }\r\n }));\r\n\r\n return this._promises.version;\r\n }\r\n\r\n /**\r\n * Gets the web server name.\r\n * @returns {Promise}\r\n */\r\n getWebServerName() {\r\n this._promises.webName = this._promises.webName || new Promise((resolve, reject) =>\r\n this._socket.emit('getAdapterName', (err, name) =>\r\n err ? reject(err) : resolve(name)));\r\n\r\n return this._promises.webName;\r\n }\r\n\r\n /**\r\n * Gets the admin version.\r\n * @deprecated use getVersion()\r\n * @returns {Promise<{version: string; serverName: string}>}\r\n */\r\n getAdminVersion() {\r\n console.log('Deprecated: use getVersion');\r\n return this.getVersion();\r\n }\r\n\r\n /**\r\n * Change access rights for file\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @param {object} [options] like {mode: 0x644}\r\n * @returns {Promise<{entries: array}>}\r\n */\r\n chmodFile(adapter, filename, options) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('chmodFile', adapter, filename, options, (err, entries, id) =>\r\n err ? reject(err) : resolve({entries, id})));\r\n }\r\n\r\n /**\r\n * Change owner or/and owner group for file\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @param {object} [options] like {owner: 'newOwner', ownerGroup: 'newGroup'}\r\n * @returns {Promise<{entries: array}>}\r\n */\r\n chownFile(adapter, filename, options) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('chownFile', adapter, filename, options, (err, entries, id) =>\r\n err ? reject(err) : resolve({entries, id})));\r\n }\r\n\r\n /**\r\n * Check if the file exists\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @returns {Promise}\r\n */\r\n fileExists(adapter, filename) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('fileExists', adapter, filename, (err, exists) =>\r\n err ? reject(err) : resolve(exists)));\r\n }\r\n\r\n /**\r\n * Get the alarm notifications from a host (only for admin connection).\r\n * @param {string} host\r\n * @param {string} [category] - optional\r\n * @returns {Promise}\r\n */\r\n getNotifications(host, category) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'getNotifications', {category}, notifications =>\r\n resolve(notifications)));\r\n }\r\n\r\n /**\r\n * Clear the alarm notifications on a host (only for admin connection).\r\n * @param {string} host\r\n * @param {string} [category] - optional\r\n * @returns {Promise}\r\n */\r\n clearNotifications(host, category) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'clearNotifications', {category}, notifications =>\r\n resolve(notifications)));\r\n }\r\n\r\n /**\r\n * Read if only easy mode is allowed (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getIsEasyModeStrict() {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getIsEasyModeStrict', (error, isStrict) =>\r\n error ? reject(error) : resolve(isStrict)));\r\n }\r\n\r\n /**\r\n * Read easy mode configuration (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getEasyMode() {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getEasyMode', (error, config) =>\r\n error ? reject(error) : resolve(config)));\r\n }\r\n\r\n /**\r\n * Read current user\r\n * @returns {Promise}\r\n */\r\n getCurrentUser() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('authEnabled', (isSecure, user) =>\r\n resolve(user)));\r\n }\r\n\r\n getCurrentSession(cmdTimeout) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const controller = new AbortController();\r\n\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n controller.abort();\r\n reject('getCurrentSession timeout');\r\n }\r\n }, cmdTimeout || 5000);\r\n\r\n return fetch('./session', { signal: controller.signal })\r\n .then(res => res.json())\r\n .then(json => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n resolve(json);\r\n }\r\n })\r\n .catch(e => {\r\n reject('getCurrentSession: ' + e);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Read adapter ratings\r\n * @returns {Promise}\r\n */\r\n getRatings(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getRatings', update, (err, ratings) =>\r\n err ? reject(err) : resolve(ratings)));\r\n }\r\n\r\n /**\r\n * Read current web, socketio or admin namespace, like admin.0\r\n * @returns {Promise}\r\n */\r\n getCurrentInstance() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.currentInstance = this._promises.currentInstance ||\r\n new Promise((resolve, reject) =>\r\n this._socket.emit('getCurrentInstance', (err, namespace) =>\r\n err ? reject(err) : resolve(namespace)));\r\n\r\n return this._promises.currentInstance;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactAdapters(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.compactAdapters) {\r\n return this._promises.compactAdapters;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n this._promises.compactAdapters = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactAdapters', (err, adapters) =>\r\n err ? reject(err) : resolve(adapters)));\r\n\r\n return this._promises.compactAdapters;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactInstances(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.compactInstances) {\r\n return this._promises.compactInstances;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.compactInstances = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactInstances', (err, instances) =>\r\n err ? reject(err) : resolve(instances)));\r\n\r\n return this._promises.compactInstances;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n // reads only version of installed adapter\r\n getCompactInstalled(host, update, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n this._promises.installedCompact = this._promises.installedCompact || {};\r\n\r\n if (!update && this._promises.installedCompact[host]) {\r\n return this._promises.installedCompact[host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.installedCompact[host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getCompactInstalled timeout');\r\n }\r\n }, cmdTimeout || this.props.cmdTimeout);\r\n\r\n this._socket.emit('getCompactInstalled', host, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getCompactInstalled\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getCompactInstalled\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.installedCompact[host];\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactSystemConfig(update) {\r\n if (!update && this._promises.systemConfigCommon) {\r\n return this._promises.systemConfigCommon;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.systemConfigCommon = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactSystemConfig', (err, systemConfig) =>\r\n err ? reject(err) : resolve(systemConfig)));\r\n\r\n return this._promises.systemConfigCommon;\r\n }\r\n\r\n /**\r\n * Get the repository in compact form (only version and icon).\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] timeout in ms.\r\n * @returns {Promise}\r\n */\r\n getCompactRepository(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.repoCompact) {\r\n return this._promises.repoCompact;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.repoCompact = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getCompactRepository timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('getCompactRepository', host, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getCompactRepository\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getCompactRepository\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.repoCompact;\r\n }\r\n\r\n /**\r\n * Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getCompactHosts(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.hostsCompact) {\r\n return this._promises.hostsCompact;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.hostsCompact = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactHosts', (err, hosts) =>\r\n err ? reject(err) : resolve(hosts)));\r\n\r\n return this._promises.hostsCompact;\r\n }\r\n\r\n /**\r\n * Get uuid\r\n * @returns {Promise}\r\n */\r\n getUuid() {\r\n if (this._promises.uuid) {\r\n return this._promises.uuid;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.uuid = this.getObject('system.meta.uuid')\r\n //@ts-ignore\r\n .then(obj => obj?.native?.uuid);\r\n\r\n return this._promises.uuid;\r\n }\r\n}\r\n\r\nConnection.Connection = {\r\n onLog: PropTypes.func,\r\n onReady: PropTypes.func,\r\n onProgress: PropTypes.func,\r\n};\r\n\r\nexport default Connection;\r\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@material-ui/core/styles/withStyles';\n\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\n\nimport IconCheck from '@material-ui/icons/Check';\n\nimport I18n from '../i18n';\n\nconst styles = theme => ({\n titleBackground: {\n\n },\n titleColor: {\n\n }\n});\n\n/**\n * @typedef {object} DialogErrorProps\n * @property {string} [key] The key to identify this component.\n * @property {string} [title] The dialog title; default: Error (translated)\n * @property {string | JSX.Element} text The dialog text.\n * @property {() => void} [onClose] Close handler.\n * @property {{titleBackground: string; titleColor: string}} classes The styling class names.\n *\n * @extends {React.Component}\n */\nclass DialogError extends React.Component {\n handleOk() {\n this.props.onClose && this.props.onClose();\n };\n\n render() {\n return this.handleOk()}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n {this.props.title || I18n.t('ra_Error')}\n \n \n {this.props.text || I18n.t('ra_Unknown error!')}\n \n \n \n \n \n ;\n }\n}\n\nDialogError.propTypes = {\n onClose: PropTypes.func,\n title: PropTypes.string,\n text: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element\n ]),\n icon: PropTypes.object\n};\n\n/** @type {typeof DialogError} */\nconst _export = withStyles(styles)(DialogError);\nexport default _export;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createTheme = _interopRequireDefault(require(\"./createTheme\"));\n\nvar defaultTheme = (0, _createTheme.default)();\nvar _default = defaultTheme;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createMuiTheme = createMuiTheme;\nexports.default = void 0;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _createBreakpoints = _interopRequireDefault(require(\"./createBreakpoints\"));\n\nvar _createMixins = _interopRequireDefault(require(\"./createMixins\"));\n\nvar _createPalette = _interopRequireDefault(require(\"./createPalette\"));\n\nvar _createTypography = _interopRequireDefault(require(\"./createTypography\"));\n\nvar _shadows = _interopRequireDefault(require(\"./shadows\"));\n\nvar _shape = _interopRequireDefault(require(\"./shape\"));\n\nvar _createSpacing = _interopRequireDefault(require(\"./createSpacing\"));\n\nvar _transitions = _interopRequireDefault(require(\"./transitions\"));\n\nvar _zIndex = _interopRequireDefault(require(\"./zIndex\"));\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = (0, _objectWithoutProperties2.default)(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n var palette = (0, _createPalette.default)(paletteInput);\n var breakpoints = (0, _createBreakpoints.default)(breakpointsInput);\n var spacing = (0, _createSpacing.default)(spacingInput);\n var muiTheme = (0, _utils.deepmerge)({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: (0, _createMixins.default)(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: _shadows.default,\n typography: (0, _createTypography.default)(palette, typographyInput),\n spacing: spacing,\n shape: _shape.default,\n transitions: _transitions.default,\n zIndex: _zIndex.default\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return (0, _utils.deepmerge)(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: (0, _defineProperty2.default)({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\n\nfunction createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\n\nvar _default = createTheme;\nexports.default = _default;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createBreakpoints;\nexports.keys = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nvar keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.\n\nexports.keys = keys;\n\nfunction createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n } : _breakpoints$values,\n _breakpoints$unit = breakpoints.unit,\n unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,\n _breakpoints$step = breakpoints.step,\n step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,\n other = (0, _objectWithoutProperties2.default)(breakpoints, [\"values\", \"unit\", \"step\"]);\n\n function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n }\n\n function down(key) {\n var endIndex = keys.indexOf(key) + 1;\n var upperbound = values[keys[endIndex]];\n\n if (endIndex === keys.length) {\n // xl down applies to all sizes\n return up('xs');\n }\n\n var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;\n return \"@media (max-width:\".concat(value - step / 100).concat(unit, \")\");\n }\n\n function between(start, end) {\n var endIndex = keys.indexOf(end);\n\n if (endIndex === keys.length - 1) {\n return up(start);\n }\n\n return \"@media (min-width:\".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, \") and \") + \"(max-width:\".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, \")\");\n }\n\n function only(key) {\n return between(key, key);\n }\n\n var warnedOnce = false;\n\n function width(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn([\"Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.\", 'Use the `theme.breakpoints.values` instead.'].join('\\n'));\n }\n }\n\n return values[key];\n }\n\n return (0, _extends2.default)({\n keys: keys,\n values: values,\n up: up,\n down: down,\n between: between,\n only: only,\n width: width\n }, other);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createMixins;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _extends3 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nfunction createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return (0, _extends3.default)({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return (0, _extends3.default)({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, (0, _defineProperty2.default)({}, breakpoints.up('sm'), (0, _extends3.default)({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, (0, _defineProperty2.default)(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), (0, _defineProperty2.default)(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPalette;\nexports.dark = exports.light = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _common = _interopRequireDefault(require(\"../colors/common\"));\n\nvar _grey = _interopRequireDefault(require(\"../colors/grey\"));\n\nvar _indigo = _interopRequireDefault(require(\"../colors/indigo\"));\n\nvar _pink = _interopRequireDefault(require(\"../colors/pink\"));\n\nvar _red = _interopRequireDefault(require(\"../colors/red\"));\n\nvar _orange = _interopRequireDefault(require(\"../colors/orange\"));\n\nvar _blue = _interopRequireDefault(require(\"../colors/blue\"));\n\nvar _green = _interopRequireDefault(require(\"../colors/green\"));\n\nvar _colorManipulator = require(\"./colorManipulator\");\n\nvar light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: _common.default.white,\n default: _grey.default[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexports.light = light;\nvar dark = {\n text: {\n primary: _common.default.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: _grey.default[800],\n default: '#303030'\n },\n action: {\n active: _common.default.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nexports.dark = dark;\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = (0, _colorManipulator.lighten)(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = (0, _colorManipulator.darken)(intent.main, tonalOffsetDark);\n }\n }\n}\n\nfunction createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: _indigo.default[300],\n main: _indigo.default[500],\n dark: _indigo.default[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: _pink.default.A200,\n main: _pink.default.A400,\n dark: _pink.default.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: _red.default[300],\n main: _red.default[500],\n dark: _red.default[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: _orange.default[300],\n main: _orange.default[500],\n dark: _orange.default[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: _blue.default[300],\n main: _blue.default[500],\n dark: _blue.default[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: _green.default[300],\n main: _green.default[500],\n dark: _green.default[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = (0, _objectWithoutProperties2.default)(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n function getContrastText(background) {\n var contrastText = (0, _colorManipulator.getContrastRatio)(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = (0, _colorManipulator.getContrastRatio)(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = (0, _extends2.default)({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : (0, _utils.formatMuiErrorMessage)(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = (0, _utils.deepmerge)((0, _extends2.default)({\n // A collection of common colors.\n common: _common.default,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: _grey.default,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar common = {\n black: '#000',\n white: '#fff'\n};\nvar _default = common;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nvar _default = grey;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nvar _default = indigo;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nvar _default = pink;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nvar _default = red;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nvar _default = blue;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nvar _default = green;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hexToRgb = hexToRgb;\nexports.rgbToHex = rgbToHex;\nexports.hslToRgb = hslToRgb;\nexports.decomposeColor = decomposeColor;\nexports.recomposeColor = recomposeColor;\nexports.getContrastRatio = getContrastRatio;\nexports.getLuminance = getLuminance;\nexports.emphasize = emphasize;\nexports.fade = fade;\nexports.alpha = alpha;\nexports.darken = darken;\nexports.lighten = lighten;\n\nvar _utils = require(\"@material-ui/utils\");\n\n/* eslint-disable no-use-before-define */\n\n/**\n * Returns a number whose value is limited to the given range.\n *\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(\"Material-UI: The value provided \".concat(value, \" is out of range [\").concat(min, \", \").concat(max, \"].\"));\n }\n }\n\n return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n *\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nfunction hexToRgb(color) {\n color = color.substr(1);\n var re = new RegExp(\".{1,\".concat(color.length >= 6 ? 2 : 1, \"}\"), 'g');\n var colors = color.match(re);\n\n if (colors && colors[0].length === 1) {\n colors = colors.map(function (n) {\n return n + n;\n });\n }\n\n return colors ? \"rgb\".concat(colors.length === 4 ? 'a' : '', \"(\").concat(colors.map(function (n, index) {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', '), \")\") : '';\n}\n\nfunction intToHex(int) {\n var hex = int.toString(16);\n return hex.length === 1 ? \"0\".concat(hex) : hex;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n *\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\n\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n\n var _decomposeColor = decomposeColor(color),\n values = _decomposeColor.values;\n\n return \"#\".concat(values.map(function (n) {\n return intToHex(n);\n }).join(''));\n}\n/**\n * Converts a color from hsl format to rgb format.\n *\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\n\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n var _color = color,\n values = _color.values;\n var h = values[0];\n var s = values[1] / 100;\n var l = values[2] / 100;\n var a = s * Math.min(l, 1 - l);\n\n var f = function f(n) {\n var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n };\n\n var type = 'rgb';\n var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n\n return recomposeColor({\n type: type,\n values: rgb\n });\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\n\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n var marker = color.indexOf('(');\n var type = color.substring(0, marker);\n\n if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Unsupported `\".concat(color, \"` color.\\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().\") : (0, _utils.formatMuiErrorMessage)(3, color));\n }\n\n var values = color.substring(marker + 1, color.length - 1).split(',');\n values = values.map(function (value) {\n return parseFloat(value);\n });\n return {\n type: type,\n values: values\n };\n}\n/**\n * Converts a color object with type and values to a string.\n *\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\n\nfunction recomposeColor(color) {\n var type = color.type;\n var values = color.values;\n\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map(function (n, i) {\n return i < 3 ? parseInt(n, 10) : n;\n });\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = \"\".concat(values[1], \"%\");\n values[2] = \"\".concat(values[2], \"%\");\n }\n\n return \"\".concat(type, \"(\").concat(values.join(', '), \")\");\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\n\nfunction getContrastRatio(foreground, background) {\n var lumA = getLuminance(foreground);\n var lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\n\nfunction getLuminance(color) {\n color = decomposeColor(color);\n var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(function (val) {\n val /= 255; // normalized\n\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }); // Truncate at 3 digits\n\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction emphasize(color) {\n var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\n\nvar warnedOnce = false;\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0 -1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n *\n * @deprecated\n * Use `import { alpha } from '@material-ui/core/styles'` instead.\n */\n\nfunction fade(color, value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The `fade` color utility was renamed to `alpha` to better describe its functionality.', '', \"You should use `import { alpha } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return alpha(color, value);\n}\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha value is overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0-1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clamp(value);\n\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n\n color.values[3] = value;\n return recomposeColor(color);\n}\n/**\n * Darkens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Lightens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n }\n\n return recomposeColor(color);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createTypography;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nfunction createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = (0, _objectWithoutProperties2.default)(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return (0, _extends2.default)({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return (0, _utils.deepmerge)((0, _extends2.default)({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nvar _default = shadows;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar shape = {\n borderRadius: 4\n};\nvar _default = shape;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createSpacing;\n\nvar _system = require(\"@material-ui/system\");\n\nvar warnOnce;\n\nfunction createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = (0, _system.createUnarySpacing)({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.duration = exports.easing = void 0;\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nvar easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\n\nexports.easing = easing;\nvar duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nexports.duration = duration;\n\nfunction formatMs(milliseconds) {\n return \"\".concat(Math.round(milliseconds), \"ms\");\n}\n/**\n * @param {string|Array} props\n * @param {object} param\n * @param {string} param.prop\n * @param {number} param.duration\n * @param {string} param.easing\n * @param {number} param.delay\n */\n\n\nvar _default = {\n easing: easing,\n duration: duration,\n create: function create() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$duration = options.duration,\n durationOption = _options$duration === void 0 ? duration.standard : _options$duration,\n _options$easing = options.easing,\n easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 0 : _options$delay,\n other = (0, _objectWithoutProperties2.default)(options, [\"duration\", \"easing\", \"delay\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n var isString = function isString(value) {\n return typeof value === 'string';\n };\n\n var isNumber = function isNumber(value) {\n return !isNaN(parseFloat(value));\n };\n\n if (!isString(props) && !Array.isArray(props)) {\n console.error('Material-UI: Argument \"props\" must be a string or Array.');\n }\n\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(\"Material-UI: Argument \\\"duration\\\" must be a number or a string but found \".concat(durationOption, \".\"));\n }\n\n if (!isString(easingOption)) {\n console.error('Material-UI: Argument \"easing\" must be a string.');\n }\n\n if (!isNumber(delay) && !isString(delay)) {\n console.error('Material-UI: Argument \"delay\" must be a number or a string.');\n }\n\n if (Object.keys(other).length !== 0) {\n console.error(\"Material-UI: Unrecognized argument(s) [\".concat(Object.keys(other).join(','), \"].\"));\n }\n }\n\n return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {\n return \"\".concat(animatedProp, \" \").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), \" \").concat(easingOption, \" \").concat(typeof delay === 'string' ? delay : formatMs(delay));\n }).join(',');\n },\n getAutoHeightDuration: function getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n\n var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n\n return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);\n }\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nvar zIndex = {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nvar _default = zIndex;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"\n}), 'Check');\n\nexports.default = _default;","\n/**\n * Print the ioBroker welcome screen to the developer console.\n */\nfunction printPrompt() {\n const prompt = `\n██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ \n██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗\n██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝\n██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗\n██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║\n╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝\n`;\n\n console.log(prompt);\n console.log('Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters');\n console.log('Help us to create open source project with reactJS!');\n console.log('See you :)');\n}\n\nexport default printPrompt;","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\r\nimport React from 'react';\r\n\r\n/**\r\n * @template P Type of the properties object.\r\n * @template S Type of the internal state object.\r\n * @extends {React.Component}\r\n */\r\nclass Router extends React.Component {\r\n /**\r\n * @param {P} props The React properties of this component.\r\n */\r\n constructor(props) {\r\n super(props);\r\n this.onHashChangedBound = this.onHashChanged.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener('hashchange', this.onHashChangedBound);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('hashchange', this.onHashChangedBound);\r\n }\r\n\r\n onHashChanged() {\r\n // override this function\r\n }\r\n\r\n /**\r\n * Gets the location object.\r\n * @returns {{ tab: string; dialog: string; id: string; arg: string; }}\r\n */\r\n static getLocation() {\r\n let hash = window.location.hash;\r\n hash = hash.replace(/^#/, '');\r\n const parts = hash.split('/').map(item => {\r\n try {\r\n return item ? decodeURIComponent(item) : ''\r\n } catch (e) {\r\n console.error('Router: Cannot decode ' + item);\r\n return item || '';\r\n }\r\n });\r\n // #tabName/dialogName/deviceId\r\n return {\r\n tab: parts[0] || '',\r\n dialog: parts[1] || '',\r\n id: parts[2] || '',\r\n arg: parts[3] || ''\r\n };\r\n }\r\n\r\n /**\r\n * Navigate to a new location. Any parameters that are not set will be taken from the current location.\r\n * @param {string | undefined} [tab]\r\n * @param {string | undefined} [dialog]\r\n * @param {string | undefined} [id]\r\n * @param {string | undefined} [arg]\r\n */\r\n static doNavigate(tab, dialog, id, arg) {\r\n let hash = '';\r\n const location = Router.getLocation();\r\n if (arg !== undefined && !id) {\r\n id = location.id;\r\n }\r\n if (id && !dialog) {\r\n dialog = location.dialog;\r\n }\r\n if (dialog && !tab) {\r\n tab = location.tab;\r\n } else\r\n if (tab === null) {\r\n tab = location.tab;\r\n }\r\n\r\n if (tab) {\r\n hash = '#' + tab;\r\n if (dialog) {\r\n hash += '/' + dialog;\r\n\r\n if (id) {\r\n hash += '/' + id;\r\n if (arg !== undefined) {\r\n hash += '/' + arg;\r\n }\r\n }\r\n }\r\n }\r\n if (window.location.hash !== hash) {\r\n window.location.hash = hash;\r\n }\r\n }\r\n}\r\n\r\nexport default Router;","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport Fab from '@material-ui/core/Fab';\nimport PropTypes from 'prop-types';\n\nimport Toolbar from '@material-ui/core/Toolbar';\n\nimport I18n from '../i18n';\n\nimport IconSave from '@material-ui/icons/Save';\nimport IconClose from '@material-ui/icons/Close';\n\nconst styles = theme => ({\n buttonIcon: {\n marginRight: 8\n },\n});\n\n/**\n * @typedef {object} LogoProps\n * @property {boolean} noTextOnButtons Are the buttons without text\n * @property {any} theme Theme object (from this.state.theme)\n * @property {boolean} isIFrame bottom position 0 or 38 for iFrame\n * @property {function} onSave on Save handler\n * @property {function} onClose on Close handler\n *\n * @extends {React.Component}\n */\nclass SaveCloseButtons extends React.Component {\n constructor(props) {\n super(props);\n try {\n this.isIFrame = !props.newReact && window.self !== window.top;\n } catch (e) {\n this.isIFrame = !props.newReact;\n }\n }\n\n render() {\n const noTextOnButtons = this.props.noTextOnButtons;\n const buttonStyle = {\n borderRadius: this.props.theme.saveToolbar.button.borderRadius || 3,\n height: this.props.theme.saveToolbar.button.height || 32,\n };\n\n const style = {\n bottom: this.isIFrame ? 38 : 0,\n left: this.props.paddingLeft || 0,\n right: 0,\n position: 'absolute',\n background: this.props.theme.saveToolbar.background\n };\n if (this.props.dense) {\n style.minHeight = 48;\n }\n\n if (this.props.error) {\n buttonStyle.border = '1px solid red';\n }\n\n return \n this.props.onSave(false)}\n style={buttonStyle}\n >\n {!noTextOnButtons && I18n.t('ra_Save')}\n \n this.props.onSave(true)}\n style={Object.assign({}, buttonStyle, {marginLeft: 10})}>\n \n {!noTextOnButtons ? I18n.t('ra_Save and close') : '+'}\n {noTextOnButtons && }\n \n
\n this.props.onClose()} style={buttonStyle}>\n {!noTextOnButtons && I18n.t('ra_Close')}\n \n ;\n }\n}\n\nSaveCloseButtons.propTypes = {\n dense: PropTypes.bool,\n paddingLeft: PropTypes.number,\n noTextOnButtons: PropTypes.bool,\n theme: PropTypes.object,\n isIFrame: PropTypes.bool,\n changed: PropTypes.bool.isRequired,\n error: PropTypes.bool,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n newReact: PropTypes.bool,\n};\n\n/** @type {typeof SaveCloseButtons} */\nconst _export = withStyles(styles)(SaveCloseButtons);\nexport default _export;","/** @license React v17.0.2\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"object-assign\");var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z\"\n}), 'SettingsApplications');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"\n}), 'Photo');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm3.61 6.34c1.07 0 1.93.86 1.93 1.93 0 1.07-.86 1.93-1.93 1.93-1.07 0-1.93-.86-1.93-1.93-.01-1.07.86-1.93 1.93-1.93zm-6-1.58c1.3 0 2.36 1.06 2.36 2.36 0 1.3-1.06 2.36-2.36 2.36s-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36zm0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68zM11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09z\"\n}), 'SupervisedUserCircle');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'PersonOutlined');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.2 5.9l.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7zm-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1l.8-.8zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM8 18H6v-2h2v2zm3.5 0h-2v-2h2v2zm3.5 0h-2v-2h2v2z\"\n}), 'Router');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z\"\n}), 'Wifi');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\"\n}), 'Info');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z\"\n}), 'Description');\n\nexports.default = _default;","import React from 'react';\nimport PropTypes from 'prop-types';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nconst IconAlias = props => {\n return props.onClick && props.onClick(e)} viewBox=\"0 0 512 512\" width={props.width || 20} height={props.height || props.width || 20} xmlns=\"http://www.w3.org/2000/svg\" className={ props.className }>\n \n ;\n}\n\nIconAlias.propTypes = {\n onClick: PropTypes.func,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\n\nexport default IconAlias;","var unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = o[Symbol.iterator]();\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nmodule.exports = _createForOfIteratorHelper;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ace_builds_1 = require(\"ace-builds\");\nvar PropTypes = require(\"prop-types\");\nvar React = require(\"react\");\nvar isEqual = require(\"lodash.isequal\");\nvar editorOptions_1 = require(\"./editorOptions\");\nvar ace = (0, editorOptions_1.getAceInstance)();\nvar ReactAce = /** @class */ (function (_super) {\n __extends(ReactAce, _super);\n function ReactAce(props) {\n var _this = _super.call(this, props) || this;\n editorOptions_1.editorEvents.forEach(function (method) {\n _this[method] = _this[method].bind(_this);\n });\n _this.debounce = editorOptions_1.debounce;\n return _this;\n }\n ReactAce.prototype.isInShadow = function (node) {\n var parent = node && node.parentNode;\n while (parent) {\n if (parent.toString() === \"[object ShadowRoot]\") {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n };\n ReactAce.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, className = _a.className, onBeforeLoad = _a.onBeforeLoad, onValidate = _a.onValidate, mode = _a.mode, focus = _a.focus, theme = _a.theme, fontSize = _a.fontSize, value = _a.value, defaultValue = _a.defaultValue, showGutter = _a.showGutter, wrapEnabled = _a.wrapEnabled, showPrintMargin = _a.showPrintMargin, _b = _a.scrollMargin, scrollMargin = _b === void 0 ? [0, 0, 0, 0] : _b, keyboardHandler = _a.keyboardHandler, onLoad = _a.onLoad, commands = _a.commands, annotations = _a.annotations, markers = _a.markers, placeholder = _a.placeholder;\n this.editor = ace.edit(this.refEditor);\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n var editorProps = Object.keys(this.props.editorProps);\n for (var i = 0; i < editorProps.length; i++) {\n this.editor[editorProps[i]] = this.props.editorProps[editorProps[i]];\n }\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(this.onChange, this.props.debounceChangePeriod);\n }\n this.editor.renderer.setScrollMargin(scrollMargin[0], scrollMargin[1], scrollMargin[2], scrollMargin[3]);\n if (this.isInShadow(this.refEditor)) {\n this.editor.renderer.attachToShadowRoot();\n }\n this.editor\n .getSession()\n .setMode(typeof mode === \"string\" ? \"ace/mode/\" + mode : mode);\n if (theme && theme !== \"\")\n this.editor.setTheme(\"ace/theme/\" + theme);\n this.editor.setFontSize(typeof fontSize === \"number\" ? fontSize + \"px\" : fontSize);\n this.editor\n .getSession()\n .setValue(!defaultValue ? value || \"\" : defaultValue);\n if (this.props.navigateToFileEnd) {\n this.editor.navigateFileEnd();\n }\n this.editor.renderer.setShowGutter(showGutter);\n this.editor.getSession().setUseWrapMode(wrapEnabled);\n this.editor.setShowPrintMargin(showPrintMargin);\n this.editor.on(\"focus\", this.onFocus);\n this.editor.on(\"blur\", this.onBlur);\n this.editor.on(\"copy\", this.onCopy);\n this.editor.on(\"paste\", this.onPaste);\n this.editor.on(\"change\", this.onChange);\n this.editor.on(\"input\", this.onInput);\n if (placeholder) {\n this.updatePlaceholder();\n }\n this.editor\n .getSession()\n .selection.on(\"changeSelection\", this.onSelectionChange);\n this.editor.getSession().selection.on(\"changeCursor\", this.onCursorChange);\n if (onValidate) {\n // @ts-ignore types don't include\n this.editor.getSession().on(\"changeAnnotation\", function () {\n // tslint:disable-next-line:no-shadowed-variable\n var annotations = _this.editor.getSession().getAnnotations();\n _this.props.onValidate(annotations);\n });\n }\n this.editor.session.on(\"changeScrollTop\", this.onScroll);\n this.editor.getSession().setAnnotations(annotations || []);\n if (markers && markers.length > 0) {\n this.handleMarkers(markers);\n }\n // get a list of possible options to avoid 'misspelled option errors'\n var availableOptions = this.editor.$options;\n editorOptions_1.editorOptions.forEach(function (option) {\n if (availableOptions.hasOwnProperty(option)) {\n // @ts-ignore\n _this.editor.setOption(option, _this.props[option]);\n }\n else if (_this.props[option]) {\n console.warn(\"ReactAce: editor option \" + option + \" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?\");\n }\n });\n this.handleOptions(this.props);\n if (Array.isArray(commands)) {\n commands.forEach(function (command) {\n if (typeof command.exec === \"string\") {\n _this.editor.commands.bindKey(command.bindKey, command.exec);\n }\n else {\n _this.editor.commands.addCommand(command);\n }\n });\n }\n if (keyboardHandler) {\n this.editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n if (onLoad) {\n onLoad(this.editor);\n }\n this.editor.resize();\n if (focus) {\n this.editor.focus();\n }\n };\n ReactAce.prototype.componentDidUpdate = function (prevProps) {\n var oldProps = prevProps;\n var nextProps = this.props;\n for (var i = 0; i < editorOptions_1.editorOptions.length; i++) {\n var option = editorOptions_1.editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n // @ts-ignore\n this.editor.setOption(option, nextProps[option]);\n }\n }\n if (nextProps.className !== oldProps.className) {\n var appliedClasses = this.refEditor.className;\n var appliedClassesArray_1 = appliedClasses.trim().split(\" \");\n var oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(function (oldClass) {\n var index = appliedClassesArray_1.indexOf(oldClass);\n appliedClassesArray_1.splice(index, 1);\n });\n this.refEditor.className =\n \" \" + nextProps.className + \" \" + appliedClassesArray_1.join(\" \");\n }\n // First process editor value, as it may create a new session (see issue #300)\n if (this.editor &&\n nextProps.value != null &&\n this.editor.getValue() !== nextProps.value) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n this.silent = true;\n var pos = this.editor.session.selection.toJSON();\n this.editor.setValue(nextProps.value, nextProps.cursorStart);\n this.editor.session.selection.fromJSON(pos);\n this.silent = false;\n }\n if (nextProps.placeholder !== oldProps.placeholder) {\n this.updatePlaceholder();\n }\n if (nextProps.mode !== oldProps.mode) {\n this.editor\n .getSession()\n .setMode(typeof nextProps.mode === \"string\"\n ? \"ace/mode/\" + nextProps.mode\n : nextProps.mode);\n }\n if (nextProps.theme !== oldProps.theme) {\n this.editor.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n this.editor.setKeyboardHandler(\"ace/keyboard/\" + nextProps.keyboardHandler);\n }\n else {\n this.editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n this.editor.setFontSize(typeof nextProps.fontSize === \"number\"\n ? nextProps.fontSize + \"px\"\n : nextProps.fontSize);\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n this.editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n this.editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n this.editor.renderer.setShowGutter(nextProps.showGutter);\n }\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n this.handleOptions(nextProps);\n }\n if (!isEqual(nextProps.annotations, oldProps.annotations)) {\n this.editor.getSession().setAnnotations(nextProps.annotations || []);\n }\n if (!isEqual(nextProps.markers, oldProps.markers) &&\n Array.isArray(nextProps.markers)) {\n this.handleMarkers(nextProps.markers);\n }\n // this doesn't look like it works at all....\n if (!isEqual(nextProps.scrollMargin, oldProps.scrollMargin)) {\n this.handleScrollMargins(nextProps.scrollMargin);\n }\n if (prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width) {\n this.editor.resize();\n }\n if (this.props.focus && !prevProps.focus) {\n this.editor.focus();\n }\n };\n ReactAce.prototype.handleScrollMargins = function (margins) {\n if (margins === void 0) { margins = [0, 0, 0, 0]; }\n this.editor.renderer.setScrollMargin(margins[0], margins[1], margins[2], margins[3]);\n };\n ReactAce.prototype.componentWillUnmount = function () {\n this.editor.destroy();\n this.editor = null;\n };\n ReactAce.prototype.onChange = function (event) {\n if (this.props.onChange && !this.silent) {\n var value = this.editor.getValue();\n this.props.onChange(value, event);\n }\n };\n ReactAce.prototype.onSelectionChange = function (event) {\n if (this.props.onSelectionChange) {\n var value = this.editor.getSelection();\n this.props.onSelectionChange(value, event);\n }\n };\n ReactAce.prototype.onCursorChange = function (event) {\n if (this.props.onCursorChange) {\n var value = this.editor.getSelection();\n this.props.onCursorChange(value, event);\n }\n };\n ReactAce.prototype.onInput = function (event) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n if (this.props.placeholder) {\n this.updatePlaceholder();\n }\n };\n ReactAce.prototype.onFocus = function (event) {\n if (this.props.onFocus) {\n this.props.onFocus(event, this.editor);\n }\n };\n ReactAce.prototype.onBlur = function (event) {\n if (this.props.onBlur) {\n this.props.onBlur(event, this.editor);\n }\n };\n ReactAce.prototype.onCopy = function (_a) {\n var text = _a.text;\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n };\n ReactAce.prototype.onPaste = function (_a) {\n var text = _a.text;\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n };\n ReactAce.prototype.onScroll = function () {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n };\n ReactAce.prototype.handleOptions = function (props) {\n var setOptions = Object.keys(props.setOptions);\n for (var y = 0; y < setOptions.length; y++) {\n // @ts-ignore\n this.editor.setOption(setOptions[y], props.setOptions[setOptions[y]]);\n }\n };\n ReactAce.prototype.handleMarkers = function (markers) {\n var _this = this;\n // remove foreground markers\n var currentMarkers = this.editor.getSession().getMarkers(true);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers except active line marker and selected word marker\n currentMarkers = this.editor.getSession().getMarkers(false);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i) &&\n currentMarkers[i].clazz !== \"ace_active-line\" &&\n currentMarkers[i].clazz !== \"ace_selected-word\") {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // add new markers\n markers.forEach(function (_a) {\n var startRow = _a.startRow, startCol = _a.startCol, endRow = _a.endRow, endCol = _a.endCol, className = _a.className, type = _a.type, _b = _a.inFront, inFront = _b === void 0 ? false : _b;\n var range = new ace_builds_1.Range(startRow, startCol, endRow, endCol);\n _this.editor.getSession().addMarker(range, className, type, inFront);\n });\n };\n ReactAce.prototype.updatePlaceholder = function () {\n // Adapted from https://stackoverflow.com/questions/26695708/how-can-i-add-placeholder-text-when-the-editor-is-empty\n var editor = this.editor;\n var placeholder = this.props.placeholder;\n var showPlaceholder = !editor.session.getValue().length;\n var node = editor.renderer.placeholderNode;\n if (!showPlaceholder && node) {\n editor.renderer.scroller.removeChild(editor.renderer.placeholderNode);\n editor.renderer.placeholderNode = null;\n }\n else if (showPlaceholder && !node) {\n node = editor.renderer.placeholderNode = document.createElement(\"div\");\n node.textContent = placeholder || \"\";\n node.className = \"ace_comment ace_placeholder\";\n node.style.padding = \"0 9px\";\n node.style.position = \"absolute\";\n node.style.zIndex = \"3\";\n editor.renderer.scroller.appendChild(node);\n }\n else if (showPlaceholder && node) {\n node.textContent = placeholder;\n }\n };\n ReactAce.prototype.updateRef = function (item) {\n this.refEditor = item;\n };\n ReactAce.prototype.render = function () {\n var _a = this.props, name = _a.name, width = _a.width, height = _a.height, style = _a.style;\n var divStyle = __assign({ width: width, height: height }, style);\n return React.createElement(\"div\", { ref: this.updateRef, id: name, style: divStyle });\n };\n ReactAce.propTypes = {\n mode: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n focus: PropTypes.bool,\n theme: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n height: PropTypes.string,\n width: PropTypes.string,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n showGutter: PropTypes.bool,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onPaste: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onBlur: PropTypes.func,\n onScroll: PropTypes.func,\n value: PropTypes.string,\n defaultValue: PropTypes.string,\n onLoad: PropTypes.func,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n onValidate: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n debounceChangePeriod: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableSnippets: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n enableLiveAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n navigateToFileEnd: PropTypes.bool,\n commands: PropTypes.array,\n placeholder: PropTypes.string\n };\n ReactAce.defaultProps = {\n name: \"ace-editor\",\n focus: false,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n fontSize: 12,\n enableSnippets: false,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false,\n placeholder: null,\n navigateToFileEnd: true\n };\n return ReactAce;\n}(React.Component));\nexports.default = ReactAce;\n//# sourceMappingURL=ace.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar PropTypes = require(\"prop-types\");\nvar React = require(\"react\");\nvar split_1 = require(\"./split\");\nvar DiffMatchPatch = require(\"diff-match-patch\");\nvar DiffComponent = /** @class */ (function (_super) {\n __extends(DiffComponent, _super);\n function DiffComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n value: _this.props.value\n };\n _this.onChange = _this.onChange.bind(_this);\n _this.diff = _this.diff.bind(_this);\n return _this;\n }\n DiffComponent.prototype.componentDidUpdate = function () {\n var value = this.props.value;\n if (value !== this.state.value) {\n this.setState({ value: value });\n }\n };\n DiffComponent.prototype.onChange = function (value) {\n this.setState({\n value: value\n });\n if (this.props.onChange) {\n this.props.onChange(value);\n }\n };\n DiffComponent.prototype.diff = function () {\n var dmp = new DiffMatchPatch();\n var lhString = this.state.value[0];\n var rhString = this.state.value[1];\n if (lhString.length === 0 && rhString.length === 0) {\n return [];\n }\n var diff = dmp.diff_main(lhString, rhString);\n dmp.diff_cleanupSemantic(diff);\n var diffedLines = this.generateDiffedLines(diff);\n var codeEditorSettings = this.setCodeMarkers(diffedLines);\n return codeEditorSettings;\n };\n DiffComponent.prototype.generateDiffedLines = function (diff) {\n var C = {\n DIFF_EQUAL: 0,\n DIFF_DELETE: -1,\n DIFF_INSERT: 1\n };\n var diffedLines = {\n left: [],\n right: []\n };\n var cursor = {\n left: 1,\n right: 1\n };\n diff.forEach(function (chunk) {\n var chunkType = chunk[0];\n var text = chunk[1];\n var lines = text.split(\"\\n\").length - 1;\n // diff-match-patch sometimes returns empty strings at random\n if (text.length === 0) {\n return;\n }\n var firstChar = text[0];\n var lastChar = text[text.length - 1];\n var linesToHighlight = 0;\n switch (chunkType) {\n case C.DIFF_EQUAL:\n cursor.left += lines;\n cursor.right += lines;\n break;\n case C.DIFF_DELETE:\n // If the deletion starts with a newline, push the cursor down to that line\n if (firstChar === \"\\n\") {\n cursor.left++;\n lines--;\n }\n linesToHighlight = lines;\n // If the deletion does not include a newline, highlight the same line on the right\n if (linesToHighlight === 0) {\n diffedLines.right.push({\n startLine: cursor.right,\n endLine: cursor.right\n });\n }\n // If the last character is a newline, we don't want to highlight that line\n if (lastChar === \"\\n\") {\n linesToHighlight -= 1;\n }\n diffedLines.left.push({\n startLine: cursor.left,\n endLine: cursor.left + linesToHighlight\n });\n cursor.left += lines;\n break;\n case C.DIFF_INSERT:\n // If the insertion starts with a newline, push the cursor down to that line\n if (firstChar === \"\\n\") {\n cursor.right++;\n lines--;\n }\n linesToHighlight = lines;\n // If the insertion does not include a newline, highlight the same line on the left\n if (linesToHighlight === 0) {\n diffedLines.left.push({\n startLine: cursor.left,\n endLine: cursor.left\n });\n }\n // If the last character is a newline, we don't want to highlight that line\n if (lastChar === \"\\n\") {\n linesToHighlight -= 1;\n }\n diffedLines.right.push({\n startLine: cursor.right,\n endLine: cursor.right + linesToHighlight\n });\n cursor.right += lines;\n break;\n default:\n throw new Error(\"Diff type was not defined.\");\n }\n });\n return diffedLines;\n };\n // Receives a collection of line numbers and iterates through them to highlight appropriately\n // Returns an object that tells the render() method how to display the code editors\n DiffComponent.prototype.setCodeMarkers = function (diffedLines) {\n if (diffedLines === void 0) { diffedLines = { left: [], right: [] }; }\n var codeEditorSettings = [];\n var newMarkerSet = {\n left: [],\n right: []\n };\n for (var i = 0; i < diffedLines.left.length; i++) {\n var markerObj = {\n startRow: diffedLines.left[i].startLine - 1,\n endRow: diffedLines.left[i].endLine,\n type: \"text\",\n className: \"codeMarker\"\n };\n newMarkerSet.left.push(markerObj);\n }\n for (var i = 0; i < diffedLines.right.length; i++) {\n var markerObj = {\n startRow: diffedLines.right[i].startLine - 1,\n endRow: diffedLines.right[i].endLine,\n type: \"text\",\n className: \"codeMarker\"\n };\n newMarkerSet.right.push(markerObj);\n }\n codeEditorSettings[0] = newMarkerSet.left;\n codeEditorSettings[1] = newMarkerSet.right;\n return codeEditorSettings;\n };\n DiffComponent.prototype.render = function () {\n var markers = this.diff();\n return (React.createElement(split_1.default, { name: this.props.name, className: this.props.className, focus: this.props.focus, orientation: this.props.orientation, splits: this.props.splits, mode: this.props.mode, theme: this.props.theme, height: this.props.height, width: this.props.width, fontSize: this.props.fontSize, showGutter: this.props.showGutter, onChange: this.onChange, onPaste: this.props.onPaste, onLoad: this.props.onLoad, onScroll: this.props.onScroll, minLines: this.props.minLines, maxLines: this.props.maxLines, readOnly: this.props.readOnly, highlightActiveLine: this.props.highlightActiveLine, showPrintMargin: this.props.showPrintMargin, tabSize: this.props.tabSize, cursorStart: this.props.cursorStart, editorProps: this.props.editorProps, style: this.props.style, scrollMargin: this.props.scrollMargin, setOptions: this.props.setOptions, wrapEnabled: this.props.wrapEnabled, enableBasicAutocompletion: this.props.enableBasicAutocompletion, enableLiveAutocompletion: this.props.enableLiveAutocompletion, value: this.state.value, markers: markers }));\n };\n DiffComponent.propTypes = {\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n enableBasicAutocompletion: PropTypes.bool,\n enableLiveAutocompletion: PropTypes.bool,\n focus: PropTypes.bool,\n fontSize: PropTypes.number,\n height: PropTypes.string,\n highlightActiveLine: PropTypes.bool,\n maxLines: PropTypes.number,\n minLines: PropTypes.number,\n mode: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n onChange: PropTypes.func,\n orientation: PropTypes.string,\n readOnly: PropTypes.bool,\n scrollMargin: PropTypes.array,\n setOptions: PropTypes.object,\n showGutter: PropTypes.bool,\n showPrintMargin: PropTypes.bool,\n splits: PropTypes.number,\n style: PropTypes.object,\n tabSize: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.array,\n width: PropTypes.string,\n wrapEnabled: PropTypes.bool\n };\n DiffComponent.defaultProps = {\n cursorStart: 1,\n editorProps: {},\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false,\n focus: false,\n fontSize: 12,\n height: \"500px\",\n highlightActiveLine: true,\n maxLines: null,\n minLines: null,\n mode: \"\",\n name: \"ace-editor\",\n onLoad: null,\n onScroll: null,\n onPaste: null,\n onChange: null,\n orientation: \"beside\",\n readOnly: false,\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n showGutter: true,\n showPrintMargin: true,\n splits: 2,\n style: {},\n tabSize: 4,\n theme: \"github\",\n value: [\"\", \"\"],\n width: \"500px\",\n wrapEnabled: true\n };\n return DiffComponent;\n}(React.Component));\nexports.default = DiffComponent;\n//# sourceMappingURL=diff.js.map","ace.define(\"ace/split\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/editor\",\"ace/virtual_renderer\",\"ace/edit_session\"], function(require, exports, module) {\n\"use strict\";\n\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\nvar Editor = require(\"./editor\").Editor;\nvar Renderer = require(\"./virtual_renderer\").VirtualRenderer;\nvar EditSession = require(\"./edit_session\").EditSession;\n\n\nvar Split = function(container, theme, splits) {\n this.BELOW = 1;\n this.BESIDE = 0;\n\n this.$container = container;\n this.$theme = theme;\n this.$splits = 0;\n this.$editorCSS = \"\";\n this.$editors = [];\n this.$orientation = this.BESIDE;\n\n this.setSplits(splits || 1);\n this.$cEditor = this.$editors[0];\n\n\n this.on(\"focus\", function(editor) {\n this.$cEditor = editor;\n }.bind(this));\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$createEditor = function() {\n var el = document.createElement(\"div\");\n el.className = this.$editorCSS;\n el.style.cssText = \"position: absolute; top:0px; bottom:0px\";\n this.$container.appendChild(el);\n var editor = new Editor(new Renderer(el, this.$theme));\n\n editor.on(\"focus\", function() {\n this._emit(\"focus\", editor);\n }.bind(this));\n\n this.$editors.push(editor);\n editor.setFontSize(this.$fontSize);\n return editor;\n };\n\n this.setSplits = function(splits) {\n var editor;\n if (splits < 1) {\n throw \"The number of splits have to be > 0!\";\n }\n\n if (splits == this.$splits) {\n return;\n } else if (splits > this.$splits) {\n while (this.$splits < this.$editors.length && this.$splits < splits) {\n editor = this.$editors[this.$splits];\n this.$container.appendChild(editor.container);\n editor.setFontSize(this.$fontSize);\n this.$splits ++;\n }\n while (this.$splits < splits) {\n this.$createEditor();\n this.$splits ++;\n }\n } else {\n while (this.$splits > splits) {\n editor = this.$editors[this.$splits - 1];\n this.$container.removeChild(editor.container);\n this.$splits --;\n }\n }\n this.resize();\n };\n this.getSplits = function() {\n return this.$splits;\n };\n this.getEditor = function(idx) {\n return this.$editors[idx];\n };\n this.getCurrentEditor = function() {\n return this.$cEditor;\n };\n this.focus = function() {\n this.$cEditor.focus();\n };\n this.blur = function() {\n this.$cEditor.blur();\n };\n this.setTheme = function(theme) {\n this.$editors.forEach(function(editor) {\n editor.setTheme(theme);\n });\n };\n this.setKeyboardHandler = function(keybinding) {\n this.$editors.forEach(function(editor) {\n editor.setKeyboardHandler(keybinding);\n });\n };\n this.forEach = function(callback, scope) {\n this.$editors.forEach(callback, scope);\n };\n\n\n this.$fontSize = \"\";\n this.setFontSize = function(size) {\n this.$fontSize = size;\n this.forEach(function(editor) {\n editor.setFontSize(size);\n });\n };\n\n this.$cloneSession = function(session) {\n var s = new EditSession(session.getDocument(), session.getMode());\n\n var undoManager = session.getUndoManager();\n s.setUndoManager(undoManager);\n s.setTabSize(session.getTabSize());\n s.setUseSoftTabs(session.getUseSoftTabs());\n s.setOverwrite(session.getOverwrite());\n s.setBreakpoints(session.getBreakpoints());\n s.setUseWrapMode(session.getUseWrapMode());\n s.setUseWorker(session.getUseWorker());\n s.setWrapLimitRange(session.$wrapLimitRange.min,\n session.$wrapLimitRange.max);\n s.$foldData = session.$cloneFoldData();\n\n return s;\n };\n this.setSession = function(session, idx) {\n var editor;\n if (idx == null) {\n editor = this.$cEditor;\n } else {\n editor = this.$editors[idx];\n }\n var isUsed = this.$editors.some(function(editor) {\n return editor.session === session;\n });\n\n if (isUsed) {\n session = this.$cloneSession(session);\n }\n editor.setSession(session);\n return session;\n };\n this.getOrientation = function() {\n return this.$orientation;\n };\n this.setOrientation = function(orientation) {\n if (this.$orientation == orientation) {\n return;\n }\n this.$orientation = orientation;\n this.resize();\n };\n this.resize = function() {\n var width = this.$container.clientWidth;\n var height = this.$container.clientHeight;\n var editor;\n\n if (this.$orientation == this.BESIDE) {\n var editorWidth = width / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = editorWidth + \"px\";\n editor.container.style.top = \"0px\";\n editor.container.style.left = i * editorWidth + \"px\";\n editor.container.style.height = height + \"px\";\n editor.resize();\n }\n } else {\n var editorHeight = height / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = width + \"px\";\n editor.container.style.top = i * editorHeight + \"px\";\n editor.container.style.left = \"0px\";\n editor.container.style.height = editorHeight + \"px\";\n editor.resize();\n }\n }\n };\n\n}).call(Split.prototype);\n\nexports.Split = Split;\n});\n\nace.define(\"ace/ext/split\",[\"require\",\"exports\",\"module\",\"ace/split\"], function(require, exports, module) {\n\"use strict\";\nmodule.exports = require(\"../split\");\n\n}); (function() {\n ace.require([\"ace/ext/split\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * Diff Match and Patch\n * Copyright 2018 The diff-match-patch Authors.\n * https://github.com/google/diff-match-patch\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Computes the difference between two texts to create a patch.\n * Applies the patch onto another text, allowing for errors.\n * @author fraser@google.com (Neil Fraser)\n */\n\n/**\n * Class containing the diff, match and patch methods.\n * @constructor\n */\nvar diff_match_patch = function() {\n\n // Defaults.\n // Redefine these in your program to override the defaults.\n\n // Number of seconds to map a diff before giving up (0 for infinity).\n this.Diff_Timeout = 1.0;\n // Cost of an empty edit operation in terms of edit characters.\n this.Diff_EditCost = 4;\n // At what point is no match declared (0.0 = perfection, 1.0 = very loose).\n this.Match_Threshold = 0.5;\n // How far to search for a match (0 = exact location, 1000+ = broad match).\n // A match this many characters away from the expected location will add\n // 1.0 to the score (0.0 is a perfect match).\n this.Match_Distance = 1000;\n // When deleting a large block of text (over ~64 characters), how close do\n // the contents have to be to match the expected contents. (0.0 = perfection,\n // 1.0 = very loose). Note that Match_Threshold controls how closely the\n // end points of a delete need to match.\n this.Patch_DeleteThreshold = 0.5;\n // Chunk size for context length.\n this.Patch_Margin = 4;\n\n // The number of bits in an int.\n this.Match_MaxBits = 32;\n};\n\n\n// DIFF FUNCTIONS\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Class representing one diff tuple.\n * ~Attempts to look like a two-element array (which is what this used to be).~\n * Constructor returns an actual two-element array, to allow destructing @JackuB\n * See https://github.com/JackuB/diff-match-patch/issues/14 for details\n * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.\n * @param {string} text Text to be deleted, inserted, or retained.\n * @constructor\n */\ndiff_match_patch.Diff = function(op, text) {\n return [op, text];\n};\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean=} opt_checklines Optional speedup flag. If present and false,\n * then don't run a line-level diff first to identify the changed areas.\n * Defaults to true, which does a faster, slightly less optimal diff.\n * @param {number=} opt_deadline Optional time when the diff should be complete\n * by. Used internally for recursive calls. Users should set DiffTimeout\n * instead.\n * @return {!Array.} Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,\n opt_deadline) {\n // Set a deadline by which time the diff must be complete.\n if (typeof opt_deadline == 'undefined') {\n if (this.Diff_Timeout <= 0) {\n opt_deadline = Number.MAX_VALUE;\n } else {\n opt_deadline = (new Date).getTime() + this.Diff_Timeout * 1000;\n }\n }\n var deadline = opt_deadline;\n\n // Check for null inputs.\n if (text1 == null || text2 == null) {\n throw new Error('Null input. (diff_main)');\n }\n\n // Check for equality (speedup).\n if (text1 == text2) {\n if (text1) {\n return [new diff_match_patch.Diff(DIFF_EQUAL, text1)];\n }\n return [];\n }\n\n if (typeof opt_checklines == 'undefined') {\n opt_checklines = true;\n }\n var checklines = opt_checklines;\n\n // Trim off common prefix (speedup).\n var commonlength = this.diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = this.diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = this.diff_compute_(text1, text2, checklines, deadline);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, commonprefix));\n }\n if (commonsuffix) {\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, commonsuffix));\n }\n this.diff_cleanupMerge(diffs);\n return diffs;\n};\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean} checklines Speedup flag. If false, then don't run a\n * line-level diff first to identify the changed areas.\n * If true, then run a faster, slightly less optimal diff.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,\n deadline) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [new diff_match_patch.Diff(DIFF_DELETE, text1)];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i != -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [new diff_match_patch.Diff(DIFF_INSERT, longtext.substring(0, i)),\n new diff_match_patch.Diff(DIFF_EQUAL, shorttext),\n new diff_match_patch.Diff(DIFF_INSERT,\n longtext.substring(i + shorttext.length))];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length == 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n // Check to see if the problem can be split in two.\n var hm = this.diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = this.diff_main(text1_a, text2_a, checklines, deadline);\n var diffs_b = this.diff_main(text1_b, text2_b, checklines, deadline);\n // Merge the results.\n return diffs_a.concat([new diff_match_patch.Diff(DIFF_EQUAL, mid_common)],\n diffs_b);\n }\n\n if (checklines && text1.length > 100 && text2.length > 100) {\n return this.diff_lineMode_(text1, text2, deadline);\n }\n\n return this.diff_bisect_(text1, text2, deadline);\n};\n\n\n/**\n * Do a quick line-level diff on both strings, then rediff the parts for\n * greater accuracy.\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {\n // Scan the text on a line-by-line basis first.\n var a = this.diff_linesToChars_(text1, text2);\n text1 = a.chars1;\n text2 = a.chars2;\n var linearray = a.lineArray;\n\n var diffs = this.diff_main(text1, text2, false, deadline);\n\n // Convert the diff back to original text.\n this.diff_charsToLines_(diffs, linearray);\n // Eliminate freak matches (e.g. blank lines)\n this.diff_cleanupSemantic(diffs);\n\n // Rediff any replacement blocks, this time character-by-character.\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete >= 1 && count_insert >= 1) {\n // Delete the offending records and add the merged ones.\n diffs.splice(pointer - count_delete - count_insert,\n count_delete + count_insert);\n pointer = pointer - count_delete - count_insert;\n var subDiff =\n this.diff_main(text_delete, text_insert, false, deadline);\n for (var j = subDiff.length - 1; j >= 0; j--) {\n diffs.splice(pointer, 0, subDiff[j]);\n }\n pointer = pointer + subDiff.length;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n pointer++;\n }\n diffs.pop(); // Remove the dummy entry at the end.\n\n return diffs;\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisect_ = function(text1, text2, deadline) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = (delta % 2 != 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Bail out if deadline is reached.\n if ((new Date()).getTime() > deadline) {\n break;\n }\n\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) == text2.charAt(y1)) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ==\n text2.charAt(text2_length - y2 - 1)) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisectSplit_ = function(text1, text2, x, y,\n deadline) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = this.diff_main(text1a, text2a, false, deadline);\n var diffsb = this.diff_main(text1b, text2b, false, deadline);\n\n return diffs.concat(diffsb);\n};\n\n\n/**\n * Split two texts into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {{chars1: string, chars2: string, lineArray: !Array.}}\n * An object containing the encoded text1, the encoded text2 and\n * the array of unique strings.\n * The zeroth element of the array of unique strings is intentionally blank.\n * @private\n */\ndiff_match_patch.prototype.diff_linesToChars_ = function(text1, text2) {\n var lineArray = []; // e.g. lineArray[4] == 'Hello\\n'\n var lineHash = {}; // e.g. lineHash['Hello\\n'] == 4\n\n // '\\x00' is a valid character, but various debuggers don't like it.\n // So we'll insert a junk entry to avoid generating a null character.\n lineArray[0] = '';\n\n /**\n * Split a text into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * Modifies linearray and linehash through being a closure.\n * @param {string} text String to encode.\n * @return {string} Encoded string.\n * @private\n */\n function diff_linesToCharsMunge_(text) {\n var chars = '';\n // Walk the text, pulling out a substring for each line.\n // text.split('\\n') would would temporarily double our memory footprint.\n // Modifying text would create many large strings to garbage collect.\n var lineStart = 0;\n var lineEnd = -1;\n // Keeping our own length variable is faster than looking it up.\n var lineArrayLength = lineArray.length;\n while (lineEnd < text.length - 1) {\n lineEnd = text.indexOf('\\n', lineStart);\n if (lineEnd == -1) {\n lineEnd = text.length - 1;\n }\n var line = text.substring(lineStart, lineEnd + 1);\n\n if (lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) :\n (lineHash[line] !== undefined)) {\n chars += String.fromCharCode(lineHash[line]);\n } else {\n if (lineArrayLength == maxLines) {\n // Bail out at 65535 because\n // String.fromCharCode(65536) == String.fromCharCode(0)\n line = text.substring(lineStart);\n lineEnd = text.length;\n }\n chars += String.fromCharCode(lineArrayLength);\n lineHash[line] = lineArrayLength;\n lineArray[lineArrayLength++] = line;\n }\n lineStart = lineEnd + 1;\n }\n return chars;\n }\n // Allocate 2/3rds of the space for text1, the rest for text2.\n var maxLines = 40000;\n var chars1 = diff_linesToCharsMunge_(text1);\n maxLines = 65535;\n var chars2 = diff_linesToCharsMunge_(text2);\n return {chars1: chars1, chars2: chars2, lineArray: lineArray};\n};\n\n\n/**\n * Rehydrate the text in a diff from a string of line hashes to real lines of\n * text.\n * @param {!Array.} diffs Array of diff tuples.\n * @param {!Array.} lineArray Array of unique strings.\n * @private\n */\ndiff_match_patch.prototype.diff_charsToLines_ = function(diffs, lineArray) {\n for (var i = 0; i < diffs.length; i++) {\n var chars = diffs[i][1];\n var text = [];\n for (var j = 0; j < chars.length; j++) {\n text[j] = lineArray[chars.charCodeAt(j)];\n }\n diffs[i][1] = text.join('');\n }\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\ndiff_match_patch.prototype.diff_commonPrefix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\ndiff_match_patch.prototype.diff_commonSuffix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 ||\n text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\ndiff_match_patch.prototype.diff_commonOverlap_ = function(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: https://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (found == 0 || text1.substring(text_length - length) ==\n text2.substring(0, length)) {\n best = length;\n length++;\n }\n }\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n * @private\n */\ndiff_match_patch.prototype.diff_halfMatch_ = function(text1, text2) {\n if (this.Diff_Timeout <= 0) {\n // Don't risk returning a non-optimal diff if we have unlimited time.\n return null;\n }\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = '';\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n var prefixLength = dmp.diff_commonPrefix(longtext.substring(i),\n shorttext.substring(j));\n var suffixLength = dmp.diff_commonSuffix(longtext.substring(0, i),\n shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 2));\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = diffs[pointer][1];\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (lastEquality && (lastEquality.length <=\n Math.max(length_insertions1, length_deletions1)) &&\n (lastEquality.length <= Math.max(length_insertions2,\n length_deletions2))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n this.diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = this.diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = this.diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n insertion.substring(0, overlap_length1)));\n diffs[pointer - 1][1] =\n deletion.substring(0, deletion.length - overlap_length1);\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n deletion.substring(0, overlap_length2)));\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] =\n insertion.substring(0, insertion.length - overlap_length2);\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] =\n deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n};\n\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemanticLossless = function(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(diff_match_patch.nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(diff_match_patch.nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 &&\n char1.match(diff_match_patch.whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 &&\n char2.match(diff_match_patch.whitespaceRegex_);\n var lineBreak1 = whitespace1 &&\n char1.match(diff_match_patch.linebreakRegex_);\n var lineBreak2 = whitespace2 &&\n char2.match(diff_match_patch.linebreakRegex_);\n var blankLine1 = lineBreak1 &&\n one.match(diff_match_patch.blanklineEndRegex_);\n var blankLine2 = lineBreak2 &&\n two.match(diff_match_patch.blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = this.diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n};\n\n// Define some regex patterns for matching boundaries.\ndiff_match_patch.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\ndiff_match_patch.whitespaceRegex_ = /\\s/;\ndiff_match_patch.linebreakRegex_ = /[\\r\\n]/;\ndiff_match_patch.blanklineEndRegex_ = /\\n\\r?\\n$/;\ndiff_match_patch.blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Reduce the number of edits by eliminating operationally trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupEfficiency = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Is there an insertion operation before the last equality.\n var pre_ins = false;\n // Is there a deletion operation before the last equality.\n var pre_del = false;\n // Is there an insertion operation after the last equality.\n var post_ins = false;\n // Is there a deletion operation after the last equality.\n var post_del = false;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n if (diffs[pointer][1].length < this.Diff_EditCost &&\n (post_ins || post_del)) {\n // Candidate found.\n equalities[equalitiesLength++] = pointer;\n pre_ins = post_ins;\n pre_del = post_del;\n lastEquality = diffs[pointer][1];\n } else {\n // Not a candidate, and can never become one.\n equalitiesLength = 0;\n lastEquality = null;\n }\n post_ins = post_del = false;\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_DELETE) {\n post_del = true;\n } else {\n post_ins = true;\n }\n /*\n * Five types to be split:\n * ABXYCD\n * AXCD\n * ABXC\n * AXCD\n * ABXC\n */\n if (lastEquality && ((pre_ins && pre_del && post_ins && post_del) ||\n ((lastEquality.length < this.Diff_EditCost / 2) &&\n (pre_ins + pre_del + post_ins + post_del) == 3))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n equalitiesLength--; // Throw away the equality we just deleted;\n lastEquality = null;\n if (pre_ins && pre_del) {\n // No changes made which could affect previous entry, keep going.\n post_ins = post_del = true;\n equalitiesLength = 0;\n } else {\n equalitiesLength--; // Throw away the previous equality.\n pointer = equalitiesLength > 0 ?\n equalities[equalitiesLength - 1] : -1;\n post_ins = post_del = false;\n }\n changes = true;\n }\n }\n pointer++;\n }\n\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupMerge = function(diffs) {\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n var commonlength;\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete + count_insert > 1) {\n if (count_delete !== 0 && count_insert !== 0) {\n // Factor out any common prefixies.\n commonlength = this.diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if ((pointer - count_delete - count_insert) > 0 &&\n diffs[pointer - count_delete - count_insert - 1][0] ==\n DIFF_EQUAL) {\n diffs[pointer - count_delete - count_insert - 1][1] +=\n text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n text_insert.substring(0, commonlength)));\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixies.\n commonlength = this.diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] = text_insert.substring(text_insert.length -\n commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length -\n commonlength);\n text_delete = text_delete.substring(0, text_delete.length -\n commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n pointer -= count_delete + count_insert;\n diffs.splice(pointer, count_delete + count_insert);\n if (text_delete.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_DELETE, text_delete));\n pointer++;\n }\n if (text_insert.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_INSERT, text_insert));\n pointer++;\n }\n pointer++;\n } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * loc is a location in text1, compute and return the equivalent location in\n * text2.\n * e.g. 'The cat' vs 'The big cat', 1->1, 5->8\n * @param {!Array.} diffs Array of diff tuples.\n * @param {number} loc Location within text1.\n * @return {number} Location within text2.\n */\ndiff_match_patch.prototype.diff_xIndex = function(diffs, loc) {\n var chars1 = 0;\n var chars2 = 0;\n var last_chars1 = 0;\n var last_chars2 = 0;\n var x;\n for (x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) { // Equality or deletion.\n chars1 += diffs[x][1].length;\n }\n if (diffs[x][0] !== DIFF_DELETE) { // Equality or insertion.\n chars2 += diffs[x][1].length;\n }\n if (chars1 > loc) { // Overshot the location.\n break;\n }\n last_chars1 = chars1;\n last_chars2 = chars2;\n }\n // Was the location was deleted?\n if (diffs.length != x && diffs[x][0] === DIFF_DELETE) {\n return last_chars2;\n }\n // Add the remaining character length.\n return last_chars2 + (loc - last_chars1);\n};\n\n\n/**\n * Convert a diff array into a pretty HTML report.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} HTML representation.\n */\ndiff_match_patch.prototype.diff_prettyHtml = function(diffs) {\n var html = [];\n var pattern_amp = /&/g;\n var pattern_lt = //g;\n var pattern_para = /\\n/g;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0]; // Operation (insert, delete, equal)\n var data = diffs[x][1]; // Text of change.\n var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')\n .replace(pattern_gt, '>').replace(pattern_para, '¶
');\n switch (op) {\n case DIFF_INSERT:\n html[x] = '' + text + '';\n break;\n case DIFF_DELETE:\n html[x] = '' + text + '';\n break;\n case DIFF_EQUAL:\n html[x] = '' + text + '';\n break;\n }\n }\n return html.join('');\n};\n\n\n/**\n * Compute and return the source text (all equalities and deletions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Source text.\n */\ndiff_match_patch.prototype.diff_text1 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute and return the destination text (all equalities and insertions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Destination text.\n */\ndiff_match_patch.prototype.diff_text2 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_DELETE) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute the Levenshtein distance; the number of inserted, deleted or\n * substituted characters.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {number} Number of changes.\n */\ndiff_match_patch.prototype.diff_levenshtein = function(diffs) {\n var levenshtein = 0;\n var insertions = 0;\n var deletions = 0;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0];\n var data = diffs[x][1];\n switch (op) {\n case DIFF_INSERT:\n insertions += data.length;\n break;\n case DIFF_DELETE:\n deletions += data.length;\n break;\n case DIFF_EQUAL:\n // A deletion and an insertion is one substitution.\n levenshtein += Math.max(insertions, deletions);\n insertions = 0;\n deletions = 0;\n break;\n }\n }\n levenshtein += Math.max(insertions, deletions);\n return levenshtein;\n};\n\n\n/**\n * Crush the diff into an encoded string which describes the operations\n * required to transform text1 into text2.\n * E.g. =3\\t-2\\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'.\n * Operations are tab-separated. Inserted text is escaped using %xx notation.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Delta text.\n */\ndiff_match_patch.prototype.diff_toDelta = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n switch (diffs[x][0]) {\n case DIFF_INSERT:\n text[x] = '+' + encodeURI(diffs[x][1]);\n break;\n case DIFF_DELETE:\n text[x] = '-' + diffs[x][1].length;\n break;\n case DIFF_EQUAL:\n text[x] = '=' + diffs[x][1].length;\n break;\n }\n }\n return text.join('\\t').replace(/%20/g, ' ');\n};\n\n\n/**\n * Given the original text1, and an encoded string which describes the\n * operations required to transform text1 into text2, compute the full diff.\n * @param {string} text1 Source string for the diff.\n * @param {string} delta Delta text.\n * @return {!Array.} Array of diff tuples.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.diff_fromDelta = function(text1, delta) {\n var diffs = [];\n var diffsLength = 0; // Keeping our own length var is faster in JS.\n var pointer = 0; // Cursor in text1\n var tokens = delta.split(/\\t/g);\n for (var x = 0; x < tokens.length; x++) {\n // Each token begins with a one character parameter which specifies the\n // operation of this token (delete, insert, equality).\n var param = tokens[x].substring(1);\n switch (tokens[x].charAt(0)) {\n case '+':\n try {\n diffs[diffsLength++] =\n new diff_match_patch.Diff(DIFF_INSERT, decodeURI(param));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in diff_fromDelta: ' + param);\n }\n break;\n case '-':\n // Fall through.\n case '=':\n var n = parseInt(param, 10);\n if (isNaN(n) || n < 0) {\n throw new Error('Invalid number in diff_fromDelta: ' + param);\n }\n var text = text1.substring(pointer, pointer += n);\n if (tokens[x].charAt(0) == '=') {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_EQUAL, text);\n } else {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_DELETE, text);\n }\n break;\n default:\n // Blank tokens are ok (from a trailing \\t).\n // Anything else is an error.\n if (tokens[x]) {\n throw new Error('Invalid diff operation in diff_fromDelta: ' +\n tokens[x]);\n }\n }\n }\n if (pointer != text1.length) {\n throw new Error('Delta length (' + pointer +\n ') does not equal source text length (' + text1.length + ').');\n }\n return diffs;\n};\n\n\n// MATCH FUNCTIONS\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc'.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n */\ndiff_match_patch.prototype.match_main = function(text, pattern, loc) {\n // Check for null inputs.\n if (text == null || pattern == null || loc == null) {\n throw new Error('Null input. (match_main)');\n }\n\n loc = Math.max(0, Math.min(loc, text.length));\n if (text == pattern) {\n // Shortcut (potentially not guaranteed by the algorithm)\n return 0;\n } else if (!text.length) {\n // Nothing to match.\n return -1;\n } else if (text.substring(loc, loc + pattern.length) == pattern) {\n // Perfect match at the perfect spot! (Includes case of null pattern)\n return loc;\n } else {\n // Do a fuzzy compare.\n return this.match_bitap_(text, pattern, loc);\n }\n};\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc' using the\n * Bitap algorithm.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n * @private\n */\ndiff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {\n if (pattern.length > this.Match_MaxBits) {\n throw new Error('Pattern too long for this browser.');\n }\n\n // Initialise the alphabet.\n var s = this.match_alphabet_(pattern);\n\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Compute and return the score for a match with e errors and x location.\n * Accesses loc and pattern through being a closure.\n * @param {number} e Number of errors in match.\n * @param {number} x Location of match.\n * @return {number} Overall score for match (0.0 = good, 1.0 = bad).\n * @private\n */\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length;\n var proximity = Math.abs(loc - x);\n if (!dmp.Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy;\n }\n return accuracy + (proximity / dmp.Match_Distance);\n }\n\n // Highest score beyond which we give up.\n var score_threshold = this.Match_Threshold;\n // Is there a nearby exact match? (speedup)\n var best_loc = text.indexOf(pattern, loc);\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length);\n if (best_loc != -1) {\n score_threshold =\n Math.min(match_bitapScore_(0, best_loc), score_threshold);\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1);\n best_loc = -1;\n\n var bin_min, bin_mid;\n var bin_max = pattern.length + text.length;\n var last_rd;\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0;\n bin_mid = bin_max;\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid;\n } else {\n bin_max = bin_mid;\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid;\n var start = Math.max(1, loc - bin_mid + 1);\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length;\n\n var rd = Array(finish + 2);\n rd[finish + 1] = (1 << d) - 1;\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)];\n if (d === 0) { // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;\n } else { // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) |\n (((last_rd[j + 1] | last_rd[j]) << 1) | 1) |\n last_rd[j + 1];\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1);\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score;\n best_loc = j - 1;\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc);\n } else {\n // Already passed loc, downhill from here on in.\n break;\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break;\n }\n last_rd = rd;\n }\n return best_loc;\n};\n\n\n/**\n * Initialise the alphabet for the Bitap algorithm.\n * @param {string} pattern The text to encode.\n * @return {!Object} Hash of character locations.\n * @private\n */\ndiff_match_patch.prototype.match_alphabet_ = function(pattern) {\n var s = {};\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] = 0;\n }\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] |= 1 << (pattern.length - i - 1);\n }\n return s;\n};\n\n\n// PATCH FUNCTIONS\n\n\n/**\n * Increase the context until it is unique,\n * but don't let the pattern expand beyond Match_MaxBits.\n * @param {!diff_match_patch.patch_obj} patch The patch to grow.\n * @param {string} text Source text.\n * @private\n */\ndiff_match_patch.prototype.patch_addContext_ = function(patch, text) {\n if (text.length == 0) {\n return;\n }\n if (patch.start2 === null) {\n throw Error('patch not initialized');\n }\n var pattern = text.substring(patch.start2, patch.start2 + patch.length1);\n var padding = 0;\n\n // Look for the first and last matches of pattern in text. If two different\n // matches are found, increase the pattern length.\n while (text.indexOf(pattern) != text.lastIndexOf(pattern) &&\n pattern.length < this.Match_MaxBits - this.Patch_Margin -\n this.Patch_Margin) {\n padding += this.Patch_Margin;\n pattern = text.substring(patch.start2 - padding,\n patch.start2 + patch.length1 + padding);\n }\n // Add one chunk for good luck.\n padding += this.Patch_Margin;\n\n // Add the prefix.\n var prefix = text.substring(patch.start2 - padding, patch.start2);\n if (prefix) {\n patch.diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, prefix));\n }\n // Add the suffix.\n var suffix = text.substring(patch.start2 + patch.length1,\n patch.start2 + patch.length1 + padding);\n if (suffix) {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, suffix));\n }\n\n // Roll back the start points.\n patch.start1 -= prefix.length;\n patch.start2 -= prefix.length;\n // Extend the lengths.\n patch.length1 += prefix.length + suffix.length;\n patch.length2 += prefix.length + suffix.length;\n};\n\n\n/**\n * Compute a list of patches to turn text1 into text2.\n * Use diffs if provided, otherwise compute it ourselves.\n * There are four ways to call this function, depending on what data is\n * available to the caller:\n * Method 1:\n * a = text1, b = text2\n * Method 2:\n * a = diffs\n * Method 3 (optimal):\n * a = text1, b = diffs\n * Method 4 (deprecated, use method 3):\n * a = text1, b = text2, c = diffs\n *\n * @param {string|!Array.} a text1 (methods 1,3,4) or\n * Array of diff tuples for text1 to text2 (method 2).\n * @param {string|!Array.=} opt_b text2 (methods 1,4) or\n * Array of diff tuples for text1 to text2 (method 3) or undefined (method 2).\n * @param {string|!Array.=} opt_c Array of diff tuples\n * for text1 to text2 (method 4) or undefined (methods 1,2,3).\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_make = function(a, opt_b, opt_c) {\n var text1, diffs;\n if (typeof a == 'string' && typeof opt_b == 'string' &&\n typeof opt_c == 'undefined') {\n // Method 1: text1, text2\n // Compute diffs from text1 and text2.\n text1 = /** @type {string} */(a);\n diffs = this.diff_main(text1, /** @type {string} */(opt_b), true);\n if (diffs.length > 2) {\n this.diff_cleanupSemantic(diffs);\n this.diff_cleanupEfficiency(diffs);\n }\n } else if (a && typeof a == 'object' && typeof opt_b == 'undefined' &&\n typeof opt_c == 'undefined') {\n // Method 2: diffs\n // Compute text1 from diffs.\n diffs = /** @type {!Array.} */(a);\n text1 = this.diff_text1(diffs);\n } else if (typeof a == 'string' && opt_b && typeof opt_b == 'object' &&\n typeof opt_c == 'undefined') {\n // Method 3: text1, diffs\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_b);\n } else if (typeof a == 'string' && typeof opt_b == 'string' &&\n opt_c && typeof opt_c == 'object') {\n // Method 4: text1, text2, diffs\n // text2 is not used.\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_c);\n } else {\n throw new Error('Unknown call format to patch_make.');\n }\n\n if (diffs.length === 0) {\n return []; // Get rid of the null case.\n }\n var patches = [];\n var patch = new diff_match_patch.patch_obj();\n var patchDiffLength = 0; // Keeping our own length var is faster in JS.\n var char_count1 = 0; // Number of characters into the text1 string.\n var char_count2 = 0; // Number of characters into the text2 string.\n // Start with text1 (prepatch_text) and apply the diffs until we arrive at\n // text2 (postpatch_text). We recreate the patches one by one to determine\n // context info.\n var prepatch_text = text1;\n var postpatch_text = text1;\n for (var x = 0; x < diffs.length; x++) {\n var diff_type = diffs[x][0];\n var diff_text = diffs[x][1];\n\n if (!patchDiffLength && diff_type !== DIFF_EQUAL) {\n // A new patch starts here.\n patch.start1 = char_count1;\n patch.start2 = char_count2;\n }\n\n switch (diff_type) {\n case DIFF_INSERT:\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length2 += diff_text.length;\n postpatch_text = postpatch_text.substring(0, char_count2) + diff_text +\n postpatch_text.substring(char_count2);\n break;\n case DIFF_DELETE:\n patch.length1 += diff_text.length;\n patch.diffs[patchDiffLength++] = diffs[x];\n postpatch_text = postpatch_text.substring(0, char_count2) +\n postpatch_text.substring(char_count2 +\n diff_text.length);\n break;\n case DIFF_EQUAL:\n if (diff_text.length <= 2 * this.Patch_Margin &&\n patchDiffLength && diffs.length != x + 1) {\n // Small equality inside a patch.\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length1 += diff_text.length;\n patch.length2 += diff_text.length;\n } else if (diff_text.length >= 2 * this.Patch_Margin) {\n // Time for a new patch.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n patch = new diff_match_patch.patch_obj();\n patchDiffLength = 0;\n // Unlike Unidiff, our patch lists have a rolling context.\n // https://github.com/google/diff-match-patch/wiki/Unidiff\n // Update prepatch text & pos to reflect the application of the\n // just completed patch.\n prepatch_text = postpatch_text;\n char_count1 = char_count2;\n }\n }\n break;\n }\n\n // Update the current character count.\n if (diff_type !== DIFF_INSERT) {\n char_count1 += diff_text.length;\n }\n if (diff_type !== DIFF_DELETE) {\n char_count2 += diff_text.length;\n }\n }\n // Pick up the leftover patch if not empty.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n }\n\n return patches;\n};\n\n\n/**\n * Given an array of patches, return another array that is identical.\n * @param {!Array.} patches Array of Patch objects.\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_deepCopy = function(patches) {\n // Making deep copies is hard in JavaScript.\n var patchesCopy = [];\n for (var x = 0; x < patches.length; x++) {\n var patch = patches[x];\n var patchCopy = new diff_match_patch.patch_obj();\n patchCopy.diffs = [];\n for (var y = 0; y < patch.diffs.length; y++) {\n patchCopy.diffs[y] =\n new diff_match_patch.Diff(patch.diffs[y][0], patch.diffs[y][1]);\n }\n patchCopy.start1 = patch.start1;\n patchCopy.start2 = patch.start2;\n patchCopy.length1 = patch.length1;\n patchCopy.length2 = patch.length2;\n patchesCopy[x] = patchCopy;\n }\n return patchesCopy;\n};\n\n\n/**\n * Merge a set of patches onto the text. Return a patched text, as well\n * as a list of true/false values indicating which patches were applied.\n * @param {!Array.} patches Array of Patch objects.\n * @param {string} text Old text.\n * @return {!Array.>} Two element Array, containing the\n * new text and an array of boolean values.\n */\ndiff_match_patch.prototype.patch_apply = function(patches, text) {\n if (patches.length == 0) {\n return [text, []];\n }\n\n // Deep copy the patches so that no changes are made to originals.\n patches = this.patch_deepCopy(patches);\n\n var nullPadding = this.patch_addPadding(patches);\n text = nullPadding + text + nullPadding;\n\n this.patch_splitMax(patches);\n // delta keeps track of the offset between the expected and actual location\n // of the previous patch. If there are patches expected at positions 10 and\n // 20, but the first patch was found at 12, delta is 2 and the second patch\n // has an effective expected position of 22.\n var delta = 0;\n var results = [];\n for (var x = 0; x < patches.length; x++) {\n var expected_loc = patches[x].start2 + delta;\n var text1 = this.diff_text1(patches[x].diffs);\n var start_loc;\n var end_loc = -1;\n if (text1.length > this.Match_MaxBits) {\n // patch_splitMax will only provide an oversized pattern in the case of\n // a monster delete.\n start_loc = this.match_main(text, text1.substring(0, this.Match_MaxBits),\n expected_loc);\n if (start_loc != -1) {\n end_loc = this.match_main(text,\n text1.substring(text1.length - this.Match_MaxBits),\n expected_loc + text1.length - this.Match_MaxBits);\n if (end_loc == -1 || start_loc >= end_loc) {\n // Can't find valid trailing context. Drop this patch.\n start_loc = -1;\n }\n }\n } else {\n start_loc = this.match_main(text, text1, expected_loc);\n }\n if (start_loc == -1) {\n // No match found. :(\n results[x] = false;\n // Subtract the delta for this failed patch from subsequent patches.\n delta -= patches[x].length2 - patches[x].length1;\n } else {\n // Found a match. :)\n results[x] = true;\n delta = start_loc - expected_loc;\n var text2;\n if (end_loc == -1) {\n text2 = text.substring(start_loc, start_loc + text1.length);\n } else {\n text2 = text.substring(start_loc, end_loc + this.Match_MaxBits);\n }\n if (text1 == text2) {\n // Perfect match, just shove the replacement text in.\n text = text.substring(0, start_loc) +\n this.diff_text2(patches[x].diffs) +\n text.substring(start_loc + text1.length);\n } else {\n // Imperfect match. Run a diff to get a framework of equivalent\n // indices.\n var diffs = this.diff_main(text1, text2, false);\n if (text1.length > this.Match_MaxBits &&\n this.diff_levenshtein(diffs) / text1.length >\n this.Patch_DeleteThreshold) {\n // The end points match, but the content is unacceptably bad.\n results[x] = false;\n } else {\n this.diff_cleanupSemanticLossless(diffs);\n var index1 = 0;\n var index2;\n for (var y = 0; y < patches[x].diffs.length; y++) {\n var mod = patches[x].diffs[y];\n if (mod[0] !== DIFF_EQUAL) {\n index2 = this.diff_xIndex(diffs, index1);\n }\n if (mod[0] === DIFF_INSERT) { // Insertion\n text = text.substring(0, start_loc + index2) + mod[1] +\n text.substring(start_loc + index2);\n } else if (mod[0] === DIFF_DELETE) { // Deletion\n text = text.substring(0, start_loc + index2) +\n text.substring(start_loc + this.diff_xIndex(diffs,\n index1 + mod[1].length));\n }\n if (mod[0] !== DIFF_DELETE) {\n index1 += mod[1].length;\n }\n }\n }\n }\n }\n }\n // Strip the padding off.\n text = text.substring(nullPadding.length, text.length - nullPadding.length);\n return [text, results];\n};\n\n\n/**\n * Add some padding on text start and end so that edges can match something.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} The padding string added to each side.\n */\ndiff_match_patch.prototype.patch_addPadding = function(patches) {\n var paddingLength = this.Patch_Margin;\n var nullPadding = '';\n for (var x = 1; x <= paddingLength; x++) {\n nullPadding += String.fromCharCode(x);\n }\n\n // Bump all the patches forward.\n for (var x = 0; x < patches.length; x++) {\n patches[x].start1 += paddingLength;\n patches[x].start2 += paddingLength;\n }\n\n // Add some padding on start of first diff.\n var patch = patches[0];\n var diffs = patch.diffs;\n if (diffs.length == 0 || diffs[0][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.start1 -= paddingLength; // Should be 0.\n patch.start2 -= paddingLength; // Should be 0.\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[0][1].length) {\n // Grow first equality.\n var extraLength = paddingLength - diffs[0][1].length;\n diffs[0][1] = nullPadding.substring(diffs[0][1].length) + diffs[0][1];\n patch.start1 -= extraLength;\n patch.start2 -= extraLength;\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n // Add some padding on end of last diff.\n patch = patches[patches.length - 1];\n diffs = patch.diffs;\n if (diffs.length == 0 || diffs[diffs.length - 1][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[diffs.length - 1][1].length) {\n // Grow last equality.\n var extraLength = paddingLength - diffs[diffs.length - 1][1].length;\n diffs[diffs.length - 1][1] += nullPadding.substring(0, extraLength);\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n return nullPadding;\n};\n\n\n/**\n * Look through the patches and break up any which are longer than the maximum\n * limit of the match algorithm.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_splitMax = function(patches) {\n var patch_size = this.Match_MaxBits;\n for (var x = 0; x < patches.length; x++) {\n if (patches[x].length1 <= patch_size) {\n continue;\n }\n var bigpatch = patches[x];\n // Remove the big old patch.\n patches.splice(x--, 1);\n var start1 = bigpatch.start1;\n var start2 = bigpatch.start2;\n var precontext = '';\n while (bigpatch.diffs.length !== 0) {\n // Create one of several smaller patches.\n var patch = new diff_match_patch.patch_obj();\n var empty = true;\n patch.start1 = start1 - precontext.length;\n patch.start2 = start2 - precontext.length;\n if (precontext !== '') {\n patch.length1 = patch.length2 = precontext.length;\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, precontext));\n }\n while (bigpatch.diffs.length !== 0 &&\n patch.length1 < patch_size - this.Patch_Margin) {\n var diff_type = bigpatch.diffs[0][0];\n var diff_text = bigpatch.diffs[0][1];\n if (diff_type === DIFF_INSERT) {\n // Insertions are harmless.\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n patch.diffs.push(bigpatch.diffs.shift());\n empty = false;\n } else if (diff_type === DIFF_DELETE && patch.diffs.length == 1 &&\n patch.diffs[0][0] == DIFF_EQUAL &&\n diff_text.length > 2 * patch_size) {\n // This is a large deletion. Let it pass in one chunk.\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n empty = false;\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n bigpatch.diffs.shift();\n } else {\n // Deletion or equality. Only take as much as we can stomach.\n diff_text = diff_text.substring(0,\n patch_size - patch.length1 - this.Patch_Margin);\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n if (diff_type === DIFF_EQUAL) {\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n } else {\n empty = false;\n }\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n if (diff_text == bigpatch.diffs[0][1]) {\n bigpatch.diffs.shift();\n } else {\n bigpatch.diffs[0][1] =\n bigpatch.diffs[0][1].substring(diff_text.length);\n }\n }\n }\n // Compute the head context for the next patch.\n precontext = this.diff_text2(patch.diffs);\n precontext =\n precontext.substring(precontext.length - this.Patch_Margin);\n // Append the end context for this patch.\n var postcontext = this.diff_text1(bigpatch.diffs)\n .substring(0, this.Patch_Margin);\n if (postcontext !== '') {\n patch.length1 += postcontext.length;\n patch.length2 += postcontext.length;\n if (patch.diffs.length !== 0 &&\n patch.diffs[patch.diffs.length - 1][0] === DIFF_EQUAL) {\n patch.diffs[patch.diffs.length - 1][1] += postcontext;\n } else {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, postcontext));\n }\n }\n if (!empty) {\n patches.splice(++x, 0, patch);\n }\n }\n }\n};\n\n\n/**\n * Take a list of patches and return a textual representation.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} Text representation of patches.\n */\ndiff_match_patch.prototype.patch_toText = function(patches) {\n var text = [];\n for (var x = 0; x < patches.length; x++) {\n text[x] = patches[x];\n }\n return text.join('');\n};\n\n\n/**\n * Parse a textual representation of patches and return a list of Patch objects.\n * @param {string} textline Text representation of patches.\n * @return {!Array.} Array of Patch objects.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.patch_fromText = function(textline) {\n var patches = [];\n if (!textline) {\n return patches;\n }\n var text = textline.split('\\n');\n var textPointer = 0;\n var patchHeader = /^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$/;\n while (textPointer < text.length) {\n var m = text[textPointer].match(patchHeader);\n if (!m) {\n throw new Error('Invalid patch string: ' + text[textPointer]);\n }\n var patch = new diff_match_patch.patch_obj();\n patches.push(patch);\n patch.start1 = parseInt(m[1], 10);\n if (m[2] === '') {\n patch.start1--;\n patch.length1 = 1;\n } else if (m[2] == '0') {\n patch.length1 = 0;\n } else {\n patch.start1--;\n patch.length1 = parseInt(m[2], 10);\n }\n\n patch.start2 = parseInt(m[3], 10);\n if (m[4] === '') {\n patch.start2--;\n patch.length2 = 1;\n } else if (m[4] == '0') {\n patch.length2 = 0;\n } else {\n patch.start2--;\n patch.length2 = parseInt(m[4], 10);\n }\n textPointer++;\n\n while (textPointer < text.length) {\n var sign = text[textPointer].charAt(0);\n try {\n var line = decodeURI(text[textPointer].substring(1));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in patch_fromText: ' + line);\n }\n if (sign == '-') {\n // Deletion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_DELETE, line));\n } else if (sign == '+') {\n // Insertion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_INSERT, line));\n } else if (sign == ' ') {\n // Minor equality.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, line));\n } else if (sign == '@') {\n // Start of next patch.\n break;\n } else if (sign === '') {\n // Blank line? Whatever.\n } else {\n // WTF?\n throw new Error('Invalid patch mode \"' + sign + '\" in: ' + line);\n }\n textPointer++;\n }\n }\n return patches;\n};\n\n\n/**\n * Class representing one patch operation.\n * @constructor\n */\ndiff_match_patch.patch_obj = function() {\n /** @type {!Array.} */\n this.diffs = [];\n /** @type {?number} */\n this.start1 = null;\n /** @type {?number} */\n this.start2 = null;\n /** @type {number} */\n this.length1 = 0;\n /** @type {number} */\n this.length2 = 0;\n};\n\n\n/**\n * Emulate GNU diff's format.\n * Header: @@ -382,8 +481,9 @@\n * Indices are printed as 1-based, not 0-based.\n * @return {string} The GNU diff string.\n */\ndiff_match_patch.patch_obj.prototype.toString = function() {\n var coords1, coords2;\n if (this.length1 === 0) {\n coords1 = this.start1 + ',0';\n } else if (this.length1 == 1) {\n coords1 = this.start1 + 1;\n } else {\n coords1 = (this.start1 + 1) + ',' + this.length1;\n }\n if (this.length2 === 0) {\n coords2 = this.start2 + ',0';\n } else if (this.length2 == 1) {\n coords2 = this.start2 + 1;\n } else {\n coords2 = (this.start2 + 1) + ',' + this.length2;\n }\n var text = ['@@ -' + coords1 + ' +' + coords2 + ' @@\\n'];\n var op;\n // Escape the body of the patch with %xx notation.\n for (var x = 0; x < this.diffs.length; x++) {\n switch (this.diffs[x][0]) {\n case DIFF_INSERT:\n op = '+';\n break;\n case DIFF_DELETE:\n op = '-';\n break;\n case DIFF_EQUAL:\n op = ' ';\n break;\n }\n text[x + 1] = op + encodeURI(this.diffs[x][1]) + '\\n';\n }\n return text.join('').replace(/%20/g, ' ');\n};\n\n\n// The following export code was added by @ForbesLindesay\nmodule.exports = diff_match_patch;\nmodule.exports['diff_match_patch'] = diff_match_patch;\nmodule.exports['DIFF_DELETE'] = DIFF_DELETE;\nmodule.exports['DIFF_INSERT'] = DIFF_INSERT;\nmodule.exports['DIFF_EQUAL'] = DIFF_EQUAL;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","var purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","var deepPurple = {\n 50: '#ede7f6',\n 100: '#d1c4e9',\n 200: '#b39ddb',\n 300: '#9575cd',\n 400: '#7e57c2',\n 500: '#673ab7',\n 600: '#5e35b1',\n 700: '#512da8',\n 800: '#4527a0',\n 900: '#311b92',\n A100: '#b388ff',\n A200: '#7c4dff',\n A400: '#651fff',\n A700: '#6200ea'\n};\nexport default deepPurple;","var lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","var cyan = {\n 50: '#e0f7fa',\n 100: '#b2ebf2',\n 200: '#80deea',\n 300: '#4dd0e1',\n 400: '#26c6da',\n 500: '#00bcd4',\n 600: '#00acc1',\n 700: '#0097a7',\n 800: '#00838f',\n 900: '#006064',\n A100: '#84ffff',\n A200: '#18ffff',\n A400: '#00e5ff',\n A700: '#00b8d4'\n};\nexport default cyan;","var teal = {\n 50: '#e0f2f1',\n 100: '#b2dfdb',\n 200: '#80cbc4',\n 300: '#4db6ac',\n 400: '#26a69a',\n 500: '#009688',\n 600: '#00897b',\n 700: '#00796b',\n 800: '#00695c',\n 900: '#004d40',\n A100: '#a7ffeb',\n A200: '#64ffda',\n A400: '#1de9b6',\n A700: '#00bfa5'\n};\nexport default teal;","var lightGreen = {\n 50: '#f1f8e9',\n 100: '#dcedc8',\n 200: '#c5e1a5',\n 300: '#aed581',\n 400: '#9ccc65',\n 500: '#8bc34a',\n 600: '#7cb342',\n 700: '#689f38',\n 800: '#558b2f',\n 900: '#33691e',\n A100: '#ccff90',\n A200: '#b2ff59',\n A400: '#76ff03',\n A700: '#64dd17'\n};\nexport default lightGreen;","var lime = {\n 50: '#f9fbe7',\n 100: '#f0f4c3',\n 200: '#e6ee9c',\n 300: '#dce775',\n 400: '#d4e157',\n 500: '#cddc39',\n 600: '#c0ca33',\n 700: '#afb42b',\n 800: '#9e9d24',\n 900: '#827717',\n A100: '#f4ff81',\n A200: '#eeff41',\n A400: '#c6ff00',\n A700: '#aeea00'\n};\nexport default lime;","var yellow = {\n 50: '#fffde7',\n 100: '#fff9c4',\n 200: '#fff59d',\n 300: '#fff176',\n 400: '#ffee58',\n 500: '#ffeb3b',\n 600: '#fdd835',\n 700: '#fbc02d',\n 800: '#f9a825',\n 900: '#f57f17',\n A100: '#ffff8d',\n A200: '#ffff00',\n A400: '#ffea00',\n A700: '#ffd600'\n};\nexport default yellow;","var amber = {\n 50: '#fff8e1',\n 100: '#ffecb3',\n 200: '#ffe082',\n 300: '#ffd54f',\n 400: '#ffca28',\n 500: '#ffc107',\n 600: '#ffb300',\n 700: '#ffa000',\n 800: '#ff8f00',\n 900: '#ff6f00',\n A100: '#ffe57f',\n A200: '#ffd740',\n A400: '#ffc400',\n A700: '#ffab00'\n};\nexport default amber;","var deepOrange = {\n 50: '#fbe9e7',\n 100: '#ffccbc',\n 200: '#ffab91',\n 300: '#ff8a65',\n 400: '#ff7043',\n 500: '#ff5722',\n 600: '#f4511e',\n 700: '#e64a19',\n 800: '#d84315',\n 900: '#bf360c',\n A100: '#ff9e80',\n A200: '#ff6e40',\n A400: '#ff3d00',\n A700: '#dd2c00'\n};\nexport default deepOrange;","var brown = {\n 50: '#efebe9',\n 100: '#d7ccc8',\n 200: '#bcaaa4',\n 300: '#a1887f',\n 400: '#8d6e63',\n 500: '#795548',\n 600: '#6d4c41',\n 700: '#5d4037',\n 800: '#4e342e',\n 900: '#3e2723',\n A100: '#d7ccc8',\n A200: '#bcaaa4',\n A400: '#8d6e63',\n A700: '#5d4037'\n};\nexport default brown;","var blueGrey = {\n 50: '#eceff1',\n 100: '#cfd8dc',\n 200: '#b0bec5',\n 300: '#90a4ae',\n 400: '#78909c',\n 500: '#607d8b',\n 600: '#546e7a',\n 700: '#455a64',\n 800: '#37474f',\n 900: '#263238',\n A100: '#cfd8dc',\n A200: '#b0bec5',\n A400: '#78909c',\n A700: '#455a64'\n};\nexport default blueGrey;","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar AccordionContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n AccordionContext.displayName = 'AccordionContext';\n}\n\nexport default AccordionContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from './AccordionContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar Accordion = /*#__PURE__*/React.forwardRef(function Accordion(props, ref) {\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'Accordion',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(AccordionContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Accordion.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The Accordion doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the accordion by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the accordion will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the accordion.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordion'\n})(Accordion);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionActions'\n})(AccordionActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionDetails'\n})(AccordionDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from '../Accordion/AccordionContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused, &$focusVisible': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focused: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$IconButtonProp = props.IconButtonProps,\n IconButtonProps = _props$IconButtonProp === void 0 ? {} : _props$IconButtonProp,\n onClick = props.onClick,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"focusVisibleClassName\", \"IconButtonProps\", \"onClick\"]);\n\n var _React$useContext = React.useContext(AccordionContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded),\n focusVisibleClassName: clsx(classes.focusVisible, classes.focused, focusVisibleClassName),\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n // Guard against when generation of classes is disabled in the stylesheets (`disableGeneration`).\n // For `disableGeneration` we don't have an accurate warning but `disableGeneration` is an advanced use case anyway.\n if (props.classes.focused !== undefined && props.classes.focused.indexOf(' ') !== -1) {\n return new Error(['Material-UI: The `classes.focused` key is deprecated.', 'Use `classes.focusVisible` instead.', 'The name of the pseudo-class was changed for consistency.'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionSummary'\n})(AccordionSummary);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport Person from '../internal/svg-icons/Person';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 40,\n height: 40,\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(20),\n lineHeight: 1,\n borderRadius: '50%',\n overflow: 'hidden',\n userSelect: 'none'\n },\n\n /* Styles applied to the root element if not `src` or `srcSet`. */\n colorDefault: {\n color: theme.palette.background.default,\n backgroundColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `variant=\"circle\"`. */\n circle: {},\n\n /* Styles applied to the root element if `variant=\"circular\"`. */\n circular: {},\n\n /* Styles applied to the root element if `variant=\"rounded\"`. */\n rounded: {\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"square\"`. */\n square: {\n borderRadius: 0\n },\n\n /* Styles applied to the img element if either `src` or `srcSet` is defined. */\n img: {\n width: '100%',\n height: '100%',\n textAlign: 'center',\n // Handle non-square image. The property isn't supported by IE 11.\n objectFit: 'cover',\n // Hide alt text.\n color: 'transparent',\n // Hide the image broken icon, only works on Chrome.\n textIndent: 10000\n },\n\n /* Styles applied to the fallback icon */\n fallback: {\n width: '75%',\n height: '75%'\n }\n };\n};\n\nfunction useLoaded(_ref) {\n var src = _ref.src,\n srcSet = _ref.srcSet;\n\n var _React$useState = React.useState(false),\n loaded = _React$useState[0],\n setLoaded = _React$useState[1];\n\n React.useEffect(function () {\n if (!src && !srcSet) {\n return undefined;\n }\n\n setLoaded(false);\n var active = true;\n var image = new Image();\n image.src = src;\n image.srcSet = srcSet;\n\n image.onload = function () {\n if (!active) {\n return;\n }\n\n setLoaded('loaded');\n };\n\n image.onerror = function () {\n if (!active) {\n return;\n }\n\n setLoaded('error');\n };\n\n return function () {\n active = false;\n };\n }, [src, srcSet]);\n return loaded;\n}\n\nvar Avatar = /*#__PURE__*/React.forwardRef(function Avatar(props, ref) {\n var alt = props.alt,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n imgProps = props.imgProps,\n sizes = props.sizes,\n src = props.src,\n srcSet = props.srcSet,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circular' : _props$variant,\n other = _objectWithoutProperties(props, [\"alt\", \"children\", \"classes\", \"className\", \"component\", \"imgProps\", \"sizes\", \"src\", \"srcSet\", \"variant\"]);\n\n var children = null; // Use a hook instead of onError on the img element to support server-side rendering.\n\n var loaded = useLoaded({\n src: src,\n srcSet: srcSet\n });\n var hasImg = src || srcSet;\n var hasImgNotFailing = hasImg && loaded !== 'error';\n\n if (hasImgNotFailing) {\n children = /*#__PURE__*/React.createElement(\"img\", _extends({\n alt: alt,\n src: src,\n srcSet: srcSet,\n sizes: sizes,\n className: classes.img\n }, imgProps));\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n children = alt[0];\n } else {\n children = /*#__PURE__*/React.createElement(Person, {\n className: classes.fallback\n });\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes.system, classes[variant], className, !hasImgNotFailing && classes.colorDefault),\n ref: ref\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? Avatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Used in combination with `src` or `srcSet` to\n * provide an alt attribute for the rendered `img` element.\n */\n alt: PropTypes.string,\n\n /**\n * Used to render icon or text elements inside the Avatar if `src` is not set.\n * This can be an element, or just a string.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n var classes = props.classes;\n\n if (classes == null) {\n return null;\n }\n\n if (classes.circle != null && // 2 classnames? one from withStyles the other must be custom\n classes.circle.split(' ').length > 1) {\n throw new Error(\"Material-UI: The `circle` class is deprecated. Use `circular` instead.\");\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Attributes applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps: PropTypes.object,\n\n /**\n * The `sizes` attribute for the `img` element.\n */\n sizes: PropTypes.string,\n\n /**\n * The `src` attribute for the `img` element.\n */\n src: PropTypes.string,\n\n /**\n * The `srcSet` attribute for the `img` element.\n * Use this attribute for responsive image display.\n */\n srcSet: PropTypes.string,\n\n /**\n * The shape of the avatar.\n */\n variant: chainPropTypes(PropTypes.oneOf(['circle', 'circular', 'rounded', 'square']), function (props) {\n var variant = props.variant;\n\n if (variant === 'circle') {\n throw new Error('Material-UI: `variant=\"circle\"` is deprecated. Use `variant=\"circular\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAvatar'\n})(Avatar);","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar RADIUS_STANDARD = 10;\nvar RADIUS_DOT = 4;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'inline-flex',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n flexShrink: 0\n },\n\n /* Styles applied to the badge `span` element. */\n badge: {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n boxSizing: 'border-box',\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(12),\n minWidth: RADIUS_STANDARD * 2,\n lineHeight: 1,\n padding: '0 6px',\n height: RADIUS_STANDARD * 2,\n borderRadius: RADIUS_STANDARD,\n zIndex: 1,\n // Render the badge on top of potential ripples.\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.enteringScreen\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.error.contrastText\n },\n\n /* Styles applied to the root element if `variant=\"dot\"`. */\n dot: {\n borderRadius: RADIUS_DOT,\n height: RADIUS_DOT * 2,\n minWidth: RADIUS_DOT * 2,\n padding: 0\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginTopRightRectangle: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangular\"`. */\n anchorOriginTopRightRectangular: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginBottomRightRectangle: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangular\"`. */\n anchorOriginBottomRightRectangular: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginTopLeftRectangle: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangular\"`. */\n anchorOriginTopLeftRectangular: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginBottomLeftRectangle: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangular\"`. */\n anchorOriginBottomLeftRectangular: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circle\"`. */\n anchorOriginTopRightCircle: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circular\"`. */\n anchorOriginTopRightCircular: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circle\"`. */\n anchorOriginBottomRightCircle: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circular\"`. */\n anchorOriginBottomRightCircular: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circle\"`. */\n anchorOriginTopLeftCircle: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circular\"`. */\n anchorOriginTopLeftCircular: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circle\"`. */\n anchorOriginBottomLeftCircle: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circular\"`. */\n anchorOriginBottomLeftCircular: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Pseudo-class to the badge `span` element if `invisible={true}`. */\n invisible: {\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.leavingScreen\n })\n }\n };\n};\nvar Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {\n var _props$anchorOrigin = props.anchorOrigin,\n anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'top',\n horizontal: 'right'\n } : _props$anchorOrigin,\n badgeContent = props.badgeContent,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n ComponentProp = _props$component === void 0 ? 'span' : _props$component,\n invisibleProp = props.invisible,\n _props$max = props.max,\n max = _props$max === void 0 ? 99 : _props$max,\n _props$overlap = props.overlap,\n overlap = _props$overlap === void 0 ? 'rectangle' : _props$overlap,\n _props$showZero = props.showZero,\n showZero = _props$showZero === void 0 ? false : _props$showZero,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchorOrigin\", \"badgeContent\", \"children\", \"classes\", \"className\", \"color\", \"component\", \"invisible\", \"max\", \"overlap\", \"showZero\", \"variant\"]);\n\n var invisible = invisibleProp;\n\n if (invisibleProp == null && (badgeContent === 0 && !showZero || badgeContent == null && variant !== 'dot')) {\n invisible = true;\n }\n\n var displayValue = '';\n\n if (variant !== 'dot') {\n displayValue = badgeContent > max ? \"\".concat(max, \"+\") : badgeContent;\n }\n\n return /*#__PURE__*/React.createElement(ComponentProp, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), children, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.badge, classes[\"\".concat(anchorOrigin.horizontal).concat(capitalize(anchorOrigin.vertical), \"}\")], classes[\"anchorOrigin\".concat(capitalize(anchorOrigin.vertical)).concat(capitalize(anchorOrigin.horizontal)).concat(capitalize(overlap))], color !== 'default' && classes[\"color\".concat(capitalize(color))], invisible && classes.invisible, variant === 'dot' && classes.dot)\n }, displayValue));\n});\nprocess.env.NODE_ENV !== \"production\" ? Badge.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The anchor of the badge.\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The content rendered within the badge.\n */\n badgeContent: PropTypes.node,\n\n /**\n * The badge will be added relative to this node.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n var classes = props.classes;\n\n if (classes == null) {\n return null;\n }\n\n [['anchorOriginTopRightRectangle', 'anchorOriginTopRightRectangular'], ['anchorOriginBottomRightRectangle', 'anchorOriginBottomRightRectangular'], ['anchorOriginTopLeftRectangle', 'anchorOriginTopLeftRectangular'], ['anchorOriginBottomLeftRectangle', 'anchorOriginBottomLeftRectangular'], ['anchorOriginTopRightCircle', 'anchorOriginTopRightCircular'], ['anchorOriginBottomRightCircle', 'anchorOriginBottomRightCircular'], ['anchorOriginTopLeftCircle', 'anchorOriginTopLeftCircular']].forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n deprecatedClassKey = _ref2[0],\n newClassKey = _ref2[1];\n\n if (classes[deprecatedClassKey] != null && // 2 classnames? one from withStyles the other must be custom\n classes[deprecatedClassKey].split(' ').length > 1) {\n throw new Error(\"Material-UI: The `\".concat(deprecatedClassKey, \"` class was deprecated. Use `\").concat(newClassKey, \"` instead.\"));\n }\n });\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'error', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the badge will be invisible.\n */\n invisible: PropTypes.bool,\n\n /**\n * Max count to show.\n */\n max: PropTypes.number,\n\n /**\n * Wrapped shape the badge should overlap.\n */\n overlap: chainPropTypes(PropTypes.oneOf(['circle', 'rectangle', 'circular', 'rectangular']), function (props) {\n var overlap = props.overlap;\n\n if (overlap === 'rectangle') {\n throw new Error('Material-UI: `overlap=\"rectangle\"` was deprecated. Use `overlap=\"rectangular\"` instead.');\n }\n\n if (overlap === 'circle') {\n throw new Error('Material-UI: `overlap=\"circle\"` was deprecated. Use `overlap=\"circular\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Controls whether the badge is hidden when `badgeContent` is zero.\n */\n showZero: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['dot', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBadge'\n})(Badge);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n justifyContent: 'center',\n height: 56,\n backgroundColor: theme.palette.background.paper\n }\n };\n};\nvar BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n onChange = props.onChange,\n _props$showLabels = props.showLabels,\n showLabels = _props$showLabels === void 0 ? false : _props$showLabels,\n value = props.value,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"onChange\", \"showLabels\", \"value\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), React.Children.map(children, function (child, childIndex) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The BottomNavigation component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n return /*#__PURE__*/React.cloneElement(child, {\n selected: childValue === value,\n showLabel: child.props.showLabel !== undefined ? child.props.showLabel : showLabels,\n value: childValue,\n onChange: onChange\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? BottomNavigation.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback.\n * @param {any} value We default to the index of the child.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, all `BottomNavigationAction`s will show their labels.\n * By default, only the selected `BottomNavigationAction` will show its label.\n */\n showLabels: PropTypes.bool,\n\n /**\n * The value of the currently selected `BottomNavigationAction`.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBottomNavigation'\n})(BottomNavigation);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport unsupportedProp from '../utils/unsupportedProp';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n transition: theme.transitions.create(['color', 'padding-top'], {\n duration: theme.transitions.duration.short\n }),\n padding: '6px 12px 8px',\n minWidth: 80,\n maxWidth: 168,\n color: theme.palette.text.secondary,\n flex: '1',\n '&$iconOnly': {\n paddingTop: 16\n },\n '&$selected': {\n paddingTop: 6,\n color: theme.palette.primary.main\n }\n },\n\n /* Pseudo-class applied to the root element if selected. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `showLabel={false}` and not selected. */\n iconOnly: {},\n\n /* Styles applied to the span element that wraps the icon and label. */\n wrapper: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n flexDirection: 'column'\n },\n\n /* Styles applied to the label's span element. */\n label: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(12),\n opacity: 1,\n transition: 'font-size 0.2s, opacity 0.2s',\n transitionDelay: '0.1s',\n '&$iconOnly': {\n opacity: 0,\n transitionDelay: '0s'\n },\n '&$selected': {\n fontSize: theme.typography.pxToRem(14)\n }\n }\n };\n};\nvar BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavigationAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n icon = props.icon,\n label = props.label,\n onChange = props.onChange,\n onClick = props.onClick,\n selected = props.selected,\n showLabel = props.showLabel,\n value = props.value,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"icon\", \"label\", \"onChange\", \"onClick\", \"selected\", \"showLabel\", \"value\"]);\n\n var handleChange = function handleChange(event) {\n if (onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n ref: ref,\n className: clsx(classes.root, className, selected ? classes.selected : !showLabel && classes.iconOnly),\n focusRipple: true,\n onClick: handleChange\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.wrapper\n }, icon, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.label, selected ? classes.selected : !showLabel && classes.iconOnly)\n }, label)));\n});\nprocess.env.NODE_ENV !== \"production\" ? BottomNavigationAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon element.\n */\n icon: PropTypes.node,\n\n /**\n * The label element.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n selected: PropTypes.bool,\n\n /**\n * If `true`, the `BottomNavigationAction` will show its label.\n * By default, only the selected `BottomNavigationAction`\n * inside `BottomNavigation` will show its label.\n */\n showLabel: PropTypes.bool,\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBottomNavigationAction'\n})(BottomNavigationAction);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'MoreHoriz');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport { emphasize } from '../styles/colorManipulator';\nimport MoreHorizIcon from '../internal/svg-icons/MoreHoriz';\nimport ButtonBase from '../ButtonBase';\n\nvar styles = function styles(theme) {\n return {\n root: {\n display: 'flex',\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n backgroundColor: theme.palette.grey[100],\n color: theme.palette.grey[700],\n borderRadius: 2,\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: theme.palette.grey[200]\n },\n '&:active': {\n boxShadow: theme.shadows[0],\n backgroundColor: emphasize(theme.palette.grey[200], 0.12)\n }\n },\n icon: {\n width: 24,\n height: 16\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction BreadcrumbCollapsed(props) {\n var classes = props.classes,\n other = _objectWithoutProperties(props, [\"classes\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"li\",\n className: classes.root,\n focusRipple: true\n }, other), /*#__PURE__*/React.createElement(MoreHorizIcon, {\n className: classes.icon\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? BreadcrumbCollapsed.propTypes = {\n /**\n * @ignore\n */\n classes: PropTypes.object.isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateBreadcrumbCollapsed'\n})(BreadcrumbCollapsed);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport BreadcrumbCollapsed from './BreadcrumbCollapsed';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the ol element. */\n ol: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n padding: 0,\n margin: 0,\n listStyle: 'none'\n },\n\n /* Styles applied to the li element. */\n li: {},\n\n /* Styles applied to the separator element. */\n separator: {\n display: 'flex',\n userSelect: 'none',\n marginLeft: 8,\n marginRight: 8\n }\n};\n\nfunction insertSeparators(items, className, separator) {\n return items.reduce(function (acc, current, index) {\n if (index < items.length - 1) {\n acc = acc.concat(current, /*#__PURE__*/React.createElement(\"li\", {\n \"aria-hidden\": true,\n key: \"separator-\".concat(index),\n className: className\n }, separator));\n } else {\n acc.push(current);\n }\n\n return acc;\n }, []);\n}\n\nvar Breadcrumbs = /*#__PURE__*/React.forwardRef(function Breadcrumbs(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'nav' : _props$component,\n _props$expandText = props.expandText,\n expandText = _props$expandText === void 0 ? 'Show path' : _props$expandText,\n _props$itemsAfterColl = props.itemsAfterCollapse,\n itemsAfterCollapse = _props$itemsAfterColl === void 0 ? 1 : _props$itemsAfterColl,\n _props$itemsBeforeCol = props.itemsBeforeCollapse,\n itemsBeforeCollapse = _props$itemsBeforeCol === void 0 ? 1 : _props$itemsBeforeCol,\n _props$maxItems = props.maxItems,\n maxItems = _props$maxItems === void 0 ? 8 : _props$maxItems,\n _props$separator = props.separator,\n separator = _props$separator === void 0 ? '/' : _props$separator,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"expandText\", \"itemsAfterCollapse\", \"itemsBeforeCollapse\", \"maxItems\", \"separator\"]);\n\n var _React$useState = React.useState(false),\n expanded = _React$useState[0],\n setExpanded = _React$useState[1];\n\n var renderItemsBeforeAndAfter = function renderItemsBeforeAndAfter(allItems) {\n var handleClickExpand = function handleClickExpand(event) {\n setExpanded(true); // The clicked element received the focus but gets removed from the DOM.\n // Let's keep the focus in the component after expanding.\n\n var focusable = event.currentTarget.parentNode.querySelector('a[href],button,[tabindex]');\n\n if (focusable) {\n focusable.focus();\n }\n }; // This defends against someone passing weird input, to ensure that if all\n // items would be shown anyway, we just show all items without the EllipsisItem\n\n\n if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['Material-UI: You have provided an invalid combination of props to the Breadcrumbs.', \"itemsAfterCollapse={\".concat(itemsAfterCollapse, \"} + itemsBeforeCollapse={\").concat(itemsBeforeCollapse, \"} >= maxItems={\").concat(maxItems, \"}\")].join('\\n'));\n }\n\n return allItems;\n }\n\n return [].concat(_toConsumableArray(allItems.slice(0, itemsBeforeCollapse)), [/*#__PURE__*/React.createElement(BreadcrumbCollapsed, {\n \"aria-label\": expandText,\n key: \"ellipsis\",\n onClick: handleClickExpand\n })], _toConsumableArray(allItems.slice(allItems.length - itemsAfterCollapse, allItems.length)));\n };\n\n var allItems = React.Children.toArray(children).filter(function (child) {\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Breadcrumbs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.isValidElement(child);\n }).map(function (child, index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n className: classes.li,\n key: \"child-\".concat(index)\n }, child);\n });\n return /*#__PURE__*/React.createElement(Typography, _extends({\n ref: ref,\n component: Component,\n color: \"textSecondary\",\n className: clsx(classes.root, className)\n }, other), /*#__PURE__*/React.createElement(\"ol\", {\n className: classes.ol\n }, insertSeparators(expanded || maxItems && allItems.length <= maxItems ? allItems : renderItemsBeforeAndAfter(allItems), classes.separator, separator)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Breadcrumbs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The breadcrumb children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default label for the expand button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n expandText: PropTypes.string,\n\n /**\n * If max items is exceeded, the number of items to show after the ellipsis.\n */\n itemsAfterCollapse: PropTypes.number,\n\n /**\n * If max items is exceeded, the number of items to show before the ellipsis.\n */\n itemsBeforeCollapse: PropTypes.number,\n\n /**\n * Specifies the maximum number of breadcrumbs to display. When there are more\n * than the maximum number, only the first `itemsBeforeCollapse` and last `itemsAfterCollapse`\n * will be shown, with an ellipsis in between.\n */\n maxItems: PropTypes.number,\n\n /**\n * Custom separator node.\n */\n separator: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBreadcrumbs'\n})(Breadcrumbs);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport { alpha } from '../styles/colorManipulator';\nimport withStyles from '../styles/withStyles';\nimport Button from '../Button'; // Force a side effect so we don't have any override priority issue.\n// eslint-disable-next-line no-unused-expressions\n\nButton.styles;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n boxShadow: theme.shadows[2]\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none'\n },\n\n /* Pseudo-class applied to child elements if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the children. */\n grouped: {\n minWidth: 40\n },\n\n /* Styles applied to the children if `orientation=\"horizontal\"`. */\n groupedHorizontal: {\n '&:not(:first-child)': {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n }\n },\n\n /* Styles applied to the children if `orientation=\"vertical\"`. */\n groupedVertical: {\n '&:not(:first-child)': {\n borderTopRightRadius: 0,\n borderTopLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"`. */\n groupedText: {},\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"horizontal\"`. */\n groupedTextHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"vertical\"`. */\n groupedTextVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"primary\"`. */\n groupedTextPrimary: {\n '&:not(:last-child)': {\n borderColor: alpha(theme.palette.primary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"secondary\"`. */\n groupedTextSecondary: {\n '&:not(:last-child)': {\n borderColor: alpha(theme.palette.secondary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"`. */\n groupedOutlined: {},\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"horizontal\"`. */\n groupedOutlinedHorizontal: {\n '&:not(:first-child)': {\n marginLeft: -1\n },\n '&:not(:last-child)': {\n borderRightColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"vertical\"`. */\n groupedOutlinedVertical: {\n '&:not(:first-child)': {\n marginTop: -1\n },\n '&:not(:last-child)': {\n borderBottomColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"primary\"`. */\n groupedOutlinedPrimary: {\n '&:hover': {\n borderColor: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"secondary\"`. */\n groupedOutlinedSecondary: {\n '&:hover': {\n borderColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"`. */\n groupedContained: {\n boxShadow: 'none'\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"horizontal\"`. */\n groupedContainedHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderRight: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"vertical\"`. */\n groupedContainedVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderBottom: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"primary\"`. */\n groupedContainedPrimary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.primary.dark\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"secondary\"`. */\n groupedContainedSecondary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.secondary.dark\n }\n }\n };\n};\nvar ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'outlined' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"disableRipple\", \"fullWidth\", \"orientation\", \"size\", \"variant\"]);\n\n var buttonClassName = clsx(classes.grouped, classes[\"grouped\".concat(capitalize(orientation))], classes[\"grouped\".concat(capitalize(variant))], classes[\"grouped\".concat(capitalize(variant)).concat(capitalize(orientation))], classes[\"grouped\".concat(capitalize(variant)).concat(color !== 'default' ? capitalize(color) : '')], disabled && classes.disabled);\n return /*#__PURE__*/React.createElement(Component, _extends({\n role: \"group\",\n className: clsx(classes.root, className, fullWidth && classes.fullWidth, disableElevation && classes.disableElevation, variant === 'contained' && classes.contained, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The ButtonGroup component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.cloneElement(child, {\n className: clsx(buttonClassName, child.props.className),\n color: child.props.color || color,\n disabled: child.props.disabled || disabled,\n disableElevation: child.props.disableElevation || disableElevation,\n disableFocusRipple: disableFocusRipple,\n disableRipple: disableRipple,\n fullWidth: fullWidth,\n size: child.props.size || size,\n variant: child.props.variant || variant\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ButtonGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button group.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the buttons will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the button keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the button ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If `true`, the buttons will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The group orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButtonGroup'\n})(ButtonGroup);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden'\n }\n};\nvar Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$raised = props.raised,\n raised = _props$raised === void 0 ? false : _props$raised,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"raised\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className),\n elevation: raised ? 8 : 1,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Card.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the card will use raised styling.\n */\n raised: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCard'\n})(Card);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n textAlign: 'inherit',\n width: '100%',\n '&:hover $focusHighlight': {\n opacity: theme.palette.action.hoverOpacity\n },\n '&$focusVisible $focusHighlight': {\n opacity: 0.12\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the action area is keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the overlay that covers the action area when it is keyboard focused. */\n focusHighlight: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n opacity: 0,\n backgroundColor: 'currentcolor',\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.short\n })\n }\n };\n};\nvar CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n focusVisibleClassName = props.focusVisibleClassName,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"focusVisibleClassName\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className),\n focusVisibleClassName: clsx(focusVisibleClassName, classes.focusVisible),\n ref: ref\n }, other), children, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.focusHighlight\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActionArea.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActionArea'\n})(CardActionArea);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar CardActions = /*#__PURE__*/React.forwardRef(function CardActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActions'\n})(CardActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n padding: 16,\n '&:last-child': {\n paddingBottom: 24\n }\n }\n};\nvar CardContent = /*#__PURE__*/React.forwardRef(function CardContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardContent'\n})(CardContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 16\n },\n\n /* Styles applied to the avatar element. */\n avatar: {\n flex: '0 0 auto',\n marginRight: 16\n },\n\n /* Styles applied to the action element. */\n action: {\n flex: '0 0 auto',\n alignSelf: 'flex-start',\n marginTop: -8,\n marginRight: -8\n },\n\n /* Styles applied to the content wrapper element. */\n content: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the title Typography element. */\n title: {},\n\n /* Styles applied to the subheader Typography element. */\n subheader: {}\n};\nvar CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader(props, ref) {\n var action = props.action,\n avatar = props.avatar,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n subheaderProp = props.subheader,\n subheaderTypographyProps = props.subheaderTypographyProps,\n titleProp = props.title,\n titleTypographyProps = props.titleTypographyProps,\n other = _objectWithoutProperties(props, [\"action\", \"avatar\", \"classes\", \"className\", \"component\", \"disableTypography\", \"subheader\", \"subheaderTypographyProps\", \"title\", \"titleTypographyProps\"]);\n\n var title = titleProp;\n\n if (title != null && title.type !== Typography && !disableTypography) {\n title = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: avatar ? 'body2' : 'h5',\n className: classes.title,\n component: \"span\",\n display: \"block\"\n }, titleTypographyProps), title);\n }\n\n var subheader = subheaderProp;\n\n if (subheader != null && subheader.type !== Typography && !disableTypography) {\n subheader = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: avatar ? 'body2' : 'body1',\n className: classes.subheader,\n color: \"textSecondary\",\n component: \"span\",\n display: \"block\"\n }, subheaderTypographyProps), subheader);\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), avatar && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.avatar\n }, avatar), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.content\n }, title, subheader), action && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.action\n }, action));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardHeader.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display in the card header.\n */\n action: PropTypes.node,\n\n /**\n * The Avatar for the Card Header.\n */\n avatar: PropTypes.node,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, `subheader` and `title` won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `title` text, and optional `subheader` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n subheader: PropTypes.node,\n\n /**\n * These props will be forwarded to the subheader\n * (as long as disableTypography is not `true`).\n */\n subheaderTypographyProps: PropTypes.object,\n\n /**\n * The content of the Card Title.\n */\n title: PropTypes.node,\n\n /**\n * These props will be forwarded to the title\n * (as long as disableTypography is not `true`).\n */\n titleTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardHeader'\n})(CardHeader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { chainPropTypes } from '@material-ui/utils';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'center'\n },\n\n /* Styles applied to the root element if `component=\"video, audio, picture, iframe, or img\"`. */\n media: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `component=\"picture or img\"`. */\n img: {\n // ⚠️ object-fit is not supported by IE 11.\n objectFit: 'cover'\n }\n};\nvar MEDIA_COMPONENTS = ['video', 'audio', 'picture', 'iframe', 'img'];\nvar CardMedia = /*#__PURE__*/React.forwardRef(function CardMedia(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n image = props.image,\n src = props.src,\n style = props.style,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"image\", \"src\", \"style\"]);\n\n var isMediaComponent = MEDIA_COMPONENTS.indexOf(Component) !== -1;\n var composedStyle = !isMediaComponent && image ? _extends({\n backgroundImage: \"url(\\\"\".concat(image, \"\\\")\")\n }, style) : style;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, isMediaComponent && classes.media, \"picture img\".indexOf(Component) !== -1 && classes.img),\n ref: ref,\n style: composedStyle,\n src: isMediaComponent ? image || src : undefined\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? CardMedia.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n if (!props.children && !props.image && !props.src && !props.component) {\n return new Error('Material-UI: Either `children`, `image`, `src` or `component` prop must be specified.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Image to be displayed as a background image.\n * Either `image` or `src` prop must be specified.\n * Note that caller must specify height otherwise the image will not be visible.\n */\n image: PropTypes.string,\n\n /**\n * An alias for `image` property.\n * Available only with media components.\n * Media components: `video`, `audio`, `picture`, `iframe`, `img`.\n */\n src: PropTypes.string,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardMedia'\n})(CardMedia);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport CancelIcon from '../internal/svg-icons/Cancel';\nimport withStyles from '../styles/withStyles';\nimport { emphasize, alpha } from '../styles/colorManipulator';\nimport useForkRef from '../utils/useForkRef';\nimport unsupportedProp from '../utils/unsupportedProp';\nimport capitalize from '../utils/capitalize';\nimport ButtonBase from '../ButtonBase';\nexport var styles = function styles(theme) {\n var backgroundColor = theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700];\n var deleteIconColor = alpha(theme.palette.text.primary, 0.26);\n return {\n /* Styles applied to the root element. */\n root: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(13),\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32,\n color: theme.palette.getContrastText(backgroundColor),\n backgroundColor: backgroundColor,\n borderRadius: 32 / 2,\n whiteSpace: 'nowrap',\n transition: theme.transitions.create(['background-color', 'box-shadow']),\n // label will inherit this from root, then `clickable` class overrides this for both\n cursor: 'default',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n textDecoration: 'none',\n border: 'none',\n // Remove `button` border\n padding: 0,\n // Remove `button` padding\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n '&$disabled': {\n opacity: 0.5,\n pointerEvents: 'none'\n },\n '& $avatar': {\n marginLeft: 5,\n marginRight: -6,\n width: 24,\n height: 24,\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n fontSize: theme.typography.pxToRem(12)\n },\n '& $avatarColorPrimary': {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.dark\n },\n '& $avatarColorSecondary': {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.dark\n },\n '& $avatarSmall': {\n marginLeft: 4,\n marginRight: -4,\n width: 18,\n height: 18,\n fontSize: theme.typography.pxToRem(10)\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n height: 24\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */\n clickable: {\n userSelect: 'none',\n WebkitTapHighlightColor: 'transparent',\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: emphasize(backgroundColor, 0.08)\n },\n '&:active': {\n boxShadow: theme.shadows[1]\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"primary\"` is defined or `clickable={true}`. */\n clickableColorPrimary: {\n '&:hover, &:focus': {\n backgroundColor: emphasize(theme.palette.primary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"secondary\"` is defined or `clickable={true}`. */\n clickableColorSecondary: {\n '&:hover, &:focus': {\n backgroundColor: emphasize(theme.palette.secondary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` is defined. */\n deletable: {\n '&:focus': {\n backgroundColor: emphasize(backgroundColor, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"primary\"` is defined. */\n deletableColorPrimary: {\n '&:focus': {\n backgroundColor: emphasize(theme.palette.primary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"secondary\"` is defined. */\n deletableColorSecondary: {\n '&:focus': {\n backgroundColor: emphasize(theme.palette.secondary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n backgroundColor: 'transparent',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity)\n },\n '& $avatar': {\n marginLeft: 4\n },\n '& $avatarSmall': {\n marginLeft: 2\n },\n '& $icon': {\n marginLeft: 4\n },\n '& $iconSmall': {\n marginLeft: 2\n },\n '& $deleteIcon': {\n marginRight: 5\n },\n '& $deleteIconSmall': {\n marginRight: 3\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(theme.palette.primary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(theme.palette.secondary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity)\n }\n },\n // TODO v5: remove\n\n /* Styles applied to the `avatar` element. */\n avatar: {},\n\n /* Styles applied to the `avatar` element if `size=\"small\"`. */\n avatarSmall: {},\n\n /* Styles applied to the `avatar` element if `color=\"primary\"`. */\n avatarColorPrimary: {},\n\n /* Styles applied to the `avatar` element if `color=\"secondary\"`. */\n avatarColorSecondary: {},\n\n /* Styles applied to the `icon` element. */\n icon: {\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n marginLeft: 5,\n marginRight: -6\n },\n\n /* Styles applied to the `icon` element if `size=\"small\"`. */\n iconSmall: {\n width: 18,\n height: 18,\n marginLeft: 4,\n marginRight: -4\n },\n\n /* Styles applied to the `icon` element if `color=\"primary\"`. */\n iconColorPrimary: {\n color: 'inherit'\n },\n\n /* Styles applied to the `icon` element if `color=\"secondary\"`. */\n iconColorSecondary: {\n color: 'inherit'\n },\n\n /* Styles applied to the label `span` element. */\n label: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingLeft: 12,\n paddingRight: 12,\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the label `span` element if `size=\"small\"`. */\n labelSmall: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the `deleteIcon` element. */\n deleteIcon: {\n WebkitTapHighlightColor: 'transparent',\n color: deleteIconColor,\n height: 22,\n width: 22,\n cursor: 'pointer',\n margin: '0 5px 0 -6px',\n '&:hover': {\n color: alpha(deleteIconColor, 0.4)\n }\n },\n\n /* Styles applied to the `deleteIcon` element if `size=\"small\"`. */\n deleteIconSmall: {\n height: 16,\n width: 16,\n marginRight: 4,\n marginLeft: -4\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"default\"`. */\n deleteIconColorPrimary: {\n color: alpha(theme.palette.primary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"default\"`. */\n deleteIconColorSecondary: {\n color: alpha(theme.palette.secondary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorPrimary: {\n color: alpha(theme.palette.primary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorSecondary: {\n color: alpha(theme.palette.secondary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.main\n }\n }\n };\n};\n\nfunction isDeleteKeyboardEvent(keyboardEvent) {\n return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';\n}\n/**\n * Chips represent complex entities in small blocks, such as a contact.\n */\n\n\nvar Chip = /*#__PURE__*/React.forwardRef(function Chip(props, ref) {\n var avatarProp = props.avatar,\n classes = props.classes,\n className = props.className,\n clickableProp = props.clickable,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n ComponentProp = props.component,\n deleteIconProp = props.deleteIcon,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n iconProp = props.icon,\n label = props.label,\n onClick = props.onClick,\n onDelete = props.onDelete,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'default' : _props$variant,\n other = _objectWithoutProperties(props, [\"avatar\", \"classes\", \"className\", \"clickable\", \"color\", \"component\", \"deleteIcon\", \"disabled\", \"icon\", \"label\", \"onClick\", \"onDelete\", \"onKeyDown\", \"onKeyUp\", \"size\", \"variant\"]);\n\n var chipRef = React.useRef(null);\n var handleRef = useForkRef(chipRef, ref);\n\n var handleDeleteIconClick = function handleDeleteIconClick(event) {\n // Stop the event from bubbling up to the `Chip`\n event.stopPropagation();\n\n if (onDelete) {\n onDelete(event);\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {\n // will be handled in keyUp, otherwise some browsers\n // might init navigation\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n var handleKeyUp = function handleKeyUp(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target) {\n if (onDelete && isDeleteKeyboardEvent(event)) {\n onDelete(event);\n } else if (event.key === 'Escape' && chipRef.current) {\n chipRef.current.blur();\n }\n }\n\n if (onKeyUp) {\n onKeyUp(event);\n }\n };\n\n var clickable = clickableProp !== false && onClick ? true : clickableProp;\n var small = size === 'small';\n var Component = ComponentProp || (clickable ? ButtonBase : 'div');\n var moreProps = Component === ButtonBase ? {\n component: 'div'\n } : {};\n var deleteIcon = null;\n\n if (onDelete) {\n var customClasses = clsx(color !== 'default' && (variant === \"default\" ? classes[\"deleteIconColor\".concat(capitalize(color))] : classes[\"deleteIconOutlinedColor\".concat(capitalize(color))]), small && classes.deleteIconSmall);\n deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? /*#__PURE__*/React.cloneElement(deleteIconProp, {\n className: clsx(deleteIconProp.props.className, classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n }) : /*#__PURE__*/React.createElement(CancelIcon, {\n className: clsx(classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n });\n }\n\n var avatar = null;\n\n if (avatarProp && /*#__PURE__*/React.isValidElement(avatarProp)) {\n avatar = /*#__PURE__*/React.cloneElement(avatarProp, {\n className: clsx(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes[\"avatarColor\".concat(capitalize(color))])\n });\n }\n\n var icon = null;\n\n if (iconProp && /*#__PURE__*/React.isValidElement(iconProp)) {\n icon = /*#__PURE__*/React.cloneElement(iconProp, {\n className: clsx(classes.icon, iconProp.props.className, small && classes.iconSmall, color !== 'default' && classes[\"iconColor\".concat(capitalize(color))])\n });\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (avatar && icon) {\n console.error('Material-UI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n role: clickable || onDelete ? 'button' : undefined,\n className: clsx(classes.root, className, color !== 'default' && [classes[\"color\".concat(capitalize(color))], clickable && classes[\"clickableColor\".concat(capitalize(color))], onDelete && classes[\"deletableColor\".concat(capitalize(color))]], variant !== \"default\" && [classes.outlined, {\n 'primary': classes.outlinedPrimary,\n 'secondary': classes.outlinedSecondary\n }[color]], disabled && classes.disabled, small && classes.sizeSmall, clickable && classes.clickable, onDelete && classes.deletable),\n \"aria-disabled\": disabled ? true : undefined,\n tabIndex: clickable || onDelete ? 0 : undefined,\n onClick: onClick,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n ref: handleRef\n }, moreProps, other), avatar || icon, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.label, small && classes.labelSmall)\n }, label), deleteIcon);\n});\nprocess.env.NODE_ENV !== \"production\" ? Chip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Avatar element.\n */\n avatar: PropTypes.element,\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the chip will appear clickable, and will raise when pressed,\n * even if the onClick prop is not defined.\n * If false, the chip will not be clickable, even if onClick prop is defined.\n * This can be used, for example,\n * along with the component prop to indicate an anchor Chip is clickable.\n */\n clickable: PropTypes.bool,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default delete icon element. Shown only if `onDelete` is set.\n */\n deleteIcon: PropTypes.element,\n\n /**\n * If `true`, the chip should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * Icon element.\n */\n icon: PropTypes.element,\n\n /**\n * The content of the label.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * Callback function fired when the delete icon is clicked.\n * If set, the delete icon will be shown.\n */\n onDelete: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The size of the chip.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['default', 'outlined'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiChip'\n})(Chip);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar SIZE = 44;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-block'\n },\n\n /* Styles applied to the root element if `variant=\"static\"`. */\n static: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {\n animation: '$circular-rotate 1.4s linear infinite'\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the `svg` element. */\n svg: {\n display: 'block' // Keeps the progress centered\n\n },\n\n /* Styles applied to the `circle` svg path. */\n circle: {\n stroke: 'currentColor' // Use butt to follow the specification, by chance, it's already the default CSS value.\n // strokeLinecap: 'butt',\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"static\"`. */\n circleStatic: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"indeterminate\"`. */\n circleIndeterminate: {\n animation: '$circular-dash 1.4s ease-in-out infinite',\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: '0px' // Add the unit to fix a Edge 16 and below bug.\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"determinate\"`. */\n circleDeterminate: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n '@keyframes circular-rotate': {\n '0%': {\n // Fix IE 11 wobbly\n transformOrigin: '50% 50%'\n },\n '100%': {\n transform: 'rotate(360deg)'\n }\n },\n '@keyframes circular-dash': {\n '0%': {\n strokeDasharray: '1px, 200px',\n strokeDashoffset: '0px'\n },\n '50%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-15px'\n },\n '100%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-125px'\n }\n },\n\n /* Styles applied to the `circle` svg path if `disableShrink={true}`. */\n circleDisableShrink: {\n animation: 'none'\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$disableShrink = props.disableShrink,\n disableShrink = _props$disableShrink === void 0 ? false : _props$disableShrink,\n _props$size = props.size,\n size = _props$size === void 0 ? 40 : _props$size,\n style = props.style,\n _props$thickness = props.thickness,\n thickness = _props$thickness === void 0 ? 3.6 : _props$thickness,\n _props$value = props.value,\n value = _props$value === void 0 ? 0 : _props$value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"disableShrink\", \"size\", \"style\", \"thickness\", \"value\", \"variant\"]);\n\n var circleStyle = {};\n var rootStyle = {};\n var rootProps = {};\n\n if (variant === 'determinate' || variant === 'static') {\n var circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = \"\".concat(((100 - value) / 100 * circumference).toFixed(3), \"px\");\n rootStyle.transform = 'rotate(-90deg)';\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'static': classes.static\n }[variant]),\n style: _extends({\n width: size,\n height: size\n }, rootStyle, style),\n ref: ref,\n role: \"progressbar\"\n }, rootProps, other), /*#__PURE__*/React.createElement(\"svg\", {\n className: classes.svg,\n viewBox: \"\".concat(SIZE / 2, \" \").concat(SIZE / 2, \" \").concat(SIZE, \" \").concat(SIZE)\n }, /*#__PURE__*/React.createElement(\"circle\", {\n className: clsx(classes.circle, disableShrink && classes.circleDisableShrink, {\n 'determinate': classes.circleDeterminate,\n 'indeterminate': classes.circleIndeterminate,\n 'static': classes.circleStatic\n }[variant]),\n style: circleStyle,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n */\n disableShrink: chainPropTypes(PropTypes.bool, function (props) {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('Material-UI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n\n return null;\n }),\n\n /**\n * The size of the circle.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, e.g '3rem'.\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The thickness of the circle.\n */\n thickness: PropTypes.number,\n\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n */\n variant: chainPropTypes(PropTypes.oneOf(['determinate', 'indeterminate', 'static']), function (props) {\n var variant = props.variant;\n\n if (variant === 'static') {\n throw new Error('Material-UI: `variant=\"static\"` was deprecated. Use `variant=\"determinate\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCircularProgress',\n flip: false\n})(CircularProgress);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _defineProperty({\n width: '100%',\n marginLeft: 'auto',\n boxSizing: 'border-box',\n marginRight: 'auto',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n display: 'block'\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `disableGutters={true}`. */\n disableGutters: {\n paddingLeft: 0,\n paddingRight: 0\n },\n\n /* Styles applied to the root element if `fixed={true}`. */\n fixed: Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {\n var value = theme.breakpoints.values[breakpoint];\n\n if (value !== 0) {\n acc[theme.breakpoints.up(breakpoint)] = {\n maxWidth: value\n };\n }\n\n return acc;\n }, {}),\n\n /* Styles applied to the root element if `maxWidth=\"xs\"`. */\n maxWidthXs: _defineProperty({}, theme.breakpoints.up('xs'), {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444)\n }),\n\n /* Styles applied to the root element if `maxWidth=\"sm\"`. */\n maxWidthSm: _defineProperty({}, theme.breakpoints.up('sm'), {\n maxWidth: theme.breakpoints.values.sm\n }),\n\n /* Styles applied to the root element if `maxWidth=\"md\"`. */\n maxWidthMd: _defineProperty({}, theme.breakpoints.up('md'), {\n maxWidth: theme.breakpoints.values.md\n }),\n\n /* Styles applied to the root element if `maxWidth=\"lg\"`. */\n maxWidthLg: _defineProperty({}, theme.breakpoints.up('lg'), {\n maxWidth: theme.breakpoints.values.lg\n }),\n\n /* Styles applied to the root element if `maxWidth=\"xl\"`. */\n maxWidthXl: _defineProperty({}, theme.breakpoints.up('xl'), {\n maxWidth: theme.breakpoints.values.xl\n })\n };\n};\nvar Container = /*#__PURE__*/React.forwardRef(function Container(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$fixed = props.fixed,\n fixed = _props$fixed === void 0 ? false : _props$fixed,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"fixed\", \"maxWidth\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, fixed && classes.fixed, disableGutters && classes.disableGutters, maxWidth !== false && classes[\"maxWidth\".concat(capitalize(String(maxWidth)))]),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Container.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * Set the max-width to match the min-width of the current breakpoint.\n * This is useful if you'd prefer to design for a fixed set of sizes\n * instead of trying to accommodate a fully fluid viewport.\n * It's fluid by default.\n */\n fixed: PropTypes.bool,\n\n /**\n * Determine the max-width of the container.\n * The container width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiContainer'\n})(Container);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport { exactProp } from '@material-ui/utils';\nexport var html = {\n WebkitFontSmoothing: 'antialiased',\n // Antialiasing.\n MozOsxFontSmoothing: 'grayscale',\n // Antialiasing.\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: 'border-box'\n};\nexport var body = function body(theme) {\n return _extends({\n color: theme.palette.text.primary\n }, theme.typography.body2, {\n backgroundColor: theme.palette.background.default,\n '@media print': {\n // Save printer ink.\n backgroundColor: theme.palette.common.white\n }\n });\n};\nexport var styles = function styles(theme) {\n return {\n '@global': {\n html: html,\n '*, *::before, *::after': {\n boxSizing: 'inherit'\n },\n 'strong, b': {\n fontWeight: theme.typography.fontWeightBold\n },\n body: _extends({\n margin: 0\n }, body(theme), {\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n '&::backdrop': {\n backgroundColor: theme.palette.background.default\n }\n })\n }\n };\n};\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n */\n\nfunction CssBaseline(props) {\n /* eslint-disable no-unused-vars */\n var _props$children = props.children,\n children = _props$children === void 0 ? null : _props$children,\n classes = props.classes;\n /* eslint-enable no-unused-vars */\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? CssBaseline.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n CssBaseline['propTypes' + ''] = exactProp(CssBaseline.propTypes);\n}\n\nexport default withStyles(styles, {\n name: 'MuiCssBaseline'\n})(CssBaseline);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 1,\n margin: 0,\n // Reset browser default style.\n border: 'none',\n flexShrink: 0,\n backgroundColor: theme.palette.divider\n },\n\n /* Styles applied to the root element if `absolute={true}`. */\n absolute: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n },\n\n /* Styles applied to the root element if `variant=\"inset\"`. */\n inset: {\n marginLeft: 72\n },\n\n /* Styles applied to the root element if `light={true}`. */\n light: {\n backgroundColor: alpha(theme.palette.divider, 0.08)\n },\n\n /* Styles applied to the root element if `variant=\"middle\"`. */\n middle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n height: '100%',\n width: 1\n },\n\n /* Styles applied to the root element if `flexItem={true}`. */\n flexItem: {\n alignSelf: 'stretch',\n height: 'auto'\n }\n };\n};\nvar Divider = /*#__PURE__*/React.forwardRef(function Divider(props, ref) {\n var _props$absolute = props.absolute,\n absolute = _props$absolute === void 0 ? false : _props$absolute,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'hr' : _props$component,\n _props$flexItem = props.flexItem,\n flexItem = _props$flexItem === void 0 ? false : _props$flexItem,\n _props$light = props.light,\n light = _props$light === void 0 ? false : _props$light,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$role = props.role,\n role = _props$role === void 0 ? Component !== 'hr' ? 'separator' : undefined : _props$role,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'fullWidth' : _props$variant,\n other = _objectWithoutProperties(props, [\"absolute\", \"classes\", \"className\", \"component\", \"flexItem\", \"light\", \"orientation\", \"role\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, variant !== 'fullWidth' && classes[variant], absolute && classes.absolute, flexItem && classes.flexItem, light && classes.light, orientation === 'vertical' && classes.vertical),\n role: role,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Absolutely position the element.\n */\n absolute: PropTypes.bool,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n */\n flexItem: PropTypes.bool,\n\n /**\n * If `true`, the divider will have a lighter color.\n */\n light: PropTypes.bool,\n\n /**\n * The divider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * @ignore\n */\n role: PropTypes.string,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['fullWidth', 'inset', 'middle'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDivider'\n})(Divider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Modal from '../Modal';\nimport Backdrop from '../Backdrop';\nimport withStyles from '../styles/withStyles';\nimport Slide from '../Slide';\nimport Paper from '../Paper';\nimport capitalize from '../utils/capitalize';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `variant=\"permanent or persistent\"`. */\n docked: {\n flex: '0 0 auto'\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n flex: '1 0 auto',\n zIndex: theme.zIndex.drawer,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n // temporary style\n position: 'fixed',\n top: 0,\n // We disable the focus ring for mouse, touch and keyboard users.\n // At some point, it would be better to keep it for keyboard users.\n // :focus-ring CSS pseudo-class will help.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"`. */\n paperAnchorLeft: {\n left: 0,\n right: 'auto'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"`. */\n paperAnchorRight: {\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"`. */\n paperAnchorTop: {\n top: 0,\n left: 0,\n bottom: 'auto',\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"`. */\n paperAnchorBottom: {\n top: 'auto',\n left: 0,\n bottom: 0,\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"` and `variant` is not \"temporary\". */\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"` and `variant` is not \"temporary\". */\n paperAnchorDockedTop: {\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"` and `variant` is not \"temporary\". */\n paperAnchorDockedRight: {\n borderLeft: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"` and `variant` is not \"temporary\". */\n paperAnchorDockedBottom: {\n borderTop: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Modal` component. */\n modal: {}\n };\n};\nvar oppositeDirection = {\n left: 'right',\n right: 'left',\n top: 'down',\n bottom: 'up'\n};\nexport function isHorizontal(anchor) {\n return ['left', 'right'].indexOf(anchor) !== -1;\n}\nexport function getAnchor(theme, anchor) {\n return theme.direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor;\n}\nvar defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The props of the [Modal](/api/modal/) component are available\n * when `variant=\"temporary\"` is set.\n */\n\nvar Drawer = /*#__PURE__*/React.forwardRef(function Drawer(props, ref) {\n var _props$anchor = props.anchor,\n anchorProp = _props$anchor === void 0 ? 'left' : _props$anchor,\n BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 16 : _props$elevation,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropPropsProp = _props$ModalProps.BackdropProps,\n ModalProps = _objectWithoutProperties(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n _props$open = props.open,\n open = _props$open === void 0 ? false : _props$open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SlideProps = props.SlideProps,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Slide : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchor\", \"BackdropProps\", \"children\", \"classes\", \"className\", \"elevation\", \"ModalProps\", \"onClose\", \"open\", \"PaperProps\", \"SlideProps\", \"TransitionComponent\", \"transitionDuration\", \"variant\"]);\n\n var theme = useTheme(); // Let's assume that the Drawer will always be rendered on user space.\n // We use this state is order to skip the appear transition during the\n // initial mount of the component.\n\n var mounted = React.useRef(false);\n React.useEffect(function () {\n mounted.current = true;\n }, []);\n var anchor = getAnchor(theme, anchorProp);\n var drawer = /*#__PURE__*/React.createElement(Paper, _extends({\n elevation: variant === 'temporary' ? elevation : 0,\n square: true\n }, PaperProps, {\n className: clsx(classes.paper, classes[\"paperAnchor\".concat(capitalize(anchor))], PaperProps.className, variant !== 'temporary' && classes[\"paperAnchorDocked\".concat(capitalize(anchor))])\n }), children);\n\n if (variant === 'permanent') {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes.docked, className),\n ref: ref\n }, other), drawer);\n }\n\n var slidingDrawer = /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: open,\n direction: oppositeDirection[anchor],\n timeout: transitionDuration,\n appear: mounted.current\n }, SlideProps), drawer);\n\n if (variant === 'persistent') {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes.docked, className),\n ref: ref\n }, other), slidingDrawer);\n } // variant === temporary\n\n\n return /*#__PURE__*/React.createElement(Modal, _extends({\n BackdropProps: _extends({}, BackdropProps, BackdropPropsProp, {\n transitionDuration: transitionDuration\n }),\n BackdropComponent: Backdrop,\n className: clsx(classes.root, classes.modal, className),\n open: open,\n onClose: onClose,\n ref: ref\n }, other, ModalProps), slidingDrawer);\n});\nprocess.env.NODE_ENV !== \"production\" ? Drawer.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Side from which the drawer will appear.\n */\n anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * The contents of the drawer.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The elevation of the drawer.\n */\n elevation: PropTypes.number,\n\n /**\n * Props applied to the [`Modal`](/api/modal/) element.\n */\n ModalProps: PropTypes.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the drawer is open.\n */\n open: PropTypes.bool,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Props applied to the [`Slide`](/api/slide/) element.\n */\n SlideProps: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDrawer',\n flip: false\n})(Drawer);","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar ExpansionPanelContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ExpansionPanelContext.displayName = 'ExpansionPanelContext';\n}\n\nexport default ExpansionPanelContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport ExpansionPanelContext from './ExpansionPanelContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanel component was renamed to Accordion to use a more common naming convention.\n *\n * You should use `import { Accordion } from '@material-ui/core'`\n * or `import Accordion from '@material-ui/core/Accordion'`.\n */\n\nvar ExpansionPanel = /*#__PURE__*/React.forwardRef(function ExpansionPanel(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanel component was renamed to Accordion to use a more common naming convention.', '', \"You should use `import { Accordion } from '@material-ui/core'`\", \"or `import Accordion from '@material-ui/core/Accordion'`\"].join('\\n'));\n }\n }\n\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'ExpansionPanel',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(ExpansionPanelContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The ExpansionPanel doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of ExpansionPanel to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the panel by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the panel will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the panel, otherwise collapse it.\n * Setting this prop enables control over the panel.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the panel.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanel'\n})(ExpansionPanel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.\n *\n * You should use `import { AccordionActions } from '@material-ui/core'`\n * or `import AccordionActions from '@material-ui/core/AccordionActions'`.\n */\n\nvar ExpansionPanelActions = /*#__PURE__*/React.forwardRef(function ExpansionPanelActions(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.', '', \"You should use `import { AccordionActions } from '@material-ui/core'`\", \"or `import AccordionActions from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelActions'\n})(ExpansionPanelActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.\n *\n * You should use `import { AccordionDetails } from '@material-ui/core'`\n * or `import AccordionDetails from '@material-ui/core/AccordionDetails'`.\n */\n\nvar ExpansionPanelDetails = /*#__PURE__*/React.forwardRef(function ExpansionPanelDetails(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.', '', \"You should use `import { AccordionDetails } from '@material-ui/core'`\", \"or `import AccordionDetails from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelDetails'\n})(ExpansionPanelDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport ExpansionPanelContext from '../ExpansionPanel/ExpansionPanelContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.\n *\n * You should use `import { AccordionSummary } from '@material-ui/core'`\n * or `import AccordionSummary from '@material-ui/core/AccordionSummary'`.\n */\n\nvar ExpansionPanelSummary = /*#__PURE__*/React.forwardRef(function ExpansionPanelSummary(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.', '', \"You should use `import { AccordionSummary } from '@material-ui/core'`\", \"or `import AccordionSummary from '@material-ui/core/AccordionSummary'`\"].join('\\n'));\n }\n }\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n IconButtonProps = props.IconButtonProps,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocusVisible = props.onFocusVisible,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"IconButtonProps\", \"onBlur\", \"onClick\", \"onFocusVisible\"]);\n\n var _React$useState = React.useState(false),\n focusedState = _React$useState[0],\n setFocusedState = _React$useState[1];\n\n var handleFocusVisible = function handleFocusVisible(event) {\n setFocusedState(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n setFocusedState(false);\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var _React$useContext = React.useContext(ExpansionPanelContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded, focusedState && classes.focused),\n onFocusVisible: handleFocusVisible,\n onBlur: handleBlur,\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelSummary'\n})(ExpansionPanelSummary);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'wrap'\n },\n\n /* Styles applied to the root element if `row={true}`. */\n row: {\n flexDirection: 'row'\n }\n};\n/**\n * `FormGroup` wraps controls such as `Checkbox` and `Switch`.\n * It provides compact row layout.\n * For the `Radio`, you should be using the `RadioGroup` component instead of this one.\n */\n\nvar FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$row = props.row,\n row = _props$row === void 0 ? false : _props$row,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"row\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, row && classes.row),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display group of elements in a compact row.\n */\n row: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormGroup'\n})(FormGroup);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.\n *\n * You should use `import { ImageList } from '@material-ui/core'`\n * or `import ImageList from '@material-ui/core/ImageList'`.\n */\n\nvar GridList = /*#__PURE__*/React.forwardRef(function GridList(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridList component was renamed to ImageList to align with the current Material Design naming.', '', \"You should use `import { ImageList } from '@material-ui/core'`\", \"or `import ImageList from '@material-ui/core/ImageList'`.\"].join('\\n'));\n }\n }\n\n var _props$cellHeight = props.cellHeight,\n cellHeight = _props$cellHeight === void 0 ? 180 : _props$cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? 4 : _props$spacing,\n style = props.style,\n other = _objectWithoutProperties(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"spacing\", \"style\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n style: _extends({\n margin: -spacing / 2\n }, style)\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The GridList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/React.cloneElement(child, {\n style: _extends({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: cellHeight === 'auto' ? 'auto' : cellHeight * childRows + spacing,\n padding: spacing / 2\n }, child.props.style)\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridList.propTypes = {\n /**\n * Number of px for one cell height.\n * You can set `'auto'` if you want to let the children determine the height.\n */\n cellHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]),\n\n /**\n * Grid Tiles that will be in Grid List.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Number of columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Number of px for the spacing between tiles.\n */\n spacing: PropTypes.number,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridList'\n})(GridList);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport debounce from '../utils/debounce';\nimport withStyles from '../styles/withStyles';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n tile: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, _toConsumableArray(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, _toConsumableArray(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, _toConsumableArray(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, _toConsumableArray(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar warnedOnce = false;\n/**\n * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.\n *\n * You should use `import { ImageListItem } from '@material-ui/core'`\n * or `import ImageListItem from '@material-ui/core/ImageListItem'`.\n */\n\nvar GridListTile = /*#__PURE__*/React.forwardRef(function GridListTile(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridListTile component was renamed to ImageListItem to align with the current Material Design naming.', '', \"You should use `import { ImageListItem } from '@material-ui/core'`\", \"or `import ImageListItem from '@material-ui/core/ImageListItem'`.\"].join('\\n'));\n }\n } // cols rows default values are for docs only\n\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = React.useRef(null);\n React.useEffect(function () {\n ensureImageCover(imgRef.current, classes);\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.tile\n }, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTile.propTypes = {\n /**\n * Theoretically you can pass any node as children, but the main use case is to pass an img,\n * in which case GridListTile takes care of making the image \"cover\" available space\n * (similar to `background-size: cover` or to `object-fit: cover`).\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Width of the tile in number of grid cells.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the tile in number of grid cells.\n */\n rows: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTile'\n})(GridListTile);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `titlePosition=\"bottom\"`. */\n titlePositionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `titlePosition=\"top\"`. */\n titlePositionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.\n *\n * You should use `import { ImageListItemBar } from '@material-ui/core'`\n * or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.\n */\n\nvar GridListTileBar = /*#__PURE__*/React.forwardRef(function GridListTileBar(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.', '', \"You should use `import { ImageListItemBar } from '@material-ui/core'`\", \"or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.\"].join('\\n'));\n }\n }\n\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$titlePosition = props.titlePosition,\n titlePosition = _props$titlePosition === void 0 ? 'bottom' : _props$titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"titlePosition\"]);\n\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, titlePosition === 'top' ? classes.titlePositionTop : classes.titlePositionBottom, subtitle && classes.rootSubtitle),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTileBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the tile itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on tile.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n */\n titlePosition: PropTypes.oneOf(['bottom', 'top'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTileBar'\n})(GridListTileBar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { getThemeProps, useTheme } from '@material-ui/styles';\nexport default function useMediaQuery(queryInput) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var theme = useTheme();\n var props = getThemeProps({\n theme: theme,\n name: 'MuiUseMediaQuery',\n props: {}\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['Material-UI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n var query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, ''); // Wait for jsdom to support the match media feature.\n // All the browsers Material-UI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n\n var supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n\n var _props$options = _extends({}, props, options),\n _props$options$defaul = _props$options.defaultMatches,\n defaultMatches = _props$options$defaul === void 0 ? false : _props$options$defaul,\n _props$options$matchM = _props$options.matchMedia,\n matchMedia = _props$options$matchM === void 0 ? supportMatchMedia ? window.matchMedia : null : _props$options$matchM,\n _props$options$noSsr = _props$options.noSsr,\n noSsr = _props$options$noSsr === void 0 ? false : _props$options$noSsr,\n _props$options$ssrMat = _props$options.ssrMatchMedia,\n ssrMatchMedia = _props$options$ssrMat === void 0 ? null : _props$options$ssrMat;\n\n var _React$useState = React.useState(function () {\n if (noSsr && supportMatchMedia) {\n return matchMedia(query).matches;\n }\n\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n } // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n\n\n return defaultMatches;\n }),\n match = _React$useState[0],\n setMatch = _React$useState[1];\n\n React.useEffect(function () {\n var active = true;\n\n if (!supportMatchMedia) {\n return undefined;\n }\n\n var queryList = matchMedia(query);\n\n var updateMatch = function updateMatch() {\n // Workaround Safari wrong implementation of matchMedia\n // TODO can we remove it?\n // https://github.com/mui-org/material-ui/pull/17315#issuecomment-528286677\n if (active) {\n setMatch(queryList.matches);\n }\n };\n\n updateMatch();\n queryList.addListener(updateMatch);\n return function () {\n active = false;\n queryList.removeListener(updateMatch);\n };\n }, [query, matchMedia, supportMatchMedia]);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue({\n query: query,\n match: match\n });\n }\n\n return match;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { getDisplayName } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport useTheme from '../styles/useTheme';\nimport { keys as breakpointKeys } from '../styles/createBreakpoints';\nimport useMediaQuery from '../useMediaQuery'; // By default, returns true if screen width is the same or greater than the given breakpoint.\n\nexport var isWidthUp = function isWidthUp(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return breakpointKeys.indexOf(breakpoint) <= breakpointKeys.indexOf(width);\n }\n\n return breakpointKeys.indexOf(breakpoint) < breakpointKeys.indexOf(width);\n}; // By default, returns true if screen width is the same or less than the given breakpoint.\n\nexport var isWidthDown = function isWidthDown(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return breakpointKeys.indexOf(width) <= breakpointKeys.indexOf(breakpoint);\n }\n\n return breakpointKeys.indexOf(width) < breakpointKeys.indexOf(breakpoint);\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nvar withWidth = function withWidth() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (Component) {\n var _options$withTheme = options.withTheme,\n withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme,\n _options$noSSR = options.noSSR,\n noSSR = _options$noSSR === void 0 ? false : _options$noSSR,\n initialWidthOption = options.initialWidth;\n\n function WithWidth(props) {\n var contextTheme = useTheme();\n var theme = props.theme || contextTheme;\n\n var _getThemeProps = getThemeProps({\n theme: theme,\n name: 'MuiWithWidth',\n props: _extends({}, props)\n }),\n initialWidth = _getThemeProps.initialWidth,\n width = _getThemeProps.width,\n other = _objectWithoutProperties(_getThemeProps, [\"initialWidth\", \"width\"]);\n\n var _React$useState = React.useState(false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n setMountedState(true);\n }, []);\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n var keys = theme.breakpoints.keys.slice().reverse();\n var widthComputed = keys.reduce(function (output, key) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var matches = useMediaQuery(theme.breakpoints.up(key));\n return !output && matches ? key : output;\n }, null);\n\n var more = _extends({\n width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption\n }, withThemeOption ? {\n theme: theme\n } : {}, other); // When rendering the component on the server,\n // we have no idea about the client browser screen width.\n // In order to prevent blinks and help the reconciliation of the React tree\n // we are not rendering the child component.\n //\n // An alternative is to use the `initialWidth` property.\n\n\n if (more.width === undefined) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(Component, more);\n }\n\n process.env.NODE_ENV !== \"production\" ? WithWidth.propTypes = {\n /**\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * @ignore\n */\n theme: PropTypes.object,\n\n /**\n * Bypass the width calculation logic.\n */\n width: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithWidth.displayName = \"WithWidth(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithWidth, Component);\n return WithWidth;\n };\n};\n\nexport default withWidth;","import PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport withWidth, { isWidthDown, isWidthUp } from '../withWidth';\nimport useTheme from '../styles/useTheme';\n/**\n * @ignore - internal component.\n */\n\nfunction HiddenJs(props) {\n var children = props.children,\n only = props.only,\n width = props.width;\n var theme = useTheme();\n var visible = true; // `only` check is faster to get out sooner if used.\n\n if (only) {\n if (Array.isArray(only)) {\n for (var i = 0; i < only.length; i += 1) {\n var breakpoint = only[i];\n\n if (width === breakpoint) {\n visible = false;\n break;\n }\n }\n } else if (only && width === only) {\n visible = false;\n }\n } // Allow `only` to be combined with other props. If already hidden, no need to check others.\n\n\n if (visible) {\n // determine visibility based on the smallest size up\n for (var _i = 0; _i < theme.breakpoints.keys.length; _i += 1) {\n var _breakpoint = theme.breakpoints.keys[_i];\n var breakpointUp = props[\"\".concat(_breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(_breakpoint, \"Down\")];\n\n if (breakpointUp && isWidthUp(_breakpoint, width) || breakpointDown && isWidthDown(_breakpoint, width)) {\n visible = false;\n break;\n }\n }\n }\n\n if (!visible) {\n return null;\n }\n\n return children;\n}\n\nHiddenJs.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * @ignore\n * width prop provided by withWidth decorator.\n */\n width: PropTypes.string.isRequired,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n};\n\nif (process.env.NODE_ENV !== 'production') {\n HiddenJs.propTypes = exactProp(HiddenJs.propTypes);\n}\n\nexport default withWidth()(HiddenJs);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\n\nvar styles = function styles(theme) {\n var hidden = {\n display: 'none'\n };\n return theme.breakpoints.keys.reduce(function (acc, key) {\n acc[\"only\".concat(capitalize(key))] = _defineProperty({}, theme.breakpoints.only(key), hidden);\n acc[\"\".concat(key, \"Up\")] = _defineProperty({}, theme.breakpoints.up(key), hidden);\n acc[\"\".concat(key, \"Down\")] = _defineProperty({}, theme.breakpoints.down(key), hidden);\n return acc;\n }, {});\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction HiddenCss(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n only = props.only,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"only\"]);\n\n var theme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n var unknownProps = Object.keys(other).filter(function (propName) {\n var isUndeclaredBreakpoint = !theme.breakpoints.keys.some(function (breakpoint) {\n return \"\".concat(breakpoint, \"Up\") === propName || \"\".concat(breakpoint, \"Down\") === propName;\n });\n return isUndeclaredBreakpoint;\n });\n\n if (unknownProps.length > 0) {\n console.error(\"Material-UI: Unsupported props received by ``: \".concat(unknownProps.join(', '), \". Did you forget to wrap this component in a ThemeProvider declaring these breakpoints?\"));\n }\n }\n\n var clsx = [];\n\n if (className) {\n clsx.push(className);\n }\n\n for (var i = 0; i < theme.breakpoints.keys.length; i += 1) {\n var breakpoint = theme.breakpoints.keys[i];\n var breakpointUp = props[\"\".concat(breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(breakpoint, \"Down\")];\n\n if (breakpointUp) {\n clsx.push(classes[\"\".concat(breakpoint, \"Up\")]);\n }\n\n if (breakpointDown) {\n clsx.push(classes[\"\".concat(breakpoint, \"Down\")]);\n }\n }\n\n if (only) {\n var onlyBreakpoints = Array.isArray(only) ? only : [only];\n onlyBreakpoints.forEach(function (breakpoint) {\n clsx.push(classes[\"only\".concat(capitalize(breakpoint))]);\n });\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: clsx.join(' ')\n }, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? HiddenCss.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateHiddenCss'\n})(HiddenCss);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport HiddenJs from './HiddenJs';\nimport HiddenCss from './HiddenCss';\n/**\n * Responsively hides children based on the selected implementation.\n */\n\nfunction Hidden(props) {\n var _props$implementation = props.implementation,\n implementation = _props$implementation === void 0 ? 'js' : _props$implementation,\n _props$lgDown = props.lgDown,\n lgDown = _props$lgDown === void 0 ? false : _props$lgDown,\n _props$lgUp = props.lgUp,\n lgUp = _props$lgUp === void 0 ? false : _props$lgUp,\n _props$mdDown = props.mdDown,\n mdDown = _props$mdDown === void 0 ? false : _props$mdDown,\n _props$mdUp = props.mdUp,\n mdUp = _props$mdUp === void 0 ? false : _props$mdUp,\n _props$smDown = props.smDown,\n smDown = _props$smDown === void 0 ? false : _props$smDown,\n _props$smUp = props.smUp,\n smUp = _props$smUp === void 0 ? false : _props$smUp,\n _props$xlDown = props.xlDown,\n xlDown = _props$xlDown === void 0 ? false : _props$xlDown,\n _props$xlUp = props.xlUp,\n xlUp = _props$xlUp === void 0 ? false : _props$xlUp,\n _props$xsDown = props.xsDown,\n xsDown = _props$xsDown === void 0 ? false : _props$xsDown,\n _props$xsUp = props.xsUp,\n xsUp = _props$xsUp === void 0 ? false : _props$xsUp,\n other = _objectWithoutProperties(props, [\"implementation\", \"lgDown\", \"lgUp\", \"mdDown\", \"mdUp\", \"smDown\", \"smUp\", \"xlDown\", \"xlUp\", \"xsDown\", \"xsUp\"]);\n\n if (implementation === 'js') {\n return /*#__PURE__*/React.createElement(HiddenJs, _extends({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n }\n\n return /*#__PURE__*/React.createElement(HiddenCss, _extends({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Hidden.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n} : void 0;\nexport default Hidden;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n fontSize: theme.typography.pxToRem(24),\n width: '1em',\n height: '1em',\n // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541\n // To remove at some point.\n overflow: 'hidden',\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(36)\n }\n };\n};\nvar Icon = /*#__PURE__*/React.forwardRef(function Icon(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"fontSize\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx('material-icons', classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n \"aria-hidden\": true,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Icon.propTypes = {\n /**\n * The name of the icon font ligature.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nIcon.muiName = 'Icon';\nexport default withStyles(styles, {\n name: 'MuiIcon'\n})(Icon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar ImageList = /*#__PURE__*/React.forwardRef(function ImageList(props, ref) {\n var cellHeight = props.cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$gap = props.gap,\n gapProp = _props$gap === void 0 ? 4 : _props$gap,\n _props$rowHeight = props.rowHeight,\n rowHeightProp = _props$rowHeight === void 0 ? 180 : _props$rowHeight,\n spacing = props.spacing,\n style = props.style,\n other = _objectWithoutProperties(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"gap\", \"rowHeight\", \"spacing\", \"style\"]);\n\n var gap = spacing || gapProp;\n var rowHeight = cellHeight || rowHeightProp;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n style: _extends({\n margin: -gap / 2\n }, style)\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The ImageList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/React.cloneElement(child, {\n style: _extends({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: rowHeight === 'auto' ? 'auto' : rowHeight * childRows + gap,\n padding: gap / 2\n }, child.props.style)\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageList.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Cell height in `px`.\n * Set to `'auto'` to let the children determine the height.\n * @deprecated Use rowHeight instead.\n */\n cellHeight: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]), 'Use the `rowHeight` prop instead.'),\n\n /**\n * Items that will be in the image list.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Number of columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The gap between items in `px`.\n */\n gap: PropTypes.number,\n\n /**\n * The height of one row in `px`.\n */\n rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n\n /**\n * The spacing between items in `px`.\n * @deprecated Use gap instead.\n */\n spacing: deprecatedPropType(PropTypes.number, 'Use the `gap` prop instead.'),\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageList'\n})(ImageList);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport debounce from '../utils/debounce';\nimport withStyles from '../styles/withStyles';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n item: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the item. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the item. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, _toConsumableArray(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, _toConsumableArray(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, _toConsumableArray(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, _toConsumableArray(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(props, ref) {\n // cols rows default values are for docs only\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = React.useRef(null);\n React.useEffect(function () {\n ensureImageCover(imgRef.current, classes);\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.item\n }, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItem.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * While you can pass any node as children, the main use case is for an img.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Width of the item in number of grid columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the item in number of grid rows.\n */\n rows: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageListItem'\n})(ImageListItem);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar ImageListItemBar = /*#__PURE__*/React.forwardRef(function ImageListItemBar(props, ref) {\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$position = props.position,\n positionProp = _props$position === void 0 ? 'bottom' : _props$position,\n titlePosition = props.titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"position\", \"titlePosition\"]);\n\n var position = titlePosition || positionProp;\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, subtitle && classes.rootSubtitle, {\n 'bottom': classes.positionBottom,\n 'top': classes.positionTop\n }[position]),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItemBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the item itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Position of the title bar.\n */\n position: PropTypes.oneOf(['bottom', 'top']),\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on item.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n * @deprecated Use position instead.\n */\n titlePosition: deprecatedPropType(PropTypes.oneOf(['bottom', 'top']), 'Use the `position` prop instead.')\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageListItemBar'\n})(ImageListItemBar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { darken, lighten } from '../styles/colorManipulator';\nimport useTheme from '../styles/useTheme';\nvar TRANSITION_DURATION = 4; // seconds\n\nexport var styles = function styles(theme) {\n var getColor = function getColor(color) {\n return theme.palette.type === 'light' ? lighten(color, 0.62) : darken(color, 0.5);\n };\n\n var backgroundPrimary = getColor(theme.palette.primary.main);\n var backgroundSecondary = getColor(theme.palette.secondary.main);\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n overflow: 'hidden',\n height: 4,\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root and bar2 element if `color=\"primary\"`; bar2 if `variant=\"buffer\"`. */\n colorPrimary: {\n backgroundColor: backgroundPrimary\n },\n\n /* Styles applied to the root and bar2 elements if `color=\"secondary\"`; bar2 if `variant=\"buffer\"`. */\n colorSecondary: {\n backgroundColor: backgroundSecondary\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {},\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `variant=\"buffer\"`. */\n buffer: {\n backgroundColor: 'transparent'\n },\n\n /* Styles applied to the root element if `variant=\"query\"`. */\n query: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"`. */\n dashed: {\n position: 'absolute',\n marginTop: 0,\n height: '100%',\n width: '100%',\n animation: '$buffer 3s infinite linear'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"primary\"`. */\n dashedColorPrimary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundPrimary, \" 0%, \").concat(backgroundPrimary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"secondary\"`. */\n dashedColorSecondary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundSecondary, \" 0%, \").concat(backgroundSecondary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the layered bar1 and bar2 elements. */\n bar: {\n width: '100%',\n position: 'absolute',\n left: 0,\n bottom: 0,\n top: 0,\n transition: 'transform 0.2s linear',\n transformOrigin: 'left'\n },\n\n /* Styles applied to the bar elements if `color=\"primary\"`; bar2 if `variant` not \"buffer\". */\n barColorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the bar elements if `color=\"secondary\"`; bar2 if `variant` not \"buffer\". */\n barColorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n\n /* Styles applied to the bar1 element if `variant=\"indeterminate or query\"`. */\n bar1Indeterminate: {\n width: 'auto',\n animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite'\n },\n\n /* Styles applied to the bar1 element if `variant=\"determinate\"`. */\n bar1Determinate: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar1 element if `variant=\"buffer\"`. */\n bar1Buffer: {\n zIndex: 1,\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar2 element if `variant=\"indeterminate or query\"`. */\n bar2Indeterminate: {\n width: 'auto',\n animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite'\n },\n\n /* Styles applied to the bar2 element if `variant=\"buffer\"`. */\n bar2Buffer: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n // Legends:\n // || represents the viewport\n // - represents a light background\n // x represents a dark background\n '@keyframes indeterminate1': {\n // |-----|---x-||-----||-----|\n '0%': {\n left: '-35%',\n right: '100%'\n },\n // |-----|-----||-----||xxxx-|\n '60%': {\n left: '100%',\n right: '-90%'\n },\n '100%': {\n left: '100%',\n right: '-90%'\n }\n },\n '@keyframes indeterminate2': {\n // |xxxxx|xxxxx||-----||-----|\n '0%': {\n left: '-200%',\n right: '100%'\n },\n // |-----|-----||-----||-x----|\n '60%': {\n left: '107%',\n right: '-8%'\n },\n '100%': {\n left: '107%',\n right: '-8%'\n }\n },\n '@keyframes buffer': {\n '0%': {\n opacity: 1,\n backgroundPosition: '0 -23px'\n },\n '50%': {\n opacity: 0,\n backgroundPosition: '0 -23px'\n },\n '100%': {\n opacity: 1,\n backgroundPosition: '-200px -23px'\n }\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n value = props.value,\n valueBuffer = props.valueBuffer,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"value\", \"valueBuffer\", \"variant\"]);\n\n var theme = useTheme();\n var rootProps = {};\n var inlineStyles = {\n bar1: {},\n bar2: {}\n };\n\n if (variant === 'determinate' || variant === 'buffer') {\n if (value !== undefined) {\n rootProps['aria-valuenow'] = Math.round(value);\n rootProps['aria-valuemin'] = 0;\n rootProps['aria-valuemax'] = 100;\n var transform = value - 100;\n\n if (theme.direction === 'rtl') {\n transform = -transform;\n }\n\n inlineStyles.bar1.transform = \"translateX(\".concat(transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');\n }\n }\n\n if (variant === 'buffer') {\n if (valueBuffer !== undefined) {\n var _transform = (valueBuffer || 0) - 100;\n\n if (theme.direction === 'rtl') {\n _transform = -_transform;\n }\n\n inlineStyles.bar2.transform = \"translateX(\".concat(_transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');\n }\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'buffer': classes.buffer,\n 'query': classes.query\n }[variant]),\n role: \"progressbar\"\n }, rootProps, {\n ref: ref\n }, other), variant === 'buffer' ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.dashed, classes[\"dashedColor\".concat(capitalize(color))])\n }) : null, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, classes[\"barColor\".concat(capitalize(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, {\n 'determinate': classes.bar1Determinate,\n 'buffer': classes.bar1Buffer\n }[variant]),\n style: inlineStyles.bar1\n }), variant === 'determinate' ? null : /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes[\"color\".concat(capitalize(color))], classes.bar2Buffer] : classes[\"barColor\".concat(capitalize(color))]),\n style: inlineStyles.bar2\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? LinearProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The value of the progress indicator for the determinate and buffer variants.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The value for the buffer variant.\n * Value between 0 and 100.\n */\n valueBuffer: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate or query when there is no progress value.\n */\n variant: PropTypes.oneOf(['buffer', 'determinate', 'indeterminate', 'query'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLinearProgress'\n})(LinearProgress);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useForkRef from '../utils/useForkRef';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `underline=\"none\"`. */\n underlineNone: {\n textDecoration: 'none'\n },\n\n /* Styles applied to the root element if `underline=\"hover\"`. */\n underlineHover: {\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline'\n }\n },\n\n /* Styles applied to the root element if `underline=\"always\"`. */\n underlineAlways: {\n textDecoration: 'underline'\n },\n // Same reset as ButtonBase.root\n\n /* Styles applied to the root element if `component=\"button\"`. */\n button: {\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$focusVisible': {\n outline: 'auto'\n }\n },\n\n /* Pseudo-class applied to the root element if the link is keyboard focused. */\n focusVisible: {}\n};\nvar Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'a' : _props$component,\n onBlur = props.onBlur,\n onFocus = props.onFocus,\n TypographyClasses = props.TypographyClasses,\n _props$underline = props.underline,\n underline = _props$underline === void 0 ? 'hover' : _props$underline,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'inherit' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"onBlur\", \"onFocus\", \"TypographyClasses\", \"underline\", \"variant\"]);\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n var handlerRef = useForkRef(ref, focusVisibleRef);\n\n var handleBlur = function handleBlur(event) {\n if (focusVisible) {\n onBlurVisible();\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var handleFocus = function handleFocus(event) {\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(Typography, _extends({\n className: clsx(classes.root, classes[\"underline\".concat(capitalize(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button),\n classes: TypographyClasses,\n color: color,\n component: component,\n onBlur: handleBlur,\n onFocus: handleFocus,\n ref: handlerRef,\n variant: variant\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n /**\n * The content of the link.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the link.\n */\n color: PropTypes.oneOf(['initial', 'inherit', 'primary', 'secondary', 'textPrimary', 'textSecondary', 'error']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * `classes` prop applied to the [`Typography`](/api/typography/) element.\n */\n TypographyClasses: PropTypes.object,\n\n /**\n * Controls when the link should have an underline.\n */\n underline: PropTypes.oneOf(['none', 'hover', 'always']),\n\n /**\n * Applies the theme typography styles.\n */\n variant: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLink'\n})(Link);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n flexShrink: 0\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n};\n/**\n * A simple wrapper to apply `List` styles to an `Avatar`.\n */\n\nvar ListItemAvatar = /*#__PURE__*/React.forwardRef(function ListItemAvatar(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n var context = React.useContext(ListContext);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemAvatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component – normally `Avatar`.\n */\n children: PropTypes.element.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemAvatar'\n})(ListItemAvatar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from '../List/ListContext';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n };\n};\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nvar ListItemIcon = /*#__PURE__*/React.forwardRef(function ListItemIcon(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n var context = React.useContext(ListContext);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@material-ui/icons` SVG icon element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemIcon'\n})(ListItemIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n right: 16,\n top: '50%',\n transform: 'translateY(-50%)'\n }\n};\n/**\n * Must be used as the last child of ListItem to function properly.\n */\n\nvar ListItemSecondaryAction = /*#__PURE__*/React.forwardRef(function ListItemSecondaryAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemSecondaryAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally an `IconButton` or selection control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nListItemSecondaryAction.muiName = 'ListItemSecondaryAction';\nexport default withStyles(styles, {\n name: 'MuiListItemSecondaryAction'\n})(ListItemSecondaryAction);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n },\n\n /* Styles applied to the `Typography` components if primary and secondary are set. */\n multiline: {\n marginTop: 6,\n marginBottom: 6\n },\n\n /* Styles applied to the `Typography` components if dense. */\n dense: {},\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 56\n },\n\n /* Styles applied to the primary `Typography` component. */\n primary: {},\n\n /* Styles applied to the secondary `Typography` component. */\n secondary: {}\n};\nvar ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n primaryProp = props.primary,\n primaryTypographyProps = props.primaryTypographyProps,\n secondaryProp = props.secondary,\n secondaryTypographyProps = props.secondaryTypographyProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"]);\n\n var _React$useContext = React.useContext(ListContext),\n dense = _React$useContext.dense;\n\n var primary = primaryProp != null ? primaryProp : children;\n\n if (primary != null && primary.type !== Typography && !disableTypography) {\n primary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps), primary);\n }\n\n var secondary = secondaryProp;\n\n if (secondary != null && secondary.type !== Typography && !disableTypography) {\n secondary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: \"body2\",\n className: classes.secondary,\n color: \"textSecondary\",\n display: \"block\"\n }, secondaryTypographyProps), secondary);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline),\n ref: ref\n }, other), primary, secondary);\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * If `true`, the children will be indented.\n * This should be used if there is no left avatar or left icon.\n */\n inset: PropTypes.bool,\n\n /**\n * The main content element.\n */\n primary: PropTypes.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: PropTypes.object,\n\n /**\n * The secondary content element.\n */\n secondary: PropTypes.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemText'\n})(ListItemText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n lineHeight: '48px',\n listStyle: 'none',\n color: theme.palette.text.secondary,\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(14)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the inner `component` element if `disableGutters={false}`. */\n gutters: {\n paddingLeft: 16,\n paddingRight: 16\n },\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 72\n },\n\n /* Styles applied to the root element if `disableSticky={false}`. */\n sticky: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n backgroundColor: 'inherit'\n }\n };\n};\nvar ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$disableSticky = props.disableSticky,\n disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"disableGutters\", \"disableSticky\", \"inset\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListSubheader.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'inherit']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the List Subheader will not have gutters.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will not stick to the top during scroll.\n */\n disableSticky: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will be indented.\n */\n inset: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListSubheader'\n})(ListSubheader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Paper from '../Paper';\nimport capitalize from '../utils/capitalize';\nimport LinearProgress from '../LinearProgress';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n background: theme.palette.background.default,\n padding: 8\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n position: 'fixed',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {},\n\n /* Styles applied to the dots container if `variant=\"dots\"`. */\n dots: {\n display: 'flex',\n flexDirection: 'row'\n },\n\n /* Styles applied to each dot if `variant=\"dots\"`. */\n dot: {\n backgroundColor: theme.palette.action.disabled,\n borderRadius: '50%',\n width: 8,\n height: 8,\n margin: '0 2px'\n },\n\n /* Styles applied to a dot if `variant=\"dots\"` and this is the active step. */\n dotActive: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the Linear Progress component if `variant=\"progress\"`. */\n progress: {\n width: '50%'\n }\n };\n};\nvar MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n backButton = props.backButton,\n classes = props.classes,\n className = props.className,\n LinearProgressProps = props.LinearProgressProps,\n nextButton = props.nextButton,\n _props$position = props.position,\n position = _props$position === void 0 ? 'bottom' : _props$position,\n steps = props.steps,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'dots' : _props$variant,\n other = _objectWithoutProperties(props, [\"activeStep\", \"backButton\", \"classes\", \"className\", \"LinearProgressProps\", \"nextButton\", \"position\", \"steps\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[\"position\".concat(capitalize(position))], className),\n ref: ref\n }, other), backButton, variant === 'text' && /*#__PURE__*/React.createElement(React.Fragment, null, activeStep + 1, \" / \", steps), variant === 'dots' && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.dots\n }, _toConsumableArray(new Array(steps)).map(function (_, index) {\n return /*#__PURE__*/React.createElement(\"div\", {\n key: index,\n className: clsx(classes.dot, index === activeStep && classes.dotActive)\n });\n })), variant === 'progress' && /*#__PURE__*/React.createElement(LinearProgress, _extends({\n className: classes.progress,\n variant: \"determinate\",\n value: Math.ceil(activeStep / (steps - 1) * 100)\n }, LinearProgressProps)), nextButton);\n});\nprocess.env.NODE_ENV !== \"production\" ? MobileStepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Defines which dot is highlighted when the variant is 'dots'.\n */\n activeStep: PropTypes.number,\n\n /**\n * A back button element. For instance, it can be a `Button` or an `IconButton`.\n */\n backButton: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Props applied to the `LinearProgress` element.\n */\n LinearProgressProps: PropTypes.object,\n\n /**\n * A next button element. For instance, it can be a `Button` or an `IconButton`.\n */\n nextButton: PropTypes.node,\n\n /**\n * Set the positioning type.\n */\n position: PropTypes.oneOf(['bottom', 'static', 'top']),\n\n /**\n * The total steps.\n */\n steps: PropTypes.number.isRequired,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['dots', 'progress', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiMobileStepper'\n})(MobileStepper);","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nvar useEnhancedEffect = typeof window !== 'undefined' && process.env.NODE_ENV !== 'test' ? React.useLayoutEffect : React.useEffect;\n/**\n * NoSsr purposely removes components from the subject of Server Side Rendering (SSR).\n *\n * This component can be useful in a variety of situations:\n * - Escape hatch for broken dependencies not supporting SSR.\n * - Improve the time-to-first paint on the client by only rendering above the fold.\n * - Reduce the rendering time on the server.\n * - Under too heavy server load, you can turn on service degradation.\n */\n\nfunction NoSsr(props) {\n var children = props.children,\n _props$defer = props.defer,\n defer = _props$defer === void 0 ? false : _props$defer,\n _props$fallback = props.fallback,\n fallback = _props$fallback === void 0 ? null : _props$fallback;\n\n var _React$useState = React.useState(false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n if (!defer) {\n setMountedState(true);\n }\n }, [defer]);\n React.useEffect(function () {\n if (defer) {\n setMountedState(true);\n }\n }, [defer]); // We need the Fragment here to force react-docgen to recognise NoSsr as a component.\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, mountedState ? children : fallback);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? NoSsr.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n\n /**\n * If `true`, the component will not only prevent server-side rendering.\n * It will also defer the rendering of the children into a different screen frame.\n */\n defer: PropTypes.bool,\n\n /**\n * The fallback content to display.\n */\n fallback: PropTypes.node\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n NoSsr['propTypes' + ''] = exactProp(NoSsr.propTypes);\n}\n\nexport default NoSsr;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'RadioButtonUnchecked');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z\"\n}), 'RadioButtonChecked');","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport RadioButtonUncheckedIcon from '../internal/svg-icons/RadioButtonUnchecked';\nimport RadioButtonCheckedIcon from '../internal/svg-icons/RadioButtonChecked';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'relative',\n display: 'flex',\n '&$checked $layer': {\n transform: 'scale(1)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.shortest\n })\n }\n },\n layer: {\n left: 0,\n position: 'absolute',\n transform: 'scale(0)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeIn,\n duration: theme.transitions.duration.shortest\n })\n },\n checked: {}\n };\n};\n/**\n * @ignore - internal component.\n */\n\nfunction RadioButtonIcon(props) {\n var checked = props.checked,\n classes = props.classes,\n fontSize = props.fontSize;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.root, checked && classes.checked)\n }, /*#__PURE__*/React.createElement(RadioButtonUncheckedIcon, {\n fontSize: fontSize\n }), /*#__PURE__*/React.createElement(RadioButtonCheckedIcon, {\n fontSize: fontSize,\n className: classes.layer\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? RadioButtonIcon.propTypes = {\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n fontSize: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateRadioButtonIcon'\n})(RadioButtonIcon);","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nvar RadioGroupContext = React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n RadioGroupContext.displayName = 'RadioGroupContext';\n}\n\nexport default RadioGroupContext;","import * as React from 'react';\nimport RadioGroupContext from './RadioGroupContext';\nexport default function useRadioGroup() {\n return React.useContext(RadioGroupContext);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport RadioButtonIcon from './RadioButtonIcon';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport withStyles from '../styles/withStyles';\nimport useRadioGroup from '../RadioGroup/useRadioGroup';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, {\n checked: true\n});\nvar defaultIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, null);\nvar Radio = /*#__PURE__*/React.forwardRef(function Radio(props, ref) {\n var checkedProp = props.checked,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n nameProp = props.name,\n onChangeProp = props.onChange,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checked\", \"classes\", \"color\", \"name\", \"onChange\", \"size\"]);\n\n var radioGroup = useRadioGroup();\n var checked = checkedProp;\n var onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);\n var name = nameProp;\n\n if (radioGroup) {\n if (typeof checked === 'undefined') {\n checked = radioGroup.value === props.value;\n }\n\n if (typeof name === 'undefined') {\n name = radioGroup.name;\n }\n }\n\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n color: color,\n type: \"radio\",\n icon: /*#__PURE__*/React.cloneElement(defaultIcon, {\n fontSize: size === 'small' ? 'small' : 'medium'\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(defaultCheckedIcon, {\n fontSize: size === 'small' ? 'small' : 'medium'\n }),\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))]),\n checked: classes.checked,\n disabled: classes.disabled\n },\n name: name,\n checked: checked,\n onChange: onChange,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Radio.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the radio will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiRadio'\n})(Radio);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport FormGroup from '../FormGroup';\nimport useForkRef from '../utils/useForkRef';\nimport useControlled from '../utils/useControlled';\nimport RadioGroupContext from './RadioGroupContext';\nimport useId from '../utils/unstable_useId';\nvar RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {\n var actions = props.actions,\n children = props.children,\n nameProp = props.name,\n valueProp = props.value,\n onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"actions\", \"children\", \"name\", \"value\", \"onChange\"]);\n\n var rootRef = React.useRef(null);\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: props.defaultValue,\n name: 'RadioGroup'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n value = _useControlled2[0],\n setValue = _useControlled2[1];\n\n React.useImperativeHandle(actions, function () {\n return {\n focus: function focus() {\n var input = rootRef.current.querySelector('input:not(:disabled):checked');\n\n if (!input) {\n input = rootRef.current.querySelector('input:not(:disabled)');\n }\n\n if (input) {\n input.focus();\n }\n }\n };\n }, []);\n var handleRef = useForkRef(ref, rootRef);\n\n var handleChange = function handleChange(event) {\n setValue(event.target.value);\n\n if (onChange) {\n onChange(event, event.target.value);\n }\n };\n\n var name = useId(nameProp);\n return /*#__PURE__*/React.createElement(RadioGroupContext.Provider, {\n value: {\n name: name,\n onChange: handleChange,\n value: value\n }\n }, /*#__PURE__*/React.createElement(FormGroup, _extends({\n role: \"radiogroup\",\n ref: handleRef\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? RadioGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string]),\n\n /**\n * The name used to reference the value of the control.\n * If you don't provide this prop, it falls back to a randomly generated name.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when a radio button is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * Value of the selected radio button. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default RadioGroup;","import _typeof from \"@babel/runtime/helpers/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, refType } from '@material-ui/utils';\nimport setRef from '../utils/setRef';\nvar warnedOnce = false;\n/**\n * ⚠️⚠️⚠️\n * If you want the DOM element of a Material-UI component check out\n * [FAQ: How can I access the DOM element?](/getting-started/faq/#how-can-i-access-the-dom-element)\n * first.\n *\n * This component uses `findDOMNode` which is deprecated in React.StrictMode.\n *\n * Helper component to allow attaching a ref to a\n * wrapped element to access the underlying DOM element.\n *\n * It's highly inspired by https://github.com/facebook/react/issues/11401#issuecomment-340543801.\n * For example:\n * ```jsx\n * import React from 'react';\n * import RootRef from '@material-ui/core/RootRef';\n *\n * function MyComponent() {\n * const domRef = React.useRef();\n *\n * React.useEffect(() => {\n * console.log(domRef.current); // DOM node\n * }, []);\n *\n * return (\n * \n * \n * \n * );\n * }\n * ```\n *\n * @deprecated\n */\n\nvar RootRef = /*#__PURE__*/function (_React$Component) {\n _inherits(RootRef, _React$Component);\n\n var _super = _createSuper(RootRef);\n\n function RootRef() {\n _classCallCheck(this, RootRef);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(RootRef, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ref = ReactDOM.findDOMNode(this);\n setRef(this.props.rootRef, this.ref);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var ref = ReactDOM.findDOMNode(this);\n\n if (prevProps.rootRef !== this.props.rootRef || this.ref !== ref) {\n if (prevProps.rootRef !== this.props.rootRef) {\n setRef(prevProps.rootRef, null);\n }\n\n this.ref = ref;\n setRef(this.props.rootRef, this.ref);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.ref = null;\n setRef(this.props.rootRef, null);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn(['Material-UI: The RootRef component is deprecated.', 'The component relies on the ReactDOM.findDOMNode API which is deprecated in React.StrictMode.', 'Instead, you can get a reference to the underlying DOM node of the components via the `ref` prop.'].join('/n'));\n }\n }\n\n return this.props.children;\n }\n }]);\n\n return RootRef;\n}(React.Component);\n\nprocess.env.NODE_ENV !== \"production\" ? RootRef.propTypes = {\n /**\n * The wrapped element.\n */\n children: PropTypes.element.isRequired,\n\n /**\n * A ref that points to the first DOM node of the wrapped element.\n */\n rootRef: refType.isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? RootRef.propTypes = exactProp(RootRef.propTypes) : void 0;\n}\n\nexport default RootRef;","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\n\nvar styles = function styles(theme) {\n return {\n thumb: {\n '&$open': {\n '& $offset': {\n transform: 'scale(1) translateY(-10px)'\n }\n }\n },\n open: {},\n offset: _extends({\n zIndex: 1\n }, theme.typography.body2, {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1.2,\n transition: theme.transitions.create(['transform'], {\n duration: theme.transitions.duration.shortest\n }),\n top: -34,\n transformOrigin: 'bottom center',\n transform: 'scale(0)',\n position: 'absolute'\n }),\n circle: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 32,\n height: 32,\n borderRadius: '50% 50% 50% 0',\n backgroundColor: 'currentColor',\n transform: 'rotate(-45deg)'\n },\n label: {\n color: theme.palette.primary.contrastText,\n transform: 'rotate(45deg)'\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction ValueLabel(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n open = props.open,\n value = props.value,\n valueLabelDisplay = props.valueLabelDisplay;\n\n if (valueLabelDisplay === 'off') {\n return children;\n }\n\n return /*#__PURE__*/React.cloneElement(children, {\n className: clsx(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.offset, className)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.circle\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, value))));\n}\n\nexport default withStyles(styles, {\n name: 'PrivateValueLabel'\n})(ValueLabel);","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\nimport { alpha, lighten, darken } from '../styles/colorManipulator';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport capitalize from '../utils/capitalize';\nimport useControlled from '../utils/useControlled';\nimport ValueLabel from './ValueLabel';\n\nfunction asc(a, b) {\n return a - b;\n}\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(min, value), max);\n}\n\nfunction findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n\n return closestIndex;\n}\n\nfunction trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n\n return false;\n }\n\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\n\nfunction valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\n\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\n\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\nfunction roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\n\nfunction setValueIndex(_ref) {\n var values = _ref.values,\n source = _ref.source,\n newValue = _ref.newValue,\n index = _ref.index;\n\n // Performance shortcut\n if (values[index] === newValue) {\n return source;\n }\n\n var output = values.slice();\n output[index] = newValue;\n return output;\n}\n\nfunction focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n\n if (!sliderRef.current.contains(document.activeElement) || Number(document.activeElement.getAttribute('data-index')) !== activeIndex) {\n sliderRef.current.querySelector(\"[role=\\\"slider\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\")).focus();\n }\n\n if (setActive) {\n setActive(activeIndex);\n }\n}\n\nvar axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\n\nvar Identity = function Identity(x) {\n return x;\n};\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 2,\n width: '100%',\n boxSizing: 'content-box',\n padding: '13px 0',\n display: 'inline-block',\n position: 'relative',\n cursor: 'pointer',\n touchAction: 'none',\n color: theme.palette.primary.main,\n WebkitTapHighlightColor: 'transparent',\n '&$disabled': {\n pointerEvents: 'none',\n cursor: 'default',\n color: theme.palette.grey[400]\n },\n '&$vertical': {\n width: 2,\n height: '100%',\n padding: '0 13px'\n },\n // The primary input mechanism of the device includes a pointing device of limited accuracy.\n '@media (pointer: coarse)': {\n // Reach 42px touch target, about ~8mm on screen.\n padding: '20px 0',\n '&$vertical': {\n padding: '0 20px'\n }\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `marks` is provided with at least one label. */\n marked: {\n marginBottom: 20,\n '&$vertical': {\n marginBottom: 'auto',\n marginRight: 20\n }\n },\n\n /* Pseudo-class applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Pseudo-class applied to the root and thumb element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the rail element. */\n rail: {\n display: 'block',\n position: 'absolute',\n width: '100%',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n opacity: 0.38,\n '$vertical &': {\n height: '100%',\n width: 2\n }\n },\n\n /* Styles applied to the track element. */\n track: {\n display: 'block',\n position: 'absolute',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n '$vertical &': {\n width: 2\n }\n },\n\n /* Styles applied to the track element if `track={false}`. */\n trackFalse: {\n '& $track': {\n display: 'none'\n }\n },\n\n /* Styles applied to the track element if `track=\"inverted\"`. */\n trackInverted: {\n '& $track': {\n backgroundColor: // Same logic as the LinearProgress track color\n theme.palette.type === 'light' ? lighten(theme.palette.primary.main, 0.62) : darken(theme.palette.primary.main, 0.5)\n },\n '& $rail': {\n opacity: 1\n }\n },\n\n /* Styles applied to the thumb element. */\n thumb: {\n position: 'absolute',\n width: 12,\n height: 12,\n marginLeft: -6,\n marginTop: -5,\n boxSizing: 'border-box',\n borderRadius: '50%',\n outline: 0,\n backgroundColor: 'currentColor',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: theme.transitions.create(['box-shadow'], {\n duration: theme.transitions.duration.shortest\n }),\n '&::after': {\n position: 'absolute',\n content: '\"\"',\n borderRadius: '50%',\n // reach 42px hit target (2 * 15 + thumb diameter)\n left: -15,\n top: -15,\n right: -15,\n bottom: -15\n },\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.primary.main, 0.16)),\n '@media (hover: none)': {\n boxShadow: 'none'\n }\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.primary.main, 0.16))\n },\n '&$disabled': {\n width: 8,\n height: 8,\n marginLeft: -4,\n marginTop: -3,\n '&:hover': {\n boxShadow: 'none'\n }\n },\n '$vertical &': {\n marginLeft: -5,\n marginBottom: -6\n },\n '$vertical &$disabled': {\n marginLeft: -3,\n marginBottom: -4\n }\n },\n\n /* Styles applied to the thumb element if `color=\"primary\"`. */\n thumbColorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the thumb element if `color=\"secondary\"`. */\n thumbColorSecondary: {\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.secondary.main, 0.16))\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.secondary.main, 0.16))\n }\n },\n\n /* Pseudo-class applied to the thumb element if it's active. */\n active: {},\n\n /* Pseudo-class applied to the thumb element if keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the thumb label element. */\n valueLabel: {\n // IE 11 centering bug, to remove from the customization demos once no longer supported\n left: 'calc(-50% - 4px)'\n },\n\n /* Styles applied to the mark element. */\n mark: {\n position: 'absolute',\n width: 2,\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the mark element if active (depending on the value). */\n markActive: {\n backgroundColor: theme.palette.background.paper,\n opacity: 0.8\n },\n\n /* Styles applied to the mark label element. */\n markLabel: _extends({}, theme.typography.body2, {\n color: theme.palette.text.secondary,\n position: 'absolute',\n top: 26,\n transform: 'translateX(-50%)',\n whiteSpace: 'nowrap',\n '$vertical &': {\n top: 'auto',\n left: 26,\n transform: 'translateY(50%)'\n },\n '@media (pointer: coarse)': {\n top: 40,\n '$vertical &': {\n left: 31\n }\n }\n }),\n\n /* Styles applied to the mark label element if active (depending on the value). */\n markLabelActive: {\n color: theme.palette.text.primary\n }\n };\n};\nvar Slider = /*#__PURE__*/React.forwardRef(function Slider(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledby = props['aria-labelledby'],\n ariaValuetext = props['aria-valuetext'],\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n defaultValue = props.defaultValue,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n getAriaLabel = props.getAriaLabel,\n getAriaValueText = props.getAriaValueText,\n _props$marks = props.marks,\n marksProp = _props$marks === void 0 ? false : _props$marks,\n _props$max = props.max,\n max = _props$max === void 0 ? 100 : _props$max,\n _props$min = props.min,\n min = _props$min === void 0 ? 0 : _props$min,\n name = props.name,\n onChange = props.onChange,\n onChangeCommitted = props.onChangeCommitted,\n onMouseDown = props.onMouseDown,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$scale = props.scale,\n scale = _props$scale === void 0 ? Identity : _props$scale,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n _props$ThumbComponent = props.ThumbComponent,\n ThumbComponent = _props$ThumbComponent === void 0 ? 'span' : _props$ThumbComponent,\n _props$track = props.track,\n track = _props$track === void 0 ? 'normal' : _props$track,\n valueProp = props.value,\n _props$ValueLabelComp = props.ValueLabelComponent,\n ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel : _props$ValueLabelComp,\n _props$valueLabelDisp = props.valueLabelDisplay,\n valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp,\n _props$valueLabelForm = props.valueLabelFormat,\n valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"aria-valuetext\", \"classes\", \"className\", \"color\", \"component\", \"defaultValue\", \"disabled\", \"getAriaLabel\", \"getAriaValueText\", \"marks\", \"max\", \"min\", \"name\", \"onChange\", \"onChangeCommitted\", \"onMouseDown\", \"orientation\", \"scale\", \"step\", \"ThumbComponent\", \"track\", \"value\", \"ValueLabelComponent\", \"valueLabelDisplay\", \"valueLabelFormat\"]);\n\n var theme = useTheme();\n var touchId = React.useRef(); // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transfered when inversing a range slider.\n\n var _React$useState = React.useState(-1),\n active = _React$useState[0],\n setActive = _React$useState[1];\n\n var _React$useState2 = React.useState(-1),\n open = _React$useState2[0],\n setOpen = _React$useState2[1];\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Slider'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n valueDerived = _useControlled2[0],\n setValueState = _useControlled2[1];\n\n var range = Array.isArray(valueDerived);\n var values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(function (value) {\n return clamp(value, min, max);\n });\n var marks = marksProp === true && step !== null ? _toConsumableArray(Array(Math.floor((max - min) / step) + 1)).map(function (_, index) {\n return {\n value: min + step * index\n };\n }) : marksProp || [];\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(-1),\n focusVisible = _React$useState3[0],\n setFocusVisible = _React$useState3[1];\n\n var sliderRef = React.useRef();\n var handleFocusRef = useForkRef(focusVisibleRef, sliderRef);\n var handleRef = useForkRef(ref, handleFocusRef);\n var handleFocus = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n\n if (isFocusVisible(event)) {\n setFocusVisible(index);\n }\n\n setOpen(index);\n });\n var handleBlur = useEventCallback(function () {\n if (focusVisible !== -1) {\n setFocusVisible(-1);\n onBlurVisible();\n }\n\n setOpen(-1);\n });\n var handleMouseOver = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n });\n var handleMouseLeave = useEventCallback(function () {\n setOpen(-1);\n });\n var isRtl = theme.direction === 'rtl';\n var handleKeyDown = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n var value = values[index];\n var tenPercents = (max - min) / 10;\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var marksIndex = marksValues.indexOf(value);\n var newValue;\n var increaseKey = isRtl ? 'ArrowLeft' : 'ArrowRight';\n var decreaseKey = isRtl ? 'ArrowRight' : 'ArrowLeft';\n\n switch (event.key) {\n case 'Home':\n newValue = min;\n break;\n\n case 'End':\n newValue = max;\n break;\n\n case 'PageUp':\n if (step) {\n newValue = value + tenPercents;\n }\n\n break;\n\n case 'PageDown':\n if (step) {\n newValue = value - tenPercents;\n }\n\n break;\n\n case increaseKey:\n case 'ArrowUp':\n if (step) {\n newValue = value + step;\n } else {\n newValue = marksValues[marksIndex + 1] || marksValues[marksValues.length - 1];\n }\n\n break;\n\n case decreaseKey:\n case 'ArrowDown':\n if (step) {\n newValue = value - step;\n } else {\n newValue = marksValues[marksIndex - 1] || marksValues[0];\n }\n\n break;\n\n default:\n return;\n } // Prevent scroll of the page\n\n\n event.preventDefault();\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n }\n\n newValue = clamp(newValue, min, max);\n\n if (range) {\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values,\n source: valueDerived,\n newValue: newValue,\n index: index\n }).sort(asc);\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: newValue.indexOf(previousValue)\n });\n }\n\n setValueState(newValue);\n setFocusVisible(index);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n });\n var previousIndex = React.useRef();\n var axis = orientation;\n\n if (isRtl && orientation !== \"vertical\") {\n axis += '-reverse';\n }\n\n var getFingerNewValue = function getFingerNewValue(_ref3) {\n var finger = _ref3.finger,\n _ref3$move = _ref3.move,\n move = _ref3$move === void 0 ? false : _ref3$move,\n values2 = _ref3.values,\n source = _ref3.source;\n var slider = sliderRef.current;\n\n var _slider$getBoundingCl = slider.getBoundingClientRect(),\n width = _slider$getBoundingCl.width,\n height = _slider$getBoundingCl.height,\n bottom = _slider$getBoundingCl.bottom,\n left = _slider$getBoundingCl.left;\n\n var percent;\n\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n\n var newValue;\n newValue = percentToValue(percent, min, max);\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n\n newValue = clamp(newValue, min, max);\n var activeIndex = 0;\n\n if (range) {\n if (!move) {\n activeIndex = findClosest(values2, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values2,\n source: source,\n newValue: newValue,\n index: activeIndex\n }).sort(asc);\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n\n return {\n newValue: newValue,\n activeIndex: activeIndex\n };\n };\n\n var handleTouchMove = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue = getFingerNewValue({\n finger: finger,\n move: true,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue.newValue,\n activeIndex = _getFingerNewValue.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n });\n var handleTouchEnd = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue2 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue2.newValue;\n\n setActive(-1);\n\n if (event.type === 'touchend') {\n setOpen(-1);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n\n touchId.current = undefined;\n var doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n });\n var handleTouchStart = useEventCallback(function (event) {\n // Workaround as Safari has partial support for touchAction: 'none'.\n event.preventDefault();\n var touch = event.changedTouches[0];\n\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue3 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue3.newValue,\n activeIndex = _getFingerNewValue3.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n React.useEffect(function () {\n var slider = sliderRef.current;\n slider.addEventListener('touchstart', handleTouchStart);\n var doc = ownerDocument(slider);\n return function () {\n slider.removeEventListener('touchstart', handleTouchStart);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n };\n }, [handleTouchEnd, handleTouchMove, handleTouchStart]);\n var handleMouseDown = useEventCallback(function (event) {\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n event.preventDefault();\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue4 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue4.newValue,\n activeIndex = _getFingerNewValue4.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove);\n doc.addEventListener('mouseup', handleTouchEnd);\n });\n var trackOffset = valueToPercent(range ? values[0] : min, min, max);\n var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n\n var trackStyle = _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: handleRef,\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, disabled && classes.disabled, marks.length > 0 && marks.some(function (mark) {\n return mark.label;\n }) && classes.marked, track === false && classes.trackFalse, orientation === 'vertical' && classes.vertical, track === 'inverted' && classes.trackInverted),\n onMouseDown: handleMouseDown\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.rail\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track,\n style: trackStyle\n }), /*#__PURE__*/React.createElement(\"input\", {\n value: values.join(','),\n name: name,\n type: \"hidden\"\n }), marks.map(function (mark, index) {\n var percent = valueToPercent(mark.value, min, max);\n var style = axisProps[axis].offset(percent);\n var markActive;\n\n if (track === false) {\n markActive = values.indexOf(mark.value) !== -1;\n } else {\n markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: mark.value\n }, /*#__PURE__*/React.createElement(\"span\", {\n style: style,\n \"data-index\": index,\n className: clsx(classes.mark, markActive && classes.markActive)\n }), mark.label != null ? /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true,\n \"data-index\": index,\n style: style,\n className: clsx(classes.markLabel, markActive && classes.markLabelActive)\n }, mark.label) : null);\n }), values.map(function (value, index) {\n var percent = valueToPercent(value, min, max);\n var style = axisProps[axis].offset(percent);\n return /*#__PURE__*/React.createElement(ValueLabelComponent, {\n key: index,\n valueLabelFormat: valueLabelFormat,\n valueLabelDisplay: valueLabelDisplay,\n className: classes.valueLabel,\n value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,\n index: index,\n open: open === index || active === index || valueLabelDisplay === 'on',\n disabled: disabled\n }, /*#__PURE__*/React.createElement(ThumbComponent, {\n className: clsx(classes.thumb, classes[\"thumbColor\".concat(capitalize(color))], active === index && classes.active, disabled && classes.disabled, focusVisible === index && classes.focusVisible),\n tabIndex: disabled ? null : 0,\n role: \"slider\",\n style: style,\n \"data-index\": index,\n \"aria-label\": getAriaLabel ? getAriaLabel(index) : ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-orientation\": orientation,\n \"aria-valuemax\": scale(max),\n \"aria-valuemin\": scale(min),\n \"aria-valuenow\": scale(value),\n \"aria-valuetext\": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n }));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Slider.propTypes = {\n /**\n * The label of the slider.\n */\n 'aria-label': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-label'] != null) {\n return new Error('Material-UI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * The id of the element containing a label for the slider.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * A string value that provides a user-friendly name for the current value of the slider.\n */\n 'aria-valuetext': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-valuetext'] != null) {\n return new Error('Material-UI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * If `true`, the slider will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.\n *\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaLabel: PropTypes.func,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.\n *\n * @param {number} value The thumb label's value to format.\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaValueText: PropTypes.func,\n\n /**\n * Marks indicate predetermined values to which the user can move the slider.\n * If `true` the marks will be spaced according the value of the `step` prop.\n * If an array, it should contain objects with `value` and an optional `label` keys.\n */\n marks: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),\n\n /**\n * The maximum allowed value of the slider.\n * Should not be equal to min.\n */\n max: PropTypes.number,\n\n /**\n * The minimum allowed value of the slider.\n * Should not be equal to max.\n */\n min: PropTypes.number,\n\n /**\n * Name attribute of the hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChange: PropTypes.func,\n\n /**\n * Callback function that is fired when the `mouseup` is triggered.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChangeCommitted: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n\n /**\n * The slider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * A transformation function, to change the scale of the slider.\n */\n scale: PropTypes.func,\n\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.)\n * The `min` prop serves as the origin for the valid values.\n * We recommend (max - min) to be evenly divisible by the step.\n *\n * When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.\n */\n step: PropTypes.number,\n\n /**\n * The component used to display the value label.\n */\n ThumbComponent: PropTypes.elementType,\n\n /**\n * The track presentation:\n *\n * - `normal` the track will render a bar representing the slider value.\n * - `inverted` the track will render a bar representing the remaining slider value.\n * - `false` the track will render without a bar.\n */\n track: PropTypes.oneOf(['normal', false, 'inverted']),\n\n /**\n * The value of the slider.\n * For ranged sliders, provide an array with two values.\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * The value label component.\n */\n ValueLabelComponent: PropTypes.elementType,\n\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n */\n valueLabelDisplay: PropTypes.oneOf(['on', 'auto', 'off']),\n\n /**\n * The format function the value label's value.\n *\n * When a function is provided, it should have the following signature:\n *\n * - {number} value The value label's value to format\n * - {number} index The value label's index to format\n */\n valueLabelFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSlider'\n})(Slider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n flex: 1,\n position: 'relative'\n },\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {}\n};\nvar Step = /*#__PURE__*/React.forwardRef(function Step(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n connectorProp = props.connector,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$expanded = props.expanded,\n expanded = _props$expanded === void 0 ? false : _props$expanded,\n index = props.index,\n last = props.last,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"connector\", \"disabled\", \"expanded\", \"index\", \"last\", \"orientation\"]);\n\n var connector = connectorProp ? /*#__PURE__*/React.cloneElement(connectorProp, {\n orientation: orientation,\n alternativeLabel: alternativeLabel,\n index: index,\n active: active,\n completed: completed,\n disabled: disabled\n }) : null;\n var newChildren = /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, completed && classes.completed),\n ref: ref\n }, other), connector && alternativeLabel && index !== 0 ? connector : null, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Step component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.cloneElement(child, _extends({\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n expanded: expanded,\n last: last,\n icon: index + 1,\n orientation: orientation\n }, child.props));\n }));\n\n if (connector && !alternativeLabel && index !== 0) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, connector, newChildren);\n }\n\n return newChildren;\n});\nprocess.env.NODE_ENV !== \"production\" ? Step.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Sets the step as active. Is passed to child components.\n */\n active: PropTypes.bool,\n\n /**\n * Should be `Step` sub-components such as `StepLabel`, `StepContent`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: PropTypes.bool,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepButton` is a child of `Step`. Is passed to child components.\n */\n disabled: PropTypes.bool,\n\n /**\n * Expand the step.\n */\n expanded: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStep'\n})(Step);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z\"\n}), 'CheckCircle');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"\n}), 'Warning');","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport CheckCircle from '../internal/svg-icons/CheckCircle';\nimport Warning from '../internal/svg-icons/Warning';\nimport withStyles from '../styles/withStyles';\nimport SvgIcon from '../SvgIcon';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n color: theme.palette.text.disabled,\n '&$completed': {\n color: theme.palette.primary.main\n },\n '&$active': {\n color: theme.palette.primary.main\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Styles applied to the SVG text element. */\n text: {\n fill: theme.palette.primary.contrastText,\n fontSize: theme.typography.caption.fontSize,\n fontFamily: theme.typography.fontFamily\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {}\n };\n};\n\nvar _ref = /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"12\"\n});\n\nvar StepIcon = /*#__PURE__*/React.forwardRef(function StepIcon(props, ref) {\n var _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n icon = props.icon,\n _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n classes = props.classes;\n\n if (typeof icon === 'number' || typeof icon === 'string') {\n var className = clsx(classes.root, active && classes.active, error && classes.error, completed && classes.completed);\n\n if (error) {\n return /*#__PURE__*/React.createElement(Warning, {\n className: className,\n ref: ref\n });\n }\n\n if (completed) {\n return /*#__PURE__*/React.createElement(CheckCircle, {\n className: className,\n ref: ref\n });\n }\n\n return /*#__PURE__*/React.createElement(SvgIcon, {\n className: className,\n ref: ref\n }, _ref, /*#__PURE__*/React.createElement(\"text\", {\n className: classes.text,\n x: \"12\",\n y: \"16\",\n textAnchor: \"middle\"\n }, icon));\n }\n\n return icon;\n});\nprocess.env.NODE_ENV !== \"production\" ? StepIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Whether this step is active.\n */\n active: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: PropTypes.bool,\n\n /**\n * Mark the step as failed.\n */\n error: PropTypes.bool,\n\n /**\n * The label displayed in the step icon.\n */\n icon: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepIcon'\n})(StepIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport StepIcon from '../StepIcon';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n '&$alternativeLabel': {\n flexDirection: 'column'\n },\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the `Typography` component which wraps `children`. */\n label: {\n color: theme.palette.text.secondary,\n '&$active': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$completed': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$alternativeLabel': {\n textAlign: 'center',\n marginTop: 16\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Pseudo-class applied to the `Typography` component if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the `Typography` component if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the `icon` container element. */\n iconContainer: {\n flexShrink: 0,\n // Fix IE 11 issue\n display: 'flex',\n paddingRight: 8,\n '&$alternativeLabel': {\n paddingRight: 0\n }\n },\n\n /* Pseudo-class applied to the root and icon container and `Typography` if `alternativeLabel={true}`. */\n alternativeLabel: {},\n\n /* Styles applied to the container element which wraps `Typography` and `optional`. */\n labelContainer: {\n width: '100%'\n }\n };\n};\nvar StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n StepIconComponentProp = props.StepIconComponent,\n StepIconProps = props.StepIconProps,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"error\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\", \"StepIconComponent\", \"StepIconProps\"]);\n\n var StepIconComponent = StepIconComponentProp;\n\n if (icon && !StepIconComponent) {\n StepIconComponent = StepIcon;\n }\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[orientation], className, disabled && classes.disabled, alternativeLabel && classes.alternativeLabel, error && classes.error),\n ref: ref\n }, other), icon || StepIconComponent ? /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.iconContainer, alternativeLabel && classes.alternativeLabel)\n }, /*#__PURE__*/React.createElement(StepIconComponent, _extends({\n completed: completed,\n active: active,\n error: error,\n icon: icon\n }, StepIconProps))) : null, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.labelContainer\n }, children ? /*#__PURE__*/React.createElement(Typography, {\n variant: \"body2\",\n component: \"span\",\n display: \"block\",\n className: clsx(classes.label, alternativeLabel && classes.alternativeLabel, completed && classes.completed, active && classes.active, error && classes.error)\n }, children) : null, optional));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * In most cases will simply be a string containing a title for the label.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepLabelButton` is a child of `StepLabel`. Is passed to child components.\n */\n disabled: PropTypes.bool,\n\n /**\n * Mark the step as failed.\n */\n error: PropTypes.bool,\n\n /**\n * Override the default label of the step icon.\n */\n icon: PropTypes.node,\n\n /**\n * The optional node to display.\n */\n optional: PropTypes.node,\n\n /**\n * The component to render in place of the [`StepIcon`](/api/step-icon/).\n */\n StepIconComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`StepIcon`](/api/step-icon/) element.\n */\n StepIconProps: PropTypes.object\n} : void 0;\nStepLabel.muiName = 'StepLabel';\nexport default withStyles(styles, {\n name: 'MuiStepLabel'\n})(StepLabel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport StepLabel from '../StepLabel';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n padding: '24px 16px',\n margin: '-24px -16px',\n boxSizing: 'content-box'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n justifyContent: 'flex-start',\n padding: '8px',\n margin: '-8px'\n },\n\n /* Styles applied to the `ButtonBase` touch-ripple. */\n touchRipple: {\n color: 'rgba(0, 0, 0, 0.3)'\n }\n};\nvar StepButton = /*#__PURE__*/React.forwardRef(function StepButton(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\"]);\n\n var childProps = {\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n icon: icon,\n optional: optional,\n orientation: orientation\n };\n var child = isMuiElement(children, ['StepLabel']) ? /*#__PURE__*/React.cloneElement(children, childProps) : /*#__PURE__*/React.createElement(StepLabel, childProps, children);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: true,\n disabled: disabled,\n TouchRippleProps: {\n className: classes.touchRipple\n },\n className: clsx(classes.root, classes[orientation], className),\n ref: ref\n }, other), child);\n});\nprocess.env.NODE_ENV !== \"production\" ? StepButton.propTypes = {\n /**\n * @ignore\n * Passed in via `Step` - passed through to `StepLabel`.\n */\n active: PropTypes.bool,\n\n /**\n * @ignore\n * Set internally by Stepper when it's supplied with the alternativeLabel property.\n */\n alternativeLabel: PropTypes.bool,\n\n /**\n * Can be a `StepLabel` or a node to place inside `StepLabel` as children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * Sets completed styling. Is passed to StepLabel.\n */\n completed: PropTypes.bool,\n\n /**\n * @ignore\n * Disables the button and sets disabled styling. Is passed to StepLabel.\n */\n disabled: PropTypes.bool,\n\n /**\n * @ignore\n * potentially passed from parent `Step`\n */\n expanded: PropTypes.bool,\n\n /**\n * The icon displayed by the step label.\n */\n icon: PropTypes.node,\n\n /**\n * @ignore\n */\n last: PropTypes.bool,\n\n /**\n * The optional node to display.\n */\n optional: PropTypes.node,\n\n /**\n * @ignore\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepButton'\n})(StepButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n marginLeft: 12,\n // half icon\n padding: '0 0 8px'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n position: 'absolute',\n top: 8 + 4,\n left: 'calc(-50% + 20px)',\n right: 'calc(50% + 20px)'\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the line element. */\n line: {\n display: 'block',\n borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n lineHorizontal: {\n borderTopStyle: 'solid',\n borderTopWidth: 1\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n lineVertical: {\n borderLeftStyle: 'solid',\n borderLeftWidth: 1,\n minHeight: 24\n }\n };\n};\nvar StepConnector = /*#__PURE__*/React.forwardRef(function StepConnector(props, ref) {\n var active = props.active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n index = props.index,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"classes\", \"className\", \"completed\", \"disabled\", \"index\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, active && classes.active, completed && classes.completed, disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.line, {\n 'horizontal': classes.lineHorizontal,\n 'vertical': classes.lineVertical\n }[orientation])\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepConnector.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepConnector'\n})(StepConnector);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Collapse from '../Collapse';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n marginTop: 8,\n marginLeft: 12,\n // half icon\n paddingLeft: 8 + 12,\n // margin + half icon\n paddingRight: 8,\n borderLeft: \"1px solid \".concat(theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])\n },\n\n /* Styles applied to the root element if `last={true}` (controlled by `Step`). */\n last: {\n borderLeft: 'none'\n },\n\n /* Styles applied to the Transition component. */\n transition: {}\n };\n};\nvar StepContent = /*#__PURE__*/React.forwardRef(function StepContent(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n expanded = props.expanded,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"expanded\", \"last\", \"optional\", \"orientation\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (orientation !== 'vertical') {\n console.error('Material-UI: is only designed for use with the vertical stepper.');\n }\n }\n\n var transitionDuration = transitionDurationProp;\n\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, last && classes.last),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: active || expanded,\n className: classes.transition,\n timeout: transitionDuration,\n unmountOnExit: true\n }, TransitionProps), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Step content.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Adjust the duration of the content expand transition.\n * Passed as a prop to the transition component.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepContent'\n})(StepContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Paper from '../Paper';\nimport StepConnector from '../StepConnector';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: 24\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n alignItems: 'flex-start'\n }\n};\nvar defaultConnector = /*#__PURE__*/React.createElement(StepConnector, null);\nvar Stepper = /*#__PURE__*/React.forwardRef(function Stepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$connector = props.connector,\n connectorProp = _props$connector === void 0 ? defaultConnector : _props$connector,\n _props$nonLinear = props.nonLinear,\n nonLinear = _props$nonLinear === void 0 ? false : _props$nonLinear,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = _objectWithoutProperties(props, [\"activeStep\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"connector\", \"nonLinear\", \"orientation\"]);\n\n var connector = /*#__PURE__*/React.isValidElement(connectorProp) ? /*#__PURE__*/React.cloneElement(connectorProp, {\n orientation: orientation\n }) : null;\n var childrenArray = React.Children.toArray(children);\n var steps = childrenArray.map(function (step, index) {\n var state = {\n index: index,\n active: false,\n completed: false,\n disabled: false\n };\n\n if (activeStep === index) {\n state.active = true;\n } else if (!nonLinear && activeStep > index) {\n state.completed = true;\n } else if (!nonLinear && activeStep < index) {\n state.disabled = true;\n }\n\n return /*#__PURE__*/React.cloneElement(step, _extends({\n alternativeLabel: alternativeLabel,\n connector: connector,\n last: index + 1 === childrenArray.length,\n orientation: orientation\n }, state, step.props));\n });\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel),\n ref: ref\n }, other), steps);\n});\nprocess.env.NODE_ENV !== \"production\" ? Stepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Set to -1 to disable all the steps.\n */\n activeStep: PropTypes.number,\n\n /**\n * If set to 'true' and orientation is horizontal,\n * then the step label will be positioned under the icon.\n */\n alternativeLabel: PropTypes.bool,\n\n /**\n * Two or more `` components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * An element to be placed between each step.\n */\n connector: PropTypes.element,\n\n /**\n * If set the `Stepper` will not assist in controlling steps for linear flow.\n */\n nonLinear: PropTypes.bool,\n\n /**\n * The stepper orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepper'\n})(Stepper);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport { isHorizontal } from '../Drawer/Drawer';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'fixed',\n top: 0,\n left: 0,\n bottom: 0,\n zIndex: theme.zIndex.drawer - 1\n },\n anchorLeft: {\n right: 'auto'\n },\n anchorRight: {\n left: 'auto',\n right: 0\n },\n anchorTop: {\n bottom: 'auto',\n right: 0\n },\n anchorBottom: {\n top: 'auto',\n bottom: 0,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwipeArea = /*#__PURE__*/React.forwardRef(function SwipeArea(props, ref) {\n var anchor = props.anchor,\n classes = props.classes,\n className = props.className,\n width = props.width,\n other = _objectWithoutProperties(props, [\"anchor\", \"classes\", \"className\", \"width\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"anchor\".concat(capitalize(anchor))], className),\n ref: ref,\n style: _defineProperty({}, isHorizontal(anchor) ? 'width' : 'height', width)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeArea.propTypes = {\n /**\n * Side on which to attach the discovery area.\n */\n anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']).isRequired,\n\n /**\n * @ignore\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n width: PropTypes.number.isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwipeArea'\n})(SwipeArea);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps } from '../transitions/utils';\nimport NoSsr from '../NoSsr';\nimport SwipeArea from './SwipeArea'; // This value is closed to what browsers are using internally to\n// trigger a native scroll.\n\nvar UNCERTAINTY_THRESHOLD = 3; // px\n// We can only have one node at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\n\nvar nodeThatClaimedTheSwipe = null; // Exported for test purposes.\n\nexport function reset() {\n nodeThatClaimedTheSwipe = null;\n}\n\nfunction calculateCurrentX(anchor, touches) {\n return anchor === 'right' ? document.body.offsetWidth - touches[0].pageX : touches[0].pageX;\n}\n\nfunction calculateCurrentY(anchor, touches) {\n return anchor === 'bottom' ? window.innerHeight - touches[0].clientY : touches[0].clientY;\n}\n\nfunction getMaxTranslate(horizontalSwipe, paperInstance) {\n return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight;\n}\n\nfunction getTranslate(currentTranslate, startLocation, open, maxTranslate) {\n return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate);\n}\n\nfunction getDomTreeShapes(element, rootNode) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129\n var domTreeShapes = [];\n\n while (element && element !== rootNode) {\n var style = window.getComputedStyle(element);\n\n if ( // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n domTreeShapes = [];\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push(element);\n }\n\n element = element.parentElement;\n }\n\n return domTreeShapes;\n}\n\nfunction findNativeHandler(_ref) {\n var domTreeShapes = _ref.domTreeShapes,\n start = _ref.start,\n current = _ref.current,\n anchor = _ref.anchor;\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175\n var axisProperties = {\n scrollPosition: {\n x: 'scrollLeft',\n y: 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n y: 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n y: 'clientHeight'\n }\n };\n return domTreeShapes.some(function (shape) {\n // Determine if we are going backward or forward.\n var goingForward = current >= start;\n\n if (anchor === 'top' || anchor === 'left') {\n goingForward = !goingForward;\n }\n\n var axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y';\n var scrollPosition = shape[axisProperties.scrollPosition[axis]];\n var areNotAtStart = scrollPosition > 0;\n var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n return shape;\n }\n\n return null;\n });\n}\n\nvar iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);\nvar transitionDurationDefault = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {\n var theme = useTheme();\n var props = getThemeProps({\n name: 'MuiSwipeableDrawer',\n props: _extends({}, inProps),\n theme: theme\n });\n var _props$anchor = props.anchor,\n anchor = _props$anchor === void 0 ? 'left' : _props$anchor,\n _props$disableBackdro = props.disableBackdropTransition,\n disableBackdropTransition = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableDiscove = props.disableDiscovery,\n disableDiscovery = _props$disableDiscove === void 0 ? false : _props$disableDiscove,\n _props$disableSwipeTo = props.disableSwipeToOpen,\n disableSwipeToOpen = _props$disableSwipeTo === void 0 ? iOS : _props$disableSwipeTo,\n hideBackdrop = props.hideBackdrop,\n _props$hysteresis = props.hysteresis,\n hysteresis = _props$hysteresis === void 0 ? 0.52 : _props$hysteresis,\n _props$minFlingVeloci = props.minFlingVelocity,\n minFlingVelocity = _props$minFlingVeloci === void 0 ? 450 : _props$minFlingVeloci,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropProps = _props$ModalProps.BackdropProps,\n ModalPropsProp = _objectWithoutProperties(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n onOpen = props.onOpen,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SwipeAreaProps = props.SwipeAreaProps,\n _props$swipeAreaWidth = props.swipeAreaWidth,\n swipeAreaWidth = _props$swipeAreaWidth === void 0 ? 20 : _props$swipeAreaWidth,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? transitionDurationDefault : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchor\", \"disableBackdropTransition\", \"disableDiscovery\", \"disableSwipeToOpen\", \"hideBackdrop\", \"hysteresis\", \"minFlingVelocity\", \"ModalProps\", \"onClose\", \"onOpen\", \"open\", \"PaperProps\", \"SwipeAreaProps\", \"swipeAreaWidth\", \"transitionDuration\", \"variant\"]);\n\n var _React$useState = React.useState(false),\n maybeSwiping = _React$useState[0],\n setMaybeSwiping = _React$useState[1];\n\n var swipeInstance = React.useRef({\n isSwiping: null\n });\n var swipeAreaRef = React.useRef();\n var backdropRef = React.useRef();\n var paperRef = React.useRef();\n var touchDetected = React.useRef(false); // Ref for transition duration based on / to match swipe speed\n\n var calculatedDurationRef = React.useRef(); // Use a ref so the open value used is always up to date inside useCallback.\n\n useEnhancedEffect(function () {\n calculatedDurationRef.current = null;\n }, [open]);\n var setPosition = React.useCallback(function (translate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$mode = options.mode,\n mode = _options$mode === void 0 ? null : _options$mode,\n _options$changeTransi = options.changeTransition,\n changeTransition = _options$changeTransi === void 0 ? true : _options$changeTransi;\n var anchorRtl = getAnchor(theme, anchor);\n var rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1;\n var horizontalSwipe = isHorizontal(anchor);\n var transform = horizontalSwipe ? \"translate(\".concat(rtlTranslateMultiplier * translate, \"px, 0)\") : \"translate(0, \".concat(rtlTranslateMultiplier * translate, \"px)\");\n var drawerStyle = paperRef.current.style;\n drawerStyle.webkitTransform = transform;\n drawerStyle.transform = transform;\n var transition = '';\n\n if (mode) {\n transition = theme.transitions.create('all', getTransitionProps({\n timeout: transitionDuration\n }, {\n mode: mode\n }));\n }\n\n if (changeTransition) {\n drawerStyle.webkitTransition = transition;\n drawerStyle.transition = transition;\n }\n\n if (!disableBackdropTransition && !hideBackdrop) {\n var backdropStyle = backdropRef.current.style;\n backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current);\n\n if (changeTransition) {\n backdropStyle.webkitTransition = transition;\n backdropStyle.transition = transition;\n }\n }\n }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);\n var handleBodyTouchEnd = useEventCallback(function (event) {\n if (!touchDetected.current) {\n return;\n }\n\n nodeThatClaimedTheSwipe = null;\n touchDetected.current = false;\n setMaybeSwiping(false); // The swipe wasn't started.\n\n if (!swipeInstance.current.isSwiping) {\n swipeInstance.current.isSwiping = null;\n return;\n }\n\n swipeInstance.current.isSwiping = null;\n var anchorRtl = getAnchor(theme, anchor);\n var horizontal = isHorizontal(anchor);\n var current;\n\n if (horizontal) {\n current = calculateCurrentX(anchorRtl, event.changedTouches);\n } else {\n current = calculateCurrentY(anchorRtl, event.changedTouches);\n }\n\n var startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY;\n var maxTranslate = getMaxTranslate(horizontal, paperRef.current);\n var currentTranslate = getTranslate(current, startLocation, open, maxTranslate);\n var translateRatio = currentTranslate / maxTranslate;\n\n if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) {\n // Calculate transition duration to match swipe speed\n calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000;\n }\n\n if (open) {\n if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) {\n onClose();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(0, {\n mode: 'exit'\n });\n }\n\n return;\n }\n\n if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) {\n onOpen();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(getMaxTranslate(horizontal, paperRef.current), {\n mode: 'enter'\n });\n }\n });\n var handleBodyTouchMove = useEventCallback(function (event) {\n // the ref may be null when a parent component updates while swiping\n if (!paperRef.current || !touchDetected.current) {\n return;\n } // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer\n\n\n if (nodeThatClaimedTheSwipe != null && nodeThatClaimedTheSwipe !== swipeInstance.current) {\n return;\n }\n\n var anchorRtl = getAnchor(theme, anchor);\n var horizontalSwipe = isHorizontal(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (open && paperRef.current.contains(event.target) && nodeThatClaimedTheSwipe == null) {\n var domTreeShapes = getDomTreeShapes(event.target, paperRef.current);\n var nativeHandler = findNativeHandler({\n domTreeShapes: domTreeShapes,\n start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY,\n current: horizontalSwipe ? currentX : currentY,\n anchor: anchor\n });\n\n if (nativeHandler) {\n nodeThatClaimedTheSwipe = nativeHandler;\n return;\n }\n\n nodeThatClaimedTheSwipe = swipeInstance.current;\n } // We don't know yet.\n\n\n if (swipeInstance.current.isSwiping == null) {\n var dx = Math.abs(currentX - swipeInstance.current.startX);\n var dy = Math.abs(currentY - swipeInstance.current.startY); // We are likely to be swiping, let's prevent the scroll event on iOS.\n\n if (dx > dy) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n\n var definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD;\n\n if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) {\n swipeInstance.current.isSwiping = definitelySwiping;\n\n if (!definitelySwiping) {\n handleBodyTouchEnd(event);\n return;\n } // Shift the starting point.\n\n\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY; // Compensate for the part of the drawer displayed on touch start.\n\n if (!disableDiscovery && !open) {\n if (horizontalSwipe) {\n swipeInstance.current.startX -= swipeAreaWidth;\n } else {\n swipeInstance.current.startY -= swipeAreaWidth;\n }\n }\n }\n }\n\n if (!swipeInstance.current.isSwiping) {\n return;\n }\n\n var maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current);\n var startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY;\n\n if (open && !swipeInstance.current.paperHit) {\n startLocation = Math.min(startLocation, maxTranslate);\n }\n\n var translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate);\n\n if (open) {\n if (!swipeInstance.current.paperHit) {\n var paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate;\n\n if (paperHit) {\n swipeInstance.current.paperHit = true;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n } else {\n return;\n }\n } else if (translate === 0) {\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n }\n }\n\n if (swipeInstance.current.lastTranslate === null) {\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now() + 1;\n }\n\n var velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3; // Low Pass filter.\n\n swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6;\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now(); // We are swiping, let's prevent the scroll event on iOS.\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n setPosition(translate);\n });\n var handleBodyTouchStart = useEventCallback(function (event) {\n // We are not supposed to handle this touch move.\n // Example of use case: ignore the event if there is a Slider.\n if (event.defaultPrevented) {\n return;\n } // We can only have one node at the time claiming ownership for handling the swipe.\n\n\n if (event.muiHandled) {\n return;\n } // At least one element clogs the drawer interaction zone.\n\n\n if (open && !backdropRef.current.contains(event.target) && !paperRef.current.contains(event.target)) {\n return;\n }\n\n var anchorRtl = getAnchor(theme, anchor);\n var horizontalSwipe = isHorizontal(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (!open) {\n if (disableSwipeToOpen || event.target !== swipeAreaRef.current) {\n return;\n }\n\n if (horizontalSwipe) {\n if (currentX > swipeAreaWidth) {\n return;\n }\n } else if (currentY > swipeAreaWidth) {\n return;\n }\n }\n\n event.muiHandled = true;\n nodeThatClaimedTheSwipe = null;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n setMaybeSwiping(true);\n\n if (!open && paperRef.current) {\n // The ref may be null when a parent component updates while swiping.\n setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 20 : -swipeAreaWidth), {\n changeTransition: false\n });\n }\n\n swipeInstance.current.velocity = 0;\n swipeInstance.current.lastTime = null;\n swipeInstance.current.lastTranslate = null;\n swipeInstance.current.paperHit = false;\n touchDetected.current = true;\n });\n React.useEffect(function () {\n if (variant === 'temporary') {\n var doc = ownerDocument(paperRef.current);\n doc.addEventListener('touchstart', handleBodyTouchStart);\n doc.addEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.addEventListener('touchend', handleBodyTouchEnd);\n return function () {\n doc.removeEventListener('touchstart', handleBodyTouchStart);\n doc.removeEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.removeEventListener('touchend', handleBodyTouchEnd);\n };\n }\n\n return undefined;\n }, [variant, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]);\n React.useEffect(function () {\n return function () {\n // We need to release the lock.\n if (nodeThatClaimedTheSwipe === swipeInstance.current) {\n nodeThatClaimedTheSwipe = null;\n }\n };\n }, []);\n React.useEffect(function () {\n if (!open) {\n setMaybeSwiping(false);\n }\n }, [open]);\n var handleBackdropRef = React.useCallback(function (instance) {\n // #StrictMode ready\n backdropRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, _extends({\n open: variant === 'temporary' && maybeSwiping ? true : open,\n variant: variant,\n ModalProps: _extends({\n BackdropProps: _extends({}, BackdropProps, {\n ref: handleBackdropRef\n })\n }, ModalPropsProp),\n PaperProps: _extends({}, PaperProps, {\n style: _extends({\n pointerEvents: variant === 'temporary' && !open ? 'none' : ''\n }, PaperProps.style),\n ref: paperRef\n }),\n anchor: anchor,\n transitionDuration: calculatedDurationRef.current || transitionDuration,\n onClose: onClose,\n ref: ref\n }, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/React.createElement(NoSsr, null, /*#__PURE__*/React.createElement(SwipeArea, _extends({\n anchor: anchor,\n ref: swipeAreaRef,\n width: swipeAreaWidth\n }, SwipeAreaProps))));\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeableDrawer.propTypes = {\n /**\n * @ignore\n */\n anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Disable the backdrop transition.\n * This can improve the FPS on low-end devices.\n */\n disableBackdropTransition: PropTypes.bool,\n\n /**\n * If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit\n * to promote accidental discovery of the swipe gesture.\n */\n disableDiscovery: PropTypes.bool,\n\n /**\n * If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers\n * navigation actions. Swipe to open is disabled on iOS browsers by default.\n */\n disableSwipeToOpen: PropTypes.bool,\n\n /**\n * @ignore\n */\n hideBackdrop: PropTypes.bool,\n\n /**\n * Affects how far the drawer must be opened/closed to change his state.\n * Specified as percent (0-1) of the width of the drawer\n */\n hysteresis: PropTypes.number,\n\n /**\n * Defines, from which (average) velocity on, the swipe is\n * defined as complete although hysteresis isn't reached.\n * Good threshold is between 250 - 1000 px/s\n */\n minFlingVelocity: PropTypes.number,\n\n /**\n * @ignore\n */\n ModalProps: PropTypes.shape({\n BackdropProps: PropTypes.shape({\n component: elementTypeAcceptingRef\n })\n }),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the component requests to be opened.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func.isRequired,\n\n /**\n * If `true`, the drawer is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: PropTypes.shape({\n component: elementTypeAcceptingRef,\n style: PropTypes.object\n }),\n\n /**\n * The element is used to intercept the touch events on the edge.\n */\n SwipeAreaProps: PropTypes.object,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n swipeAreaWidth: PropTypes.number,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * @ignore\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default SwipeableDrawer;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// @inheritedComponent IconButton\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport SwitchBase from '../internal/SwitchBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -8\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -8\n },\n\n /* Styles applied to the internal `SwitchBase` component's `root` class. */\n switchBase: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400],\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n '&$checked': {\n transform: 'translateX(20px)'\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n opacity: 0.5\n },\n '&$disabled + $track': {\n opacity: theme.palette.type === 'light' ? 0.12 : 0.1\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.primary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.secondary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n width: 40,\n height: 24,\n padding: 7,\n '& $thumb': {\n width: 16,\n height: 16\n },\n '& $switchBase': {\n padding: 4,\n '&$checked': {\n transform: 'translateX(16px)'\n }\n }\n },\n\n /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */\n checked: {},\n\n /* Pseudo-class applied to the internal SwitchBase component's disabled class. */\n disabled: {},\n\n /* Styles applied to the internal SwitchBase component's input element. */\n input: {\n left: '-100%',\n width: '300%'\n },\n\n /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */\n thumb: {\n boxShadow: theme.shadows[1],\n backgroundColor: 'currentColor',\n width: 20,\n height: 20,\n borderRadius: '50%'\n },\n\n /* Styles applied to the track element. */\n track: {\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,\n opacity: theme.palette.type === 'light' ? 0.38 : 0.3\n }\n };\n};\nvar Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"edge\", \"size\"]);\n\n var icon = /*#__PURE__*/React.createElement(\"span\", {\n className: classes.thumb\n });\n return /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.root, className, {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge], size === \"small\" && classes[\"size\".concat(capitalize(size))])\n }, /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n classes: {\n root: clsx(classes.switchBase, classes[\"color\".concat(capitalize(color))]),\n input: classes.input,\n checked: classes.checked,\n disabled: classes.disabled\n },\n ref: ref\n }, other)), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the switch.\n * `small` is equivalent to the dense switch styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSwitch'\n})(Switch);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n overflowX: 'auto'\n }\n};\nvar TableContainer = /*#__PURE__*/React.forwardRef(function TableContainer(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableContainer.propTypes = {\n /**\n * The table itself, normally ``\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableContainer'\n})(TableContainer);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-footer-group'\n }\n};\nvar tablelvl2 = {\n variant: 'footer'\n};\nvar defaultComponent = 'tfoot';\nvar TableFooter = /*#__PURE__*/React.forwardRef(function TableFooter(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableFooter.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableFooter'\n})(TableFooter);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport useTheme from '../styles/useTheme';\nimport IconButton from '../IconButton';\n/**\n * @ignore - internal component.\n */\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowRight, null);\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowLeft, null);\n\nvar _ref3 = /*#__PURE__*/React.createElement(KeyboardArrowLeft, null);\n\nvar _ref4 = /*#__PURE__*/React.createElement(KeyboardArrowRight, null);\n\nvar TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {\n var backIconButtonProps = props.backIconButtonProps,\n count = props.count,\n nextIconButtonProps = props.nextIconButtonProps,\n _props$onChangePage = props.onChangePage,\n onChangePage = _props$onChangePage === void 0 ? function () {} : _props$onChangePage,\n _props$onPageChange = props.onPageChange,\n onPageChange = _props$onPageChange === void 0 ? function () {} : _props$onPageChange,\n page = props.page,\n rowsPerPage = props.rowsPerPage,\n other = _objectWithoutProperties(props, [\"backIconButtonProps\", \"count\", \"nextIconButtonProps\", \"onChangePage\", \"onPageChange\", \"page\", \"rowsPerPage\"]);\n\n var theme = useTheme();\n\n var handleBackButtonClick = function handleBackButtonClick(event) {\n onChangePage(event, page - 1);\n onPageChange(event, page - 1);\n };\n\n var handleNextButtonClick = function handleNextButtonClick(event) {\n onChangePage(event, page + 1);\n onPageChange(event, page + 1);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref\n }, other), /*#__PURE__*/React.createElement(IconButton, _extends({\n onClick: handleBackButtonClick,\n disabled: page === 0,\n color: \"inherit\"\n }, backIconButtonProps), theme.direction === 'rtl' ? _ref : _ref2), /*#__PURE__*/React.createElement(IconButton, _extends({\n onClick: handleNextButtonClick,\n disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false,\n color: \"inherit\"\n }, nextIconButtonProps), theme.direction === 'rtl' ? _ref3 : _ref4));\n});\nprocess.env.NODE_ENV !== \"production\" ? TablePaginationActions.propTypes = {\n /**\n * Props applied to the back arrow [`IconButton`](/api/icon-button/) element.\n */\n backIconButtonProps: PropTypes.object,\n\n /**\n * The total number of rows.\n */\n count: PropTypes.number.isRequired,\n\n /**\n * Props applied to the next arrow [`IconButton`](/api/icon-button/) element.\n */\n nextIconButtonProps: PropTypes.object,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onChangePage: PropTypes.func,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onPageChange: PropTypes.func,\n\n /**\n * The zero-based index of the current page.\n */\n page: PropTypes.number.isRequired,\n\n /**\n * The number of rows per page.\n */\n rowsPerPage: PropTypes.number.isRequired\n} : void 0;\nexport default TablePaginationActions;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@material-ui/utils';\nimport clsx from 'clsx';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport InputBase from '../InputBase';\nimport MenuItem from '../MenuItem';\nimport Select from '../Select';\nimport TableCell from '../TableCell';\nimport Toolbar from '../Toolbar';\nimport Typography from '../Typography';\nimport TablePaginationActions from './TablePaginationActions';\nimport useId from '../utils/unstable_useId';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.primary,\n fontSize: theme.typography.pxToRem(14),\n overflow: 'auto',\n // Increase the specificity to override TableCell.\n '&:last-child': {\n padding: 0\n }\n },\n\n /* Styles applied to the Toolbar component. */\n toolbar: {\n minHeight: 52,\n paddingRight: 2\n },\n\n /* Styles applied to the spacer element. */\n spacer: {\n flex: '1 1 100%'\n },\n\n /* Styles applied to the caption Typography components if `variant=\"caption\"`. */\n caption: {\n flexShrink: 0\n },\n // TODO v5: `.selectRoot` should be merged with `.input`\n\n /* Styles applied to the Select component root element. */\n selectRoot: {\n marginRight: 32,\n marginLeft: 8\n },\n\n /* Styles applied to the Select component `select` class. */\n select: {\n paddingLeft: 8,\n paddingRight: 24,\n textAlign: 'right',\n textAlignLast: 'right' // Align children such as `TableCell`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n */\n hover: PropTypes.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n */\n selected: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableRow'\n})(TableRow);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: 40,\n flexShrink: 0,\n opacity: 0.8,\n '&$disabled': {\n opacity: 0\n }\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n width: '100%',\n height: 40,\n '& svg': {\n transform: 'rotate(90deg)'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {}\n};\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowLeft, {\n fontSize: \"small\"\n});\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowRight, {\n fontSize: \"small\"\n});\n\nvar TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(props, ref) {\n var classes = props.classes,\n classNameProp = props.className,\n direction = props.direction,\n orientation = props.orientation,\n disabled = props.disabled,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"direction\", \"orientation\", \"disabled\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"div\",\n className: clsx(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),\n ref: ref,\n role: null,\n tabIndex: null\n }, other), direction === 'left' ? _ref : _ref2);\n});\nprocess.env.NODE_ENV !== \"production\" ? TabScrollButton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Which direction should the button indicate?\n */\n direction: PropTypes.oneOf(['left', 'right']).isRequired,\n\n /**\n * If `true`, the element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabScrollButton'\n})(TabScrollButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { deepmerge, elementAcceptingRef } from '@material-ui/utils';\nimport { alpha } from '../styles/colorManipulator';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport Grow from '../Grow';\nimport Popper from '../Popper';\nimport useForkRef from '../utils/useForkRef';\nimport useId from '../utils/unstable_useId';\nimport setRef from '../utils/setRef';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useControlled from '../utils/useControlled';\nimport useTheme from '../styles/useTheme';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nfunction arrowGenerator() {\n return {\n '&[x-placement*=\"bottom\"] $arrow': {\n top: 0,\n left: 0,\n marginTop: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n '&[x-placement*=\"top\"] $arrow': {\n bottom: 0,\n left: 0,\n marginBottom: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n '&[x-placement*=\"right\"] $arrow': {\n left: 0,\n marginLeft: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n '&[x-placement*=\"left\"] $arrow': {\n right: 0,\n marginRight: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n };\n}\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the Popper component. */\n popper: {\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none' // disable jss-rtl plugin\n\n },\n\n /* Styles applied to the Popper component if `interactive={true}`. */\n popperInteractive: {\n pointerEvents: 'auto'\n },\n\n /* Styles applied to the Popper component if `arrow={true}`. */\n popperArrow: arrowGenerator(),\n\n /* Styles applied to the tooltip (label wrapper) element. */\n tooltip: {\n backgroundColor: alpha(theme.palette.grey[700], 0.9),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(10),\n lineHeight: \"\".concat(round(14 / 10), \"em\"),\n maxWidth: 300,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */\n tooltipArrow: {\n position: 'relative',\n margin: '0'\n },\n\n /* Styles applied to the arrow element. */\n arrow: {\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n },\n\n /* Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */\n touch: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: \"\".concat(round(16 / 14), \"em\"),\n fontWeight: theme.typography.fontWeightRegular\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"left\". */\n tooltipPlacementLeft: _defineProperty({\n transformOrigin: 'right center',\n margin: '0 24px '\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"right\". */\n tooltipPlacementRight: _defineProperty({\n transformOrigin: 'left center',\n margin: '0 24px'\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"top\". */\n tooltipPlacementTop: _defineProperty({\n transformOrigin: 'center bottom',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"bottom\". */\n tooltipPlacementBottom: _defineProperty({\n transformOrigin: 'center top',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n })\n };\n};\nvar hystersisOpen = false;\nvar hystersisTimer = null;\nexport function testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\nvar Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {\n var _props$arrow = props.arrow,\n arrow = _props$arrow === void 0 ? false : _props$arrow,\n children = props.children,\n classes = props.classes,\n _props$disableFocusLi = props.disableFocusListener,\n disableFocusListener = _props$disableFocusLi === void 0 ? false : _props$disableFocusLi,\n _props$disableHoverLi = props.disableHoverListener,\n disableHoverListener = _props$disableHoverLi === void 0 ? false : _props$disableHoverLi,\n _props$disableTouchLi = props.disableTouchListener,\n disableTouchListener = _props$disableTouchLi === void 0 ? false : _props$disableTouchLi,\n _props$enterDelay = props.enterDelay,\n enterDelay = _props$enterDelay === void 0 ? 100 : _props$enterDelay,\n _props$enterNextDelay = props.enterNextDelay,\n enterNextDelay = _props$enterNextDelay === void 0 ? 0 : _props$enterNextDelay,\n _props$enterTouchDela = props.enterTouchDelay,\n enterTouchDelay = _props$enterTouchDela === void 0 ? 700 : _props$enterTouchDela,\n idProp = props.id,\n _props$interactive = props.interactive,\n interactive = _props$interactive === void 0 ? false : _props$interactive,\n _props$leaveDelay = props.leaveDelay,\n leaveDelay = _props$leaveDelay === void 0 ? 0 : _props$leaveDelay,\n _props$leaveTouchDela = props.leaveTouchDelay,\n leaveTouchDelay = _props$leaveTouchDela === void 0 ? 1500 : _props$leaveTouchDela,\n onClose = props.onClose,\n onOpen = props.onOpen,\n openProp = props.open,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'bottom' : _props$placement,\n _props$PopperComponen = props.PopperComponent,\n PopperComponent = _props$PopperComponen === void 0 ? Popper : _props$PopperComponen,\n PopperProps = props.PopperProps,\n title = props.title,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"arrow\", \"children\", \"classes\", \"disableFocusListener\", \"disableHoverListener\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"id\", \"interactive\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var theme = useTheme();\n\n var _React$useState = React.useState(),\n childNode = _React$useState[0],\n setChildNode = _React$useState[1];\n\n var _React$useState2 = React.useState(null),\n arrowRef = _React$useState2[0],\n setArrowRef = _React$useState2[1];\n\n var ignoreNonTouchEvents = React.useRef(false);\n var closeTimer = React.useRef();\n var enterTimer = React.useRef();\n var leaveTimer = React.useRef();\n var touchTimer = React.useRef();\n\n var _useControlled = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n openState = _useControlled2[0],\n setOpenState = _useControlled2[1];\n\n var open = openState;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var _React$useRef = React.useRef(openProp !== undefined),\n isControlled = _React$useRef.current; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n\n React.useEffect(function () {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n var id = useId(idProp);\n React.useEffect(function () {\n return function () {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n clearTimeout(touchTimer.current);\n };\n }, []);\n\n var handleOpen = function handleOpen(event) {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen) {\n onOpen(event);\n }\n };\n\n var handleEnter = function handleEnter() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'mouseover' && childrenProps.onMouseOver && forward) {\n childrenProps.onMouseOver(event);\n }\n\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n event.persist();\n enterTimer.current = setTimeout(function () {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n };\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(false),\n childIsFocusVisible = _React$useState3[0],\n setChildIsFocusVisible = _React$useState3[1];\n\n var handleBlur = function handleBlur() {\n if (childIsFocusVisible) {\n setChildIsFocusVisible(false);\n onBlurVisible();\n }\n };\n\n var handleFocus = function handleFocus() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n if (isFocusVisible(event)) {\n setChildIsFocusVisible(true);\n handleEnter()(event);\n }\n\n var childrenProps = children.props;\n\n if (childrenProps.onFocus && forward) {\n childrenProps.onFocus(event);\n }\n };\n };\n\n var handleClose = function handleClose(event) {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(function () {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(function () {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n };\n\n var handleLeave = function handleLeave() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'blur') {\n if (childrenProps.onBlur && forward) {\n childrenProps.onBlur(event);\n }\n\n handleBlur();\n }\n\n if (event.type === 'mouseleave' && childrenProps.onMouseLeave && event.currentTarget === childNode) {\n childrenProps.onMouseLeave(event);\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveDelay);\n };\n };\n\n var detectTouchStart = function detectTouchStart(event) {\n ignoreNonTouchEvents.current = true;\n var childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n var handleTouchStart = function handleTouchStart(event) {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n clearTimeout(touchTimer.current);\n event.persist();\n touchTimer.current = setTimeout(function () {\n handleEnter()(event);\n }, enterTouchDelay);\n };\n\n var handleTouchEnd = function handleTouchEnd(event) {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n var handleUseRef = useForkRef(setChildNode, ref);\n var handleFocusRef = useForkRef(focusVisibleRef, handleUseRef); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n setRef(handleFocusRef, ReactDOM.findDOMNode(instance));\n }, [handleFocusRef]);\n var handleRef = useForkRef(children.ref, handleOwnRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n } // For accessibility and SEO concerns, we render the title to the DOM node when\n // the tooltip is hidden. However, we have made a tradeoff when\n // `disableHoverListener` is set. This title logic is disabled.\n // It's allowing us to keep the implementation size minimal.\n // We are open to change the tradeoff.\n\n\n var shouldShowNativeTitle = !open && !disableHoverListener;\n\n var childrenProps = _extends({\n 'aria-describedby': open ? id : null,\n title: shouldShowNativeTitle && typeof title === 'string' ? title : null\n }, other, children.props, {\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n });\n\n var interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = handleEnter();\n childrenProps.onMouseLeave = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onMouseOver = handleEnter(false);\n interactiveWrapperListeners.onMouseLeave = handleLeave(false);\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = handleFocus();\n childrenProps.onBlur = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onFocus = handleFocus(false);\n interactiveWrapperListeners.onBlur = handleLeave(false);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', \"Remove this title prop `\".concat(children.props.title, \"` or the Tooltip component.\")].join('\\n'));\n }\n }\n\n var mergedPopperProps = React.useMemo(function () {\n return deepmerge({\n popperOptions: {\n modifiers: {\n arrow: {\n enabled: Boolean(arrowRef),\n element: arrowRef\n }\n }\n }\n }, PopperProps);\n }, [arrowRef, PopperProps]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/React.createElement(PopperComponent, _extends({\n className: clsx(classes.popper, interactive && classes.popperInteractive, arrow && classes.popperArrow),\n placement: placement,\n anchorEl: childNode,\n open: childNode ? open : false,\n id: childrenProps['aria-describedby'],\n transition: true\n }, interactiveWrapperListeners, mergedPopperProps), function (_ref) {\n var placementInner = _ref.placement,\n TransitionPropsInner = _ref.TransitionProps;\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.tooltip, classes[\"tooltipPlacement\".concat(capitalize(placementInner.split('-')[0]))], ignoreNonTouchEvents.current && classes.touch, arrow && classes.tooltipArrow)\n }, title, arrow ? /*#__PURE__*/React.createElement(\"span\", {\n className: classes.arrow,\n ref: setArrowRef\n }) : null));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n */\n arrow: PropTypes.bool,\n\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Do not respond to focus events.\n */\n disableFocusListener: PropTypes.bool,\n\n /**\n * Do not respond to hover events.\n */\n disableHoverListener: PropTypes.bool,\n\n /**\n * Do not respond to long press touch events.\n */\n disableTouchListener: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n */\n enterDelay: PropTypes.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n */\n enterNextDelay: PropTypes.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n */\n enterTouchDelay: PropTypes.number,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n\n /**\n * Makes a tooltip interactive, i.e. will not close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n */\n interactive: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n */\n leaveDelay: PropTypes.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n */\n leaveTouchDelay: PropTypes.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n\n /**\n * If `true`, the tooltip is shown.\n */\n open: PropTypes.bool,\n\n /**\n * Tooltip placement.\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n */\n PopperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTooltip',\n flip: false\n})(Tooltip);","// Source from https://github.com/alitaheri/normalize-scroll-left\nvar cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.\n *\n * Type | <- Most Left | Most Right -> | Initial\n * ---------------- | ------------ | ------------- | -------\n * default | 0 | 100 | 100\n * negative (spec*) | -100 | 0 | 0\n * reverse | 100 | 0 | 0\n *\n * Edge 85: default\n * Safari 14: negative\n * Chrome 85: negative\n * Firefox 81: negative\n * IE 11: reverse\n *\n * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll\n */\n\nexport function detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n\n var dummy = document.createElement('div');\n var container = document.createElement('div');\n container.style.width = '10px';\n container.style.height = '1px';\n dummy.appendChild(container);\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n\n document.body.removeChild(dummy);\n return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nexport function getNormalizedScrollLeft(element, direction) {\n var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior\n\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n var type = detectScrollType();\n\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n\n default:\n return scrollLeft;\n }\n}","function easeInOutSin(time) {\n return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};\n var _options$ease = options.ease,\n ease = _options$ease === void 0 ? easeInOutSin : _options$ease,\n _options$duration = options.duration,\n duration = _options$duration === void 0 ? 300 : _options$duration;\n var start = null;\n var from = element[property];\n var cancelled = false;\n\n var cancel = function cancel() {\n cancelled = true;\n };\n\n var step = function step(timestamp) {\n if (cancelled) {\n cb(new Error('Animation cancelled'));\n return;\n }\n\n if (start === null) {\n start = timestamp;\n }\n\n var time = Math.min(1, (timestamp - start) / duration);\n element[property] = ease(time) * (to - from) + from;\n\n if (time >= 1) {\n requestAnimationFrame(function () {\n cb(null);\n });\n return;\n }\n\n requestAnimationFrame(step);\n };\n\n if (from === to) {\n cb(new Error('Element already at target position'));\n return cancel;\n }\n\n requestAnimationFrame(step);\n return cancel;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nvar styles = {\n width: 99,\n height: 99,\n position: 'absolute',\n top: -9999,\n overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nexport default function ScrollbarSize(props) {\n var onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"onChange\"]);\n\n var scrollbarHeight = React.useRef();\n var nodeRef = React.useRef(null);\n\n var setMeasurements = function setMeasurements() {\n scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n };\n\n React.useEffect(function () {\n var handleResize = debounce(function () {\n var prevHeight = scrollbarHeight.current;\n setMeasurements();\n\n if (prevHeight !== scrollbarHeight.current) {\n onChange(scrollbarHeight.current);\n }\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [onChange]);\n React.useEffect(function () {\n setMeasurements();\n onChange(scrollbarHeight.current);\n }, [onChange]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n style: styles,\n ref: nodeRef\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? ScrollbarSize.propTypes = {\n onChange: PropTypes.func.isRequired\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'absolute',\n height: 2,\n bottom: 0,\n width: '100%',\n transition: theme.transitions.create()\n },\n colorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n vertical: {\n height: '100%',\n width: 2,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar TabIndicator = /*#__PURE__*/React.forwardRef(function TabIndicator(props, ref) {\n var classes = props.classes,\n className = props.className,\n color = props.color,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TabIndicator.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * The color of the tab indicator.\n */\n color: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateTabIndicator'\n})(TabIndicator);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport debounce from '../utils/debounce';\nimport ownerWindow from '../utils/ownerWindow';\nimport { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';\nimport animate from '../internal/animate';\nimport ScrollbarSize from './ScrollbarSize';\nimport withStyles from '../styles/withStyles';\nimport TabIndicator from './TabIndicator';\nimport TabScrollButton from '../TabScrollButton';\nimport useEventCallback from '../utils/useEventCallback';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n minHeight: 48,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n display: 'flex'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element. */\n flexContainer: {\n display: 'flex'\n },\n\n /* Styles applied to the flex container element if `orientation=\"vertical\"`. */\n flexContainerVertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element if `centered={true}` & `!variant=\"scrollable\"`. */\n centered: {\n justifyContent: 'center'\n },\n\n /* Styles applied to the tablist element. */\n scroller: {\n position: 'relative',\n display: 'inline-block',\n flex: '1 1 auto',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the tablist element if `!variant=\"scrollable\"`\b\b\b. */\n fixed: {\n overflowX: 'hidden',\n width: '100%'\n },\n\n /* Styles applied to the tablist element if `variant=\"scrollable\"`. */\n scrollable: {\n overflowX: 'scroll',\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n },\n\n /* Styles applied to the `ScrollButtonComponent` component. */\n scrollButtons: {},\n\n /* Styles applied to the `ScrollButtonComponent` component if `scrollButtons=\"auto\"` or scrollButtons=\"desktop\"`. */\n scrollButtonsDesktop: _defineProperty({}, theme.breakpoints.down('xs'), {\n display: 'none'\n }),\n\n /* Styles applied to the `TabIndicator` component. */\n indicator: {}\n };\n};\nvar Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledBy = props['aria-labelledby'],\n action = props.action,\n _props$centered = props.centered,\n centered = _props$centered === void 0 ? false : _props$centered,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$indicatorColor = props.indicatorColor,\n indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,\n onChange = props.onChange,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$ScrollButtonCo = props.ScrollButtonComponent,\n ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton : _props$ScrollButtonCo,\n _props$scrollButtons = props.scrollButtons,\n scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,\n selectionFollowsFocus = props.selectionFollowsFocus,\n _props$TabIndicatorPr = props.TabIndicatorProps,\n TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,\n TabScrollButtonProps = props.TabScrollButtonProps,\n _props$textColor = props.textColor,\n textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n value = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"classes\", \"className\", \"component\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\"]);\n\n var theme = useTheme();\n var scrollable = variant === 'scrollable';\n var isRtl = theme.direction === 'rtl';\n var vertical = orientation === 'vertical';\n var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n var start = vertical ? 'top' : 'left';\n var end = vertical ? 'bottom' : 'right';\n var clientSize = vertical ? 'clientHeight' : 'clientWidth';\n var size = vertical ? 'height' : 'width';\n\n if (process.env.NODE_ENV !== 'production') {\n if (centered && scrollable) {\n console.error('Material-UI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n }\n }\n\n var _React$useState = React.useState(false),\n mounted = _React$useState[0],\n setMounted = _React$useState[1];\n\n var _React$useState2 = React.useState({}),\n indicatorStyle = _React$useState2[0],\n setIndicatorStyle = _React$useState2[1];\n\n var _React$useState3 = React.useState({\n start: false,\n end: false\n }),\n displayScroll = _React$useState3[0],\n setDisplayScroll = _React$useState3[1];\n\n var _React$useState4 = React.useState({\n overflow: 'hidden',\n marginBottom: null\n }),\n scrollerStyle = _React$useState4[0],\n setScrollerStyle = _React$useState4[1];\n\n var valueToIndex = new Map();\n var tabsRef = React.useRef(null);\n var tabListRef = React.useRef(null);\n\n var getTabsMeta = function getTabsMeta() {\n var tabsNode = tabsRef.current;\n var tabsMeta;\n\n if (tabsNode) {\n var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n tabsMeta = {\n clientWidth: tabsNode.clientWidth,\n scrollLeft: tabsNode.scrollLeft,\n scrollTop: tabsNode.scrollTop,\n scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),\n scrollWidth: tabsNode.scrollWidth,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right\n };\n }\n\n var tabMeta;\n\n if (tabsNode && value !== false) {\n var _children = tabListRef.current.children;\n\n if (_children.length > 0) {\n var tab = _children[valueToIndex.get(value)];\n\n if (process.env.NODE_ENV !== 'production') {\n if (!tab) {\n console.error([\"Material-UI: The value provided to the Tabs component is invalid.\", \"None of the Tabs' children match with `\".concat(value, \"`.\"), valueToIndex.keys ? \"You can provide one of the following values: \".concat(Array.from(valueToIndex.keys()).join(', '), \".\") : null].join('\\n'));\n }\n }\n\n tabMeta = tab ? tab.getBoundingClientRect() : null;\n }\n }\n\n return {\n tabsMeta: tabsMeta,\n tabMeta: tabMeta\n };\n };\n\n var updateIndicatorState = useEventCallback(function () {\n var _newIndicatorStyle;\n\n var _getTabsMeta = getTabsMeta(),\n tabsMeta = _getTabsMeta.tabsMeta,\n tabMeta = _getTabsMeta.tabMeta;\n\n var startValue = 0;\n\n if (tabMeta && tabsMeta) {\n if (vertical) {\n startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n } else {\n var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n startValue = tabMeta.left - tabsMeta.left + correction;\n }\n }\n\n var newIndicatorStyle = (_newIndicatorStyle = {}, _defineProperty(_newIndicatorStyle, start, startValue), _defineProperty(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle);\n\n if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) {\n setIndicatorStyle(newIndicatorStyle);\n } else {\n var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);\n var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n if (dStart >= 1 || dSize >= 1) {\n setIndicatorStyle(newIndicatorStyle);\n }\n }\n });\n\n var scroll = function scroll(scrollValue) {\n animate(scrollStart, tabsRef.current, scrollValue);\n };\n\n var moveTabsScroll = function moveTabsScroll(delta) {\n var scrollValue = tabsRef.current[scrollStart];\n\n if (vertical) {\n scrollValue += delta;\n } else {\n scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;\n }\n\n scroll(scrollValue);\n };\n\n var handleStartScrollClick = function handleStartScrollClick() {\n moveTabsScroll(-tabsRef.current[clientSize]);\n };\n\n var handleEndScrollClick = function handleEndScrollClick() {\n moveTabsScroll(tabsRef.current[clientSize]);\n };\n\n var handleScrollbarSizeChange = React.useCallback(function (scrollbarHeight) {\n setScrollerStyle({\n overflow: null,\n marginBottom: -scrollbarHeight\n });\n }, []);\n\n var getConditionalElements = function getConditionalElements() {\n var conditionalElements = {};\n conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/React.createElement(ScrollbarSize, {\n className: classes.scrollable,\n onChange: handleScrollbarSizeChange\n }) : null;\n var scrollButtonsActive = displayScroll.start || displayScroll.end;\n var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');\n conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'right' : 'left',\n onClick: handleStartScrollClick,\n disabled: !displayScroll.start,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'left' : 'right',\n onClick: handleEndScrollClick,\n disabled: !displayScroll.end,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n return conditionalElements;\n };\n\n var scrollSelectedIntoView = useEventCallback(function () {\n var _getTabsMeta2 = getTabsMeta(),\n tabsMeta = _getTabsMeta2.tabsMeta,\n tabMeta = _getTabsMeta2.tabMeta;\n\n if (!tabMeta || !tabsMeta) {\n return;\n }\n\n if (tabMeta[start] < tabsMeta[start]) {\n // left side of button is out of view\n var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n scroll(nextScrollStart);\n } else if (tabMeta[end] > tabsMeta[end]) {\n // right side of button is out of view\n var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n\n scroll(_nextScrollStart);\n }\n });\n var updateScrollButtonState = useEventCallback(function () {\n if (scrollable && scrollButtons !== 'off') {\n var _tabsRef$current = tabsRef.current,\n scrollTop = _tabsRef$current.scrollTop,\n scrollHeight = _tabsRef$current.scrollHeight,\n clientHeight = _tabsRef$current.clientHeight,\n scrollWidth = _tabsRef$current.scrollWidth,\n clientWidth = _tabsRef$current.clientWidth;\n var showStartScroll;\n var showEndScroll;\n\n if (vertical) {\n showStartScroll = scrollTop > 1;\n showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n } else {\n var scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n }\n\n if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n setDisplayScroll({\n start: showStartScroll,\n end: showEndScroll\n });\n }\n }\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n var win = ownerWindow(tabsRef.current);\n win.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n win.removeEventListener('resize', handleResize);\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var handleTabsScroll = React.useCallback(debounce(function () {\n updateScrollButtonState();\n }));\n React.useEffect(function () {\n return function () {\n handleTabsScroll.clear();\n };\n }, [handleTabsScroll]);\n React.useEffect(function () {\n setMounted(true);\n }, []);\n React.useEffect(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n React.useEffect(function () {\n scrollSelectedIntoView();\n }, [scrollSelectedIntoView, indicatorStyle]);\n React.useImperativeHandle(action, function () {\n return {\n updateIndicator: updateIndicatorState,\n updateScrollButtons: updateScrollButtonState\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var indicator = /*#__PURE__*/React.createElement(TabIndicator, _extends({\n className: classes.indicator,\n orientation: orientation,\n color: indicatorColor\n }, TabIndicatorProps, {\n style: _extends({}, indicatorStyle, TabIndicatorProps.style)\n }));\n var childIndex = 0;\n var children = React.Children.map(childrenProp, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n valueToIndex.set(childValue, childIndex);\n var selected = childValue === value;\n childIndex += 1;\n return /*#__PURE__*/React.cloneElement(child, {\n fullWidth: variant === 'fullWidth',\n indicator: selected && !mounted && indicator,\n selected: selected,\n selectionFollowsFocus: selectionFollowsFocus,\n onChange: onChange,\n textColor: textColor,\n value: childValue\n });\n });\n\n var handleKeyDown = function handleKeyDown(event) {\n var target = event.target; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n // though we might warn in the future about nested, interactive elements\n // as a a11y violation\n\n var role = target.getAttribute('role');\n\n if (role !== 'tab') {\n return;\n }\n\n var newFocusTarget = null;\n var previousItemKey = orientation !== \"vertical\" ? 'ArrowLeft' : 'ArrowUp';\n var nextItemKey = orientation !== \"vertical\" ? 'ArrowRight' : 'ArrowDown';\n\n if (orientation !== \"vertical\" && theme.direction === 'rtl') {\n // swap previousItemKey with nextItemKey\n previousItemKey = 'ArrowRight';\n nextItemKey = 'ArrowLeft';\n }\n\n switch (event.key) {\n case previousItemKey:\n newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild;\n break;\n\n case nextItemKey:\n newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild;\n break;\n\n case 'Home':\n newFocusTarget = tabListRef.current.firstChild;\n break;\n\n case 'End':\n newFocusTarget = tabListRef.current.lastChild;\n break;\n\n default:\n break;\n }\n\n if (newFocusTarget !== null) {\n newFocusTarget.focus();\n event.preventDefault();\n }\n };\n\n var conditionalElements = getConditionalElements();\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, vertical && classes.vertical),\n ref: ref\n }, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.scroller, scrollable ? classes.scrollable : classes.fixed),\n style: scrollerStyle,\n ref: tabsRef,\n onScroll: handleTabsScroll\n }, /*#__PURE__*/React.createElement(\"div\", {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n className: clsx(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),\n onKeyDown: handleKeyDown,\n ref: tabListRef,\n role: \"tablist\"\n }, children), mounted && indicator), conditionalElements.scrollButtonEnd);\n});\nprocess.env.NODE_ENV !== \"production\" ? Tabs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Callback fired when the component mounts.\n * This is useful when you want to trigger an action programmatically.\n * It supports two actions: `updateIndicator()` and `updateScrollButtons()`\n *\n * @param {object} actions This object contains all possible actions\n * that can be triggered programmatically.\n */\n action: refType,\n\n /**\n * The label for the Tabs as a string.\n */\n 'aria-label': PropTypes.string,\n\n /**\n * An id or list of ids separated by a space that label the Tabs.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * If `true`, the tabs will be centered.\n * This property is intended for large views.\n */\n centered: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Determines the color of the indicator.\n */\n indicatorColor: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback\n * @param {any} value We default to the index of the child (number)\n */\n onChange: PropTypes.func,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The component used to render the scroll buttons.\n */\n ScrollButtonComponent: PropTypes.elementType,\n\n /**\n * Determine behavior of scroll buttons when tabs are set to scroll:\n *\n * - `auto` will only present them when not all the items are visible.\n * - `desktop` will only present them on medium and larger viewports.\n * - `on` will always present them.\n * - `off` will never present them.\n */\n scrollButtons: PropTypes.oneOf(['auto', 'desktop', 'off', 'on']),\n\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: PropTypes.bool,\n\n /**\n * Props applied to the tab indicator element.\n */\n TabIndicatorProps: PropTypes.object,\n\n /**\n * Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.\n */\n TabScrollButtonProps: PropTypes.object,\n\n /**\n * Determines the color of the `Tab`.\n */\n textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this property to `false`.\n */\n value: PropTypes.any,\n\n /**\n * Determines additional display behavior of the tabs:\n *\n * - `scrollable` will invoke scrolling properties and allow for horizontally\n * scrolling (or swiping) of the tab bar.\n * -`fullWidth` will make the tabs grow to use all the available space,\n * which should be used for small views, like on mobile.\n * - `standard` will render the default state.\n */\n variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabs'\n})(Tabs);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport CheckBoxOutlineBlankIcon from '../internal/svg-icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '../internal/svg-icons/CheckBox';\nimport { alpha } from '../styles/colorManipulator';\nimport IndeterminateCheckBoxIcon from '../internal/svg-icons/IndeterminateCheckBox';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `indeterminate={true}`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(CheckBoxIcon, null);\nvar defaultIcon = /*#__PURE__*/React.createElement(CheckBoxOutlineBlankIcon, null);\nvar defaultIndeterminateIcon = /*#__PURE__*/React.createElement(IndeterminateCheckBoxIcon, null);\nvar Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {\n var _props$checkedIcon = props.checkedIcon,\n checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$icon = props.icon,\n iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$indeterminateI = props.indeterminateIcon,\n indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI,\n inputProps = props.inputProps,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checkedIcon\", \"classes\", \"color\", \"icon\", \"indeterminate\", \"indeterminateIcon\", \"inputProps\", \"size\"]);\n\n var icon = indeterminate ? indeterminateIconProp : iconProp;\n var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))], indeterminate && classes.indeterminate),\n checked: classes.checked,\n disabled: classes.disabled\n },\n color: color,\n inputProps: _extends({\n 'data-indeterminate': indeterminate\n }, inputProps),\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize === undefined && size === \"small\" ? size : icon.props.fontSize\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize === undefined && size === \"small\" ? size : indeterminateIcon.props.fontSize\n }),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the checkbox will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the input.\n */\n indeterminate: PropTypes.bool,\n\n /**\n * The icon to display when the component is indeterminate.\n */\n indeterminateIcon: PropTypes.node,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the checkbox.\n * `small` is equivalent to the dense checkbox styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCheckbox'\n})(Checkbox);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"\n}), 'ArrowDownward');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ArrowDownwardIcon from '../internal/svg-icons/ArrowDownward';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'flex-start',\n flexDirection: 'inherit',\n alignItems: 'center',\n '&:focus': {\n color: theme.palette.text.secondary\n },\n '&:hover': {\n color: theme.palette.text.secondary,\n '& $icon': {\n opacity: 0.5\n }\n },\n '&$active': {\n color: theme.palette.text.primary,\n // && instead of & is a workaround for https://github.com/cssinjs/jss/issues/1045\n '&& $icon': {\n opacity: 1,\n color: theme.palette.text.secondary\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Styles applied to the icon component. */\n icon: {\n fontSize: 18,\n marginRight: 4,\n marginLeft: 4,\n opacity: 0,\n transition: theme.transitions.create(['opacity', 'transform'], {\n duration: theme.transitions.duration.shorter\n }),\n userSelect: 'none'\n },\n\n /* Styles applied to the icon component if `direction=\"desc\"`. */\n iconDirectionDesc: {\n transform: 'rotate(0deg)'\n },\n\n /* Styles applied to the icon component if `direction=\"asc\"`. */\n iconDirectionAsc: {\n transform: 'rotate(180deg)'\n }\n };\n};\n/**\n * A button based label for placing inside `TableCell` for column sorting.\n */\n\nvar TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'asc' : _props$direction,\n _props$hideSortIcon = props.hideSortIcon,\n hideSortIcon = _props$hideSortIcon === void 0 ? false : _props$hideSortIcon,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? ArrowDownwardIcon : _props$IconComponent,\n other = _objectWithoutProperties(props, [\"active\", \"children\", \"classes\", \"className\", \"direction\", \"hideSortIcon\", \"IconComponent\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, active && classes.active),\n component: \"span\",\n disableRipple: true,\n ref: ref\n }, other), children, hideSortIcon && !active ? null : /*#__PURE__*/React.createElement(IconComponent, {\n className: clsx(classes.icon, classes[\"iconDirection\".concat(capitalize(direction))])\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableSortLabel.propTypes = {\n /**\n * If `true`, the label will have the active styling (should be true for the sorted column).\n */\n active: PropTypes.bool,\n\n /**\n * Label contents, the arrow will be appended automatically.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The current sort direction.\n */\n direction: PropTypes.oneOf(['asc', 'desc']),\n\n /**\n * Hide sort icon when active is false.\n */\n hideSortIcon: PropTypes.bool,\n\n /**\n * Sort icon to use.\n */\n IconComponent: PropTypes.elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableSortLabel'\n})(TableSortLabel);"],"sourceRoot":""} \ No newline at end of file diff --git a/admin/static/js/2.f425d7e3.chunk.js b/admin/static/js/2.f425d7e3.chunk.js new file mode 100644 index 0000000..2a18f03 --- /dev/null +++ b/admin/static/js/2.f425d7e3.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.f425d7e3.chunk.js.LICENSE.txt */ +(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(344)},function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){e.exports=n(352)()},function(e,t,n){"use strict";var r=n(1),o=n(430),i=n(56);t.a=function(e,t){return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return u}));var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function u(){for(var e=[],t=0;t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){if(0===e.indexOf("#"))return e;var t=c(e).values;return"#".concat(t.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))}function s(e){var t=(e=c(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),l({type:s,values:u})}function c(e){if(e.type)return e;if("#"===e.charAt(0))return c(i(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var o=e.substring(t+1,e.length-1).split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)}))}}function l(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function u(e,t){var n=d(e),r=d(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function d(e){var t="hsl"===(e=c(e)).type?c(s(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return d(e)>.5?m(e,t):g(e,t)}function h(e,t){return p(e,t)}function p(e,t){return e=c(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,l(e)}function m(e,t){if(e=c(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function g(e,t){if(e=c(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return l(e)}},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.r(t),n.d(t,"chainPropTypes",(function(){return r})),n.d(t,"deepmerge",(function(){return o.a})),n.d(t,"elementAcceptingRef",(function(){return c})),n.d(t,"elementTypeAcceptingRef",(function(){return l})),n.d(t,"exactProp",(function(){return u})),n.d(t,"formatMuiErrorMessage",(function(){return d.a})),n.d(t,"getDisplayName",(function(){return b})),n.d(t,"HTMLElementType",(function(){return y})),n.d(t,"ponyfillGlobal",(function(){return _})),n.d(t,"refType",(function(){return w}));var o=n(159),i=n(4),a=n.n(i);var s=(a.a.element,function(){return null});s.isRequired=(a.a.element.isRequired,function(){return null});var c=s;var l=(i.elementType,function(){return null});n(12),n(1);function u(e){return e}var d=n(129),f=n(52),h=n(40),p=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function m(e){var t="".concat(e).match(p);return t&&t[1]||""}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||m(e)||t}function v(e,t,n){var r=g(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function b(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return g(e,"Component");if("object"===Object(f.a)(e))switch(e.$$typeof){case h.ForwardRef:return v(e,e.render,"ForwardRef");case h.Memo:return v(e,e.type,"memo");default:return}}}function y(e,t,n,r,o){return null}var _="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w=a.a.oneOfType([a.a.func,a.a.object])},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(c.a)(t,["attached"]),o=p(r).linebreak,i="",a=0;a0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=ce(),n=0;nn?n:t},he=function(){function e(e){this.getPropertyValue=oe,this.setProperty=ie,this.removeProperty=ae,this.setSelector=se,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=ue();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=le(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.breakpoints,r=void 0===n?["sm","md","lg"]:n,o=t.disableAlign,i=void 0!==o&&o,a=t.factor,s=void 0===a?2:a,c=t.variants,d=void 0===c?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:c,h=Object(l.a)({},e);h.typography=Object(l.a)({},h.typography);var b=h.typography,y=p(b.htmlFontSize),_=r.map((function(e){return h.breakpoints.values[e]}));return d.forEach((function(e){var t=b[e],n=parseFloat(y(t.fontSize,"rem"));if(!(n<=1)){var r=n,o=1+(r-1)/s,a=t.lineHeight;if(!f(a)&&!i)throw new Error(Object(u.a)(6));f(a)||(a=parseFloat(y(a,"rem"))/parseFloat(n));var c=null;i||(c=function(e){return m({size:e,grid:g({pixels:4,lineHeight:a,htmlFontSize:b.htmlFontSize})})}),b[e]=Object(l.a)({},t,v({cssProperty:"fontSize",min:o,max:r,unit:"rem",breakpoints:_,transform:c}))}})),h}var y=n(155),_=n(22),w=n(17),S=n(5),k=n(149),x=n(56),O=Object(k.b)({defaultTheme:x.a}),C=n(336),E=n(341),j=n(455),R=n(117),T=n(456)},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=r.createContext({});t.a=o},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"i",(function(){return h})),n.d(t,"h",(function(){return g})),n.d(t,"g",(function(){return y})),n.d(t,"c",(function(){return _})),n.d(t,"b",(function(){return w}));var r=n(6),o=n(221),i=n(26),a=n(314),s=n(166),c=n(82);function l(e,t,n){if(t in e){var r=e[t],o=n(r);if("function"===typeof o)try{d(o,r)}catch(i){}e[t]=o}}function u(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function d(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,u(e,"__sentry_original__",t)}function f(e){return e.__sentry_original__}function h(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function p(e){if(Object(i.d)(e)){var t=e,n={message:t.message,name:t.name,stack:t.stack};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}if(Object(i.f)(e)){var a=e,s={};s.type=a.type;try{s.target=Object(i.c)(a.target)?Object(o.b)(a.target):Object.prototype.toString.call(a.target)}catch(l){s.target=""}try{s.currentTarget=Object(i.c)(a.currentTarget)?Object(o.b)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(l){s.currentTarget=""}for(var c in"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(s.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c]);return s}return e}function m(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}function g(e,t,n){void 0===t&&(t=3),void 0===n&&(n=102400);var r=y(e,t);return m(r)>n?g(e,t-1,n):r}function v(t,n){return"domain"===n&&t&&"object"===typeof t&&t._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!==typeof e&&t===e?"[Global]":"undefined"!==typeof window&&t===window?"[Window]":"undefined"!==typeof document&&t===document?"[Document]":Object(i.l)(t)?"[SyntheticEvent]":"number"===typeof t&&t!==t?"[NaN]":void 0===t?"[undefined]":"function"===typeof t?"[Function: "+Object(s.a)(t)+"]":"symbol"===typeof t?"["+String(t)+"]":"bigint"===typeof t?"[BigInt: "+String(t)+"]":t}function b(e,t,n,r){if(void 0===n&&(n=1/0),void 0===r&&(r=Object(a.a)()),0===n)return function(e){if("string"===typeof e)return e;var t=Object.prototype.toString.call(e);if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=v(e);return Object(i.i)(n)?n:t}(t);if(null!==t&&void 0!==t&&"function"===typeof t.toJSON)return t.toJSON();var o=v(t,e);if(Object(i.i)(o))return o;var s=p(t),c=Array.isArray(t)?[]:{};if(r[0](t))return"[Circular ~]";for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(c[l]=b(l,s[l],n-1,r));return r[1](t),c}function y(e,t){try{return JSON.parse(JSON.stringify(e,(function(e,n){return b(e,n,t)})))}catch(n){return"**non-serializable**"}}function _(e,t){void 0===t&&(t=40);var n=Object.keys(p(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(c.d)(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:Object(c.d)(o,t)}return""}function w(e){var t,n;if(Object(i.h)(e)){var o=e,a={};try{for(var s=Object(r.g)(Object.keys(o)),c=s.next();!c.done;c=s.next()){var l=c.value;"undefined"!==typeof o[l]&&(a[l]=w(o[l]))}}catch(u){t={error:u}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}return Array.isArray(e)?e.map(w):e}}).call(this,n(69))},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(1),o=n(3),i=["xs","sm","md","lg","xl"];function a(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,a=e.unit,s=void 0===a?"px":a,c=e.step,l=void 0===c?5:c,u=Object(o.a)(e,["values","unit","step"]);function d(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function f(e,t){var r=i.indexOf(t);return r===i.length-1?d(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[i[r+1]]?n[i[r+1]]:t)-l/100).concat(s,")")}return Object(r.a)({keys:i,values:n,up:d,down:function(e){var t=i.indexOf(e)+1,r=n[i[t]];return t===i.length?d("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-l/100).concat(s,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},u)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),o=n(16),i=!0,a=!1,s=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!c[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function h(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function p(){return{isFocusVisible:f,onBlurVisible:h,ref:r.useCallback((function(e){var t,n=o.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[])}}},function(e,t,n){"use strict";var r=n(349),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;ge.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&e<11.25?"N":e>=11.25&&e<33.75?"NNE":e>=33.75&&e<56.25?"NE":e>=56.25&&e<78.75?"ENE":e>=78.75&&e<101.25?"E":e>=101.25&&e<123.75?"ESE":e>=123.75&&e<146.25?"SE":e>=146.25&&e<168.75?"SSE":e>=168.75&&e<191.25?"S":e>=191.25&&e<213.75?"SSW":e>=213.75&&e<236.25?"SW":e>=236.25&&e<258.75?"WSW":e>=258.75&&e<281.25?"W":e>=281.25&&e<303.75?"WNW":e>=303.75&&e<326.25?"NW":e>=326.25&&e<348.75?"NNW":e>=348.75?"N":void 0}},{key:"padding",value:function(e){return"string"===typeof e?e.length<2?"0"+e:e:e<10?"0"+e:e}},{key:"setDataFormat",value:function(t){t&&(e.dateFormat=t.toUpperCase().split(/[.-/]/),e.dateFormat.splice(e.dateFormat.indexOf("YYYY"),1))}},{key:"date2string",value:function(t){if("string"===typeof t){if(!(t=t.trim()))return"";if(t.match(/^[\w\s]+$/))return t;var n=t.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);if(n){var r=[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)],i=r.find((function(e){return e>31}));r.splice(r.indexOf(i),1);var a=r.find((function(e){return e>12}));a?(r.splice(r.indexOf(a),1),t=new Date(i,r[0]-1,a)):"M"===e.dateFormat[0][0]&&"D"===e.dateFormat[1][0]?(t=new Date(i,r[0]-1,r[1]),Math.abs(t.getTime-Date.now())>864e6&&(t=new Date(i,r[1]-1,r[0]))):"D"===e.dateFormat[0][0]&&"M"===e.dateFormat[1][0]?(t=new Date(i,r[1]-1,r[0]),Math.abs(t.getTime-Date.now())>864e6&&(t=new Date(i,r[0]-1,r[1]))):t=new Date(t)}else t=new Date(t)}else t=new Date(t);var s=o.default.t("ra_dow_"+f[t.getDay()]).replace("ra_dow_","");return s+=". "+t.getDate()+" "+o.default.t("ra_month_"+h[t.getMonth()]).replace("ra_month_","")}},{key:"renderTextWithA",value:function(e){var t=e.match(/|/);if(t){var n=[],o=1;do{var i=e.split(t[0]);if(i[0]&&n.push(r.default.createElement("span",{key:"a"+o++},i[0])),t[0].startsWith("([^<]*)|/))||i[1]&&n.push(r.default.createElement("span",{key:"a"+o++},i[1]))}while(t);return n}return e}},{key:"getSmartName",value:function(e,t,n,r){return t?r?e[t]&&e[t].common&&e[t].common.custom&&e[t].common.custom[n]&&e[t].common.custom[n].smartName||null:e[t].common.smartName:r?e&&!e.common?e.smartName:e&&e.common&&e.common.custom&&e.common.custom[n]?e.common.custom[n].smartName:void 0:e.common?e&&!e.common?e.smartName:e.common.smartName:e.smartName}},{key:"getSmartNameFromObj",value:function(e,t,n){return n?e&&!e.common?e.smartName:e&&e.common&&e.common.custom&&e.common.custom[t]?e.common.custom[t].smartName:void 0:e.common?e&&!e.common?e.smartName:e.common.smartName:e.smartName}},{key:"enableSmartName",value:function(e,t,n){n?(e.common.custom=e.common.custom||{},e.common.custom[t]=e.common.custom[t]||{},e.common.custom[t].smartName={}):e.common.smartName={}}},{key:"removeSmartName",value:function(e,t,n){n?e.common&&e.common.custom&&e.common.custom[t]&&(e.common.custom[t]=null):e.common.smartName=null}},{key:"updateSmartName",value:function(e,t,n,r,i,a){var s,l=o.default.getLanguage();if("string"===typeof e.common.smartName){var u=e.common.smartName;e.common.smartName={},e.common.smartName[l]=u}if(e.native&&e.native.byON){delete e.native.byON;var d=e.common.smartName;d&&"object"===c(d)||((d={en:d})[l]=d.en),e.common.smartName=d}if(void 0!==r&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},r?e.common.custom[i].smartName.smartType=r:delete e.common.custom[i].smartName.smartType):(e.common.smartName=e.common.smartName||{},r?e.common.smartName.smartType=r:delete e.common.smartName.smartType)),void 0!==n&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},e.common.custom[i].smartName.byON=n):(e.common.smartName=e.common.smartName||{},e.common.smartName.byON=n)),void 0!==t&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},s=e.common.custom[i].smartName):(e.common.smartName=e.common.smartName||{},s=e.common.smartName),s[l]=t,s&&(!s[l]||s[l]===e.common.name&&(!e.common.role||e.common.role.indexOf("button")>=0)))){delete s[l];var f=!0;for(var h in s)if(s.hasOwnProperty(h)){f=!1;break}f&&(a?void 0===e.common.custom[i].smartName.byON?delete e.common.custom[i]:(delete e.common.custom[i].en,delete e.common.custom[i].de,delete e.common.custom[i].ru,delete e.common.custom[i].nl,delete e.common.custom[i].pl,delete e.common.custom[i].it,delete e.common.custom[i].fr,delete e.common.custom[i].pt,delete e.common.custom[i].es,delete e.common.custom[i]["zh-cn"]):void 0!==e.common.smartName.byON?(delete e.common.smartName.en,delete e.common.smartName.de,delete e.common.smartName.ru,delete e.common.smartName.nl,delete e.common.smartName.pl,delete e.common.smartName.it,delete e.common.smartName.fr,delete e.common.smartName.pt,delete e.common.smartName.es,delete e.common.smartName["zh-cn"]):e.common.smartName=null)}}},{key:"disableSmartName",value:function(e,t,n){n?(e.common.custom=e.common.custom||{},e.common.custom[t]=e.common.custom[t]||{},e.common.custom[t].smartName=!1):e.common.smartName=!1}},{key:"copyToClipboard",value:function(e,t){var n=window.document.createElement("textarea");n.value=e,window.document.body.appendChild(n),n.select(),window.document.execCommand("copy"),window.document.body.removeChild(n),console.log(e),t&&t.stopPropagation(),t&&t.preventDefault()}},{key:"getFileExtension",value:function(e){var t=(e||"").lastIndexOf(".");return-1!==t?e.substring(t+1).toLowerCase():null}},{key:"formatBytes",value:function(e){if(Math.abs(e)<1024)return e+" B";var t=["KB","MB","GB"],n=-1;do{e/=1024,++n}while(Math.abs(e)>=1024&&n186?"#000000":"#FFFFFF":(o=(255-o).toString(16),i=(255-i).toString(16),a=(255-a).toString(16),"#"+o.padStart(2,"0")+i.padStart(2,"0")+a.padStart(2,"0"))}},{key:"_toVal",value:function(t){var n,r,o="";if("string"===typeof t||"number"===typeof t)o+=t;else if("object"===c(t))if(Array.isArray(t))for(n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?window.vendorPrefix:e||(window.localStorage&&window.localStorage.getItem("App.themeName")?window.localStorage.getItem("App.themeName"):window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"colored")}},{key:"getThemeType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?"light":"dark"===(e=e||window.localStorage&&window.localStorage.getItem("App.themeName"))||"blue"===e?"dark":"light"}},{key:"setThemeName",value:function(e){window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix||(window.localStorage.setItem("App.themeName",e),window.localStorage.setItem("App.theme","dark"===e||"blue"===e?"dark":"light"))}},{key:"toggleTheme",value:function(t){if(window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix)return window.vendorPrefix;t=t||window.localStorage&&window.localStorage.getItem("App.themeName");var n,r=e.getThemeNames(),o=r.indexOf(t);return n=-1!==o?r[(o+1)%r.length]:r[0],e.setThemeName(n),n}},{key:"getThemeNames",value:function(){return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?[window.vendorPrefix]:["light","dark","blue","colored"]}},{key:"parseQuery",value:function(e){e=(e||"").toString().replace(/^\?/,"");var t={};return e.split("&").forEach((function(e){if(e=e.trim()){var n=e.split("="),r=decodeURIComponent(n[0]).trim();if(n.length>1)if(t[r]=decodeURIComponent(n[1]),"true"===t[r])t[r]=!0;else if("false"===t[r])t[r]=!1;else{var o=parseFloat(t[r]);o.toString()===t[r]&&(t[r]=o)}else t[r]=!0}})),t}},{key:"getParentId",value:function(e){var t=(e||"").toString().split(".");return t.length>1?(t.pop(),t.join(".")):null}},{key:"formatDate",value:function(e,t){if(!e)return"";var n,r=e.getMonth()+1;r<10&&(r="0"+r);var o=e.getDate();o<10&&(o="0"+o),n="MM/DD/YYYY"===t?r+"/"+o+"/"+e.getFullYear():e.getFullYear()+"-"+r+"-"+o;var i=e.getHours();return n+=i<10?" 0"+i:" "+i,n+=(i=e.getMinutes())<10?":0"+i:":"+i,n+=(i=e.getSeconds())<10?":0"+i:":"+i,n+=(i=e.getMilliseconds())<10?".00"+i:i<100?".0"+i:"."+i}},{key:"formatTime",value:function(e){if(e){e=Math.round(e);var t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60;return t?"".concat(t,".").concat(n.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):n?"".concat(n,":").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):"0:".concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))}return"0:00:00"}},{key:"MDtext2link",value:function(e){var t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Z\u0430-\u044f\u0410-\u042f0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}},{key:"openLink",value:function(e,t){"this"===t?window.location=e:window.open(e,t||"_blank")}},{key:"MDgetTitle",value:function(t){var n=e.extractHeader(t),r=n.body,o=n.header;if(o.title)return o.title;for(var i=(r=(r=r.replace(/{[^}]*}/g,"")).trim()).replace(/\r/g,"").split("\n"),a=0;a>16).toString(16).toUpperCase()),t}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"getStates",value:function(e){var t,n=null===e||void 0===e||null===(t=e.common)||void 0===t?void 0:t.states;if(n)if("string"===typeof n&&"{"===n[0])try{n=JSON.parse(n)}catch(s){console.error("Cannot parse states: ".concat(n)),n=null}else if("string"===typeof n){var r=n.split(";");n={};for(var o=0;o=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_NO_DEBUG__&&!__SENTRY_BROWSER_BUNDLE__}function o(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),Object(s.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(s.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(o={minHeight:56},Object(r.a)(o,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(o,e.up("sm"),{minHeight:64}),o)},n)}var l=n(129),u=n(78),d=n(92),f=n(93),h=n(94),p=n(95),m=n(96),g=n(97),v=n(98),b=n(10),y={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.a.white,default:d.a[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:u.a.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d.a[800],default:"#303030"},action:{active:u.a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(b.j)(e.main,o):"dark"===t&&(e.dark=Object(b.b)(e.main,i)))}function S(e){var t=e.primary,n=void 0===t?{light:f.a[300],main:f.a[500],dark:f.a[700]}:t,r=e.secondary,a=void 0===r?{light:h.a.A200,main:h.a.A400,dark:h.a.A700}:r,c=e.error,S=void 0===c?{light:p.a[300],main:p.a[500],dark:p.a[700]}:c,k=e.warning,x=void 0===k?{light:m.a[300],main:m.a[500],dark:m.a[700]}:k,O=e.info,C=void 0===O?{light:g.a[300],main:g.a[500],dark:g.a[700]}:O,E=e.success,j=void 0===E?{light:v.a[300],main:v.a[500],dark:v.a[700]}:E,R=e.type,T=void 0===R?"light":R,A=e.contrastThreshold,M=void 0===A?3:A,L=e.tonalOffset,$=void 0===L?.2:L,N=Object(o.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function D(e){return Object(b.f)(e,_.text.primary)>=M?_.text.primary:y.text.primary}var P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(s.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(l.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(l.a)(5,JSON.stringify(e.main)));return w(e,"light",n,$),w(e,"dark",r,$),e.contrastText||(e.contrastText=D(e.main)),e},I={dark:_,light:y};return Object(i.a)(Object(s.a)({common:u.a,type:T,primary:P(n),secondary:P(a,"A400","A200","A700"),error:P(S),warning:P(x),info:P(C),success:P(j),grey:d.a,contrastThreshold:M,getContrastText:D,augmentColor:P,tonalOffset:$},I[T]),N)}function k(e){return Math.round(1e5*e)/1e5}function x(e){return k(e)}var O={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function E(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,a=void 0===r?C:r,c=n.fontSize,l=void 0===c?14:c,u=n.fontWeightLight,d=void 0===u?300:u,f=n.fontWeightRegular,h=void 0===f?400:f,p=n.fontWeightMedium,m=void 0===p?500:p,g=n.fontWeightBold,v=void 0===g?700:g,b=n.htmlFontSize,y=void 0===b?16:b,_=n.allVariants,w=n.pxToRem,S=Object(o.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=l/14,j=w||function(e){return"".concat(e/y*E,"rem")},R=function(e,t,n,r,o){return Object(s.a)({fontFamily:a,fontWeight:e,fontSize:j(t),lineHeight:n},a===C?{letterSpacing:"".concat(k(r/t),"em")}:{},o,_)},T={h1:R(d,96,1.167,-1.5),h2:R(d,60,1.2,-.5),h3:R(h,48,1.167,0),h4:R(h,34,1.235,.25),h5:R(h,24,1.334,0),h6:R(m,20,1.6,.15),subtitle1:R(h,16,1.75,.15),subtitle2:R(m,14,1.57,.1),body1:R(h,16,1.5,.15),body2:R(h,14,1.43,.15),button:R(m,14,1.75,.4,O),caption:R(h,12,1.66,.4),overline:R(h,12,2.66,1,O)};return Object(i.a)(Object(s.a)({htmlFontSize:y,pxToRem:j,round:x,fontFamily:a,fontSize:l,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:m,fontWeightBold:v},T),S,{clone:!1})}function j(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var R=["none",j(0,2,1,-1,0,1,1,0,0,1,3,0),j(0,3,1,-2,0,2,2,0,0,1,5,0),j(0,3,3,-2,0,3,4,0,0,1,8,0),j(0,2,4,-1,0,4,5,0,0,1,10,0),j(0,3,5,-1,0,5,8,0,0,1,14,0),j(0,3,5,-1,0,6,10,0,0,1,18,0),j(0,4,5,-2,0,7,10,1,0,2,16,1),j(0,5,5,-3,0,8,10,1,0,3,14,2),j(0,5,6,-3,0,9,12,1,0,3,16,2),j(0,6,6,-3,0,10,14,1,0,4,18,3),j(0,6,7,-4,0,11,15,1,0,4,20,3),j(0,7,8,-4,0,12,17,2,0,5,22,4),j(0,7,8,-4,0,13,19,2,0,5,24,4),j(0,7,9,-4,0,14,21,2,0,5,26,4),j(0,8,9,-5,0,15,22,2,0,6,28,5),j(0,8,10,-5,0,16,24,2,0,6,30,5),j(0,8,11,-5,0,17,26,2,0,6,32,5),j(0,9,11,-5,0,18,28,2,0,7,34,6),j(0,9,12,-6,0,19,29,2,0,7,36,6),j(0,10,13,-6,0,20,31,3,0,8,38,7),j(0,10,13,-6,0,21,33,3,0,8,40,7),j(0,10,14,-6,0,22,35,3,0,8,42,7),j(0,11,14,-7,0,23,36,3,0,9,44,8),j(0,11,15,-7,0,24,38,3,0,9,46,8)],T={borderRadius:4},A=n(126);function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(A.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,s=void 0===r?{}:r,l=e.palette,u=void 0===l?{}:l,d=e.spacing,f=e.typography,h=void 0===f?{}:f,p=Object(o.a)(e,["breakpoints","mixins","palette","spacing","typography"]),m=S(u),g=Object(a.a)(n),v=M(d),b=Object(i.a)({breakpoints:g,direction:"ltr",mixins:c(g,v,s),overrides:{},palette:m,props:{},shadows:R,typography:E(m,h),spacing:v,shape:T,transitions:L.a,zIndex:$.a},p),y=arguments.length,_=new Array(y>1?y-1:0),w=1;w1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.default=a},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o="object"===("undefined"===typeof window?"undefined":r(window))&&"object"===("undefined"===typeof document?"undefined":r(document))&&9===document.nodeType;t.a=o},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(26);function o(e,t){return void 0===t&&(t=0),"string"!==typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i=0||(o[n]=e[n]);return o}var b=o.a.createContext(),y={root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},_={containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}},w={default:20,dense:4},S={default:6,dense:2},k={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:s.a,transitionDuration:{enter:225,exit:195}},x=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},O=function(e){return Object.keys(e).filter((function(e){return!_[e]})).reduce((function(t,n){var r;return g({},t,((r={})[n]=e[n],r))}),{})},C={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},E=function(e){return"containerAnchorOrigin"+e},j=function(e){var t=e.vertical,n=e.horizontal;return"anchorOrigin"+x(t)+x(n)},R=function(e){return"variant"+x(e)},T=function(e){return!!e||0===e},A=function(e){return"number"===typeof e||null===e};function M(e,t,n){return void 0===e&&(e={}),void 0===t&&(t={}),void 0===n&&(n={}),g({},n,{},t,{},e)}var L=function(e){var t;return Object(c.a)({root:(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[e.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t)})},$=Object(r.forwardRef)((function(e,t){var n=e.classes,r=e.className,i=v(e,["classes","className"]);return o.a.createElement("div",Object.assign({ref:t,className:Object(a.a)(n.root,r)},i))})),N=Object(l.a)(L)($),D={right:"left",left:"right",bottom:"up",top:"down"},P=function(e){return"center"!==e.horizontal?D[e.horizontal]:D[e.vertical]},I=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},F=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},z=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},W=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},B={fontSize:20,marginInlineEnd:8},H={default:void 0,success:o.a.createElement(I,{style:B}),warning:o.a.createElement(F,{style:B}),error:o.a.createElement(z,{style:B}),info:o.a.createElement(W,{style:B})};function U(e,t){return e.reduce((function(e,n){return null==n?e:function(){for(var r=arguments.length,o=new Array(r),i=0;i .MuiCollapse-container, & > .MuiCollapse-root",Q="& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper",Z=Object(d.a)((function(e){var t,n,r,o,i;return{root:(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:e.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[X]={pointerEvents:"all"},t[Q]={padding:S.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+2*w.default+"px)",t[e.breakpoints.down("xs")]={width:"100%",maxWidth:"calc(100% - 32px)"},t),rootDense:(n={},n[Q]={padding:S.dense+"px 0px"},n),top:{top:w.default-S.default,flexDirection:"column"},bottom:{bottom:w.default-S.default,flexDirection:"column-reverse"},left:(r={left:w.default},r[e.breakpoints.up("sm")]={alignItems:"flex-start"},r[e.breakpoints.down("xs")]={left:"16px"},r),right:(o={right:w.default},o[e.breakpoints.up("sm")]={alignItems:"flex-end"},o[e.breakpoints.down("xs")]={right:"16px"},o),center:(i={left:"50%",transform:"translateX(-50%)"},i[e.breakpoints.up("sm")]={alignItems:"center"},i)}})),ee=function(e){var t=Z(),n=e.className,r=e.anchorOrigin,i=e.dense,s=v(e,["className","anchorOrigin","dense"]),c=Object(a.a)(t[r.vertical],t[r.horizontal],t.root,n,i&&t.rootDense);return o.a.createElement("div",Object.assign({className:c},s))},te=o.a.memo(ee),ne=function(e){var t,n,r,s,c;function l(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){void 0===t&&(t={});var r=t,o=r.key,i=r.preventDuplicate,a=v(r,["key","preventDuplicate"]),s=T(o),c=s?o:(new Date).getTime()+Math.random(),l=function(e,t,n){return function(r){return"autoHideDuration"===r?A(e.autoHideDuration)?e.autoHideDuration:A(t.autoHideDuration)?t.autoHideDuration:k.autoHideDuration:e[r]||t[r]||n[r]}}(a,n.props,k),u=g({key:c},a,{message:e,open:!0,entered:!1,requestClose:!1,variant:l("variant"),anchorOrigin:l("anchorOrigin"),autoHideDuration:l("autoHideDuration")});return a.persist&&(u.autoHideDuration=void 0),n.setState((function(t){if(void 0===i&&n.props.preventDuplicate||i){var r=function(t){return s?t.key===o:t.message===e},a=t.queue.findIndex(r)>-1,c=t.snacks.findIndex(r)>-1;if(a||c)return t}return n.handleDisplaySnack(g({},t,{queue:[].concat(t.queue,[u])}))})),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?g({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var t=!1,r=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return t||e.persist&&!r?g({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,C.MAXSNACK,e.key),n.props.onClose&&n.props.onClose(null,C.MAXSNACK,e.key),g({},e,{open:!1})):g({},e,{requestClose:!0}))}));return g({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!T(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.key===r?g({},e,{entered:!0}):g({},e)}))}}))},n.handleCloseSnack=function(e,t,r){if(n.props.onClose&&n.props.onClose(e,t,r),t!==C.CLICKAWAY){var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.key===r?e.entered?g({},e,{open:!1}):g({},e,{requestClose:!0}):g({},e)})),queue:n.filter((function(e){return e.key!==r}))}}))}},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.key===e}));T(e)&&t&&t.onClose&&t.onClose(null,C.INSTRUCTED,e),n.handleCloseSnack(null,C.INSTRUCTED,e)},n.handleExitedSnack=function(e,t,r){var o=t||r;if(!T(o))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var t=n.processQueue(g({},e,{snacks:e.snacks.filter((function(e){return e.key!==o}))}));return 0===t.queue.length?t:n.handleDismissOldest(t)}))},n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar,closeSnackbar:n.closeSnackbar}},n}return n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,l.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.iconVariant,s=n.dense,c=void 0===s?k.dense:s,l=n.hideIconVariant,u=void 0===l?k.hideIconVariant:l,d=n.domRoot,f=n.children,h=n.classes,p=void 0===h?{}:h,m=v(n,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),y=this.state.snacks.reduce((function(e,t){var n,r,o=(r=t.anchorOrigin,""+x(r.vertical)+x(r.horizontal)),i=e[o]||[];return g({},e,((n={})[o]=[].concat(i,[t]),n))}),{}),_=Object.keys(y).map((function(t){var n=y[t];return o.a.createElement(te,{key:t,dense:c,anchorOrigin:n[0].anchorOrigin,className:Object(a.a)(p.containerRoot,p[E(t)])},n.map((function(t){return o.a.createElement(J,Object.assign({},m,{key:t.key,snack:t,dense:c,iconVariant:r,hideIconVariant:u,classes:O(p),onClose:e.handleCloseSnack,onExited:U([e.handleExitedSnack,e.props.onExited]),onEntered:U([e.handleEnteredSnack,e.props.onEntered])}))})))}));return o.a.createElement(b.Provider,{value:t},f,d?Object(i.createPortal)(_,d):_)},r=l,(s=[{key:"maxSnack",get:function(){return this.props.maxSnack||k.maxSnack}}])&&m(r.prototype,s),c&&m(r,c),l}(r.Component),re=function(){return Object(r.useContext)(b)}},function(e,t,n){"use strict";t.a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"}},function(e,t,n){"use strict";t.a={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"}},function(e,t,n){"use strict";t.a={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"}},function(e,t,n){"use strict";t.a={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},function(e,t,n){"use strict";t.a={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},function(e,t,n){"use strict";t.a={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},function(e,t,n){"use strict";t.a={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(130);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r=n(1),o=n(18),i=n(3),a=n(0),s=n(2),c=n(37),l=n(41),u=n(5),d=n(216),f=a.forwardRef((function(e,t){var n=e.autoFocus,u=e.checked,f=e.checkedIcon,h=e.classes,p=e.className,m=e.defaultChecked,g=e.disabled,v=e.icon,b=e.id,y=e.inputProps,_=e.inputRef,w=e.name,S=e.onBlur,k=e.onChange,x=e.onFocus,O=e.readOnly,C=e.required,E=e.tabIndex,j=e.type,R=e.value,T=Object(i.a)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),A=Object(c.a)({controlled:u,default:Boolean(m),name:"SwitchBase",state:"checked"}),M=Object(o.a)(A,2),L=M[0],$=M[1],N=Object(l.a)(),D=g;N&&"undefined"===typeof D&&(D=N.disabled);var P="checkbox"===j||"radio"===j;return a.createElement(d.a,Object(r.a)({component:"span",className:Object(s.a)(h.root,p,L&&h.checked,D&&h.disabled),disabled:D,tabIndex:null,role:void 0,onFocus:function(e){x&&x(e),N&&N.onFocus&&N.onFocus(e)},onBlur:function(e){S&&S(e),N&&N.onBlur&&N.onBlur(e)},ref:t},T),a.createElement("input",Object(r.a)({autoFocus:n,checked:u,defaultChecked:m,className:h.input,disabled:D,id:P&&b,name:w,onChange:function(e){var t=e.target.checked;$(t),k&&k(e,t)},readOnly:O,ref:_,required:C,tabIndex:E,type:j,value:R},y)),L?f:v)}));t.a=Object(u.a)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(f)},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");t.default=a},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=o.a.createContext(null)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=n(8),l=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.color,d=void 0===u?"inherit":u,f=e.component,h=void 0===f?"svg":f,p=e.fontSize,m=void 0===p?"medium":p,g=e.htmlColor,v=e.titleAccess,b=e.viewBox,y=void 0===b?"0 0 24 24":b,_=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(h,Object(r.a)({className:Object(a.a)(s.root,l,"inherit"!==d&&s["color".concat(Object(c.a)(d))],"default"!==m&&"medium"!==m&&s["fontSize".concat(Object(c.a)(m))]),focusable:"false",viewBox:y,color:g,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},_),n,v?i.createElement("title",null,v):null)}));l.muiName="SvgIcon",t.a=Object(s.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n.n(i),s=n(16),c=n(2),l=n(14),u=n(19),d=n(5),f=n(54),h=n(23),p=n(66),m=n(76),g=n(77),v=n(102);function b(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(i.isValidElement)(e)?t(e):e}(e)})),n}function y(e,t,n){return null!=n[t]?n[t]:e.props[t]}function _(e,t,n){var r=b(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var c in t){if(o[c])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,s=void 0===i?a||t.pulsate:i,c=t.fakeElement,l=void 0!==c&&c;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var u,d,f,h=l?null:_.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(p.width/2),d=Math.round(p.height/2);else{var m=e.touches?e.touches[0]:e,g=m.clientX,S=m.clientY;u=Math.round(g-p.left),d=Math.round(S-p.top)}if(s)(f=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(f+=1);else{var k=2*Math.max(Math.abs((h?h.clientWidth:0)-u),u)+2,x=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(k,2)+Math.pow(x,2))}e.touches?null===y.current&&(y.current=function(){w({pulsate:o,rippleX:u,rippleY:d,rippleSize:f,cb:n})},b.current=setTimeout((function(){y.current&&(y.current(),y.current=null)}),80)):w({pulsate:o,rippleX:u,rippleY:d,rippleSize:f,cb:n})}}),[a,w]),x=i.useCallback((function(){S({},{pulsate:!0})}),[S]),C=i.useCallback((function(e,t){if(clearTimeout(b.current),"touchend"===e.type&&y.current)return e.persist(),y.current(),y.current=null,void(b.current=setTimeout((function(){C(e,t)})));y.current=null,p((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:x,start:S,stop:C}}),[x,S,C]),i.createElement("span",Object(r.a)({className:Object(c.a)(s.root,l),ref:_},u),i.createElement(k,{component:null,exit:!0},f))})),E=Object(d.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(C)),j=i.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,d=e.centerRipple,h=void 0!==d&&d,p=e.children,m=e.classes,g=e.className,v=e.component,b=void 0===v?"button":v,y=e.disabled,_=void 0!==y&&y,w=e.disableRipple,S=void 0!==w&&w,k=e.disableTouchRipple,x=void 0!==k&&k,O=e.focusRipple,C=void 0!==O&&O,j=e.focusVisibleClassName,R=e.onBlur,T=e.onClick,A=e.onFocus,M=e.onFocusVisible,L=e.onKeyDown,$=e.onKeyUp,N=e.onMouseDown,D=e.onMouseLeave,P=e.onMouseUp,I=e.onTouchEnd,F=e.onTouchMove,z=e.onTouchStart,W=e.onDragLeave,B=e.tabIndex,H=void 0===B?0:B,U=e.TouchRippleProps,V=e.type,G=void 0===V?"button":V,K=Object(o.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),q=i.useRef(null);var Y=i.useRef(null),J=i.useState(!1),X=J[0],Q=J[1];_&&X&&Q(!1);var Z=Object(f.a)(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;return Object(u.a)((function(r){return t&&t(r),!n&&Y.current&&Y.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){Q(!0),q.current.focus()}}}),[]),i.useEffect((function(){X&&C&&!S&&Y.current.pulsate()}),[S,C,X]);var oe=re("start",N),ie=re("stop",W),ae=re("stop",P),se=re("stop",(function(e){X&&e.preventDefault(),D&&D(e)})),ce=re("start",z),le=re("stop",I),ue=re("stop",F),de=re("stop",(function(e){X&&(te(e),Q(!1)),R&&R(e)}),!1),fe=Object(u.a)((function(e){q.current||(q.current=e.currentTarget),ee(e)&&(Q(!0),M&&M(e)),A&&A(e)})),he=function(){var e=s.findDOMNode(q.current);return b&&"button"!==b&&!("A"===e.tagName&&e.href)},pe=i.useRef(!1),me=Object(u.a)((function(e){C&&!pe.current&&X&&Y.current&&" "===e.key&&(pe.current=!0,e.persist(),Y.current.stop(e,(function(){Y.current.start(e)}))),e.target===e.currentTarget&&he()&&" "===e.key&&e.preventDefault(),L&&L(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&!_&&(e.preventDefault(),T&&T(e))})),ge=Object(u.a)((function(e){C&&" "===e.key&&Y.current&&X&&!e.defaultPrevented&&(pe.current=!1,e.persist(),Y.current.stop(e,(function(){Y.current.pulsate(e)}))),$&&$(e),T&&e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&T(e)})),ve=b;"button"===ve&&K.href&&(ve="a");var be={};"button"===ve?(be.type=G,be.disabled=_):("a"===ve&&K.href||(be.role="button"),be["aria-disabled"]=_);var ye=Object(l.a)(a,t),_e=Object(l.a)(ne,q),we=Object(l.a)(ye,_e),Se=i.useState(!1),ke=Se[0],xe=Se[1];i.useEffect((function(){xe(!0)}),[]);var Oe=ke&&!S&&!_;return i.createElement(ve,Object(r.a)({className:Object(c.a)(m.root,g,X&&[m.focusVisible,j],_&&m.disabled),onBlur:de,onClick:T,onFocus:fe,onKeyDown:me,onKeyUp:ge,onMouseDown:oe,onMouseLeave:se,onMouseUp:ae,onDragLeave:ie,onTouchEnd:le,onTouchMove:ue,onTouchStart:ce,ref:we,tabIndex:_?-1:H},be,K),p,Oe?i.createElement(E,Object(r.a)({ref:Y,center:h},U)):null)}));t.a=Object(d.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(j)},,,,,,,,function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e,t,n,r,o){return null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(301);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var r,o=n(1),i=n(3),a=n(0),s=n.n(a),c=n(336),l=n(31),u=n(341),d=Object(l.c)(Object(u.a)()),f=Object(c.a)(),h=new Map,p={disableGeneration:!1,generateClassName:f,jss:d,sheetsCache:null,sheetsManager:h,sheetsRegistry:null},m=s.a.createContext(p);function g(e){var t=e.children,n=e.injectFirst,a=void 0!==n&&n,c=e.disableGeneration,d=void 0!==c&&c,f=Object(i.a)(e,["children","injectFirst","disableGeneration"]),h=s.a.useContext(m),p=Object(o.a)({},h,{disableGeneration:d},f);if(!p.jss.options.insertionPoint&&a&&"undefined"!==typeof window){if(!r){var g=document.head;r=document.createComment("mui-inject-first"),g.insertBefore(r,g.firstChild)}p.jss=Object(l.c)({plugins:Object(u.a)().plugins,insertionPoint:r})}return s.a.createElement(m.Provider,{value:p},t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return f}));var r=n(9),o=n(29);function i(e){return"number"!==typeof e?e:"".concat(e,"px solid")}var a=Object(r.a)({prop:"border",themeKey:"borders",transform:i}),s=Object(r.a)({prop:"borderTop",themeKey:"borders",transform:i}),c=Object(r.a)({prop:"borderRight",themeKey:"borders",transform:i}),l=Object(r.a)({prop:"borderBottom",themeKey:"borders",transform:i}),u=Object(r.a)({prop:"borderLeft",themeKey:"borders",transform:i}),d=Object(r.a)({prop:"borderColor",themeKey:"palette"}),f=Object(r.a)({prop:"borderRadius",themeKey:"shape"}),h=Object(o.a)(a,s,c,l,u,d,f);t.h=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(23),o=n(1),i=n(63);function a(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function s(e){var t=function(t){var n=e(t);return t.css?Object(o.a)({},Object(i.a)(n,e(Object(o.a)({theme:t.theme},t.css))),a(t.css,[e.filterProps])):t.sx?Object(o.a)({},Object(i.a)(n,e(Object(o.a)({theme:t.theme},t.sx))),a(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat(Object(r.a)(e.filterProps)),t}function c(e){return s(e)}t.b=s},function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"k",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"n",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return v}));var r=n(9),o=n(29),i=Object(r.a)({prop:"flexBasis"}),a=Object(r.a)({prop:"flexDirection"}),s=Object(r.a)({prop:"flexWrap"}),c=Object(r.a)({prop:"justifyContent"}),l=Object(r.a)({prop:"alignItems"}),u=Object(r.a)({prop:"alignContent"}),d=Object(r.a)({prop:"order"}),f=Object(r.a)({prop:"flex"}),h=Object(r.a)({prop:"flexGrow"}),p=Object(r.a)({prop:"flexShrink"}),m=Object(r.a)({prop:"alignSelf"}),g=Object(r.a)({prop:"justifyItems"}),v=Object(r.a)({prop:"justifySelf"}),b=Object(o.a)(i,a,s,c,l,u,d,f,h,p,m,g,v);t.d=b},function(e,t,n){"use strict";n.d(t,"h",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return p})),n.d(t,"k",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n(9),o=n(29),i=Object(r.a)({prop:"gridGap"}),a=Object(r.a)({prop:"gridColumnGap"}),s=Object(r.a)({prop:"gridRowGap"}),c=Object(r.a)({prop:"gridColumn"}),l=Object(r.a)({prop:"gridRow"}),u=Object(r.a)({prop:"gridAutoFlow"}),d=Object(r.a)({prop:"gridAutoColumns"}),f=Object(r.a)({prop:"gridAutoRows"}),h=Object(r.a)({prop:"gridTemplateColumns"}),p=Object(r.a)({prop:"gridTemplateRows"}),m=Object(r.a)({prop:"gridTemplateAreas"}),g=Object(r.a)({prop:"gridArea"}),v=Object(o.a)(i,a,s,c,l,u,d,f,h,p,m,g);t.a=v},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(9),o=n(29),i=Object(r.a)({prop:"color",themeKey:"palette"}),a=Object(r.a)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),s=Object(o.a)(i,a);t.c=s},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return u}));var r=n(9),o=n(29),i=Object(r.a)({prop:"position"}),a=Object(r.a)({prop:"zIndex",themeKey:"zIndex"}),s=Object(r.a)({prop:"top"}),c=Object(r.a)({prop:"right"}),l=Object(r.a)({prop:"bottom"}),u=Object(r.a)({prop:"left"});t.b=Object(o.a)(i,a,s,c,l,u)},function(e,t,n){"use strict";n.d(t,"j",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(9),o=n(29);function i(e){return e<=1?"".concat(100*e,"%"):e}var a=Object(r.a)({prop:"width",transform:i}),s=Object(r.a)({prop:"maxWidth",transform:i}),c=Object(r.a)({prop:"minWidth",transform:i}),l=Object(r.a)({prop:"height",transform:i}),u=Object(r.a)({prop:"maxHeight",transform:i}),d=Object(r.a)({prop:"minHeight",transform:i}),f=Object(r.a)({prop:"size",cssProperty:"width",transform:i}),h=Object(r.a)({prop:"size",cssProperty:"height",transform:i}),p=Object(r.a)({prop:"boxSizing"}),m=Object(o.a)(a,s,c,l,u,d,p);t.b=m},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return d}));var r=n(9),o=n(29),i=Object(r.a)({prop:"fontFamily",themeKey:"typography"}),a=Object(r.a)({prop:"fontSize",themeKey:"typography"}),s=Object(r.a)({prop:"fontStyle",themeKey:"typography"}),c=Object(r.a)({prop:"fontWeight",themeKey:"typography"}),l=Object(r.a)({prop:"letterSpacing"}),u=Object(r.a)({prop:"lineHeight"}),d=Object(r.a)({prop:"textAlign"}),f=Object(o.a)(i,a,s,c,l,u,d);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(18),o=n(90),i=n(63);var a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},l=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!c[e])return[e];e=c[e]}var t=e.split(""),n=Object(r.a)(t,2),o=n[0],i=n[1],l=a[o],u=s[i]||"";return Array.isArray(u)?u.map((function(e){return l+e})):[l+u]})),u=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function d(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function f(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function h(e){var t=d(e.theme);return Object.keys(e).map((function(n){if(-1===u.indexOf(n))return null;var r=f(l(n),t),i=e[n];return Object(o.b)(e,i,r)})).reduce(i.a,{})}h.propTypes={},h.filterProps=u;t.b=h},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p}));var r=n(28),o=n(25),i=n(23),a=n(167),s=n(21),c=n(65);function l(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function u(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function d(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(i.a)(r)),s=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===s.indexOf(e.tagName)&&l(e,o)}))}function f(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function h(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(s.a)(e);return t.body===e?Object(c.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var l=Object(a.a)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(u(i)+l,"px"),n=Object(s.a)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(u(e)+l,"px")}))}var d=i.parentElement,f="HTML"===d.nodeName&&"scroll"===window.getComputedStyle(d)["overflow-y"]?d:i;r.push({value:f.style.overflow,key:"overflow",el:f}),f.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var p=function(){function e(){Object(r.a)(this,e),this.modals=[],this.containers=[]}return Object(o.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&l(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);d(t,e.mountNode,e.modalRef,r,!0);var o=f(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=f(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=h(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=f(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&l(e.modalRef,!0),d(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&l(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}()},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=function(e){var n=a.a.forwardRef((function(n,i){var s=n.innerRef,c=Object(o.a)(n,["innerRef"]),u=Object(l.a)()||t;return a.a.createElement(e,Object(r.a)({theme:u,ref:s||i},c))}));return c()(n,e),n};return n}var d=u();t.a=d},function(e,t,n){"use strict";n.r(t);var r=n(8);n.d(t,"capitalize",(function(){return r.a}));var o=n(42);n.d(t,"createChainedFunction",(function(){return o.a}));var i=n(20);n.d(t,"createSvgIcon",(function(){return i.a}));var a=n(32);n.d(t,"debounce",(function(){return a.a}));var s=n(39);n.d(t,"deprecatedPropType",(function(){return s.a}));var c=n(45);n.d(t,"isMuiElement",(function(){return c.a}));var l=n(21);n.d(t,"ownerDocument",(function(){return l.a}));var u=n(65);n.d(t,"ownerWindow",(function(){return u.a}));var d=n(210);n.d(t,"requirePropFactory",(function(){return d.a}));var f=n(30);n.d(t,"setRef",(function(){return f.a}));var h=n(115);n.d(t,"unsupportedProp",(function(){return h.a}));var p=n(37);n.d(t,"useControlled",(function(){return p.a}));var m=n(19);n.d(t,"useEventCallback",(function(){return m.a}));var g=n(14);n.d(t,"useForkRef",(function(){return g.a}));var v=n(62);n.d(t,"unstable_useId",(function(){return v.a}));var b=n(54);n.d(t,"useIsFocusVisible",(function(){return b.a}))},function(e,t,n){"use strict";n.r(t);var r=n(298);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(300);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(211);n.d(t,"a",(function(){return r.b}))},function(e,t,n){(function(e){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,r){"string"===typeof t?(2==arguments.length&&(r=n),e.modules[t]||(e.payloads[t]=r,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var o=i(e,t);if(void 0!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,c=t.length;s=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=i.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(i.split(" Edge/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isAndroid=i.indexOf("Android")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(i)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r,o=e("./useragent");t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var i=[],a=0;a=1.5,o.isChromeOS&&(t.HI_DPI=!1),"undefined"!==typeof document){var c=document.createElement("div");t.HI_DPI&&void 0!==c.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||"undefined"===typeof c.style.animationName||(t.HAS_CSS_ANIMATION=!0),c=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./oop"),o=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,o),t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r,o=e("./keys"),i=e("./useragent"),a=null,s=0;function c(){return void 0==r&&function(){r=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){r={passive:!1}}})}catch(e){}}(),r}function l(e,t,n){this.elem=e,this.type=t,this.callback=n}l.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,r){e.addEventListener(t,n,c()),r&&r.$toDestroy.push(new l(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,c())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function o(e){t&&t(e),n&&n(e),d(r,"mousemove",t),d(r,"mouseup",o),d(r,"dragstart",o)}return u(r,"mousemove",t),u(r,"mouseup",o),u(r,"dragstart",o),o},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?u(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?u(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):u(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,r,o,a){var s,c,l,d=0,f={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,i.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-c)>5;l&&!a||(d=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[d-1]||600),1==d&&(s=e.clientX,c=e.clientY)}if(e._clicks=d,r[o]("mousedown",e),d>4)d=0;else if(d>1)return r[o](f[d],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",h,a)}))};var f=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function h(e,t,n){var r=f(t);if(!i.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var c="location"in t?t.location:t.keyLocation;if(17===n&&1===c)1==a[n]&&(s=t.timeStamp);else if(18===n&&3===r&&2===c){t.timeStamp-s<50&&(a.altGr=!0)}}}if((n in o.MODIFIER_KEYS&&(n=-1),!r&&13===n)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,r,-n),t.defaultPrevented)))return;if(i.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}function p(){a=Object.create(null)}if(t.getModifierString=function(e){return o.KEY_MODS[f(e)]},t.addCommandKeyListener=function(e,n,r){if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var o=null;u(e,"keydown",(function(e){o=e.keyCode}),r),u(e,"keypress",(function(e){return h(n,e,o)}),r)}else{var s=null;u(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=h(n,e,e.keyCode);return s=e.defaultPrevented,t}),r),u(e,"keypress",(function(e){s&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),s=null)}),r),u(e,"keyup",(function(e){a[e.keyCode]=null}),r),a||(p(),u(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!i.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++;u(n,"message",(function o(i){i.data==r&&(t.stopPropagation(i),d(n,"message",o),e())})),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var o={row:t+1,column:0};else if(this.start.row0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;nDate.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=e("../lib/dom"),a=e("../lib/lang"),s=e("../clipboard"),c=o.isChrome<18,l=o.isIE,u=o.isChrome>63,d=400,f=e("../lib/keys"),h=f.KEY_MODS,p=o.isIOS,m=p?/\s/:/\n/,g=o.isMobile;t.TextInput=function(e,t){var n=i.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,b=!1,y=!1,_=!1,w="";g||(n.style.fontSize="1px");var S=!1,k=!1,x="",O=0,C=0,E=0;try{var j=document.activeElement===n}catch(G){}r.addListener(n,"blur",(function(e){k||(t.onBlur(e),j=!1)}),t),r.addListener(n,"focus",(function(e){if(!k){if(j=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(R):R()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(G){return}var r=[];if(t)for(var o=n.parentElement;o&&1==o.nodeType;)r.push(o),o.setAttribute("ace_nocontext",!0),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;n.focus({preventScroll:!0}),t&&r.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return j},t.on("beforeEndOperation",(function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var o=r&&(e.docChanged||e.selectionChanged);y&&o&&(x=n.value="",z()),R()}}));var R=p?function(e){if(j&&(!v||e)&&!_){e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=x=r);var o=4+(e.length||(t.selection.isEmpty()?0:1));4==O&&C==o||n.setSelectionRange(4,o),O=4,C=o}}:function(){if(!y&&!_&&(j||A)){y=!0;var e=0,r=0,o="";if(t.session){var i=t.selection,a=i.getRange(),s=i.cursor.row;if(e=a.start.column,r=a.end.column,o=t.session.getLine(s),a.start.row!=s){var c=t.session.getLine(s-1);e=a.start.rows+1?l.length:r,r+=o.length+1,o=o+"\n"+l}else g&&s>0&&(o="\n"+o,r+=1,e+=1);o.length>d&&(e0&&x[f]==e[f];)f++,s--;for(l=l.slice(f),f=1;c>0&&x.length-f>O-1&&x[x.length-f]==e[e.length-f];)f++,c--;u-=f-1,d-=f-1;var h=l.length-f+1;if(h<0&&(s=-h,h=0),l=l.slice(0,h),!r&&!l&&!u&&!s&&!c&&!d)return"";_=!0;var p=!1;return o.isAndroid&&". "==l&&(l=" ",p=!0),l&&!s&&!c&&!u&&!d||S?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:c,restoreStart:u,restoreEnd:d}),_=!1,x=e,O=i,C=a,E=d,p?"\n":l},L=function(e){if(y)return F();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var r=n.value,o=M(r,!0);(r.length>500||m.test(o)||g&&O<1&&O==C)&&R()},$=function e(t,n,r){var o=t.clipboardData||window.clipboardData;if(o&&!c){var i=l||r?"Text":"text/plain";try{return n?!1!==o.setData(i,n):o.getData(i)}catch(t){if(!r)return e(t,n,!0)}}},N=function(e,o){var i=t.getCopyText();if(!i)return r.preventDefault(e);$(e,i)?(p&&(R(i),v=i,setTimeout((function(){v=!1}),10)),o?t.onCut():t.onCopy(),r.preventDefault(e)):(v=!0,n.value=i,n.select(),setTimeout((function(){v=!1,R(),o?t.onCut():t.onCopy()})))},D=function(e){N(e,!0)},P=function(e){N(e,!1)},I=function(e){var i=$(e);s.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),o.isIE&&setTimeout(R),r.preventDefault(e)):(n.value="",b=!0))};r.addCommandKeyListener(n,t.onCommandKey.bind(t),t),r.addListener(n,"select",(function(e){y||(v?v=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=x.length&&e.value===x&&x&&e.selectionEnd!==C}(n)?g&&n.selectionStart!=O&&R():(t.selectAll(),R()))}),t),r.addListener(n,"input",L,t),r.addListener(n,"cut",D,t),r.addListener(n,"copy",P,t),r.addListener(n,"paste",I,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:P(e);break;case 86:I(e);break;case 88:D(e)}}),t);var F=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){if(S)return W();if(y.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;M(e),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+C-y.selectionStart+E)}}},z=function(e){t.onCompositionEnd&&!t.$readOnly&&(y=!1,t.onCompositionEnd(),t.off("mousedown",W),e&&L())};function W(){k=!0,n.blur(),n.focus(),k=!1}var B,H=a.delayedCall(F,50).schedule.bind(null,null);function U(){clearTimeout(B),B=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",(function(e){if(!y&&t.onCompositionStart&&!t.$readOnly&&(y={},!S)){e.data&&(y.useTextareaForIME=!1),setTimeout(F,0),t._signal("compositionStart"),t.on("mousedown",W);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,y.markerRange=r,y.selectionStart=O,t.onCompositionStart(y),y.useTextareaForIME?(x=n.value="",O=0,C=0):(n.msGetInputContext&&(y.context=n.msGetInputContext()),n.getInputContext&&(y.context=n.getInputContext()))}}),t),r.addListener(n,"compositionupdate",F,t),r.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthC&&"\n"==x[i]?a=f.end:rC&&x.slice(0,i).split("\n").length>2?a=f.down:i>C&&" "==x[i-1]?(a=f.right,s=h.option):(i>C||i==C&&C!=O&&r==i)&&(a=f.right),r!==i&&(s|=h.shift),a){if(!t.onCommandKey({},s,a)&&t.commands){a=f.keyCodeToString(a);var c=t.commands.findKeyCommand(s,a);c&&t.execCommand(c)}O=r,C=i,R("")}}};document.addEventListener("selectionchange",i),t.on("destroy",(function(){document.removeEventListener("selectionchange",i)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/useragent");function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function i(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,i=e.getButton();return 0!==i?((o.getSelectionRange().isEmpty()||1==i)&&o.selection.moveToPosition(n),void(2==i&&(o.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==a&&s<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==s&&a>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==a&&1==s)r=o.end,t=o.start;else{var c=i(this.$clickSelection,r);r=c.cursor,t=c.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,r,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),i=Date.now();(o>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,o=r-n.t,i=o?e.wheelX/o:n.vx,a=o?e.wheelY/o:n.vy;o<550&&(i=(i+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(i/a),c=!1;if(s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)n.allowed=r;else if(r-n.allowed<550){Math.abs(i)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(c=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=i,n.vy=a,c?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(o.prototype),t.DefaultHandlers=o})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/oop"),i=e("../lib/event"),a=e("../tooltip").Tooltip;function s(e){a.call(this,e)}o.inherits(s,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),i=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+i>r&&(t-=20+i),a.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=function(e){var t,n,o,a=e.editor,c=a.renderer.$gutterLayer,l=new s(a.container);function u(){t&&(t=clearTimeout(t)),o&&(l.hide(),o=null,a._signal("hideGutterTooltip",l),a.off("mousewheel",u))}function d(e){l.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=c.getRegion(t)){var n=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(i){var s=i.domEvent.target||i.domEvent.srcElement;if(r.hasCssClass(s,"ace_fold-widget"))return u();o&&e.$tooltipFollowsMouse&&d(i),n=i,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=c.$annotations[t];if(!r)return u();if(t==a.session.getLength()){var i=a.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(i>a.session.documentToScreenRow(s.row,s.column))return u()}if(o!=r)if(o=r.text.join("
"),l.setHtml(o),l.show(),a._signal("showGutterTooltip",l),a.on("mousewheel",u),e.$tooltipFollowsMouse)d(n);else{var f=n.domEvent.target.getBoundingClientRect(),h=l.getElement().style;h.left=f.right+"px",h.top=f.bottom+"px"}}():u()}),50))})),i.addListener(a.renderer.$gutter,"mouseout",(function(e){n=null,o&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),a),a.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(i.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/event"),i=e("../lib/useragent");function a(e){var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var a,c,l,u,d,f,h,p,m,g,v,b=t.container,y=0;function _(){var e=f;(function(e,n){var r=Date.now(),o=!n||e.row!=n.row,i=!n||e.column!=n.column;!g||o||i?(t.moveCursorToPosition(e),g=r,v={x:c,y:l}):s(v.x,v.y,c,l)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(f=t.renderer.screenToTextCoordinates(c,l),e),function(e,n){var r=Date.now(),o=t.renderer.layerConfig.lineHeight,i=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:c-a.left,right:a.right-c},y:{top:l-a.top,bottom:a.bottom-l}},u=Math.min(s.x.left,s.x.right),d=Math.min(s.y.top,s.y.bottom),f={row:e.row,column:e.column};u/i<=2&&(f.column+=s.x.left=200&&t.renderer.scrollCursorIntoView(f):m=r:m=null}(f,e)}function w(){d=t.selection.toOrientedRange(),a=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),_(),u=setInterval(_,20),y=0,o.addListener(document,"mousemove",x)}function S(){clearInterval(u),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(d),t.isFocused()&&!p&&t.$resetCursorStyle(),d=null,f=null,y=0,m=null,g=null,o.removeListener(document,"mousemove",x)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),o.setDragImage&&o.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),o.clearData(),o.setData("Text",t.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,p=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&O(e.dataTransfer))return c=e.clientX,l=e.clientY,a||w(),y++,e.dataTransfer.dropEffect=h=C(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&O(e.dataTransfer))return c=e.clientX,l=e.clientY,a||(w(),y++),null!==k&&(k=null),e.dataTransfer.dropEffect=h=C(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&a)return S(),h=null,o.preventDefault(e)},this.onDrop=function(e){if(f){var n=e.dataTransfer;if(p)switch(h){case"move":d=d.contains(f.row,f.column)?{start:f,end:f}:t.moveText(d,f);break;case"copy":d=t.moveText(d,f,!0)}else{var r=n.getData("Text");d={start:f,end:t.session.insert(f,r)},t.focus(),h=null}return S(),o.preventDefault(e)}},o.addListener(b,"dragstart",this.onDragStart.bind(e),t),o.addListener(b,"dragend",this.onDragEnd.bind(e),t),o.addListener(b,"dragenter",this.onDragEnter.bind(e),t),o.addListener(b,"dragover",this.onDragOver.bind(e),t),o.addListener(b,"dragleave",this.onDragLeave.bind(e),t),o.addListener(b,"drop",this.onDrop.bind(e),t);var k=null;function x(){null==k&&(k=setTimeout((function(){null!=k&&a&&S()}),20))}function O(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function C(e){var t=["copy","copymove","all","uninitialized"],n=i.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(r)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?o="move":t.indexOf(r)>=0&&(o="copy"),o}}function s(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=i.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;i.isIE&&"dragReady"==this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(i.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,o=e("../lib/event"),i=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,c,l,u,d,f,h,p="scroll",m=0,g=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(r){var o=r.target.getAttribute("action");if("more"==o||!n)return n=!n,function(){var r=t.getCopyText(),o=t.session.getUndoManager().hasUndo();h.replaceChild(i.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),h.firstChild)}();"paste"==o?e.readText().then((function(e){t.execCommand(o,e)})):o&&("cut"!=o&&"copy"!=o||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),h.firstChild.style.display="none",n=!1,"openCommandPallete"!=o&&t.focus()};h=i.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){p="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),r(e)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function _(){h||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,i=t.container.getBoundingClientRect();h.style.top=n.pageY-i.top-3+"px",n.pageX-i.left1)return clearTimeout(l),l=null,s=-1,void(p="zoom");f=t.$mouseHandler.isMousePressed=!0;var i=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,h=e.timeStamp;c=h;var y=o[0],_=y.clientX,w=y.clientY;Math.abs(n-_)+Math.abs(a-w)>i&&(s=-1),n=e.clientX=_,a=e.clientY=w,v=b=0;var k=new r(e,t);if(d=k.getDocumentPosition(),h-s<500&&1==o.length&&!m)g++,e.preventDefault(),e.button=0,function(){l=null,clearTimeout(l),t.selection.moveToPosition(d);var e=g>=2?t.selection.getLineRange(d.row):t.session.getBracketRange(d);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),p="wait"}();else{g=0;var x=t.selection.cursor,O=t.selection.isEmpty()?x:t.selection.anchor,C=t.renderer.$cursorLayer.getPixelPosition(x,!0),E=t.renderer.$cursorLayer.getPixelPosition(O,!0),j=t.renderer.scroller.getBoundingClientRect(),R=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,A=function(e,t){return(e/=u)*e+(t=t/i-.75)*t};if(e.clientXL?"cursor":"anchor"),p=L<3.5?"anchor":M<3.5?"cursor":"scroll",l=setTimeout(S,450)}s=h}),t),o.addListener(e,"touchend",(function(e){f=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",m=0):l?(t.selection.moveToPosition(d),m=0,_()):"scroll"==p?(m+=60,u=setInterval((function(){m--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),m<20&&(v*=.9),m<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(m=0)}),10),w()):_(),clearTimeout(l),l=null}),t),o.addListener(e,"touchmove",(function(e){l&&(clearTimeout(l),l=null);var o=e.touches;if(!(o.length>1||"zoom"==p)){var i=o[0],s=n-i.clientX,u=a-i.clientY;if("wait"==p){if(!(s*s+u*u>4))return e.preventDefault();p="cursor"}n=i.clientX,a=i.clientY,e.clientX=i.clientX,e.clientY=i.clientY;var d=e.timeStamp,f=d-c;if(c=d,"scroll"==p){var h=new r(e,t);h.speed=1,h.wheelX=s,h.wheelY=u,10*Math.abs(s)1&&(o=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+o+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var o,a;Array.isArray(n)&&(a=n[0],n=n[1]);try{o=e(n)}catch(c){}if(o&&!t.$loading[n])return r&&r(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var s=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return s();i.loadScript(t.moduleUrl(n,a),s),u()}};var u=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};function d(o){if(c&&c.document){l.packaged=o||e.packaged||r.packaged||c.define&&n(307).packaged;for(var i,a={},s="",u=document.currentScript||document._currentScript,d=(u&&u.ownerDocument||document).getElementsByTagName("script"),f=0;f=e){for(i=d+1;i=e;)i++;for(s=d,c=i-1;s=t.length||2!=(c=n[o-1])&&3!=c||2!=(l=t[o+1])&&3!=l?4:(i&&(l=3),l==c?l:4);case 10:return 2==(c=o>0?n[o-1]:5)&&o+10&&2==n[o-1])return 2;if(i)return 4;for(h=o+1,f=t.length;h=1425&&m<=2303||64286==m;if(c=t[h],g&&(1==c||7==c))return 1}return o<1||5==(c=t[o-1])?4:n[o-1];case 5:return i=!1,a=!0,r;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:i=!1;case d:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:f[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var f=e.split(""),h=new Array(f.length),v=new Array(f.length),b=[];r=u?1:0,function(e,t,n,u){var d=r?l:c,f=null,h=null,p=null,v=0,b=null,y=-1,_=null,w=null,S=[];if(!u)for(_=0,u=[];_0)if(16==b){for(_=y;_-1){for(_=y;_=0&&8==u[k];k--)t[k]=r}}(f,b,f.length,n);for(var y=0;y7&&n[y]<13||4===n[y]||n[y]===d)?b[y]=t.ON_R:y>0&&"\u0644"===f[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(f[y])&&(b[y-1]=b[y]=t.R_H,y++);f[f.length-1]===t.DOT&&(b[f.length-1]=t.B),"\u202b"===f[0]&&(b[0]=t.RLE);for(y=0;y=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,o=r.getVisualFromLogicalIdx(n,this.bidiMap),i=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&i[o]%2!==0&&o++;for(var s=0;st&&i[o]%2===0&&(a+=this.charWidths[i[o]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},this.getSelections=function(e,t){var n,r=this.bidiMap,o=r.bidiLevels,i=[],a=0,s=Math.min(e,t)-this.wrapIndent,c=Math.max(e,t)-this.wrapIndent,l=!1,u=!1,d=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var f,h=0;h=s&&fn+i/2;){if(n+=i,r===o.length-1){i=0;break}i=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!==0&&o[r]%2===0?(e0&&o[r-1]%2===0&&o[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===i&&o[r-1]%2===0||!this.isRtlDir&&0===r&&o[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!==0&&0!==i&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/lang"),i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){r.implement(this,i),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(!this.$silent){var o=this.$isEmpty,i=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||i)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(r);return o?(r=o.start.row,n=o.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,o=e.column+t;return n<0&&(r=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var i=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var i=o.stringReverse(r),a=this.$shortWordEndIndex(i);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var i=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&i.row===this.lead.row&&(i.column,this.lead.column),this.moveCursorTo(i.row,i.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(r){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var r=e("./config"),o=2e3,i=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],o=0,i=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],c=0;c1?this.$applyToken:l.token),d>1&&(/\\\d/.test(l.regex)?u=l.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(d=1,u=this.removeCapturingGroups(l.regex)),l.splitRegex||"string"==typeof l.token||s.push(l)),i[o]=c,o+=d,r.push(u),l.onMatch||(l.onMatch=null)}}r.length||(i[0]=0,r.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var r=[],o=0,i=n.length;ou){var v=e.substring(u,g-m.length);f.type==h?f.value+=v:(f.type&&l.push(f),f={type:h,value:v})}for(var b=0;bo){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:l,state:n.length?n:r}},this.reportError=r.reportError}).call(i.prototype),t.Tokenizer=i})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(o.prototype),t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},f=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},h=function(e,t,n,r){var o=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}},p=function e(t){this.add("braces","insertion",(function(n,o,i,a,c){var l=i.getCursorPosition(),u=a.doc.getLine(l.row);if("{"==c){f(i);var d=i.getSelectionRange(),p=a.doc.getTextRange(d);if(""!==p&&"{"!==p&&i.getWrapBehavioursEnabled())return h(d,p,"{","}");if(e.isSaneInsertion(i,a))return/[\]\}\)]/.test(u[l.column])||i.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(i,a,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(i,a,"{"),{text:"{",selection:[1,1]})}else if("}"==c){if(f(i),"}"==u.substring(l.column,l.column+1))if(null!==a.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,u,c))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==c||"\r\n"==c){f(i);var m="";if(e.isMaybeInsertedClosing(l,u)&&(m=s.stringRepeat("}",r.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(l.column,l.column+1)){var g=a.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!g)return null;var v=this.$getIndent(a.getLine(g.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+a.getTabString();return{text:"\n"+b+"\n"+v+m,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){if(f(n),"}"==o.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,r,o,i){if("("==i){f(r);var a=r.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"(",")");if(e.isSaneInsertion(r,o))return e.recordAutoInsert(r,o,")"),{text:"()",selection:[1,1]}}else if(")"==i){f(r);var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if(")"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket(")",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,l,i))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i&&(f(n),")"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(t,n,r,o,i){if("["==i){f(r);var a=r.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"[","]");if(e.isSaneInsertion(r,o))return e.recordAutoInsert(r,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){f(r);var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if("]"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket("]",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,l,i))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i&&(f(n),"]"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,r,o){var i=r.$mode.$quotes||d;if(1==o.length&&i[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;f(n);var a=o,s=n.getSelectionRange(),c=r.doc.getTextRange(s);if(!(""===c||1==c.length&&i[c])&&n.getWrapBehavioursEnabled())return h(s,c,a,a);if(!c){var l=n.getCursorPosition(),u=r.doc.getLine(l.row),p=u.substring(l.column-1,l.column),m=u.substring(l.column,l.column+1),g=r.getTokenAt(l.row,l.column),v=r.getTokenAt(l.row,l.column+1);if("\\"==p&&g&&/escape/.test(g.type))return null;var b,y=g&&/string|escape/.test(g.type),_=!v||/string|escape/.test(v.type);if(m==a)(b=y!==_)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!_)return null;if(y&&_)return null;var w=r.$mode.tokenRe;w.lastIndex=0;var S=w.test(p);w.lastIndex=0;var k=w.test(p);if(S||k)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var x=u[l.column-2];if(p==a&&(x==a||w.test(x)))return null;b=!0}return{text:b?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,o){var i=r.$mode.$quotes||d,a=r.doc.getTextRange(o);if(!o.isMultiLine()&&i.hasOwnProperty(a)&&(f(n),r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==a))return o.end.column++,o}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(p,i),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,i=[],a=0;a2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,p=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(h)+")"),g=new RegExp("(?:"+c.escapeRegExp(p)+")\\s*$"),v=function(e,t){y(e,t)||i&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},p),o.insertInLine({row:t,column:s},h))},b=function(e,t){var n;(n=e.match(g))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&o.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var r=t.getTokens(n),o=0;oe.length&&(w=e.length)})),s==1/0&&(s=w,i=!1,a=!1),u&&s%l!=0&&(s=Math.floor(s/l)*l),_(a?b:v)},this.toggleBlockComment=function(e,t,n,r){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var i,a,s=(m=new l(t,r.row,r.column)).getCurrentToken(),c=(t.selection,t.selection.toOrientedRange());if(s&&/comment/.test(s.type)){for(var d,f;s&&/comment/.test(s.type);){if(-1!=(g=s.value.indexOf(o.start))){var h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;d=new u(h,p,h,p+o.start.length);break}s=m.stepBackward()}var m;for(s=(m=new l(t,r.row,r.column)).getCurrentToken();s&&/comment/.test(s.type);){var g;if(-1!=(g=s.value.indexOf(o.end))){h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;f=new u(h,p,h,p+o.end.length);break}s=m.stepForward()}f&&t.remove(f),d&&(t.remove(d),i=d.start.row,a=-o.start.length)}else a=o.start.length,i=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);c.start.row==i&&(c.start.column+=a),c.end.row==i&&(c.end.column+=a),t.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],o=n.prototype.$id,i=r.$modes[o];i||(r.$modes[o]=i=new n),r.$modes[t]||(r.$modes[t]=i),this.$embeds.push(t),this.$modes[t]=i}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,r){var o="insert"==t.action,i=(o?1:-1)*(t.end.row-t.start.row),a=(o?1:-1)*(t.end.column-t.start.column),s=t.start,c=o?s:t.end;if(e(n,s,r))return{row:n.row,column:n.column};if(e(c,n,!r))return{row:n.row+i,column:n.column+(n.row==c.row?a:0)};return{row:s.row,column:s.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var o={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:o,value:r})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(i.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,c=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),i<=r&&n.fireUpdateEvent(i,r)}}};(function(){r.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(i.prototype),t.BackgroundTokenizer=i})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),i=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,i){if(this.regExp)for(var a=i.firstRow,s=i.lastRow,c=a;c<=s;c++){var l=this.cache[c];null==l&&((l=r.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map((function(e){return new o(c,e.offset,c,e.offset+e.length)})),this.cache[c]=l.length?l:"");for(var u=l.length;u--;)t.drawSingleLineMarker(e,l[u].toScreenRange(n),this.clazz,i)}}}).call(i.prototype),t.SearchHighlight=i})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,o,i=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var c=0;c0)){var c=r(e,a.start);return 0===s?t&&0!==c?-i-2:i:c>0||0===c&&!t?i:-i-1}}return-i-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],i=1;i=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=r)break}if("insert"==e.action)for(var c=o-r,l=-t.column+n.column;ar)break;if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=l,u.start.row+=c)),u.end.row==r&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&l>0&&au.start.column&&u.end.column==i[a+1].start.column&&(u.end.column-=l),u.end.column+=l,u.end.row+=c}}else for(c=r-o,l=t.column-n.column;ao)break;u.end.rowt.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=l,u.end.row+=c):u.end.row>o&&(u.end.row+=c),u.start.rowt.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=l,u.start.row+=c):u.start.row>o&&(u.start.row+=c)}if(0!=c&&a=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,o=0;o=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof i?n=e:(n=new i(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,c=n.start.column,l=n.end.row,u=n.end.column,d=this.getFoldAt(s,c,1),f=this.getFoldAt(l,u,-1);if(d&&f==d)return d.addSubFold(n);d&&!d.range.isStart(s,c)&&this.removeFold(d),f&&!f.range.isEnd(l,u)&&this.removeFold(f);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach((function(e){n.addSubFold(e)})));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e)n=new r(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach((function(e){o=o.concat(this.unfold(e))}),this),o;n=e}for(var i=o=this.getFoldsInRangeList(n);1==o.length&&r.comparePoints(o[0].start,n.start)<0&&r.comparePoints(o[0].end,n.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(o):this.expandFolds(o),i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,o){null==r&&(r=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var i=this.doc,a="";return e.walk((function(e,t,n,s){if(!(tu)break}while(i&&c.test(i.type));i=o.stepBackward()}else i=o.getCurrentToken();return l.end.row=o.getCurrentTokenRow(),l.end.column=o.getCurrentTokenColumn()+i.value.length-2,l}},this.foldAll=function(e,t,n,r){void 0==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var i=e=e||0;i=e&&(i=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),r=0;r=0;){var i=n[o];if(null==i&&(i=n[o]=this.getFoldWidget(o)),"start"==i){var a=this.getFoldWidgetRange(o);if(r||(r=a),a&&a.end.row>=e)break}o--}return{range:-1!==o&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),o="end"===n?-1:1,i=this.getFoldAt(e,-1===o?0:r.length,o);if(i)return t.children||t.all?this.removeFold(i):this.expandFold(i),i;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(i=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(i.range))return this.removeFold(i),i;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var c=s.range.start.row+1,l=s.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=a?a.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,i=n.charAt(e.column-1),a=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(a||(i=n.charAt(e.column),e={row:e.row,column:e.column+1},a=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=o.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=o.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(r||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!r)return null;var i=new o(e.row,e.column-1,e.row,e.column),a=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);return a?[i,new o(a.row,a.column,a.row,a.column+1)]:[i]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn()-2,l=s.value;;){for(;c>=0;){var u=l.charAt(c);if(u==o){if(0==(i-=1))return{row:a.getCurrentTokenRow(),column:c+a.getCurrentTokenColumn()}}else u==e&&(i+=1);c-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;c=(l=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn();;){for(var l=s.value,u=l.length;cn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var o=n+r>>1,i=e[o];if(t>i)n=o+1;else{if(!(t=t);i++);return(n=r[i])?(n.index=i,n.start=o-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var i=t;if(i>0){do{i--}while(i>=0&&n.charAt(i).match(o));i++}for(var a=t;ae&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,o=0,i=this.$foldData[o],a=i?i.start.row:1/0,s=t.length,c=0;ca){if((c=i.end.row+1)>=s)break;a=(i=this.$foldData[o++])?i.start.row:1/0}null==n[c]&&(n[c]=this.$getStringScreenWidth(t[c])[0]),n[c]>r&&(r=n[c])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(i.start.column+=l),i.end.row==e.end.row&&i.end.column>e.end.column&&(i.end.column+=l)),a&&i.start.row>=e.end.row&&(i.start.row+=a,i.end.row+=a)}if(i.end=this.insert(i.start,r),o.length){var s=e.start,c=i.start,l=(a=c.row-s.row,c.column-s.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=l),e.end.row==s.row&&(e.end.column+=l),e.start.row+=a,e.end.row+=a,e})))}return i},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var i=this.getLine(o);n.start.row=o,n.end.row=o;for(var a=0;a0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=o-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var i=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(i).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,o=e.end,i=r.row,a=o.row,s=a-i,c=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(i,s);var l=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var u=0;if(m=this.getFoldLine(o.row)){m.addRemoveChars(o.row,o.column,r.column-o.column),m.shiftRow(-s);var d=this.getFoldLine(i);d&&d!==m&&(d.merge(m),m=d),u=l.indexOf(m)+1}for(;u=o.row&&m.shiftRow(-s)}a=i}else{var f=Array(s);f.unshift(i,0);var h=t?this.$wrapData:this.$rowLengthCache;h.splice.apply(h,f);l=this.$foldData,u=0;if(m=this.getFoldLine(i)){var p=m.range.compareInside(r.row,r.column);0==p?(m=m.split(r.row,r.column))&&(m.shiftRow(s),m.addRemoveChars(a,0,o.column-r.column)):-1==p&&(m.addRemoveChars(i,0,o.column-r.column),m.shiftRow(s)),u=l.indexOf(m)+1}for(;u=i&&m.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(c=this.getFoldsInRange(e),this.removeFolds(c),s=-s),(m=this.getFoldLine(i))&&m.addRemoveChars(i,r.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(i,a):this.$updateRowLengthCache(i,a),c},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,r){var o,i,a=this.doc.getAllLines(),s=this.getTabSize(),c=this.$wrapData,l=this.$wrapLimit,u=n;for(r=Math.min(r,a.length-1);u<=r;)(i=this.getFoldLine(u,i))?(o=[],i.walk(function(n,r,i,s){var c;if(null!=n){(c=this.$getDisplayTokens(n,o.length))[0]=e;for(var l=1;l=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,r,o){if(0==n.length)return[];var i=[],a=n.length,s=0,c=0,l=this.$wrapAsCode,u=this.$indentedSoftWrap,d=r<=Math.max(2*o,8)||!1===u?0:Math.floor(r/2);function f(e){for(var t=e-s,r=s;rr-h;){var p=s+r-h;if(n[p-1]>=10&&n[p]>=10)f(p);else if(n[p]!=e&&n[p]!=t){for(var m=Math.max(p-(r-(r>>2)),s-1);p>m&&n[p]m&&n[p]m&&9==n[p];)p--}else for(;p>m&&n[p]<10;)p--;p>m?f(++p):(2==n[p=s+r]&&p--,f(p-h))}else{for(;p!=s-1&&n[p]!=e;p--);if(p>s){f(p);continue}for(p=s+r;p39&&a<48||a>57&&a<64?o.push(9):a>=4352&&n(a)?o.push(1,2):o.push(1)}return o},this.$getStringScreenWidth=function(e,t,r){if(0==t)return[0,0];var o,i;for(null==t&&(t=1/0),r=r||0,i=0;i=4352&&n(o)?r+=2:r+=1,!(r>t));i++);return[r,i]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){s=l[u],i=this.$docRowCache[u];var f=e>l[d-1]}else f=!d;for(var h=this.getLength()-1,p=this.getNextFoldLine(i),m=p?p.start.row:1/0;s<=e&&!(s+(c=this.getRowLength(i))>e||i>=h);)s+=c,++i>m&&(i=p.end.row+1,m=(p=this.getNextFoldLine(i,p))?p.start.row:1/0),f&&(this.$docRowCache.push(i),this.$screenRowCache.push(s));if(p&&p.start.row<=i)r=this.getFoldDisplayLine(p),i=p.start.row;else{if(s+c<=e||i>h)return{row:h,column:this.getLine(h).length};r=this.getLine(i),p=null}var g=0,v=Math.floor(e-s);if(this.$useWrapMode){var b=this.$wrapData[i];b&&(o=b[v],v>0&&b.length&&(g=b.indent,a=b[v-1]||b[b.length-1],r=r.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+v,i,v)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=o&&(a=o-1),p?p.idxToPosition(a):{row:i,column:a}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,o=0,i=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var a,s=0,c=this.$docRowCache,l=this.$getRowCacheIndex(c,e),u=c.length;if(u&&l>=0){s=c[l],o=this.$screenRowCache[l];var d=e>c[u-1]}else d=!u;for(var f=this.getNextFoldLine(s),h=f?f.start.row:1/0;s=h){if((a=f.end.row+1)>e)break;h=(f=this.getNextFoldLine(a,f))?f.start.row:1/0}else a=s+1;o+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(o))}var p="";f&&s>=h?(p=this.getFoldDisplayLine(f,e,t),i=f.start.row):(p=this.getLine(e).substring(0,t),i=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[i];if(g){for(var v=0;p.length>=g[v];)o++,v++;p=p.substring(g[v-1]||0,p.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(o+=this.lineWidgets[s].rowsAbove),{row:o,column:m+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,o=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);ro&&(r=t.end.row+1,o=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sn);i++);return[r,i]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=n}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),a.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),o=e("./lib/oop"),i=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach((function(e,n,o,a){return r=new i(e,n,o,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var c,l=s.length,u=o.length-l;e:for(var d=s.offset||0;d<=u;d++){for(var f=0;fm||(a.push(c=new i(d,m,d+l-1,g)),l>2&&(d=d+l-2))}}else for(var v=0;vw&&a[f].end.row==n.end.row;)f--;for(a=a.slice(v,f+1),v=0,f=a.length;v=s;n--)if(d(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=c,s=a.row;n>=s;n--)if(d(n,Number.MAX_VALUE,e))return}};else l=function(e){var n=a.row;if(!d(n,a.column,e)){for(n+=1;n<=c;n++)if(d(n,0,e))return;if(0!=t.wrap)for(n=s,c=a.row;n<=c;n++)if(d(n,0,e))return}};if(t.$isMultiLine)var u=n.length,d=function(t,o,i){var a=r?t-u+1:t;if(!(a<0||a+u>e.getLength())){var s=e.getLine(a),c=s.search(n[0]);if(!(!r&&co))return!!i(a,c,a+u-1,d)||void 0}}};else if(r)d=function(t,r,o){var i,a=e.getLine(t),s=[],c=0;for(n.lastIndex=0;i=n.exec(a);){var l=i[0].length;if(c=i.index,!l){if(c>=a.length)break;n.lastIndex=c+=1}if(i.index+l>r)break;s.push(i.index,l)}for(var u=s.length-1;u>=0;u-=2){var d=s[u-1];if(o(t,d,t,d+(l=s[u])))return!0}};else d=function(t,r,o){var i,a,s=e.getLine(t);for(n.lastIndex=r;a=n.exec(s);){var c=a[0].length;if(o(t,i=a.index,t,i+c))return!0;if(!c&&(n.lastIndex=i+=1,i>=s.length))return!1}};return{forEach:l}}}).call(a.prototype),t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/keys"),o=e("../lib/useragent"),i=r.KEY_MODS;function a(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){a.call(this,e,t),this.$singleCommand=!1}s.prototype=a.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var o in r){var i=r[o];if(i==e)delete r[o];else if(Array.isArray(i)){var a=i.indexOf(e);-1!=a&&(i.splice(a,1),1==i.length&&(r[o]=i[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var r="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=i[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var a=this.parseKeys(e),s=i[a.hashId]+a.key;this._addCommandToBinding(r+s,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var o,i=this.commandKeyBinding;if(n)if(!i[t]||this.$singleCommand)i[t]=n;else{Array.isArray(i[t])?-1!=(o=i[t].indexOf(n))&&i[t].splice(o,1):i[t]=[i[t]],"number"!=typeof r&&(r=e(n));var a=i[t];for(o=0;or)break}a.splice(o,0,n)}else delete i[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),o=r[n];if(r.FUNCTION_KEYS[o])n=r.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,a=t.length;a--;){var s=r.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;i|=s}return{key:n,hashId:i}},this.findKeyCommand=function(e,t){var n=i[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var o=i[t]+n,a=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,a=this.commandKeyBinding[e.$keyChain]||a),!a||"chainKeys"!=a&&"chainKeys"!=a[a.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:a}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=s})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,a=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};r.inherits(a,o),function(){r.implement(this,i),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(a.prototype),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var r=e("../lib/lang"),o=e("../config"),i=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,c=e.session.doc.getLine(n.row),l=n.row+1;l<=o.row+1;l++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));0!==u.length&&(u=" "+u),c+=u}o.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,o=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a=o.lastRow||r.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var i=this.selection.toJSON();this.curOp.selectionAfter=i,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(i),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var r="ace_bracket";Array.isArray(n)?1==n.length&&(r="ace_error_bracket"):n=[n],2==n.length&&(0==h.comparePoints(n[0].end,n[1].start)?n=[h.fromPoints(n[0].start,n[1].end)]:0==h.comparePoints(n[0].start,n[1].end)&&(n=[h.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,r,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new b(e.session,n.row,n.column),o=r.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===o.type.indexOf("tag-open")||(o=r.stepForward())){var i=o.value,a=o.value,s=0,c=r.stepBackward();if("<"===c.value)do{c=o,(o=r.stepForward())&&(-1!==o.type.indexOf("tag-name")?i===(a=o.value)&&("<"===c.value?s++:""===o.value&&s--)}while(o&&s>=0);else{do{if(o=c,c=r.stepBackward(),o)if(-1!==o.type.indexOf("tag-name"))i===o.value&&("<"===c.value?s++:""===o.value){for(var l=0,u=c;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===i){s--;break}if("<"===u.value)break;u=r.stepBackward(),l++}for(var d=0;d1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new h(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,o=e.getLine(t.start.row),i=o.substring(n,r);if(!(i.length>5e3)&&/[\w\d]/.test(i)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:i}),s=o.substring(n-1,r+1);if(a.test(s))return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),o=0;os.search(/\S|$/)){var c=s.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+c)}}this.clearSelection();var l=o.column,u=n.getState(o.row),d=(s=n.getLine(o.row),r.checkOutdent(u,s,e));if(n.insert(o,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new h(o.row,l+i.selection[0],o.row,l+i.selection[1])):this.selection.setSelectionRange(new h(o.row+i.selection[0],i.selection[1],o.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(u,s.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},f)}d&&r.autoOutdent(u,n,o.row)}},this.autoIndent=function(){var e,t,n=this.session,r=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var o=this.getSelectionRange();e=o.start.row,t=o.end.row}for(var i,a,s,c="",l="",u="",d=n.getTabString(),f=e;f<=t;f++)f>0&&(c=n.getState(f-1),l=n.getLine(f-1),u=r.getNextLineIndent(c,l,d)),i=n.getLine(f),u!==(a=r.$getIndent(i))&&(a.length>0&&(s=new h(f,0,f,a.length),n.remove(s)),u.length>0&&n.insert({row:f,column:0},u)),r.autoOutdent(c,n,f)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),o=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var i=n.getTextRange(t);if("\n"==i[i.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,o=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var o=new h(0,0,0,0);for(r=e.first;r<=e.last;r++){var i=t.getLine(r);o.start.row=r,o.end.row=r,o.end.column=i.length,t.replace(o,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),o=this.session.getTextRange(r);if(!isNaN(parseFloat(o))&&isFinite(o)){var i=this.getNumberAt(t,n);if(i){var a=i.value.indexOf(".")>=0?i.start+i.value.indexOf(".")+1:i.end,s=i.start+i.value.length-a,c=parseFloat(i.value);c*=Math.pow(10,s),a!==i.end&&n=s&&a<=c&&(n=t,l.selection.clearSelection(),l.moveCursorTo(e,s+r),l.selection.selectTo(e,c+r)),s=c}));for(var u,d=this.$toggleWordPairs,f=0;fh+1)break;h=p.last}for(u--,s=this.session.$moveLines(f,h,t?0:e),t&&-1==e&&(d=u+1);d<=u;)a[d].moveBy(s,0),d++;t||(s=0),c+=s}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,o=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var i=n.scrollTop;n.scrollBy(0,o*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(i)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new b(this.session,n.row,n.column),o=r.getCurrentToken(),i=o||r.stepForward();if(i){var a,s,c=!1,l={},u=n.column-i.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(i.value.match(/[{}()\[\]]/g)){for(;u=0;--i)this.$tryReplace(n[i],e)&&r++;return this.selection.setSelectionRange(o),r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var i=this.$search.find(this.session);return t.preventScroll?i:i?(this.revealRange(i,n),i):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var i=this.on("changeSelection",(function(){r=!0})),a=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,i=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=i.top-a.offset;null!=(r=i.top>=0&&s+t.top<0||!(i.topwindow.innerHeight)&&null)&&(o.style.top=s+"px",o.style.left=i.left+"px",o.style.height=a.lineHeight+"px",o.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",i),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var r=this;v.loadModule("./ext/prompt",(function(o){o.prompt(r,e,t,n)}))}}.call(_.prototype),v.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?w.attach(this):w.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var w={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=_})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var o=n[r][0];if(o.id<=e)break;o.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?s(e):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)}}).call(r.prototype);var o=e("./range").Range,i=o.comparePoints;o.comparePoints;function a(e){return{row:e.row,column:e.column}}function s(e){if(e=e||this,Array.isArray(e))return e.map(s).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(c).join("\n"):c(e.value)),e.start&&(t+=c(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function c(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function l(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)if(i(t.start,e.end)>=0)f(t,e,-1);else{if(!(i(t.start,e.start)<=0))return null;f(e,t,1)}else if(n&&!r)if(i(t.start,e.end)>=0)f(t,e,-1);else{if(!(i(t.end,e.start)<=0))return null;f(e,t,-1)}else if(!n&&r)if(i(t.start,e.start)>=0)f(t,e,1);else{if(!(i(t.start,e.start)<=0))return null;f(e,t,1)}else if(!n&&!r)if(i(t.start,e.start)>=0)f(t,e,1);else{if(!(i(t.end,e.start)<=0))return null;f(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var r=0;r=0?f(e,t,-1):(i(e.start,t.start)<=0||f(e,o.fromPoints(t.start,e.start),-1),f(t,e,1));else if(!n&&r)i(t.start,e.end)>=0?f(t,e,-1):(i(t.start,e.start)<=0||f(t,o.fromPoints(e.start,t.start),-1),f(e,t,1));else if(!n&&!r)if(i(t.start,e.end)>=0)f(t,e,-1);else{var a,s;if(!(i(t.end,e.start)<=0))return i(e.start,t.start)<0&&(a=e,e=p(e,t.start)),i(e.end,t.end)>0&&(s=p(e,t.end)),h(t.end,e.start,e.end,-1),s&&!a&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,a,s].filter(Boolean);f(e,t,-1)}return[t,e]}function f(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function p(e,t){var n=e.lines,r=e.end;e.end=a(t);var o=e.end.row-e.start.row,i=n.splice(o,n.length),s=o?t.column:t.column-e.start.column;return n.push(i[0].substring(0,s)),i[0]=i[0].substr(s),{start:a(t),end:r,lines:i,action:e.action}}function m(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var r=e[n],o=0;oi&&(c=o.end.row+1,i=(o=t.getNextFoldLine(c,o))?o.start.row:1/0),c>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}(a=this.$lines.get(++s))?a.row=c:(a=this.$lines.createCell(c,e,this.session,l),this.$lines.push(a)),this.$renderCell(a,e,o,c),c++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+r-1);var i=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(i+=a.left+a.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(r.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r0;o--)this.$lines.shift();if(r>n)for(o=this.session.getFoldedRowCount(n+1,r);o>0;o--)this.$lines.pop();e.firstRowr&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var r=[],o=t,i=this.session.getNextFoldLine(o),a=i?i.start.row:1/0;o>a&&(o=i.end.row+1,a=(i=this.session.getNextFoldLine(o,i))?i.start.row:1/0),!(o>n);){var s=this.$lines.createCell(o,e,this.session,l);this.$renderCell(s,e,i,o),r.push(s),o++}return r},this.$renderCell=function(e,t,n,o){var i=e.element,a=this.session,s=i.childNodes[0],c=i.childNodes[1],l=a.$firstLineNumber,u=a.$breakpoints,d=a.$decorations,f=a.gutterRenderer||this.$renderer,h=this.$showFoldWidgets&&a.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o=p&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[o]&&(m+=u[o]),d[o]&&(m+=d[o]),this.$annotations[o]&&(m+=this.$annotations[o].className),i.className!=m&&(i.className=m),h){var g=h[o];null==g&&(g=h[o]=a.getFoldWidget(o))}if(g){m="ace_fold-widget ace_"+g;"start"==g&&o==p&&on.right-t.right?"foldWidgets":void 0}}).call(c.prototype),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../range").Range,o=e("../lib/dom"),i=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var o=r.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),r.renderer){var i=this.$getTop(o.start.row,e),a=this.$padding+o.start.column*e.characterWidth;r.renderer(t,o,a,i,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,o,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,o,r.clazz,e):o.isMultiLine()?"text"==r.type?this.drawTextMarker(t,o,r.clazz,e):this.drawMultiLineMarker(t,o,r.clazz,e):this.drawSingleLineMarker(t,o,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.if?4:0)|(l==c?8:0)),o,l==c?0:1,i)},this.drawMultiLineMarker=function(e,t,n,r,o){var i=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),c=i+t.start.column*r.characterWidth;(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((l=t.clone()).end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,n+" ace_br1 ace_start",r,null,o)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+s+"px;left:"+c+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l;(l=t.clone()).start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,n+" ace_br12",r,null,o)}else{s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+u+"px;top:"+s+"px;left:"+i+"px;"+(o||""))}if(!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+a+"px;right:0;top:"+s+"px;left:"+i+"px;"+(o||""))}},this.drawSingleLineMarker=function(e,t,n,r,o,i){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,o,i);var a=r.lineHeight,s=(t.end.column+(o||0)-t.start.column)*r.characterWidth,c=this.$getTop(t.start.row,r),l=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+c+"px;left:"+l+"px;"+(i||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,o,i){var a=r.lineHeight,s=this.$getTop(t.start.row,r),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+e.width+(o||0)+"px;top:"+s+"px;left:"+(c+e.left)+"px;"+(i||""))}),this)},this.drawFullLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-i),this.elt(n,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(o||""))},this.drawScreenLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),a=r.lineHeight;this.elt(n,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(o||""))}}).call(i.prototype),t.Marker=i})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,c=function(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)};(function(){r.implement(this,s),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nu&&(s=c.end.row+1,u=(c=this.session.getNextFoldLine(s,c))?c.start.row:1/0),!(s>o);){var d=i[a++];if(d){this.dom.removeChildren(d),this.$renderLine(d,s,s==u&&c),l&&(d.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var f=e.lineHeight*this.session.getRowLength(s)+"px";d.style.height!=f&&(l=!0,d.style.height=f)}s++}if(l)for(;a0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var r=[],i=t,a=this.session.getNextFoldLine(i),s=a?a.start.row:1/0;i>s&&(i=a.end.row+1,s=(a=this.session.getNextFoldLine(i,a))?a.start.row:1/0),!(i>n);){var c=this.$lines.createCell(i,e,this.session),l=c.element;this.dom.removeChildren(l),o.setStyle(l.style,"height",this.$lines.computeLineHeight(i,e,this.session)+"px"),o.setStyle(l.style,"top",this.$lines.computeLineTop(i,e,this.session)+"px"),this.$renderLine(l,i,i==s&&a),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",r.push(c),i++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){for(var o,a=this,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,c=this.dom.createFragment(this.element),l=0;o=s.exec(r);){var u=o[1],d=o[2],f=o[3],h=o[4],p=o[5];if(a.showSpaces||!d){var m=l!=o.index?r.slice(l,o.index):"";if(l=o.index+o[0].length,m&&c.appendChild(this.dom.createTextNode(m,this.element)),u){var g=a.session.getScreenTabSize(t+o.index);c.appendChild(a.$tabStrings[g].cloneNode(!0)),t+=g-1}else if(d){if(a.showSpaces)(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",b.textContent=i.stringRepeat(a.SPACE_CHAR,d.length),c.appendChild(b);else c.appendChild(this.com.createTextNode(d,this.element))}else if(f){(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",b.textContent=i.stringRepeat(a.SPACE_CHAR,f.length),c.appendChild(b)}else if(h){t+=1,(b=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",b.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=a.showSpaces?a.SPACE_CHAR:h,c.appendChild(b)}else if(p){t+=1,(b=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",b.className="ace_cjk",b.textContent=p,c.appendChild(b)}}}if(c.appendChild(this.dom.createTextNode(l?r.slice(l):r,this.element)),this.$textToken[n.type])e.appendChild(c);else{var v="ace_"+n.type.replace(/\./g," ace_"),b=this.dom.createElement("span");"fold"==n.type&&(b.style.width=n.value.length*this.config.characterWidth+"px"),b.className=v,b.appendChild(c),e.appendChild(b)}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var o=(r-=r%this.tabSize)/this.tabSize,i=0;i=a;)s=this.$renderToken(c,s,u,d.substring(0,a-r)),d=d.substring(a-r),r=a,c=this.$createLineElement(),e.appendChild(c),c.appendChild(this.dom.createTextNode(i.stringRepeat("\xa0",n.indent),this.element)),s=0,a=n[++o]||Number.MAX_VALUE;0!=d.length&&(r+=d.length,s=this.$renderToken(c,s,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(c,s,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],o=r.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(n=this.$renderToken(e,n,r,o));for(var i=1;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,o);n=this.$renderToken(e,n,r,o)}},this.$renderOverflowMessage=function(e,t,n,r,o){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var i=this.dom.createElement("span");i.className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=o?"":"",e.appendChild(i)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var o=e;if(r.length){var i=this.session.getRowSplitData(t);if(i&&i.length){this.$renderWrappedLine(e,r,i);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,r)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(a)}},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var o=n.getTokens(e);return t.walk((function(e,t,i,a,s){null!=e?r.push({type:"fold",value:e}):(s&&(o=n.getTokens(t)),o.length&&function(e,t,n){for(var o=0,i=0;i+e[o].value.lengthn-t&&(a=a.substring(0,n-t)),r.push({type:e[o].type,value:a}),i=t+a.length,o+=1);in?r.push({type:e[o].type,value:a.substring(0,n-i)}):r.push(e[o]),i+=a.length,o+=1}}(o,a,i))}),t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(c.prototype),t.Text=c})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[o++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(r.setStyle(c,"display","block"),r.translate(s,a.left,a.top),r.setStyle(c,"width",Math.round(e.characterWidth)+"px"),r.setStyle(c,"height",e.lineHeight+"px")):r.setStyle(c,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=32768,c=function(e){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addListener(this.element,"scroll",this.onScroll.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)};(function(){r.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(c.prototype);var l=function(e,t){c.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=o.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(l,c),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>s?(this.coeff=s/e,e=s):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var u=function(e,t){c.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(u,c),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var r=e("./lib/event"),o=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(o.prototype),t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),c=e("../lib/event_emitter").EventEmitter,l=256,u="function"==typeof ResizeObserver,d=200,f=t.FontMetrics=function(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=i.stringRepeat("X",l),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){r.implement(this,c),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=i.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(d,0),e(0,d),e(d,d)],this.el)},this.transformCoordinates=function(e,t){e&&(e=i(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function i(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),c=a(this.els[1]),l=a(this.els[2]),u=a(this.els[3]),f=n(r(u,c),r(u,l),r(o(c,l),o(u,s))),h=i(1+f[0],r(c,s)),p=i(1+f[1],r(l,s));if(t){var m=t,g=f[0]*m[0]/d+f[1]*m[1]/d+1,v=o(i(m[0],h),i(m[1],p));return o(i(1/g/d,v),s)}var b=r(e,s),y=n(r(h,i(f[0],b)),r(p,i(f[1],b)),b);return i(d,y)}}).call(f.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./config"),a=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,c=e("./layer/text").Text,l=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,f=e("./renderloop").RenderLoop,h=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',g=e("./lib/useragent"),v=g.isIE;o.importCssString(m,"ace_editor.css",!1);var b=function(e,t){var n=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==i.get("useStrictCSP")&&i.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new s(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),i.resetOptions(this),i._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;r||(r=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var i=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(i|this.$changes,!0):this.$loop.schedule(i|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(r&&(e||a.height!=r)&&(a.height=r,i|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){i|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var c=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",c),o.setStyle(this.scroller.style,"right",c),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)}return a.$dirty=!n||!r,i&&this._signal("resize",s),i},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,i=n.top,a=n.left;i-=r.offset;var s=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(i<0||i>r.height-s)o.translate(this.textarea,0,0);else{var c=1,l=this.$size.height-s;if(t)if(t.useTextareaForIME){var u=this.textarea.value;c=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else i+=this.lineHeight+2;else i+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-c&&(a=this.$size.scrollerWidth-c),a+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",s+"px"),o.setStyle(e,"width",c+"px"),o.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-c),Math.min(i,l))}}}else o.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},this.setMargin=function(e,t,n,r){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var i=n.width+2*this.$padding+"px",a=n.minHeight+"px";o.setStyle(this.content.style,"width",i),o.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),i=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==i;a&&(this.$horizScroll=i,this.scrollBarH.setVisible(i));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=t.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=l;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+l<0||this.scrollTop>u.top),f=s!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var h,p,m=this.scrollTop%this.lineHeight,g=Math.ceil(c/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=v+g,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var _=e.getFoldLine(v);_&&(v=_.start.row),h=e.documentToScreenRow(v,0),p=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(b)*y+p,m=this.scrollTop-h*y;var w=0;return(this.layerConfig.width!=o||a)&&(w=this.CHANGE_H_SCROLL),(a||f)&&(w|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:h,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),w},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),o=r.left,i=r.top,a=n&&n.top||0,s=n&&n.bottom||0,c=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;c+a>i?(t&&c+a>i+this.lineHeight&&(i-=t*this.$size.scrollerHeight),0===i&&(i=-this.scrollMargin.top),this.session.setScrollTop(i)):c+this.$size.scrollerHeight-so?(o=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(i):Math.round(i);return{row:a,column:s,side:i-s>0?1:-1,offsetX:o}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,a=this.$blockCursor?Math.floor(i):Math.round(i),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),o)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),i=r.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+i-this.scrollTop}},this.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,r){var o=this.session;o.bgTokenizer.lines[n]=null;var i={type:t,value:e},a=o.getTokens(n);if(null==r)a.push(i);else for(var s=0,c=0;c50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);t.UIWorkerClient=function(e,t,n){var r=null,o=!1,s=Object.create(i),l=[],u=new c({messageBuffer:l,terminate:function(){},postMessage:function(e){l.push(e),r&&(o?setTimeout(d):d())}});u.setEmitSync=function(e){o=e};var d=function(){var e=l.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){u.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(r=new e[n](s);l.length;)d()})),u},t.WorkerClient=c,t.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),a=function(e,t,n,r,o,i){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){i.implement(this,o),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new r(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,i=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(c=this.others[a]).row,column:c.column+i};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var c;s={row:(c=this.others[a]).row,column:c.column+i};this.doc.remove(new r(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var r=e("./range_list").RangeList,o=e("./range").Range,i=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),c=e("./lib/lang"),l=e("./commands/multi_select_commands");t.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=new(0,e("./search").Search);var d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],i=e.column0;)b--;if(b>0)for(var y=0;r[y].isEmpty();)y++;for(var _=b;_>=y;_--)r[_].isEmpty()&&r.splice(_,1)}return r}}.call(i.prototype);var f=e("./editor").Editor;function h(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(l.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}s.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),s.addListener(t,"keyup",r,e),s.addListener(t,"blur",r,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var o=t.indexOf(r);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,o=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,c=this.selection,l=c.rangeList,u=(o?c:l).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=c._eventRegistry;c._eventRegistry={};var f=new i(s);this.inVirtualSelectionMode=!0;for(var h=u.length;h--;){if(a)for(;h>0&&u[h].start.row==u[h-1].end.row;)h--;f.fromOrientedRange(u[h]),f.index=h,this.selection=s.selection=f;var p=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===p||(r=p),f.toOrientedRange(u[h])}f.detach(),this.selection=s.selection=c,this.inVirtualSelectionMode=!1,c._eventRegistry=d,c.mergeOverlappingRanges(),c.ranges[0]&&c.fromOrientedRange(c.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ra&&(a=n.column),ru?e.insert(r,c.stringRepeat(" ",i-u)):e.remove(new o(r.row,r.column,r.row,r.column-i+u)),t.start.column=t.end.column=a,t.start.row=t.end.row=r.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,f=u.end.row,h=d==f;if(h){var p,m=this.session.getLength();do{p=this.session.getLine(f)}while(/[=:]/.test(p)&&++f0);d<0&&(d=0),f>=m&&(f=m-1)}var g=this.session.removeFullLines(d,f);g=this.$reAlignText(g,h),this.session.insert({row:d,column:0},g.join("\n")+"\n"),h||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,o,i=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,o=t[3].length,t):(n+r+o!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(i=!1),n>t[1].length&&(n=t[1].length),rt[3].length&&(o=t[3].length),t):[e]})).map(t?l:i?a?function(e){return e[2]?s(n+r-e[2].length)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:l:function(e){return e[2]?s(n)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return c.stringRepeat(" ",e)}function l(e){return e[2]?s(n)+e[2]+s(r-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(f.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=h,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(e){h(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,i=e.getLine(t),a=i.search(o);if(-1!=a){for(var s=n||i.length,c=e.getLength(),l=t,u=t;++tl){var h=e.getLine(u).length;return new r(l,s,u,h)}}},this.openingBracketBlock=function(e,t,n,o,i){var a={row:n,column:o+1},s=e.$findClosingBracket(t,a,i);if(s){var c=e.foldWidgets[s.row];return null==c&&(c=e.getFoldWidget(s.row)),"start"==c&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,o,i){var a={row:n,column:o},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(o.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./lib/dom");function o(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,o=r.start.row,i=r.end.row,a="add"==e.action,s=o+1;st[n].column&&n++,i.unshift(n,0),t.splice.apply(t,i),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var o=1/0,i=0;i0&&!r[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=o;a<=i;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var c=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(c+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=c-n.offset+"px";var l=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(l-=t.scrollLeft),s.el.style.left=l+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(o.prototype),t.LineWidgets=o})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,o=e("../lib/dom"),i=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,c=n.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];c?c.destroy():s-=t;var l,u=function(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(r.length){var o=function(e,t,n){for(var r=0,o=e.length-1;r<=o;){var i=r+o>>1,a=n(t,e[i]);if(a>0)r=i+1;else{if(!(a<0))return i;o=i-1}}return-(r+1)}(r,{row:t,column:-1},i.comparePoints);o<0&&(o=-o-1),o>=r.length?o=n>0?0:r.length-1:0===o&&n<0&&(o=r.length-1);var a=r[o];if(a&&n){if(a.row===t){do{a=r[o+=n]}while(a&&a.row===t);if(!a)return r.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=r[o+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,l=e.renderer.$gutterLayer.$annotations[a.row]}else{if(c)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var f={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},h=f.el.appendChild(o.createElement("div")),p=f.el.appendChild(o.createElement("div"));p.className="error_widget_arrow "+l.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;p.style.left=m+e.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",h.className="error_widget "+l.className,h.innerHTML=l.text.join("
"),h.appendChild(o.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(f),e.off("changeSelection",f.destroy),e.off("changeSession",f.destroy),e.off("mouseup",f.destroy),e.off("change",f.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",f.destroy),e.on("changeSession",f.destroy),e.on("mouseup",f.destroy),e.on("change",f.destroy),e.session.widgetManager.addLineWidget(f),f.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},o.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),i=e("./lib/event"),a=e("./range").Range,s=e("./editor").Editor,c=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n(307),t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var c=e;a=c.value,e=o.createElement("pre"),c.parentNode.replaceChild(e,c)}else e&&(a=e.textContent,e.innerHTML="");var l=t.createEditSession(a),d=new s(new u(e),l,n),f={document:l,editor:d,onResize:d.resize.bind(d,null)};return c&&(f.textarea=c),i.addListener(window,"resize",f.onResize),d.on("destroy",(function(){i.removeListener(window,"resize",f.onResize),f.editor.container.env=null})),d.container.env=d.env=f,d},t.createEditSession=function(e,t){var n=new c(e,t);return n.setUndoManager(new l),n},t.Range=a,t.Editor=s,t.EditSession=c,t.UndoManager=l,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}).call(this,n(212)(e))},function(e,t,n){"use strict";var r=n(1),o=n(433),i=n(56);t.a=function(e){var t=Object(o.a)(e);return function(e,n){return t(e,Object(r.a)({defaultTheme:i.a},n))}}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(52),o=n(76);function i(e,t){if(t&&("object"===Object(r.a)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(o.a)(e)}},function(e,t,n){"use strict";var r=n(0),o=n.n(r).a.createContext(null);t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n(52);function i(e){return e&&"object"===Object(o.a)(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},o=n.clone?Object(r.a)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e?o[r]=a(e[r],t[r],n):o[r]=t[r])})),o}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(429);function o(e){return Object(r.a)(e)}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r="";function o(e){try{return e&&"function"===typeof e&&e.name||r}catch(t){return r}}},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=n(20);t.a=Object(o.a)(r.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(8),c=i.forwardRef((function(e,t){var n=e.classes,c=e.className,l=e.disabled,u=e.IconComponent,d=e.inputRef,f=e.variant,h=void 0===f?"standard":f,p=Object(o.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return i.createElement(i.Fragment,null,i.createElement("select",Object(r.a)({className:Object(a.a)(n.root,n.select,n[h],c,l&&n.disabled),disabled:l,ref:d||t},p)),e.multiple?null:i.createElement(u,{className:Object(a.a)(n.icon,n["icon".concat(Object(s.a)(h))],l&&n.disabled)}))}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=r.createContext();t.a=o},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(16),s=n(135),c=n(431),l=n(21),u=n(434),d=n(42),f=n(14),h=n(19),p=n(163),m=n(128),g=n(457),v={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},b=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,c=Object(r.a)(e,["invisible","open"]);return s?i.createElement("div",Object(o.a)({"aria-hidden":!0,ref:t},c,{style:Object(o.a)({},v.root,a?v.invisible:{},c.style)})):null}));var y=new m.b,_=i.forwardRef((function(e,t){var n=Object(s.a)(),v=Object(c.a)({name:"MuiModal",props:Object(o.a)({},e),theme:n}),_=v.BackdropComponent,w=void 0===_?b:_,S=v.BackdropProps,k=v.children,x=v.closeAfterTransition,O=void 0!==x&&x,C=v.container,E=v.disableAutoFocus,j=void 0!==E&&E,R=v.disableBackdropClick,T=void 0!==R&&R,A=v.disableEnforceFocus,M=void 0!==A&&A,L=v.disableEscapeKeyDown,$=void 0!==L&&L,N=v.disablePortal,D=void 0!==N&&N,P=v.disableRestoreFocus,I=void 0!==P&&P,F=v.disableScrollLock,z=void 0!==F&&F,W=v.hideBackdrop,B=void 0!==W&&W,H=v.keepMounted,U=void 0!==H&&H,V=v.manager,G=void 0===V?y:V,K=v.onBackdropClick,q=v.onClose,Y=v.onEscapeKeyDown,J=v.onRendered,X=v.open,Q=Object(r.a)(v,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Z=i.useState(!0),ee=Z[0],te=Z[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=Object(f.a)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(v),se=function(){return Object(l.a)(re.current)},ce=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},le=function(){G.mount(ce(),{disableScrollLock:z}),oe.current.scrollTop=0},ue=Object(h.a)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(C)||se().body;G.add(ce(),e),oe.current&&le()})),de=i.useCallback((function(){return G.isTopModal(ce())}),[G]),fe=Object(h.a)((function(e){re.current=e,e&&(J&&J(),X&&de()?le():Object(m.a)(oe.current,!0))})),he=i.useCallback((function(){G.remove(ce())}),[G]);if(i.useEffect((function(){return function(){he()}}),[he]),i.useEffect((function(){X?ue():ae&&O||he()}),[X,he,ae,O,ue]),!U&&!X&&(!ae||ee))return null;var pe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:p.a}),me={};return void 0===k.props.tabIndex&&(me.tabIndex=k.props.tabIndex||"-1"),ae&&(me.onEnter=Object(d.a)((function(){te(!1)}),k.props.onEnter),me.onExited=Object(d.a)((function(){te(!0),O&&he()}),k.props.onExited)),i.createElement(u.a,{ref:fe,container:C,disablePortal:D},i.createElement("div",Object(o.a)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&de()&&(Y&&Y(e),$||(e.stopPropagation(),q&&q(e,"escapeKeyDown")))},role:"presentation"},Q,{style:Object(o.a)({},pe.root,!X&&ee?pe.hidden:{},Q.style)}),B?null:i.createElement(w,Object(o.a)({open:X,onClick:function(e){e.target===e.currentTarget&&(K&&K(e),!T&&q&&q(e,"backdropClick"))}},S)),i.createElement(g.a,{disableEnforceFocus:M,disableAutoFocus:j,disableRestoreFocus:I,getDoc:se,isEnabled:de,open:X},i.cloneElement(k,me))))}));t.a=_},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(2),s=n(5),c=i.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.component,l=void 0===c?"div":c,u=e.square,d=void 0!==u&&u,f=e.elevation,h=void 0===f?1:f,p=e.variant,m=void 0===p?"elevation":p,g=Object(r.a)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(l,Object(o.a)({className:Object(a.a)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(h)],!d&&n.rounded),ref:t},g))}));t.a=Object(s.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(o.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=n(8),l={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=i.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,f=e.color,h=void 0===f?"initial":f,p=e.component,m=e.display,g=void 0===m?"initial":m,v=e.gutterBottom,b=void 0!==v&&v,y=e.noWrap,_=void 0!==y&&y,w=e.paragraph,S=void 0!==w&&w,k=e.variant,x=void 0===k?"body1":k,O=e.variantMapping,C=void 0===O?l:O,E=Object(o.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),j=p||(S?"p":C[x]||l[x])||"span";return i.createElement(j,Object(r.a)({className:Object(a.a)(u.root,d,"inherit"!==x&&u[x],"initial"!==h&&u["color".concat(Object(c.a)(h))],_&&u.noWrap,b&&u.gutterBottom,S&&u.paragraph,"inherit"!==s&&u["align".concat(Object(c.a)(s))],"initial"!==g&&u["display".concat(Object(c.a)(g))]),ref:t},E))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},function(e,t,n){"use strict";var r=n(66),o=n(77),i=n(0),a=n.n(i),s=n(16),c=n.n(s),l=!1,u=n(102),d="unmounted",f="exited",h="entering",p="entered",m="exiting",g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=f,r.appearStatus=h):o=p:o=t.unmountOnExit||t.mountOnEnter?d:f,r.state={status:o},r.nextCallback=null,r}Object(o.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===d?{status:f}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==p&&(t=h):n!==h&&n!==p||(t=m)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===h?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===f&&this.setState({status:d})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[c.a.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||l?this.safeSetState({status:p},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:h},(function(){t.props.onEntering(i,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:p},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:c.a.findDOMNode(this);t&&!l?(this.props.onExit(r),this.safeSetState({status:m},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:f},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:f},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:c.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===d)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(u.a.Provider,{value:null},"function"===typeof n?n(e,o):a.a.cloneElement(a.a.Children.only(n),o))},t}(a.a.Component);function v(){}g.contextType=u.a,g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v,onEntering:v,onEntered:v,onExit:v,onExiting:v,onExited:v},g.UNMOUNTED=d,g.EXITED=f,g.ENTERING=h,g.ENTERED=p,g.EXITING=m;t.a=g},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),l=1;l1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";var r=n(9),o=n(29),i=Object(r.a)({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),a=Object(r.a)({prop:"display"}),s=Object(r.a)({prop:"overflow"}),c=Object(r.a)({prop:"textOverflow"}),l=Object(r.a)({prop:"visibility"}),u=Object(r.a)({prop:"whiteSpace"});t.a=Object(o.a)(i,a,s,c,l,u)},function(e,t,n){"use strict";var r=n(9),o=Object(r.a)({prop:"boxShadow",themeKey:"shadows"});t.a=o},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=n(10),l=n(104),u=n(8),d=i.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,c=e.children,d=e.classes,f=e.className,h=e.color,p=void 0===h?"default":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.size,_=void 0===y?"medium":y,w=Object(o.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(l.a,Object(r.a)({className:Object(a.a)(d.root,f,"default"!==p&&d["color".concat(Object(u.a)(p))],g&&d.disabled,"small"===_&&d["size".concat(Object(u.a)(_))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!b,disabled:g,ref:t},w),i.createElement("span",{className:d.label},c))}));t.a=Object(s.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(c.a)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=n(48),i=(r=n(291))&&r.__esModule?r:{default:r};var a=11/23/100;function s(e){var t={r:0,g:0,b:0};if(7===e.length)t.r=parseInt(e.substr(1,2),16),t.g=parseInt(e.substr(3,2),16),t.b=parseInt(e.substr(5,2),16);else if(4===e.length){var n=e.substr(1,1),r=e.substr(2,1),o=e.substr(3,1);t.r=parseInt(n+n,16),t.g=parseInt(r+r,16),t.b=parseInt(o+o,16)}return t}function c(e,t,n){var r,o=s(e),i=s(t);return o.r+=i.r*(.05+a*(n-1)),o.g+=i.g*(.05+a*(n-1)),o.b+=i.b*(.05+a*(n-1)),r=o,"#"+Math.round(r.r).toString(16)+Math.round(r.g).toString(16)+Math.round(r.b).toString(16)}function l(e,t){for(var n={},r=1;r<=24;r++)n["elevation"+r]={backgroundColor:c(e,t,r)};return n}var u=function(e){var t;return(t="dark"===e?{name:e,palette:{type:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[200],"&:hover":{color:i.default[100]}}},MuiPaper:l("#121212","#fff")}}:"blue"===e?{name:e,palette:{type:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[200],"&:hover":{color:i.default[100]}}},MuiPaper:l("#151d21","#fff")}}:"colored"===e?{name:e,palette:{type:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:"PT"===e?{name:e,palette:{type:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:"DX"===e?{name:e,palette:{type:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:{name:e,palette:{type:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#14bb00"},overrides:{MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}).toolbar={height:48},t.saveToolbar={background:t.palette.primary.main,button:{borderRadius:3,height:32}},(0,o.createTheme)(t)};t.default=u},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),i=s(n(4)),a=s(n(208));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n ".length,c=void 0;n&&o++<5&&!("html"===(c=a(n,t))||o>1&&i+r.length*s+c.length>=80);)r.push(c),i+=c.length,n=n.parentNode;return r.reverse().join(" > ")}catch(l){return""}}function a(e,t){var n,r,i,a,s,c=e,l=[];if(!c||!c.tagName)return"";l.push(c.tagName.toLowerCase());var u=t&&t.length?t.filter((function(e){return c.getAttribute(e)})).map((function(e){return[e,c.getAttribute(e)]})):null;if(u&&u.length)u.forEach((function(e){l.push("["+e[0]+'="'+e[1]+'"]')}));else if(c.id&&l.push("#"+c.id),(n=c.className)&&Object(o.k)(n))for(r=n.split(/\s+/),s=0;s1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,s=t.Component,c=t.defaultTheme,l=void 0===c?g:c,f=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),p=m(e),S=n||i||"makeStyles";p.options={index:h(),name:n,meta:S,classNamePrefix:S};var k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(u.a)()||l,r=Object(o.a)({},a.a.useContext(d.a),f),i=a.a.useRef(),c=a.a.useRef();w((function(){var o={name:n,state:{},stylesCreator:p,stylesOptions:r,theme:t};return b(o,e),c.current=!1,i.current=o,function(){_(o)}}),[t,p]),a.a.useEffect((function(){c.current&&y(i.current,e),c.current=!0}));var h=v(i.current,e.classes,s);return h};return k}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};t.default=r},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(2),s=n(5),c=n(10),l=n(104),u=n(8),d=i.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,d=e.color,f=void 0===d?"default":d,h=e.component,p=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,v=e.disableElevation,b=void 0!==v&&v,y=e.disableFocusRipple,_=void 0!==y&&y,w=e.endIcon,S=e.focusVisibleClassName,k=e.fullWidth,x=void 0!==k&&k,O=e.size,C=void 0===O?"medium":O,E=e.startIcon,j=e.type,R=void 0===j?"button":j,T=e.variant,A=void 0===T?"text":T,M=Object(r.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),L=E&&i.createElement("span",{className:Object(a.a)(s.startIcon,s["iconSize".concat(Object(u.a)(C))])},E),$=w&&i.createElement("span",{className:Object(a.a)(s.endIcon,s["iconSize".concat(Object(u.a)(C))])},w);return i.createElement(l.a,Object(o.a)({className:Object(a.a)(s.root,s[A],c,"inherit"===f?s.colorInherit:"default"!==f&&s["".concat(A).concat(Object(u.a)(f))],"medium"!==C&&[s["".concat(A,"Size").concat(Object(u.a)(C))],s["size".concat(Object(u.a)(C))]],b&&s.disableElevation,g&&s.disabled,x&&s.fullWidth),component:p,disabled:g,focusRipple:!_,focusVisibleClassName:Object(a.a)(s.focusVisible,S),ref:t,type:R},M),i.createElement("span",{className:s.label},L,n,$))}));t.a=Object(s.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(c.a)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(c.a)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(c.a)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(12),a=n(0),s=n(2),c=n(5),l=n(8),u=n(171),d=n(435),f=n(338),h=n(22),p=n(172),m={enter:h.b.enteringScreen,exit:h.b.leavingScreen},g=a.forwardRef((function(e,t){var n=e.BackdropProps,i=e.children,c=e.classes,h=e.className,g=e.disableBackdropClick,v=void 0!==g&&g,b=e.disableEscapeKeyDown,y=void 0!==b&&b,_=e.fullScreen,w=void 0!==_&&_,S=e.fullWidth,k=void 0!==S&&S,x=e.maxWidth,O=void 0===x?"sm":x,C=e.onBackdropClick,E=e.onClose,j=e.onEnter,R=e.onEntered,T=e.onEntering,A=e.onEscapeKeyDown,M=e.onExit,L=e.onExited,$=e.onExiting,N=e.open,D=e.PaperComponent,P=void 0===D?p.a:D,I=e.PaperProps,F=void 0===I?{}:I,z=e.scroll,W=void 0===z?"paper":z,B=e.TransitionComponent,H=void 0===B?f.a:B,U=e.transitionDuration,V=void 0===U?m:U,G=e.TransitionProps,K=e["aria-describedby"],q=e["aria-labelledby"],Y=Object(o.a)(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),J=a.useRef();return a.createElement(u.a,Object(r.a)({className:Object(s.a)(c.root,h),BackdropComponent:d.a,BackdropProps:Object(r.a)({transitionDuration:V},n),closeAfterTransition:!0},v?{disableBackdropClick:v}:{},{disableEscapeKeyDown:y,onEscapeKeyDown:A,onClose:E,open:N,ref:t},Y),a.createElement(H,Object(r.a)({appear:!0,in:N,timeout:V,onEnter:j,onEntering:T,onEntered:R,onExit:M,onExiting:$,onExited:L,role:"none presentation"},G),a.createElement("div",{className:Object(s.a)(c.container,c["scroll".concat(Object(l.a)(W))]),onMouseUp:function(e){e.target===e.currentTarget&&e.target===J.current&&(J.current=null,C&&C(e),!v&&E&&E(e,"backdropClick"))},onMouseDown:function(e){J.current=e.target}},a.createElement(P,Object(r.a)({elevation:24,role:"dialog","aria-describedby":K,"aria-labelledby":q},F,{className:Object(s.a)(c.paper,c["paperScroll".concat(Object(l.a)(W))],c["paperWidth".concat(Object(l.a)(String(O)))],F.className,w&&c.paperFullScreen,k&&c.paperFullWidth)}),i))))}));t.a=Object(c.a)((function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}}),{name:"MuiDialog"})(g)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=i.forwardRef((function(e,t){var n=e.disableSpacing,s=void 0!==n&&n,c=e.classes,l=e.className,u=Object(o.a)(e,["disableSpacing","classes","className"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(c.root,l,!s&&c.spacing),ref:t},u))}));t.a=Object(s.a)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=i.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.dividers,l=void 0!==c&&c,u=Object(o.a)(e,["classes","className","dividers"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(n.root,s,l&&n.dividers),ref:t},u))}));t.a=Object(s.a)((function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}}),{name:"MuiDialogContent"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(0),i=n(5),a=n(173),s=o.forwardRef((function(e,t){return o.createElement(a.a,Object(r.a)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));t.a=Object(i.a)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(s)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=n(173),l=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.disableTypography,d=void 0!==u&&u,f=Object(o.a)(e,["children","classes","className","disableTypography"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(s.root,l),ref:t},f),d?n:i.createElement(c.a,{component:"h2",variant:"h6"},n))}));t.a=Object(s.a)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(l)},function(e,t,n){"use strict";var r=n(3),o=n(12),i=n(1),a=n(0),s=n(2),c=n(5),l=n(22),u=n(337),d=n(19),f=n(8),h=n(42),p=n(224),m=n(436),g=a.forwardRef((function(e,t){var n=e.action,o=e.anchorOrigin,c=(o=void 0===o?{vertical:"bottom",horizontal:"center"}:o).vertical,g=o.horizontal,v=e.autoHideDuration,b=void 0===v?null:v,y=e.children,_=e.classes,w=e.className,S=e.ClickAwayListenerProps,k=e.ContentProps,x=e.disableWindowBlurListener,O=void 0!==x&&x,C=e.message,E=e.onClose,j=e.onEnter,R=e.onEntered,T=e.onEntering,A=e.onExit,M=e.onExited,L=e.onExiting,$=e.onMouseEnter,N=e.onMouseLeave,D=e.open,P=e.resumeHideDuration,I=e.TransitionComponent,F=void 0===I?p.a:I,z=e.transitionDuration,W=void 0===z?{enter:l.b.enteringScreen,exit:l.b.leavingScreen}:z,B=e.TransitionProps,H=Object(r.a)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),U=a.useRef(),V=a.useState(!0),G=V[0],K=V[1],q=Object(d.a)((function(){E&&E.apply(void 0,arguments)})),Y=Object(d.a)((function(e){E&&null!=e&&(clearTimeout(U.current),U.current=setTimeout((function(){q(null,"timeout")}),e))}));a.useEffect((function(){return D&&Y(b),function(){clearTimeout(U.current)}}),[D,b,Y]);var J=function(){clearTimeout(U.current)},X=a.useCallback((function(){null!=b&&Y(null!=P?P:.5*b)}),[b,P,Y]);return a.useEffect((function(){if(!O&&D)return window.addEventListener("focus",X),window.addEventListener("blur",J),function(){window.removeEventListener("focus",X),window.removeEventListener("blur",J)}}),[O,X,D]),!D&&G?null:a.createElement(u.a,Object(i.a)({onClickAway:function(e){E&&E(e,"clickaway")}},S),a.createElement("div",Object(i.a)({className:Object(s.a)(_.root,_["anchorOrigin".concat(Object(f.a)(c)).concat(Object(f.a)(g))],w),onMouseEnter:function(e){$&&$(e),J()},onMouseLeave:function(e){N&&N(e),X()},ref:t},H),a.createElement(F,Object(i.a)({appear:!0,in:D,onEnter:Object(h.a)((function(){K(!1)}),j),onEntered:R,onEntering:T,onExit:A,onExited:Object(h.a)((function(){K(!0)}),M),onExiting:L,timeout:W,direction:"top"===c?"down":"up"},B),y||a.createElement(m.a,Object(i.a)({message:C,action:n},k)))))}));t.a=Object(c.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},a={justifyContent:"flex-start"},s={top:24},c={bottom:24},l={right:24},u={left:24},d={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Object(i.a)({},t,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({},s,d))),anchorOriginBottomCenter:Object(i.a)({},n,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({},c,d))),anchorOriginTopRight:Object(i.a)({},t,r,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({left:"auto"},s,l))),anchorOriginBottomRight:Object(i.a)({},n,r,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({left:"auto"},c,l))),anchorOriginTopLeft:Object(i.a)({},t,a,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({right:"auto"},s,u))),anchorOriginBottomLeft:Object(i.a)({},n,a,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({right:"auto"},c,u)))}}),{flip:!1,name:"MuiSnackbar"})(g)},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.default=a},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(2),s=n(5),c=n(104),l=n(8),u=i.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,d=e.color,f=void 0===d?"default":d,h=e.component,p=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.focusVisibleClassName,_=e.size,w=void 0===_?"large":_,S=e.variant,k=void 0===S?"circular":S,x=Object(r.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return i.createElement(c.a,Object(o.a)({className:Object(a.a)(s.root,u,"large"!==w&&s["size".concat(Object(l.a)(w))],g&&s.disabled,"extended"===k&&s.extended,{primary:s.primary,secondary:s.secondary,inherit:s.colorInherit}[f]),component:p,disabled:g,focusRipple:!b,focusVisibleClassName:Object(a.a)(s.focusVisible,y),ref:t},x),i.createElement("span",{className:s.label},n))}));t.a=Object(s.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(u)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(12),a=n(0),s=n(2),c=n(5),l=a.forwardRef((function(e,t){var n=e.classes,i=e.className,c=e.component,l=void 0===c?"div":c,u=e.disableGutters,d=void 0!==u&&u,f=e.variant,h=void 0===f?"regular":f,p=Object(o.a)(e,["classes","className","component","disableGutters","variant"]);return a.createElement(l,Object(r.a)({className:Object(s.a)(n.root,n[h],i,!d&&n.gutters),ref:t},p))}));t.a=Object(c.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(i.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(l)},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getSelectIdIcon=function(e,t){t=t||".";var n="",r=null===e||void 0===e?void 0:e.common;if(r){var o=r.icon;if(o)if(o.startsWith("data:image/"))n=o;else{if(!o.includes("."))return null;var i;"instance"===e.type||"adapter"===e.type?n=t+"/adapter/"+r.name+"/"+o:e._id&&e._id.startsWith("system.adapter.")?(i=e._id.split(".",3),"/"===o[0]?i[2]+=o:i[2]+="/"+o,n=t+"/adapter/"+i[2]):(i=e._id.split(".",2),"/"===o[0]?i[0]+=o:i[0]+="/"+o,n=t+"/adapter/"+i[0])}}return n||null},t.getSystemIcon=function(e){var t,n=null===e||void 0===e?void 0:e._id;if(!n)return null;n.startsWith("_design/")||"system"===n?t=o.default.createElement(s.default,{className:"iconOwn"}):"0_userdata"===n||"0_userdata.0"===n?t=o.default.createElement(c.default,{className:"iconOwn"}):"alias"===n||"alias.0"===n?t=o.default.createElement(m.default,{className:"iconOwn"}):"system.adapter"===n?t=o.default.createElement(s.default,{className:"iconOwn"}):"system.group"===n?t=o.default.createElement(l.default,{className:"iconOwn"}):"system.user"===n?t=o.default.createElement(u.default,{className:"iconOwn"}):"system.host"===n?t=o.default.createElement(d.default,{className:"iconOwn"}):n.endsWith(".connection")||n.endsWith(".connected")?t=o.default.createElement(f.default,{className:"iconOwn"}):n.endsWith(".info")?t=o.default.createElement(h.default,{className:"iconOwn"}):"meta"===(null===e||void 0===e?void 0:e.type)&&(t=o.default.createElement(p.default,{className:"iconOwn"}));return t||null};var o=v(n(0)),i=v(n(4)),a=v(n(427)),s=v(n(395)),c=v(n(396)),l=v(n(397)),u=v(n(398)),d=v(n(399)),f=v(n(400)),h=v(n(401)),p=v(n(402)),m=v(n(403)),g=v(n(61));function v(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;){var a=o(t),s=a.cell,c=a.lineIsOver;i.push(s),c&&(n.push(i),i=[])}return n}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){(function(e,n){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",c="[object Date]",l="[object Error]",u="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",S=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[i]=x[a]=x[_]=x[s]=x[w]=x[c]=x[l]=x[u]=x[d]=x[f]=x[h]=x[m]=x[g]=x[v]=x[y]=!1;var O="object"==typeof e&&e&&e.Object===Object&&e,C="object"==typeof self&&self&&self.Object===Object&&self,E=O||C||Function("return this")(),j=t&&!t.nodeType&&t,R=j&&"object"==typeof n&&n&&!n.nodeType&&n,T=R&&R.exports===j,A=T&&O.process,M=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),L=M&&M.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++ns))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var u=-1,d=!0,f=2&n?new ye:void 0;for(i.set(e,t),i.set(t,e);++u-1},ve.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||ve),string:new ge}},be.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return Te(this,e).get(e)},be.prototype.has=function(e){return Te(this,e).has(e)},be.prototype.set=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,r),this},ye.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new ve,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new be(r)}return n.set(e,t),this.size=n.size,this};var Me=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}function Be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var Ue=L?function(e){return function(t){return e(t)}}(L):function(e){return He(e)&&We(e.length)&&!!x[ke(e)]};function Ve(e){return null!=(t=e)&&We(t.length)&&!ze(t)?we(e):Ee(e);var t}n.exports=function(e,t){return Oe(e,t)}}).call(this,n(69),n(212)(e))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0;t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var t;return"undefined"===typeof window?(e.window={},t=n(154),delete e.window):window.ace?(t=window.ace).acequire=window.ace.require||window.ace.acequire:t=n(154),t};t.debounce=function(e,t){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,o)}),t)}}}).call(this,n(69))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&e.handleMarkers(w,t);for(r=0;r0?e.breadcrumbs:void 0,e.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors(Object(a.f)(m(),this._eventProcessors),e,t)},e.prototype.setSDKProcessingMetadata=function(e){return this._sdkProcessingMetadata=Object(a.a)(Object(a.a)({},this._sdkProcessingMetadata),e),this},e.prototype._notifyEventProcessors=function(e,t,n,r){var o=this;return void 0===r&&(r=0),new f((function(i,s){var l=e[r];if(null===t||"function"!==typeof l)i(t);else{var u=l(Object(a.a)({},t),n);Object(c.m)(u)?u.then((function(t){return o._notifyEventProcessors(e,t,n,r+1).then(i)})).then(null,s):o._notifyEventProcessors(e,u,n,r+1).then(i).then(null,s)}}))},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e}();function m(){var e=Object(h.a)();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function g(e){m().push(e)}var v=n(454),b=n(132),y=n(131),_=n(51),w=function(){function e(e){this.errors=0,this.sid=Object(v.g)(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var t=Object(l.b)();this.timestamp=t,this.started=t,e&&this.update(e)}return e.prototype.update=function(e){if(void 0===e&&(e={}),e.user&&(!this.ipAddress&&e.user.ip_address&&(this.ipAddress=e.user.ip_address),this.did||e.did||(this.did=e.user.id||e.user.email||e.user.username)),this.timestamp=e.timestamp||Object(l.b)(),e.ignoreDuration&&(this.ignoreDuration=e.ignoreDuration),e.sid&&(this.sid=32===e.sid.length?e.sid:Object(v.g)()),void 0!==e.init&&(this.init=e.init),!this.did&&e.did&&(this.did=""+e.did),"number"===typeof e.started&&(this.started=e.started),this.ignoreDuration)this.duration=void 0;else if("number"===typeof e.duration)this.duration=e.duration;else{var t=this.timestamp-this.started;this.duration=t>=0?t:0}e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),!this.ipAddress&&e.ipAddress&&(this.ipAddress=e.ipAddress),!this.userAgent&&e.userAgent&&(this.userAgent=e.userAgent),"number"===typeof e.errors&&(this.errors=e.errors),e.status&&(this.status=e.status)},e.prototype.close=function(e){e?this.update({status:e}):"ok"===this.status?this.update({status:"exited"}):this.update()},e.prototype.toJSON=function(){return Object(_.b)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"===typeof this.did||"string"===typeof this.did?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},e}(),S=function(){function e(e,t,n){void 0===t&&(t=new p),void 0===n&&(n=4),this._version=n,this._stack=[{}],this.getStackTop().scope=t,e&&this.bindClient(e)}return e.prototype.isOlderThan=function(e){return this._version1&&(d=h.slice(0,-1).join("/"),f=h.pop()),f){var p=f.match(/^\d+/);p&&(f=p[0])}return Y({host:c,pass:s,path:d,projectId:f,port:u,protocol:r,publicKey:o})}(e):Y(e);return function(e){if(Object(U.b)()){var t=e.port,n=e.projectId,r=e.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(t){if(!e[t])throw new G("Invalid Sentry Dsn: "+t+" missing")})),!n.match(/^\d+$/))throw new G("Invalid Sentry Dsn: Invalid projectId "+n);if(!function(e){return"http"===e||"https"===e}(r))throw new G("Invalid Sentry Dsn: Invalid protocol "+r);if(t&&isNaN(parseInt(t,10)))throw new G("Invalid Sentry Dsn: Invalid port "+t)}}(t),t}var X=n(82),Q=[];function Z(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function ee(e){var t={};return function(e){var t=e.defaultIntegrations&&Object(a.f)(e.defaultIntegrations)||[],n=e.integrations,r=Object(a.f)(Z(t));Array.isArray(n)?r=Object(a.f)(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))})),Z(n)):"function"===typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o=r.map((function(e){return e.name})),i="Debug";return-1!==o.indexOf(i)&&r.push.apply(r,Object(a.f)(r.splice(o.indexOf(i),1))),r}(e).forEach((function(e){t[e.name]=e,function(e){-1===Q.indexOf(e.name)&&(e.setupOnce(g,O),Q.push(e.name),b.b.log("Integration installed: "+e.name))}(e)})),Object(_.a)(t,"initialized",!0),t}var te="Not capturing exception because it's already been captured.",ne=function(){function e(e,t){this._integrations={},this._numProcessing=0,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=J(t.dsn))}return e.prototype.captureException=function(e,t,n){var r=this;if(!Object(v.c)(e)){var o=t&&t.event_id;return this._process(this._getBackend().eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}b.b.log(te)},e.prototype.captureMessage=function(e,t,n,r){var o=this,i=n&&n.event_id,a=Object(c.i)(e)?this._getBackend().eventFromMessage(String(e),t,n):this._getBackend().eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i},e.prototype.captureEvent=function(e,t,n){if(!(t&&t.originalException&&Object(v.c)(t.originalException))){var r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){r=e}))),r}b.b.log(te)},e.prototype.captureSession=function(e){this._isEnabled()?"string"!==typeof e.release?Object(U.b)()&&b.b.warn("Discarded session because of missing or non-string release"):(this._sendSession(e),e.update({init:!1})):Object(U.b)()&&b.b.warn("SDK not enabled, will not capture session.")},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.getTransport=function(){return this._getBackend().getTransport()},e.prototype.flush=function(e){var t=this;return this._isClientDoneProcessing(e).then((function(n){return t.getTransport().close(e).then((function(e){return n&&e}))}))},e.prototype.close=function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))},e.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=ee(this._options))},e.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){return b.b.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._updateSessionFromEvent=function(e,t){var n,r,o=!1,i=!1,s=t.exception&&t.exception.values;if(s){i=!0;try{for(var c=Object(a.g)(s),l=c.next();!l.done;l=c.next()){var u=l.value.mechanism;if(u&&!1===u.handled){o=!0;break}}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}var d="ok"===e.status;(d&&0===e.errors||d&&o)&&(e.update(Object(a.a)(Object(a.a)({},o&&{status:"crashed"}),{errors:e.errors||Number(i||o)})),this.captureSession(e))},e.prototype._sendSession=function(e){this._getBackend().sendSession(e)},e.prototype._isClientDoneProcessing=function(e){var t=this;return new f((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},e.prototype._prepareEvent=function(e,t,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,s=Object(a.a)(Object(a.a)({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:Object(v.g)()),timestamp:e.timestamp||Object(l.a)()});this._applyClientOptions(s),this._applyIntegrationsMetadata(s);var c=t;n&&n.captureContext&&(c=p.clone(c).update(n.captureContext));var d=u(s);return c&&(d=c.applyToEvent(s,n)),d.then((function(e){return"number"===typeof i&&i>0?r._normalizeEvent(e,i):e}))},e.prototype._normalizeEvent=function(e,t){if(!e)return null;var n=Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return Object(a.a)(Object(a.a)({},e),e.data&&{data:Object(_.g)(e.data,t)})}))}),e.user&&{user:Object(_.g)(e.user,t)}),e.contexts&&{contexts:Object(_.g)(e.contexts,t)}),e.extra&&{extra:Object(_.g)(e.extra,t)});return e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace),e.sdkProcessingMetadata=Object(a.a)(Object(a.a)({},e.sdkProcessingMetadata),{baseClientNormalized:!0}),n},e.prototype._applyClientOptions=function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Object(X.d)(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(X.d)(s.value,a));var c=e.request;c&&c.url&&(c.url=Object(X.d)(c.url,a))},e.prototype._applyIntegrationsMetadata=function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=Object(a.f)(e.sdk.integrations||[],t))},e.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},e.prototype._captureEvent=function(e,t,n){return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){b.b.error(e)}))},e.prototype._processEvent=function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate,s=this.getTransport();function l(e,t){s.recordLostEvent&&s.recordLostEvent(e,t)}if(!this._isEnabled())return d(new G("SDK not enabled, will not capture event."));var u="transaction"===e.type;return!u&&"number"===typeof a&&Math.random()>a?(l("sample_rate","event"),d(new G("Discarding event because it's not included in the random sample (sampling rate = "+a+")"))):this._prepareEvent(e,n,t).then((function(n){if(null===n)throw l("event_processor",e.type||"event"),new G("An event processor returned null, will not send event.");return t&&t.data&&!0===t.data.__sentry__||u||!i?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Object(c.m)(e))return e.then((function(e){if(!Object(c.h)(e)&&null!==e)throw new G(t);return e}),(function(e){throw new G("beforeSend rejected with "+e)}));if(!Object(c.h)(e)&&null!==e)throw new G(t);return e}(i(n,t))})).then((function(t){if(null===t)throw l("before_send",e.type||"event"),new G("`beforeSend` returned `null`, will not send event.");var o=n&&n.getSession&&n.getSession();return!u&&o&&r._updateSessionFromEvent(o,t),r._sendEvent(t),t})).then(null,(function(e){if(e instanceof G)throw e;throw r.captureException(e,{data:{__sentry__:!0},originalException:e}),new G("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)}))},e.prototype._process=function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))},e}();var re=function(){function e(){}return e.prototype.sendEvent=function(e){return u({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})},e.prototype.close=function(e){return u(!0)},e}(),oe=function(){function e(e){this._options=e,this._options.dsn||b.b.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype.eventFromException=function(e,t){throw new G("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(e,t,n){throw new G("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,(function(e){Object(U.b)()&&b.b.error("Error while sending event: "+e)}))},e.prototype.sendSession=function(e){this._transport.sendSession?this._transport.sendSession(e).then(null,(function(e){Object(U.b)()&&b.b.error("Error while sending session: "+e)})):Object(U.b)()&&b.b.warn("Dropping session because custom transport doesn't implement sendSession")},e.prototype.getTransport=function(){return this._transport},e.prototype._setupTransport=function(){return new re},e}(),ie=n(222),ae="?",se=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ce=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,le=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ue=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,de=/\((\S*)(?::(\d+))(?::(\d+))\)/,fe=/Minified React error #\d+;/i;function he(e){var t=null,n=0;e&&("number"===typeof e.framesToPop?n=e.framesToPop:fe.test(e.message)&&(n=1));try{if(t=function(e){if(!e||!e.stacktrace)return null;for(var t,n=e.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,i=n.split("\n"),a=[],s=0;s eval")>-1&&(o=ue.exec(i[3]))&&(i[1]=i[1]||"eval",i[3]=o[1],i[4]=o[2],i[5]="");var m=i[3];p=i[1]||ae;p=(r=Object(a.e)(pe(p,m),2))[0],s={url:m=r[1],func:p,line:i[4]?+i[4]:null,column:i[5]?+i[5]:null}}c.push(s)}}catch(g){t={error:g}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}if(!c.length)return null;return{message:ge(e),name:e.name,stack:c}}(e),t)return me(t,n)}catch(r){}return{message:ge(e),name:e&&e.name,stack:[],failed:!0}}var pe=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:ae,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]};function me(e,t){try{return Object(a.a)(Object(a.a)({},e),{stack:e.stack.slice(t)})}catch(n){return e}}function ge(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function ve(e){var t=ye(e.stack),n={type:e.name,value:e.message};return t&&t.length&&(n.stacktrace={frames:t}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function be(e){return{exception:{values:[ve(e)]}}}function ye(e){if(!e||!e.length)return[];var t=e,n=t[0].func||"",r=t[t.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return{colno:null===e.column?void 0:e.column,filename:e.url||t[0].url,function:e.func||"?",in_app:!0,lineno:null===e.line?void 0:e.line}})).reverse()}function _e(e,t,n){var r=Se(t,n&&n.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return Object(v.a)(r),r.level=s.a.Error,n&&n.event_id&&(r.event_id=n.event_id),u(r)}function we(e,t,n,r){void 0===n&&(n=s.a.Info);var o=ke(t,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),u(o)}function Se(e,t,n){var r;if(void 0===n&&(n={}),Object(c.e)(e)&&e.error)return r=be(he(e=e.error));if(Object(c.a)(e)||Object(c.b)(e)){var o=e;if("stack"in e)r=be(he(e));else{var i=o.name||(Object(c.a)(o)?"DOMError":"DOMException"),s=o.message?i+": "+o.message:i;r=ke(s,t,n),Object(v.b)(r,s)}return"code"in o&&(r.tags=Object(a.a)(Object(a.a)({},r.tags),{"DOMException.code":""+o.code})),r}return Object(c.d)(e)?r=be(he(e)):Object(c.h)(e)||Object(c.f)(e)?(r=function(e,t,n){var r={exception:{values:[{type:Object(c.f)(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(_.c)(e)}]},extra:{__serialized__:Object(_.h)(e)}};if(t){var o=ye(he(t).stack);r.stacktrace={frames:o}}return r}(e,t,n.isRejection),Object(v.a)(r,{synthetic:!0}),r):(r=ke(e,t,n),Object(v.b)(r,""+e,void 0),Object(v.a)(r,{synthetic:!0}),r)}function ke(e,t,n){void 0===n&&(n={});var r={message:e};if(n.attachStacktrace&&t){var o=ye(he(t).stack);r.stacktrace={frames:o}}return r}!function(){function e(e,t,n){void 0===t&&(t={}),this.dsn=e,this._dsnObject=J(e),this.metadata=t,this._tunnel=n}e.prototype.getDsn=function(){return this._dsnObject},e.prototype.forceEnvelope=function(){return!!this._tunnel},e.prototype.getBaseApiEndpoint=function(){return xe(this._dsnObject)},e.prototype.getStoreEndpoint=function(){return Ee(this._dsnObject)},e.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return je(this._dsnObject)},e.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return Re(this._dsnObject,this._tunnel)}}();function xe(e){var t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"}function Oe(e,t){return""+xe(e)+e.projectId+"/"+t+"/"}function Ce(e){return Object(_.i)({sentry_key:e.publicKey,sentry_version:"7"})}function Ee(e){return Oe(e,"store")}function je(e){return Ee(e)+"?"+Ce(e)}function Re(e,t){return t||function(e){return Oe(e,"envelope")}(e)+"?"+Ce(e)}function Te(e){if(e.metadata&&e.metadata.sdk){var t=e.metadata.sdk;return{name:t.name,version:t.version}}}function Ae(e,t){var n,r=Te(t),o=e.type||"event",i="transaction"===o||!!t.tunnel,s=(e.sdkProcessingMetadata||{}).transactionSampling||{},c=s.method,l=s.rate;!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=Object(a.f)(e.sdk.integrations||[],t.integrations||[]),e.sdk.packages=Object(a.f)(e.sdk.packages||[],t.packages||[]))}(e,t.metadata.sdk),e.tags=e.tags||{},e.extra=e.extra||{},e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baseClientNormalized||(e.tags.skippedNormalization=!0),delete e.sdkProcessingMetadata;try{n=JSON.stringify(e)}catch(h){e.tags.JSONStringifyError=!0,e.extra.JSONStringifyError=h;try{n=JSON.stringify(Object(_.g)(e))}catch(p){var u=p;n=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:u.message,stack:u.stack}})}}var d={body:n,type:o,url:i?Re(t.dsn,t.tunnel):je(t.dsn)};if(i){var f=JSON.stringify(Object(a.a)(Object(a.a)({event_id:e.event_id,sent_at:(new Date).toISOString()},r&&{sdk:r}),!!t.tunnel&&{dsn:q(t.dsn)}))+"\n"+JSON.stringify({type:o,sample_rates:[{id:c,rate:l}]})+"\n"+d.body;d.body=f}return d}function Me(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length0&&n(!1)}),e);t.forEach((function(e){u(e).then((function(){--o||(clearTimeout(i),n(!0))}),r)}))}))}}}var Le,$e=Object(h.a)();function Ne(){if(Le)return Le;if(Object(ie.a)($e.fetch))return Le=$e.fetch.bind($e);var e=$e.document,t=$e.fetch;if(e&&"function"===typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(o){Object(U.b)()&&b.b.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",o)}return Le=t.bind($e)}function De(e,t){if("[object Navigator]"===Object.prototype.toString.call($e&&$e.navigator)&&"function"===typeof $e.navigator.sendBeacon)return $e.navigator.sendBeacon.bind($e.navigator)(e,t);if(Object(ie.b)()){var n=Ne();n(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){console.error(e)}))}else;}function Pe(e){return"event"===e?"error":e}var Ie=Object(h.a)(),Fe=function(){function e(e){var t,n,r,o=this;this.options=e,this._buffer=Me(30),this._rateLimits={},this._outcomes={},this._api=(t=e.dsn,n=e._metadata,r=e.tunnel,{initDsn:t,metadata:n||{},dsn:J(t),tunnel:r}),this.url=je(this._api.dsn),this.options.sendClientReports&&Ie.document&&Ie.document.addEventListener("visibilitychange",(function(){"hidden"===Ie.document.visibilityState&&o._flushOutcomes()}))}return e.prototype.sendEvent=function(e){return this._sendRequest(Ae(e,this._api),e)},e.prototype.sendSession=function(e){return this._sendRequest(function(e,t){var n=Te(t),r="aggregates"in e?"sessions":"session";return{body:JSON.stringify(Object(a.a)(Object(a.a)({sent_at:(new Date).toISOString()},n&&{sdk:n}),!!t.tunnel&&{dsn:q(t.dsn)}))+"\n"+JSON.stringify({type:r})+"\n"+JSON.stringify(e),type:r,url:Re(t.dsn,t.tunnel)}}(e,this._api),e)},e.prototype.close=function(e){return this._buffer.drain(e)},e.prototype.recordLostEvent=function(e,t){var n;if(this.options.sendClientReports){var r=Pe(t)+":"+e;b.b.log("Adding outcome: "+r),this._outcomes[r]=(null!==(n=this._outcomes[r])&&void 0!==n?n:0)+1}},e.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var e=this._outcomes;if(this._outcomes={},Object.keys(e).length){b.b.log("Flushing outcomes:\n"+JSON.stringify(e,null,2));var t=Re(this._api.dsn,this._api.tunnel),n=JSON.stringify(Object(a.a)({},this._api.tunnel&&{dsn:q(this._api.dsn)}))+"\n"+JSON.stringify({type:"client_report"})+"\n"+JSON.stringify({timestamp:Object(l.a)(),discarded_events:Object.keys(e).map((function(t){var n=Object(a.e)(t.split(":"),2),r=n[0];return{reason:n[1],category:r,quantity:e[t]}}))});try{De(t,n)}catch(r){b.b.error(r)}}else b.b.log("No outcomes to flush")}},e.prototype._handleResponse=function(e){var t,n=e.requestType,r=e.response,o=e.headers,i=e.resolve,a=e.reject,s=(t=r.status)>=200&&t<300?"success":429===t?"rate_limit":t>=400&&t<500?"invalid":t>=500?"failed":"unknown";this._handleRateLimit(o)&&Object(U.b)()&&b.b.warn("Too many "+n+" requests, backing off until: "+this._disabledUntil(n)),"success"!==s?a(r):i({status:s})},e.prototype._disabledUntil=function(e){var t=Pe(e);return this._rateLimits[t]||this._rateLimits.all},e.prototype._isRateLimited=function(e){return this._disabledUntil(e)>new Date(Date.now())},e.prototype._handleRateLimit=function(e){var t,n,r,o,i=Date.now(),s=e["x-sentry-rate-limits"],c=e["retry-after"];if(s){try{for(var l=Object(a.g)(s.trim().split(",")),u=l.next();!u.done;u=l.next()){var d=u.value.split(":",2),f=parseInt(d[0],10),h=1e3*(isNaN(f)?60:f);try{for(var p=(r=void 0,Object(a.g)(d[1].split(";"))),m=p.next();!m.done;m=p.next()){var g=m.value;this._rateLimits[g||"all"]=new Date(i+h)}}catch(b){r={error:b}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(y){t={error:y}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return!0}return!!c&&(this._rateLimits.all=new Date(i+Object(v.e)(i,c)),!0)},e}(),ze=function(e){function t(t,n){void 0===n&&(n=Ne());var r=e.call(this,t)||this;return r._fetch=n,r}return Object(a.c)(t,e),t.prototype._sendRequest=function(e,t){var n=this;if(this._isRateLimited(e.type))return this.recordLostEvent("ratelimit_backoff",e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429});var r={body:e.body,method:"POST",referrerPolicy:Object(ie.e)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new f((function(t,o){n._fetch(e.url,r).then((function(r){var i={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};n._handleResponse({requestType:e.type,response:r,headers:i,resolve:t,reject:o})})).catch(o)}))})).then(void 0,(function(t){throw t instanceof G?n.recordLostEvent("queue_overflow",e.type):n.recordLostEvent("network_error",e.type),t}))},t}(Fe),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t.prototype._sendRequest=function(e,t){var n=this;return this._isRateLimited(e.type)?(this.recordLostEvent("ratelimit_backoff",e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new f((function(t,r){var o=new XMLHttpRequest;for(var i in o.onreadystatechange=function(){if(4===o.readyState){var i={"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")};n._handleResponse({requestType:e.type,response:o,headers:i,resolve:t,reject:r})}},o.open("POST",e.url),n.options.headers)Object.prototype.hasOwnProperty.call(n.options.headers,i)&&o.setRequestHeader(i,n.options.headers[i]);o.send(e.body)}))})).then(void 0,(function(t){throw t instanceof G?n.recordLostEvent("queue_overflow",e.type):n.recordLostEvent("network_error",e.type),t}))},t}(Fe),Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t.prototype.eventFromException=function(e,t){return _e(this._options,e,t)},t.prototype.eventFromMessage=function(e,t,n){return void 0===t&&(t=s.a.Info),we(this._options,e,t,n)},t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var t=Object(a.a)(Object(a.a)({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(t):Object(ie.b)()?new ze(t):new We(t)},t}(oe),He=Object(h.a)(),Ue=0;function Ve(){return Ue>0}function Ge(){Ue+=1,setTimeout((function(){Ue-=1}))}function Ke(e,t,n){if(void 0===t&&(t={}),"function"!==typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(Object(_.e)(e))return e}catch(s){return e}var o=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var o=r.map((function(e){return Ke(e,t)}));return e.apply(this,o)}catch(i){throw Ge(),W((function(e){e.addEventProcessor((function(e){return t.mechanism&&(Object(v.b)(e,void 0,void 0),Object(v.a)(e,t.mechanism)),e.extra=Object(a.a)(Object(a.a)({},e.extra),{arguments:r}),e})),T(i)})),i}};try{for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=e[i])}catch(c){}Object(_.f)(o,e),Object(_.a)(e,"__sentry_wrapped__",o);try{Object.getOwnPropertyDescriptor(o,"name").configurable&&Object.defineProperty(o,"name",{get:function(){return e.name}})}catch(c){}return o}function qe(e){if(void 0===e&&(e={}),He.document)if(e.eventId)if(e.dsn){var t=He.document.createElement("script");t.async=!0,t.src=function(e,t){var n=J(e),r=xe(n)+"embed/error-page/",o="dsn="+q(n);for(var i in t)if("dsn"!==i)if("user"===i){if(!t.user)continue;t.user.name&&(o+="&name="+encodeURIComponent(t.user.name)),t.user.email&&(o+="&email="+encodeURIComponent(t.user.email))}else o+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);return r+"?"+o}(e.dsn,e),e.onLoad&&(t.onload=e.onLoad);var n=He.document.head||He.document.body;n&&n.appendChild(t)}else Object(U.b)()&&b.b.error("Missing dsn option in showReportDialog call");else Object(U.b)()&&b.b.error("Missing eventId option in showReportDialog call")}var Ye,Je=n(166),Xe=Object(h.a)(),Qe={},Ze={};function et(e){if(!Ze[e])switch(Ze[e]=!0,e){case"console":!function(){if(!("console"in Xe))return;["debug","info","warn","error","log","assert"].forEach((function(e){e in Xe.console&&Object(_.d)(Xe.console,e,(function(t){return function(){for(var n=[],r=0;r2?t[2]:void 0;if(r){var o=Ye,i=String(r);Ye=i,nt("history",{from:o,to:i})}return e.apply(this,t)}}Xe.onpopstate=function(){for(var t=[],n=0;n"}0!==n.length&&O().addBreadcrumb({category:"ui."+t.name,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this._options.dom)),this._options.xhr&&tt("xhr",pt),this._options.fetch&&tt("fetch",mt),this._options.history&&tt("history",gt)},e.id="Breadcrumbs",e}();function ht(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:Object(dt.a)(e.level),message:Object(X.b)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: "+(Object(X.b)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}O().addBreadcrumb(t,{input:e.args,level:e.level})}function pt(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;O().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;}function mt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?O().addBreadcrumb({category:"fetch",data:e.fetchData,level:s.a.Error,type:"http"},{data:e.error,input:e.args}):O().addBreadcrumb({category:"fetch",data:Object(a.a)(Object(a.a)({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function gt(e){var t=Object(h.a)(),n=e.from,r=e.to,o=Object(v.f)(t.location.href),i=Object(v.f)(n),a=Object(v.f)(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),O().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}var vt,bt=function(e){function t(t){void 0===t&&(t={});return t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:H}],version:H},e.call(this,Be,t)||this}return Object(a.c)(t,e),t.prototype.showReportDialog=function(e){void 0===e&&(e={}),Object(h.a)().document&&(this._isEnabled()?qe(Object(a.a)(Object(a.a)({},e),{dsn:e.dsn||this.getDsn()})):b.b.error("Trying to call showReportDialog with Sentry Client disabled"))},t.prototype._prepareEvent=function(t,n,r){return t.platform=t.platform||"javascript",e.prototype._prepareEvent.call(this,t,n,r)},t.prototype._sendEvent=function(t){var n=this.getIntegration(ft);n&&n.addSentryBreadcrumb(t),e.prototype._sendEvent.call(this,t)},t}(ne),yt=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){vt=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t=0;t--){var n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null},e.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace)return this._getLastValidUrl(e.stacktrace.frames);var t;try{t=e.exception.values[0].stacktrace.frames}catch(n){}return t?this._getLastValidUrl(t):null}catch(r){return Object(U.b)()&&b.b.error("Cannot extract url for event "+Object(v.d)(e)),null}},e.id="InboundFilters",e}();var St=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],kt=function(){function e(t){this.name=e.id,this._options=Object(a.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return e.prototype.setupOnce=function(){var e=Object(h.a)();this._options.setTimeout&&Object(_.d)(e,"setTimeout",xt),this._options.setInterval&&Object(_.d)(e,"setInterval",xt),this._options.requestAnimationFrame&&Object(_.d)(e,"requestAnimationFrame",Ot),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Object(_.d)(XMLHttpRequest.prototype,"send",Ct);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:St).forEach(Et)},e.id="TryCatch",e}();function xt(e){return function(){for(var t=[],n=0;n0?t:Object(ut.a)();return 0===l.length&&l.push({colno:u,filename:f,function:"?",in_app:!0,lineno:d}),e}function Mt(e){Object(U.b)()&&b.b.log("Global Handler attached: "+e)}function Lt(e,t,n,r){Object(v.a)(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function $t(){var e=O(),t=e.getClient();return[e,t&&t.getOptions().attachStacktrace]}var Nt=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this._key=t.key||"cause",this._limit=t.limit||5}return e.prototype.setupOnce=function(){g((function(t,n){var r=O().getIntegration(e);return r?function(e,t,n,r){if(!n.exception||!n.exception.values||!r||!Object(c.g)(r.originalException,Error))return n;var o=Dt(t,r.originalException,e);return n.exception.values=Object(a.f)(o,n.exception.values),n}(r._key,r._limit,t,n):t}))},e.id="LinkedErrors",e}();function Dt(e,t,n,r){if(void 0===r&&(r=[]),!Object(c.g)(t[n],Error)||r.length+1>=e)return r;var o=ve(he(t[n]));return Dt(e,t[n],n,Object(a.f)([o],r))}var Pt=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,n){t((function(t){var r=n().getIntegration(e);if(r){try{if(function(e,t){if(!t)return!1;if(function(e,t){var n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Ft(e,t))return!1;if(!It(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){var n=zt(t),r=zt(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Ft(e,t))return!1;if(!It(e,t))return!1;return!0}(e,t))return!0;return!1}(t,r._previousEvent))return b.b.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){return r._previousEvent=t}return r._previousEvent=t}return t}))},e.id="Dedupe",e}();function It(e,t){var n=Wt(e),r=Wt(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,(r=r).length!==n.length)return!1;for(var o=0;o=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var R=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function T(e){var t=R.exec(e);return t?t.slice(1):[]}function A(){for(var e=[],t=0;t=-1&&!r;o--){var i=o>=0?e[o]:"/";i&&(n=i+"/"+n,r="/"===i.charAt(0))}return(r?"/":"")+(n=j(n.split("/").filter((function(e){return!!e})),!r).join("/"))||"."}function M(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function L(e,t){var n=T(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n}var $=function(){function e(t){var n=this;void 0===t&&(t={}),this.name=e.id,this._prefix="app:///",this._iteratee=function(e){if(!e.filename)return e;var t=/^[A-Z]:\\/.test(e.filename),r=/^\//.test(e.filename);if(t||r){var o=t?e.filename.replace(/^[A-Z]:/,"").replace(/\\/g,"/"):e.filename,i=n._root?function(e,t){e=A(e).substr(1),t=A(t).substr(1);for(var n=M(e.split("/")),r=M(t.split("/")),o=Math.min(n.length,r.length),i=o,a=0;a=0;n--){var r=t[n];if(!0===r.in_app){e.transaction=this._getTransaction(r);break}}return e},e.prototype._getFramesFromEvent=function(e){var t=e.exception&&e.exception.values&&e.exception.values[0];return t&&t.stacktrace&&t.stacktrace.frames||[]},e.prototype._getTransaction=function(e){return e.module||e.function?(e.module||"?")+"/"+(e.function||"?"):""},e.id="Transaction",e}(),P=n(453),I={id:"Tracing"},F={id:"BrowserTracing"},z="ui.vue",W={activate:["activated","deactivated"],create:["beforeCreate","created"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]},B=/(?:^|[-_/])(\w)/g,H="root",U="anonymous component",V=function(){function e(t){var n=this;this.name=e.id,this._componentsCache={},this._applyTracingHooks=function(e,t){if(!e.$options.$_sentryPerfHook){e.$options.$_sentryPerfHook=!0;var i=n._getComponentName(e),a=i===H,s={},c=function(r){var o=Object(P.c)();n._rootSpan?n._finishRootSpan(o,t):e.$once("hook:"+r,(function(){var e=t().getIntegration(I);if(e){n._tracingActivity=e.constructor.pushActivity("Vue Application Render");var r=e.constructor.getTransaction();r&&(n._rootSpan=r.startChild({description:"Application Render",op:z}))}else{var o=function(e){if(e&&e.getScope){var t=e.getScope();if(t)return t.getTransaction()}return}(t());o&&(n._rootSpan=o.startChild({description:"Application Render",op:z}))}}))},l=function(r,o){var a=Array.isArray(n._options.tracingOptions.trackComponents)?n._options.tracingOptions.trackComponents.indexOf(i)>-1:n._options.tracingOptions.trackComponents;if(n._rootSpan&&a){var c=Object(P.c)(),l=s[o];l?(l.finish(),n._finishRootSpan(c,t)):e.$once("hook:"+r,(function(){n._rootSpan&&(s[o]=n._rootSpan.startChild({description:"Vue <"+i+">",op:"ui.vue."+o}))}))}};n._options.tracingOptions.hooks.forEach((function(t){var i=W[t];i?i.forEach((function(o){var i=a?c.bind(n,o):l.bind(n,o,t),s=e.$options[o];Array.isArray(s)?e.$options[o]=Object(r.f)([i],s):e.$options[o]="function"===typeof s?[i,s]:[i]})):o.b.warn("Unknown hook: "+t)}))}},o.b.log("You are still using the Vue.js integration, consider moving to @sentry/vue"),this._options=Object(r.a)(Object(r.a)({Vue:Object(i.a)().Vue,attachProps:!0,logErrors:!1,tracing:!1},t),{tracingOptions:Object(r.a)({hooks:["mount","update"],timeout:2e3,trackComponents:!1},t.tracingOptions)})}return e.prototype.setupOnce=function(e,t){this._options.Vue?(this._attachErrorHandler(t),this._options.tracing&&this._startTracing(t)):o.b.error("Vue integration is missing a Vue instance")},e.prototype._getComponentName=function(e){if(!e)return U;if(e.$root===e)return H;if(!e.$options)return U;if(e.$options.name)return e.$options.name;if(e.$options._componentTag)return e.$options._componentTag;if(e.$options.__file){var t=L(e.$options.__file.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"),".vue");return this._componentsCache[t]||(this._componentsCache[t]=t.replace(B,(function(e,t){return t?t.toUpperCase():""})))}return U},e.prototype._finishRootSpan=function(e,t){var n=this;this._rootSpanTimer&&clearTimeout(this._rootSpanTimer),this._rootSpanTimer=setTimeout((function(){if(n._tracingActivity){var r=t().getIntegration(I);r&&r.constructor.popActivity(n._tracingActivity)}n._rootSpan&&n._rootSpan.finish(e)}),this._options.tracingOptions.timeout)},e.prototype._startTracing=function(e){var t=this._applyTracingHooks;this._options.Vue.mixin({beforeCreate:function(){e().getIntegration(I)||e().getIntegration(F)?t(this,e):o.b.error("Vue integration has tracing enabled, but Tracing integration is not configured")}})},e.prototype._attachErrorHandler=function(t){var n=this,r=this._options.Vue.config.errorHandler;this._options.Vue.config.errorHandler=function(i,a,s){var c={};if(a)try{c.componentName=n._getComponentName(a),n._options.attachProps&&(c.propsData=a.$options.propsData)}catch(l){o.b.warn("Unable to extract metadata from Vue component.")}s&&(c.lifecycleHook=s),t().getIntegration(e)&&setTimeout((function(){t().withScope((function(e){e.setContext("vue",c),t().captureException(i)}))})),"function"===typeof r&&r.call(n._options.Vue,i,a,s),n._options.logErrors&&(n._options.Vue.util&&n._options.Vue.util.warn("Error in "+s+': "'+(i&&i.toString())+'"',a),console.error(i))}},e.id="Vue",e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=w(n(0)),o=_(n(351)),i=w(n(4)),a=_(n(311)),s=_(n(312)),c=w(n(355)),l=w(n(151)),u=w(n(60)),d=w(n(299)),f=w(n(379)),h=w(n(217)),p=w(n(218)),m=w(n(381)),g=w(n(61)),v=w(n(382)),b=w(n(13));function y(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==S(e)&&"function"!==typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return(0,h.default)(g.default.getThemeName(e))}},{key:"getThemeName",value:function(e){return e.name}},{key:"getThemeType",value:function(e){return e.palette.type}},{key:"toggleTheme",value:function(){var e=this.state.themeName,t="dark"===e?"blue":"blue"===e?"colored":"colored"===e?"light":"dark";g.default.setThemeName(t);var n=this.createTheme(t);this.setState({theme:n,themeName:this.getThemeName(n),themeType:this.getThemeType(n)})}},{key:"getSystemConfig",value:function(){return this.socket.getSystemConfig()}},{key:"getExpertMode",value:function(){return"true"===window.sessionStorage.getItem("App.expertMode")||!!this._systemConfig.expertMode}},{key:"onConnectionReady",value:function(){}},{key:"encrypt",value:function(e){for(var t="",n=0;n=e[n]}))||"xs"}},{key:"onClose",value:function(){if("undefined"!==typeof window.parent&&window.parent)try{window.parent.$iframeDialog&&"function"===typeof window.parent.$iframeDialog.close?window.parent.$iframeDialog.close():window.parent.postMessage("close","*")}catch(e){window.parent.postMessage("close","*")}}}],i&&O(t.prototype,i),y&&O(t,y),Object.defineProperty(t,"prototype",{writable:!1}),w}(m.default);$.propTypes={adapterName:i.default.string,onThemeChange:i.default.func,socket:i.default.object,encryptedFields:i.default.array,bottomButtons:i.default.bool};var N=$;t.default=N},function(e,t,n){"use strict";function r(){var e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(var r=0;r=43)}})).catch((function(){return!1}))}function S(e){return"boolean"===typeof m?l.resolve(m):w(e).then((function(e){return m=e}))}function k(e){var t=g[e.name],n={};n.promise=new l((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function x(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function O(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function C(e,t){return new l((function(n,r){if(g[e.name]=g[e.name]||D(),e.db){if(!t)return n(e.db);k(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=a.open.apply(a,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(p)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),x(e)}}))}function E(e){return C(e,!1)}function j(e){return C(e,!0)}function R(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function T(e){return new l((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}function A(e){return c([_(atob(e.data))],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function L(e){var t=this,n=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return d(n,e,e),n}function $(e){k(e);for(var t=g[e.name],n=t.forages,r=0;r0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return l.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),j(e)})).then((function(){return $(e).then((function(){N(e,t,n,r-1)}))})).catch(n);n(i)}}function D(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function P(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=g[n.name];o||(o=D(),g[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=L);var i=[];function a(){return l.resolve()}for(var s=0;s>4,u[c++]=(15&r)<<4|o>>2,u[c++]=(3&o)<<6|63&i;return l}function pe(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=Y[(3&n[t])<<4|n[t+1]>>4],r+=Y[(15&n[t+1])<<2|n[t+2]>>6],r+=Y[63&n[t+2]];return n.length%3===2?r=r.substring(0,r.length-1)+"=":n.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}function me(e,t){var n="";if(e&&(n=fe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===fe.call(e.buffer))){var r,o=Q;e instanceof ArrayBuffer?(r=e,o+=ee):(r=e.buffer,"[object Int8Array]"===n?o+=ne:"[object Uint8Array]"===n?o+=re:"[object Uint8ClampedArray]"===n?o+=oe:"[object Int16Array]"===n?o+=ie:"[object Uint16Array]"===n?o+=se:"[object Int32Array]"===n?o+=ae:"[object Uint32Array]"===n?o+=ce:"[object Float32Array]"===n?o+=le:"[object Float64Array]"===n?o+=ue:t(new Error("Failed to get type for BinaryArray"))),t(o+pe(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=J+e.type+"~"+pe(this.result);t(Q+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function ge(e){if(e.substring(0,Z)!==Q)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(Z,de);if(r===te&&X.test(n)){var o=n.match(X);t=o[1],n=n.substring(o[0].length)}var i=he(n);switch(r){case ee:return i;case te:return c([i],{type:t});case ne:return new Int8Array(i);case re:return new Uint8Array(i);case oe:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case se:return new Uint16Array(i);case ae:return new Int32Array(i);case ce:return new Uint32Array(i);case le:return new Float32Array(i);case ue:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}}var ve={serialize:me,deserialize:ge,stringToBuffer:he,bufferToString:pe};function be(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function ye(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!==typeof e[r]?e[r].toString():e[r];var o=new l((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(o){return r(o)}n.db.transaction((function(o){be(o,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=ve,o}function _e(e,t,n,r,o,i){e.executeSql(n,r,o,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?i(e,a):be(e,t,(function(){e.executeSql(n,r,o,i)}),i)}),i):i(e,a)}),i)}function we(e,t){var n=this;e=f(e);var r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Se(e,t){var n=this,r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName,[],(function(n,r){for(var i=r.rows,a=i.length,s=0;s0)return void i(ke.apply(o,[e,s,n,r-1]));a(t)}}))}))})).catch(a)}));return u(i,n),i}function xe(e,t,n){return ke.apply(this,[e,t,n,1])}function Oe(e,t){var n=this;e=f(e);var r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Ce(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function Ee(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function je(e,t){var n=this,r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Re(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],o=0;o '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var o=[],i=0;i0}function Pe(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=$e(e,t._defaultConfig),De()?(t._dbInfo=n,n.serializer=ve,l.resolve()):l.reject()}function Ie(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return u(n,e),n}function Fe(e,t){var n=this;e=f(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return u(r,t),r}function ze(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):l.reject("Invalid arguments"),u(r,t),r}var Ke={_driver:"localStorageWrapper",_initStorage:Pe,_support:Le(),iterate:ze,getItem:Fe,setItem:Ve,removeItem:Ue,clear:Ie,length:He,key:We,keys:Be,dropInstance:Ge},qe=function(e,t){return e===t||"number"===typeof e&&"number"===typeof t&&isNaN(e)&&isNaN(t)},Ye=function(e,t){for(var n=e.length,r=0;r=0)return 1;return 0}();var o=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function i(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:c(s(e))}function l(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),d=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?u:10===e?d:u||d}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function m(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||h(e.firstElementChild)===e)}(a)?a:h(a);var s=p(e);return s.host?m(s.host,t):m(e,p(t).host)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(t,"top"),o=g(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function b(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,r=f(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},S=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=f(10),o="HTML"===t.nodeName,i=C(e),s=C(t),l=c(e),u=a(t),d=parseFloat(u.borderTopWidth),h=parseFloat(u.borderLeftWidth);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=O({top:i.top-s.top-d,left:i.left-s.left-h,width:i.width,height:i.height});if(p.marginTop=0,p.marginLeft=0,!r&&o){var m=parseFloat(u.marginTop),g=parseFloat(u.marginLeft);p.top-=d-m,p.bottom-=d-m,p.left-=h-g,p.right-=h-g,p.marginTop=m,p.marginLeft=g}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(p=v(p,t)),p}function j(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=E(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:g(n),s=t?0:g(n,"left"),c={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return O(c)}function R(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&R(n)}function T(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?T(e):m(e,l(t));if("viewport"===r)i=j(a,o);else{var u=void 0;"scrollParent"===r?"BODY"===(u=c(s(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===r?e.ownerDocument.documentElement:r;var d=E(u,a,o);if("HTML"!==u.nodeName||R(a))i=d;else{var f=_(e.ownerDocument),h=f.height,p=f.width;i.top+=d.top-d.marginTop,i.bottom=h+d.top,i.left+=d.left-d.marginLeft,i.right=p+d.left}}var g="number"===typeof(n=n||0);return i.left+=g?n:n.left||0,i.top+=g?n:n.top||0,i.right-=g?n:n.right||0,i.bottom-=g?n:n.bottom||0,i}function M(e){return e.width*e.height}function L(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=A(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(s).map((function(e){return x({key:e},s[e],{area:M(s[e])})})).sort((function(e,t){return t.area-e.area})),l=c.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=l.length>0?l[0].key:c[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function $(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?T(t):m(t,l(n));return E(n,o,r)}function N(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function D(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function P(e,t,n){n=n.split("-")[0];var r=N(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",c=i?"height":"width",l=i?"width":"height";return o[a]=t[a]+t[c]/2-r[c]/2,o[s]=n===s?t[s]-r[l]:t[D(s)],o}function I(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function F(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=I(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offsets.reference),t=n(t,e))})),t}function z(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=$(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=L(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=P(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=F(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function B(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=ee.indexOf(e),r=ee.slice(n+1).concat(ee.slice(0,n));return t?r.reverse():r}var ne="flip",re="clockwise",oe="counterclockwise";function ie(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(I(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return l=l.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){return O("%p"===a?n:r)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))})),l.forEach((function(e,t){e.forEach((function(n,r){Y(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var ae={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",l=s?"width":"height",u={start:k({},c,i[c]),end:k({},c,i[c]+i[l]-a[l])};e.offsets.popper=x({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],c=void 0;return c=Y(+n)?[+n,0]:ie(n,i,a,s),"left"===s?(i.top+=c[0],i.left-=c[1]):"right"===s?(i.top+=c[0],i.left+=c[1]):"top"===s?(i.left+=c[0],i.top-=c[1]):"bottom"===s&&(i.left+=c[0],i.top+=c[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var r=B("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var c=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=c;var l=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]c[e]&&!t.escapeWithReference&&(r=Math.min(u[n],c[e]-("right"===e?u.width:u.height))),k({},n,r)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=x({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",c=a?"left":"top",l=a?"width":"height";return n[s]i(r[s])&&(e.offsets.popper[c]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,s=i.popper,c=i.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",d=l?"Top":"Left",f=d.toLowerCase(),h=l?"left":"top",p=l?"bottom":"right",m=N(r)[u];c[p]-ms[p]&&(e.offsets.popper[f]+=c[f]+m-s[p]),e.offsets.popper=O(e.offsets.popper);var g=c[f]+c[u]/2-m/2,v=a(e.instance.popper),b=parseFloat(v["margin"+d]),y=parseFloat(v["border"+d+"Width"]),_=g-e.offsets.popper[f]-b-y;return _=Math.max(Math.min(s[u]-m,_),0),e.arrowElement=r,e.offsets.arrow=(k(n={},f,Math.round(_)),k(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=D(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ne:a=[r,o];break;case re:a=te(r);break;case oe:a=te(r,!0);break;default:a=t.behavior}return a.forEach((function(s,c){if(r!==s||a.length===c+1)return e;r=e.placement.split("-")[0],o=D(r);var l=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="left"===r&&d(l.right)>d(u.left)||"right"===r&&d(l.left)d(u.top)||"bottom"===r&&d(l.top)d(n.right),m=d(l.top)d(n.bottom),v="left"===r&&h||"right"===r&&p||"top"===r&&m||"bottom"===r&&g,b=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(b&&"start"===i&&h||b&&"end"===i&&p||!b&&"start"===i&&m||!b&&"end"===i&&g),_=!!t.flipVariationsByContent&&(b&&"start"===i&&p||b&&"end"===i&&h||!b&&"start"===i&&g||!b&&"end"===i&&m),w=y||_;(f||v||w)&&(e.flipped=!0,(f||v)&&(r=a[c+1]),w&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=x({},e.offsets.popper,P(e.instance.popper,e.offsets.reference,e.placement)),e=F(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=D(t),e.offsets.popper=O(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=I(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=o(this.update.bind(this)),this.options=x({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(x({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){r.options.modifiers[t]=x({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return x({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&i(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return S(e,[{key:"update",value:function(){return z.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return K.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),e}();ce.Utils=("undefined"!==typeof window?window:e).PopperUtils,ce.placements=Z,ce.Defaults=se,t.a=ce}).call(this,n(69))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diff=t.split=void 0;var r=n(409),o=n(410);t.diff=o.default;var i=n(310);t.split=i.default,t.default=r.default},function(e,t,n){"use strict";var r=n(414),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,c,l,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),c=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),c.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),l&&document.body.removeChild(l),a()}return u}},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}),"FileCopy");t.default=a},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.default=a},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"}),"ImportExport");t.default=a},,function(e,t,n){"use strict";n.d(t,"a",(function(){return ge}));var r=n(0),o=n.n(r),i=n(4),a=n.n(i);function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;var u=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function d(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=u.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"===typeof t?t:"string"===typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var f=[".DS_Store","Thumbs.db"];function h(e){return"object"===typeof e&&null!==e}function p(e){return b(e.target.files).map((function(e){return d(e)}))}function m(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return d(e)}))]}}))}))}function g(e,t){return s(this,void 0,void 0,(function(){var n;return c(this,(function(r){switch(r.label){case 0:return null===e?[2,[]]:e.items?(n=b(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(y))]):[3,2];case 1:return[2,v(_(r.sent()))];case 2:return[2,v(b(e.files).map((function(e){return d(e)})))]}}))}))}function v(e){return e.filter((function(e){return-1===f.indexOf(e.name)}))}function b(e){if(null===e)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,P(n)];if(e.sizen)return[!1,P(n)]}return[!0,null]}function B(e){return void 0!==e&&null!==e}function H(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=T(z(e,n),1)[0],i=T(W(e,r,o),1)[0];return t&&i}))}function U(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function V(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function G(e){e.preventDefault()}function K(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function q(e){return-1!==e.indexOf("Edge/")}function Y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return K(e)||q(e)}function J(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var he=Object(r.forwardRef)((function(e,t){var n=e.children,i=ge(fe(e,te)),a=i.open,s=fe(i,ne);return Object(r.useImperativeHandle)(t,(function(){return{open:a}}),[a]),o.a.createElement(r.Fragment,null,n(ue(ue({},s),{},{open:a})))}));he.displayName="Dropzone";var pe={disabled:!1,getFilesFromEvent:function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){return h(e)&&h(e.dataTransfer)?[2,g(e.dataTransfer,e.type)]:function(e){return h(e)&&h(e.target)}(e)?[2,p(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"===typeof e.getFile}))?[2,m(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};he.defaultProps=pe,he.propTypes={children:a.a.func,accept:a.a.oneOfType([a.a.string,a.a.arrayOf(a.a.string)]),multiple:a.a.bool,preventDropOnDocument:a.a.bool,noClick:a.a.bool,noKeyboard:a.a.bool,noDrag:a.a.bool,noDragEventsBubbling:a.a.bool,minSize:a.a.number,maxSize:a.a.number,maxFiles:a.a.number,disabled:a.a.bool,getFilesFromEvent:a.a.func,onFileDialogCancel:a.a.func,onFileDialogOpen:a.a.func,useFsAccessApi:a.a.bool,onDragEnter:a.a.func,onDragLeave:a.a.func,onDragOver:a.a.func,onDrop:a.a.func,onDropAccepted:a.a.func,onDropRejected:a.a.func,validator:a.a.func};var me={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ue(ue({},pe),e),n=t.accept,o=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,c=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,h=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,v=t.onFileDialogOpen,b=t.useFsAccessApi,y=t.preventDropOnDocument,_=t.noClick,w=t.noKeyboard,S=t.noDrag,k=t.noDragEventsBubbling,x=t.validator,O=Object(r.useMemo)((function(){return"function"===typeof v?v:be}),[v]),C=Object(r.useMemo)((function(){return"function"===typeof g?g:be}),[g]),E=Object(r.useRef)(null),j=Object(r.useRef)(null),R=Object(r.useReducer)(ve,me),T=ae(R,2),A=T[0],M=T[1],L=A.isFocused,$=A.isFileDialogActive,N=A.draggedFiles,D=Object(r.useRef)("undefined"!==typeof window&&window.isSecureContext&&b&&X()),P=function(){!D.current&&$&&setTimeout((function(){j.current&&(j.current.files.length||(M({type:"closeDialog"}),C()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",P,!1),function(){window.removeEventListener("focus",P,!1)}}),[j,$,C,D]);var I=Object(r.useRef)([]),B=function(e){E.current&&E.current.contains(e.target)||(e.preventDefault(),I.current=[])};Object(r.useEffect)((function(){return y&&(document.addEventListener("dragover",G,!1),document.addEventListener("drop",B,!1)),function(){y&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",B))}}),[E,y]);var K=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),ke(e),I.current=[].concat(ie(I.current),[e.target]),V(e)&&Promise.resolve(i(e)).then((function(t){U(e)&&!k||(M({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e))}))}),[i,u,k]),q=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),ke(e);var t=V(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&f&&f(e),!1}),[f,k]),te=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),ke(e);var t=I.current.filter((function(e){return E.current&&E.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),I.current=t,t.length>0||(M({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),V(e)&&d&&d(e))}),[E,d,k]),ne=Object(r.useCallback)((function(e,t){var r=[],o=[];e.forEach((function(e){var t=ae(z(e,n),2),i=t[0],c=t[1],l=ae(W(e,s,a),2),u=l[0],d=l[1],f=x?x(e):null;if(i&&u&&!f)r.push(e);else{var h=[c,d];f&&(h=h.concat(f)),o.push({file:e,errors:h.filter((function(e){return e}))})}})),(!c&&r.length>1||c&&l>=1&&r.length>l)&&(r.forEach((function(e){o.push({file:e,errors:[F]})})),r.splice(0)),M({acceptedFiles:r,fileRejections:o,type:"setFiles"}),h&&h(r,o,t),o.length>0&&m&&m(o,t),r.length>0&&p&&p(r,t)}),[M,c,n,s,a,l,h,p,m,x]),se=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),ke(e),I.current=[],V(e)&&Promise.resolve(i(e)).then((function(t){U(e)&&!k||ne(t,e)})),M({type:"reset"})}),[i,ne,k]),ce=Object(r.useCallback)((function(){if(D.current){M({type:"openDialog"}),O();var e={multiple:c,types:Q(n)};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){ne(e,null),M({type:"closeDialog"})})).catch((function(e){Z(e)?(C(e),M({type:"closeDialog"})):ee(e)&&(D.current=!1,j.current&&(j.current.value=null,j.current.click()))}))}else j.current&&(M({type:"openDialog"}),O(),j.current.value=null,j.current.click())}),[M,O,C,b,ne,n,c]),le=Object(r.useCallback)((function(e){E.current&&E.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),ce()))}),[E,ce]),he=Object(r.useCallback)((function(){M({type:"focus"})}),[]),ge=Object(r.useCallback)((function(){M({type:"blur"})}),[]),ye=Object(r.useCallback)((function(){_||(Y()?setTimeout(ce,0):ce())}),[_,ce]),_e=function(e){return o?null:e},we=function(e){return w?null:_e(e)},Se=function(e){return S?null:_e(e)},ke=function(e){k&&e.stopPropagation()},xe=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,c=e.onClick,l=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,f=e.onDrop,h=fe(e,re);return ue(ue(de({onKeyDown:we(J(i,le)),onFocus:we(J(a,he)),onBlur:we(J(s,ge)),onClick:_e(J(c,ye)),onDragEnter:Se(J(l,K)),onDragOver:Se(J(u,q)),onDragLeave:Se(J(d,te)),onDrop:Se(J(f,se)),role:"string"===typeof r&&""!==r?r:"button"},n,E),o||w?{}:{tabIndex:0}),h)}}),[E,le,he,ge,ye,K,q,te,se,w,S,o]),Oe=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),Ce=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,i=e.onClick,a=fe(e,oe),s=de({accept:n,multiple:c,type:"file",style:{display:"none"},onChange:_e(J(o,se)),onClick:_e(J(i,Oe)),autoComplete:"off",tabIndex:-1},r,j);return ue(ue({},s),a)}}),[j,n,c,se,o]),Ee=N.length,je=Ee>0&&H({files:N,accept:n,minSize:s,maxSize:a,multiple:c,maxFiles:l}),Re=Ee>0&&!je;return ue(ue({},A),{},{isDragAccept:je,isDragReject:Re,isFocused:L&&!o,getRootProps:xe,getInputProps:Ce,rootRef:E,inputRef:j,open:_e(ce)})}function ve(e,t){switch(t.type){case"focus":return ue(ue({},e),{},{isFocused:!0});case"blur":return ue(ue({},e),{},{isFocused:!1});case"openDialog":return ue(ue({},me),{},{isFileDialogActive:!0});case"closeDialog":return ue(ue({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ue(ue({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ue(ue({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ue({},me);default:return e}}function be(){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(58);function o(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=o(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},i.apply(this,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(165),o=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,i=e.productionPrefix,a=void 0===i?"jss":i,s=e.seed,c=void 0===s?"":s,l=""===c?"":"".concat(c,"-"),u=0,d=function(){return u+=1};return function(e,t){var i=t.options.name;if(i&&0===i.indexOf("Mui")&&!t.options.link&&!n){if(-1!==o.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(l).concat(i,"-").concat(e.key);return t.options.theme[r.a]&&""===c?"".concat(s,"-").concat(d()):s}return"".concat(l).concat(a).concat(d())}}},function(e,t,n){"use strict";var r=n(0),o=n(16),i=n(21),a=n(14),s=n(19);function c(e){return e.substring(2).toLowerCase()}t.a=function(e){var t=e.children,n=e.disableReactTree,l=void 0!==n&&n,u=e.mouseEvent,d=void 0===u?"onClick":u,f=e.onClickAway,h=e.touchEvent,p=void 0===h?"onTouchEnd":h,m=r.useRef(!1),g=r.useRef(null),v=r.useRef(!1),b=r.useRef(!1);r.useEffect((function(){return setTimeout((function(){v.current=!0}),0),function(){v.current=!1}}),[]);var y=r.useCallback((function(e){g.current=o.findDOMNode(e)}),[]),_=Object(a.a)(t.ref,y),w=Object(s.a)((function(e){var t=b.current;if(b.current=!1,v.current&&g.current&&!function(e){return document.documentElement.clientWidth-1;else n=!Object(i.a)(g.current).documentElement.contains(e.target)||g.current.contains(e.target);n||!l&&t||f(e)}})),S=function(e){return function(n){b.current=!0;var r=t.props[e];r&&r(n)}},k={ref:_};return!1!==p&&(k[p]=S(p)),r.useEffect((function(){if(!1!==p){var e=c(p),t=Object(i.a)(g.current),n=function(){m.current=!0};return t.addEventListener(e,w),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,w),t.removeEventListener("touchmove",n)}}}),[w,p]),!1!==d&&(k[d]=S(d)),r.useEffect((function(){if(!1!==d){var e=c(d),t=Object(i.a)(g.current);return t.addEventListener(e,w),function(){t.removeEventListener(e,w)}}}),[w,d]),r.createElement(r.Fragment,null,r.cloneElement(t,k))}},function(e,t,n){"use strict";var r=n(1),o=n(18),i=n(3),a=n(0),s=n(174),c=n(22),l=n(17),u=n(27),d=n(14),f={entering:{opacity:1},entered:{opacity:1}},h={enter:c.b.enteringScreen,exit:c.b.leavingScreen},p=a.forwardRef((function(e,t){var n=e.children,c=e.disableStrictModeCompat,p=void 0!==c&&c,m=e.in,g=e.onEnter,v=e.onEntered,b=e.onEntering,y=e.onExit,_=e.onExited,w=e.onExiting,S=e.style,k=e.TransitionComponent,x=void 0===k?s.a:k,O=e.timeout,C=void 0===O?h:O,E=Object(i.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),j=Object(l.a)(),R=j.unstable_strictMode&&!p,T=a.useRef(null),A=Object(d.a)(n.ref,t),M=Object(d.a)(R?T:void 0,A),L=function(e){return function(t,n){if(e){var r=R?[T.current,t]:[t,n],i=Object(o.a)(r,2),a=i[0],s=i[1];void 0===s?e(a):e(a,s)}}},$=L(b),N=L((function(e,t){Object(u.b)(e);var n=Object(u.a)({style:S,timeout:C},{mode:"enter"});e.style.webkitTransition=j.transitions.create("opacity",n),e.style.transition=j.transitions.create("opacity",n),g&&g(e,t)})),D=L(v),P=L(w),I=L((function(e){var t=Object(u.a)({style:S,timeout:C},{mode:"exit"});e.style.webkitTransition=j.transitions.create("opacity",t),e.style.transition=j.transitions.create("opacity",t),y&&y(e)})),F=L(_);return a.createElement(x,Object(r.a)({appear:!0,in:m,nodeRef:R?T:void 0,onEnter:N,onEntered:D,onEntering:$,onExit:I,onExited:F,onExiting:P,timeout:C},E),(function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,visibility:"exited"!==e||m?void 0:"hidden"},f[e],S,n.props.style),ref:M},t))}))}));t.a=p},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(340),c=n(5),l=i.forwardRef((function(e,t){var n=e.disableUnderline,c=e.classes,l=e.fullWidth,u=void 0!==l&&l,d=e.inputComponent,f=void 0===d?"input":d,h=e.multiline,p=void 0!==h&&h,m=e.type,g=void 0===m?"text":m,v=Object(o.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return i.createElement(s.a,Object(r.a)({classes:Object(r.a)({},c,{root:Object(a.a)(c.root,!n&&c.underline),underline:null}),fullWidth:u,inputComponent:f,multiline:p,ref:t,type:g},v))}));l.muiName="Input",t.a=Object(c.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(l)},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(129),a=n(0),s=n(2),c=n(49),l=n(59),u=n(5),d=n(8),f=n(14),h=n(439),p=n(79),m="undefined"===typeof window?a.useEffect:a.useLayoutEffect,g=a.forwardRef((function(e,t){var n=e["aria-describedby"],u=e.autoComplete,g=e.autoFocus,v=e.classes,b=e.className,y=(e.color,e.defaultValue),_=e.disabled,w=e.endAdornment,S=(e.error,e.fullWidth),k=void 0!==S&&S,x=e.id,O=e.inputComponent,C=void 0===O?"input":O,E=e.inputProps,j=void 0===E?{}:E,R=e.inputRef,T=(e.margin,e.multiline),A=void 0!==T&&T,M=e.name,L=e.onBlur,$=e.onChange,N=e.onClick,D=e.onFocus,P=e.onKeyDown,I=e.onKeyUp,F=e.placeholder,z=e.readOnly,W=e.renderSuffix,B=e.rows,H=e.rowsMax,U=e.rowsMin,V=e.maxRows,G=e.minRows,K=e.startAdornment,q=e.type,Y=void 0===q?"text":q,J=e.value,X=Object(r.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),Q=null!=j.value?j.value:J,Z=a.useRef(null!=Q).current,ee=a.useRef(),te=a.useCallback((function(e){0}),[]),ne=Object(f.a)(j.ref,te),re=Object(f.a)(R,ne),oe=Object(f.a)(ee,re),ie=a.useState(!1),ae=ie[0],se=ie[1],ce=Object(l.b)();var le=Object(c.a)({props:e,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});le.focused=ce?ce.focused:ae,a.useEffect((function(){!ce&&_&&ae&&(se(!1),L&&L())}),[ce,_,ae,L]);var ue=ce&&ce.onFilled,de=ce&&ce.onEmpty,fe=a.useCallback((function(e){Object(p.b)(e)?ue&&ue():de&&de()}),[ue,de]);m((function(){Z&&fe({value:Q})}),[Q,fe,Z]);a.useEffect((function(){fe(ee.current)}),[]);var he=C,pe=Object(o.a)({},j,{ref:oe});"string"!==typeof he?pe=Object(o.a)({inputRef:oe,type:Y},pe,{ref:null}):A?!B||V||G||H||U?(pe=Object(o.a)({minRows:B||G,rowsMax:H,maxRows:V},pe),he=h.a):he="textarea":pe=Object(o.a)({type:Y},pe);return a.useEffect((function(){ce&&ce.setAdornedStart(Boolean(K))}),[ce,K]),a.createElement("div",Object(o.a)({className:Object(s.a)(v.root,v["color".concat(Object(d.a)(le.color||"primary"))],b,le.disabled&&v.disabled,le.error&&v.error,k&&v.fullWidth,le.focused&&v.focused,ce&&v.formControl,A&&v.multiline,K&&v.adornedStart,w&&v.adornedEnd,"dense"===le.margin&&v.marginDense),onClick:function(e){ee.current&&e.currentTarget===e.target&&ee.current.focus(),N&&N(e)},ref:t},X),K,a.createElement(l.a.Provider,{value:null},a.createElement(he,Object(o.a)({"aria-invalid":le.error,"aria-describedby":n,autoComplete:u,autoFocus:g,defaultValue:y,disabled:le.disabled,id:x,onAnimationStart:function(e){fe("mui-auto-fill-cancel"===e.animationName?ee.current:{value:"x"})},name:M,placeholder:F,readOnly:z,required:le.required,rows:B,value:Q,onKeyDown:P,onKeyUp:I},pe,{className:Object(s.a)(v.input,j.className,le.disabled&&v.disabled,A&&v.inputMultiline,le.hiddenLabel&&v.inputHiddenLabel,K&&v.inputAdornedStart,w&&v.inputAdornedEnd,"search"===Y&&v.inputTypeSearch,"dense"===le.margin&&v.inputMarginDense),onBlur:function(e){L&&L(e),j.onBlur&&j.onBlur(e),ce&&ce.onBlur?ce.onBlur(e):se(!1)},onChange:function(e){if(!Z){var t=e.target||ee.current;if(null==t)throw new Error(Object(i.a)(1));fe({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o-1){var o=ge[e];if(!Array.isArray(o))return U+ee(o)in t&&V+o;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i
|/);\r\n if (m) {\r\n const result = [];\r\n let key = 1;\r\n do {\r\n const p = text.split(m[0]);\r\n p[0] && result.push({p[0]});\r\n\r\n if (m[0].startsWith(');\r\n } else {\r\n let href = m[0].match(/href=\"([^\"]+)\"/) || m[0].match(/href='([^']+)'/);\r\n let target = m[0].match(/target=\"([^\"]+)\"/) || m[0].match(/target='([^']+)'/);\r\n let rel = m[0].match(/rel=\"([^\"]+)\"/) || m[0].match(/rel='([^']+)'/);\r\n const title = m[0].match(/>([^<]*){title ? title[1] : ''});\r\n }\r\n\r\n text = p[1];\r\n\r\n m = text && text.match(/|/);\r\n if (!m) {\r\n p[1] && result.push({p[1]});\r\n }\r\n } while (m);\r\n\r\n return result;\r\n } else {\r\n return text;\r\n }\r\n }\r\n\r\n /**\r\n * Get the smart name of the given state.\r\n * @param {Record | ioBroker.StateObject} states\r\n * @param {string} id\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static getSmartName(states, id, instanceId, noCommon) {\r\n if (!id) {\r\n if (!noCommon) {\r\n if (!states.common) {\r\n return states.smartName;\r\n } else {\r\n if (states && !states.common) {\r\n return states.smartName;\r\n } else {\r\n return states.common.smartName;\r\n }\r\n }\r\n } else {\r\n if (states && !states.common) {\r\n return states.smartName;\r\n } else {\r\n return (states &&\r\n states.common &&\r\n states.common.custom &&\r\n states.common.custom[instanceId]) ?\r\n states.common.custom[instanceId].smartName : undefined;\r\n }\r\n }\r\n } else\r\n if (!noCommon) {\r\n return states[id].common.smartName;\r\n } else {\r\n return (states[id] &&\r\n states[id].common &&\r\n states[id].common.custom &&\r\n states[id].common.custom[instanceId]) ?\r\n states[id].common.custom[instanceId].smartName || null : null;\r\n }\r\n }\r\n\r\n /**\r\n * Get the smart name from a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static getSmartNameFromObj(obj, instanceId, noCommon) {\r\n if (!noCommon) {\r\n if (!obj.common) {\r\n return obj.smartName;\r\n } else {\r\n if (obj && !obj.common) {\r\n return obj.smartName;\r\n } else {\r\n return obj.common.smartName;\r\n }\r\n }\r\n } else {\r\n if (obj && !obj.common) {\r\n return obj.smartName;\r\n } else {\r\n return (obj &&\r\n obj.common &&\r\n obj.common.custom &&\r\n obj.common.custom[instanceId]) ?\r\n obj.common.custom[instanceId].smartName : undefined;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Enable smart name for a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static enableSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = {};\r\n } else {\r\n obj.common.smartName = {};\r\n }\r\n }\r\n\r\n /**\r\n * Completely remove smart name from a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string | number} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static removeSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n if (obj.common && obj.common.custom && obj.common.custom[instanceId]) {\r\n obj.common.custom[instanceId] = null;\r\n }\r\n } else {\r\n obj.common.smartName = null;\r\n }\r\n }\r\n\r\n /**\r\n * Update the smartname of a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} newSmartName\r\n * @param {string | undefined} byON\r\n * @param {string | undefined} smartType\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static updateSmartName(obj, newSmartName, byON, smartType, instanceId, noCommon) {\r\n const language = I18n.getLanguage();\r\n\r\n // convert Old format\r\n if (typeof obj.common.smartName === 'string') {\r\n const nnn = obj.common.smartName;\r\n obj.common.smartName = {};\r\n obj.common.smartName[language] = nnn;\r\n }\r\n\r\n // convert old settings\r\n if (obj.native && obj.native.byON) {\r\n delete obj.native.byON;\r\n let _smartName = obj.common.smartName;\r\n\r\n if (!_smartName || typeof _smartName !== 'object') {\r\n _smartName = {en: _smartName};\r\n _smartName[language] = _smartName.en;\r\n }\r\n obj.common.smartName = _smartName;\r\n }\r\n if (smartType !== undefined) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n if (!smartType) {\r\n delete obj.common.custom[instanceId].smartName.smartType;\r\n } else {\r\n obj.common.custom[instanceId].smartName.smartType = smartType;\r\n }\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n if (!smartType) {\r\n delete obj.common.smartName.smartType;\r\n } else {\r\n obj.common.smartName.smartType = smartType;\r\n }\r\n\r\n }\r\n }\r\n if (byON !== undefined) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n obj.common.custom[instanceId].smartName.byON = byON;\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n obj.common.smartName.byON = byON;\r\n }\r\n }\r\n if (newSmartName !== undefined) {\r\n let smartName;\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n smartName = obj.common.custom[instanceId].smartName;\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n smartName = obj.common.smartName;\r\n }\r\n smartName[language] = newSmartName;\r\n\r\n // If smart name deleted\r\n if (smartName && (!smartName[language] ||\r\n (smartName[language] === obj.common.name &&\r\n (!obj.common.role || obj.common.role.indexOf('button') >= 0)))) {\r\n delete smartName[language];\r\n let empty = true;\r\n // Check if structure has any definitions\r\n for (const key in smartName) {\r\n if (smartName.hasOwnProperty(key)) {\r\n empty = false;\r\n break;\r\n }\r\n }\r\n // If empty => delete smartName completely\r\n if (empty) {\r\n if (noCommon) {\r\n if (obj.common.custom[instanceId].smartName.byON === undefined) {\r\n delete obj.common.custom[instanceId];\r\n } else {\r\n delete obj.common.custom[instanceId].en;\r\n delete obj.common.custom[instanceId].de;\r\n delete obj.common.custom[instanceId].ru;\r\n delete obj.common.custom[instanceId].nl;\r\n delete obj.common.custom[instanceId].pl;\r\n delete obj.common.custom[instanceId].it;\r\n delete obj.common.custom[instanceId].fr;\r\n delete obj.common.custom[instanceId].pt;\r\n delete obj.common.custom[instanceId].es;\r\n delete obj.common.custom[instanceId]['zh-cn'];\r\n }\r\n } else {\r\n if (obj.common.smartName.byON !== undefined) {\r\n delete obj.common.smartName.en;\r\n delete obj.common.smartName.de;\r\n delete obj.common.smartName.ru;\r\n delete obj.common.smartName.nl;\r\n delete obj.common.smartName.pl;\r\n delete obj.common.smartName.it;\r\n delete obj.common.smartName.fr;\r\n delete obj.common.smartName.pt;\r\n delete obj.common.smartName.es;\r\n delete obj.common.smartName['zh-cn'];\r\n } else {\r\n obj.common.smartName = null;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Disable the smart name of a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static disableSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = false;\r\n } else {\r\n obj.common.smartName = false;\r\n }\r\n }\r\n\r\n /**\r\n * Copy text to the clipboard.\r\n * @param {string} text\r\n * @param {Event} [e]\r\n */\r\n static copyToClipboard(text, e) {\r\n const el = window.document.createElement('textarea');\r\n el.value = text;\r\n window.document.body.appendChild(el);\r\n el.select();\r\n window.document.execCommand('copy');\r\n window.document.body.removeChild(el);\r\n console.log(text);\r\n e && e.stopPropagation();\r\n e && e.preventDefault();\r\n }\r\n\r\n /**\r\n * Gets the extension of a file name.\r\n * @param {string | null} [fileName] the file name.\r\n * @returns {string | null} The extension in lower case.\r\n */\r\n static getFileExtension(fileName) {\r\n const pos = (fileName || '').lastIndexOf('.');\r\n if (pos !== -1) {\r\n return fileName.substring(pos + 1).toLowerCase();\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Format number of bytes as a string with B, KB, MB or GB.\r\n * The base for all calculations is 1024.\r\n * @param {number} bytes The number of bytes.\r\n * @returns {string} The formatted string (e.g. '723.5 KB')\r\n */\r\n static formatBytes(bytes) {\r\n if (Math.abs(bytes) < 1024) {\r\n return bytes + ' B';\r\n }\r\n\r\n const units = ['KB','MB','GB'];\r\n //const units = ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];\r\n let u = -1;\r\n\r\n do {\r\n bytes /= 1024;\r\n ++u;\r\n } while (Math.abs(bytes) >= 1024 && u < units.length - 1);\r\n\r\n return bytes.toFixed(1) + ' ' + units[u];\r\n }\r\n\r\n /**\r\n * Invert the given color according to theme type to get the inverted text color for background\r\n * @param {string} color Color in the format '#rrggbb' or '#rgb' (or without hash)\r\n * @param {string} themeType theme type\r\n * @param {string} invert dark theme has light color in control or light theme has light color in control\r\n * @returns {string}\r\n */\r\n static getInvertedColor(color, themeType, invert) {\r\n if (!color) {\r\n return undefined;\r\n } else {\r\n const invertedColor = Utils.invertColor(color, true);\r\n if (invertedColor === '#FFFFFF' && (themeType === 'dark' || (invert && themeType === 'light'))) {\r\n return '#DDD';\r\n } else\r\n if (invertedColor === '#000000' && (themeType === 'light' || (invert && themeType === 'dark'))) {\r\n return '#222';\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n // Big thanks to: https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color\r\n /**\r\n * Invert the given color\r\n * @param {string} hex Color in the format '#rrggbb' or '#rgb' (or without hash)\r\n * @param {boolean} bw Set to black or white.\r\n * @returns {string}\r\n */\r\n static invertColor(hex, bw) {\r\n if (hex === undefined || hex === null || hex === '' || typeof hex !== 'string') {\r\n return '';\r\n }\r\n if (hex.startsWith('rgba')) {\r\n const m = hex.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*([.\\d]+)\\)/);\r\n if (m) {\r\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0');\r\n }\r\n } else if (hex.startsWith('rgba')) {\r\n const m = hex.match(/rgb?\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)/);\r\n if (m) {\r\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0');\r\n }\r\n } else\r\n if (hex.startsWith('#')) {\r\n hex = hex.slice(1);\r\n }\r\n // convert 3-digit hex to 6-digits.\r\n if (hex.length === 3) {\r\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\r\n }\r\n if (hex.length !== 6) {\r\n console.warn('Cannot invert color: ' + hex);\r\n return hex;\r\n }\r\n let r = parseInt(hex.slice(0, 2), 16);\r\n let g = parseInt(hex.slice(2, 4), 16);\r\n let b = parseInt(hex.slice(4, 6), 16);\r\n\r\n if (bw) {\r\n // http://stackoverflow.com/a/3943023/112731\r\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\r\n ? '#000000'\r\n : '#FFFFFF';\r\n }\r\n // invert color components\r\n r = (255 - r).toString(16);\r\n g = (255 - g).toString(16);\r\n b = (255 - b).toString(16);\r\n // pad each with zeros and return\r\n return '#' + r.padStart(2, '0') + g.padStart(2, '0') + b.padStart(2, '0');\r\n }\r\n\r\n // https://github.com/lukeed/clsx/blob/master/src/index.js\r\n // License\r\n // MIT © Luke Edwards\r\n /**\r\n * @private\r\n * @param {any} mix\r\n * @returns {string}\r\n */\r\n static _toVal(mix) {\r\n let k, y, str='';\r\n\r\n if (typeof mix === 'string' || typeof mix === 'number') {\r\n str += mix;\r\n } else if (typeof mix === 'object') {\r\n if (Array.isArray(mix)) {\r\n for (k=0; k < mix.length; k++) {\r\n if (mix[k]) {\r\n if ((y = Utils._toVal(mix[k]))) {\r\n str && (str += ' ');\r\n str += y;\r\n }\r\n }\r\n }\r\n } else {\r\n for (k in mix) {\r\n if (mix[k]) {\r\n str && (str += ' ');\r\n str += k;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n // https://github.com/lukeed/clsx/blob/master/src/index.js\r\n // License\r\n // MIT © Luke Edwards\r\n /**\r\n * Convert any object to a string with its values.\r\n * @returns {string}\r\n */\r\n static clsx () {\r\n let i = 0;\r\n let tmp;\r\n let x;\r\n let str = '';\r\n while (i < arguments.length) {\r\n if ((tmp = arguments[i++])) {\r\n if ((x = Utils._toVal(tmp))) {\r\n str && (str += ' ');\r\n str += x\r\n }\r\n }\r\n }\r\n return str;\r\n }\r\n\r\n /**\r\n * Get the current theme name (either from local storage or the browser settings).\r\n * @param {string} [themeName]\r\n * @returns {string}\r\n */\r\n static getThemeName(themeName = '') {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return window.vendorPrefix;\r\n }\r\n\r\n return themeName ? themeName : window.localStorage && window.localStorage.getItem('App.themeName') ?\r\n window.localStorage.getItem('App.themeName') : window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'colored';\r\n }\r\n\r\n /**\r\n * Get the type of theme.\r\n * @param {string} [themeName]\r\n * @returns {'dark' | 'light'}\r\n */\r\n static getThemeType(themeName = '') {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return 'light';\r\n }\r\n\r\n themeName = themeName || (window.localStorage && window.localStorage.getItem('App.themeName'));\r\n return themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light';\r\n }\r\n\r\n /**\r\n * Set the theme name and theme type.\r\n * @param {string} themeName\r\n */\r\n static setThemeName(themeName) {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return; // ignore\r\n }\r\n window.localStorage.setItem('App.themeName', themeName);\r\n window.localStorage.setItem('App.theme', themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light');\r\n }\r\n\r\n /**\r\n * Toggle the theme name between 'dark' and 'colored'.\r\n * @param {string | null} themeName\r\n * @returns {string} the new theme name.\r\n */\r\n static toggleTheme(themeName) {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return window.vendorPrefix;\r\n }\r\n themeName = themeName || (window.localStorage && window.localStorage.getItem('App.themeName'));\r\n\r\n // dark => blue => colored => light => dark\r\n const themes = Utils.getThemeNames();\r\n const pos = themes.indexOf(themeName);\r\n let newTheme;\r\n if (pos !== -1) {\r\n newTheme = themes[(pos + 1) % themes.length];\r\n } else {\r\n newTheme = themes[0];\r\n }\r\n Utils.setThemeName(newTheme);\r\n\r\n return newTheme;\r\n }\r\n\r\n /**\r\n * Get the list of themes\r\n * @returns {array} list of possible themes\r\n */\r\n static getThemeNames() {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return [window.vendorPrefix];\r\n }\r\n\r\n return ['light', 'dark', 'blue', 'colored'];\r\n }\r\n\r\n /**\r\n * Parse a query string into its parts.\r\n * @param {string} query\r\n * @returns {Record}\r\n */\r\n static parseQuery(query) {\r\n query = (query || '').toString().replace(/^\\?/, '');\r\n /** @type {Record} */\r\n const result = {};\r\n query.split('&').forEach(part => {\r\n part = part.trim();\r\n if (part) {\r\n const parts = part.split('=');\r\n const attr = decodeURIComponent(parts[0]).trim();\r\n if (parts.length > 1) {\r\n result[attr] = decodeURIComponent(parts[1]);\r\n if (result[attr] === 'true') {\r\n result[attr] = true;\r\n } else if (result[attr] === 'false') {\r\n result[attr] = false;\r\n } else {\r\n const f = parseFloat(result[attr]);\r\n if (f.toString() === result[attr]) {\r\n result[attr] = f;\r\n }\r\n }\r\n } else {\r\n result[attr] = true;\r\n }\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns parent ID.\r\n * @param {string} id\r\n * @returns {string | null} parent ID or null if no parent\r\n */\r\n static getParentId(id) {\r\n const p = (id || '').toString().split('.');\r\n if (p.length > 1) {\r\n p.pop();\r\n return p.join('.');\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n static formatDate(dateObj, dateFormat) {\r\n // format could be DD.MM.YYYY, YYYY.MM.DD or MM/DD/YYYY\r\n\r\n if (!dateObj) {\r\n return '';\r\n }\r\n\r\n let text;\r\n let mm = dateObj.getMonth() + 1;\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n\r\n let dd = dateObj.getDate();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n\r\n if (dateFormat === 'MM/DD/YYYY') {\r\n text = mm + '/' + dd + '/' + dateObj.getFullYear();\r\n } else {\r\n text = dateObj.getFullYear() + '-' + mm + '-' + dd;\r\n }\r\n\r\n // time\r\n let v = dateObj.getHours();\r\n if (v < 10) {\r\n text += ' 0' + v;\r\n } else {\r\n text += ' ' + v;\r\n }\r\n v = dateObj.getMinutes();\r\n if (v < 10) {\r\n text += ':0' + v;\r\n } else {\r\n text += ':' + v;\r\n }\r\n\r\n v = dateObj.getSeconds();\r\n if (v < 10) {\r\n text += ':0' + v;\r\n } else {\r\n text += ':' + v;\r\n }\r\n\r\n v = dateObj.getMilliseconds();\r\n if (v < 10) {\r\n text += '.00' + v;\r\n } else if (v < 100) {\r\n text += '.0' + v;\r\n } else {\r\n text += '.' + v;\r\n }\r\n\r\n return text;\r\n }\r\n\r\n static formatTime(seconds) {\r\n if (seconds) {\r\n seconds = Math.round(seconds);\r\n const d = Math.floor(seconds / (3600 * 24));\r\n const h = Math.floor((seconds % (3600 * 24)) / 3600);\r\n const m = Math.floor((seconds % 3600) / 60);\r\n const s = seconds % 60;\r\n if (d) {\r\n return `${d}.${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n } else if (h) {\r\n return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n } else {\r\n return `0:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n }\r\n } else {\r\n return '0:00:00';\r\n }\r\n }\r\n\r\n static MDtext2link(text) {\r\n const m = text.match(/\\d+\\.\\)\\s/);\r\n if (m) {\r\n text = text.replace(m[0], m[0].replace(/\\s/, ' '));\r\n }\r\n\r\n return text.replace(/[^a-zA-Zа-яА-Я0-9]/g, '').trim().replace(/\\s/g, '').toLowerCase();\r\n }\r\n\r\n static openLink(url, target) {\r\n if (target === 'this') {\r\n window.location = url;\r\n } else {\r\n window.open(url, target || '_blank');\r\n }\r\n }\r\n\r\n static MDgetTitle(text) {\r\n let {body, header} = Utils.extractHeader(text);\r\n if (!header.title) {\r\n // remove {docsify-bla}\r\n body = body.replace(/{[^}]*}/g, '');\r\n body = body.trim();\r\n const lines = body.replace(/\\r/g, '').split('\\n');\r\n for (let i = 0; i < lines.length; i++) {\r\n if (lines[i].startsWith('# ')) {\r\n return lines[i].substring(2).trim();\r\n }\r\n }\r\n return '';\r\n } else {\r\n return header.title;\r\n }\r\n }\r\n\r\n static MDextractHeader(text) {\r\n const attrs = {};\r\n if (text.substring(0, 3) === '---') {\r\n const pos = text.substring(3).indexOf('\\n---');\r\n if (pos !== -1) {\r\n const _header = text.substring(3, pos + 3);\r\n const lines = _header.replace(/\\r/g, '').split('\\n');\r\n lines.forEach(line => {\r\n if (!line.trim()) {\r\n return;\r\n }\r\n const pos = line.indexOf(':');\r\n if (pos !== -1) {\r\n const attr = line.substring(0, pos).trim();\r\n attrs[attr] = line.substring(pos + 1).trim();\r\n attrs[attr] = attrs[attr].replace(/^['\"]|['\"]$/g, '');\r\n if (attrs[attr] === 'true') {\r\n attrs[attr] = true;\r\n } else if (attrs[attr] === 'false') {\r\n attrs[attr] = false;\r\n } else if (parseFloat(attrs[attr]).toString() === attrs[attr]) {\r\n attrs[attr] = parseFloat(attrs[attr]);\r\n }\r\n } else {\r\n attrs[line.trim()] = true;\r\n }\r\n });\r\n text = text.substring(pos + 7);\r\n }\r\n }\r\n return {header: attrs, body: text};\r\n }\r\n\r\n static MDremoveDocsify(text) {\r\n const m = text.match(/{docsify-[^}]*}/g);\r\n if (m) {\r\n m.forEach(doc => text = text.replace(doc, ''));\r\n }\r\n return text;\r\n }\r\n\r\n /**\r\n * Generate the json file on the file for download.\r\n * @param {string} filename file name\r\n * @returns {object} json structure (not stringified)\r\n */\r\n static generateFile(filename, json) {\r\n let el = document.createElement('a');\r\n el.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(json, null, 2)));\r\n el.setAttribute('download', filename);\r\n\r\n el.style.display = 'none';\r\n document.body.appendChild(el);\r\n\r\n el.click();\r\n\r\n document.body.removeChild(el);\r\n }\r\n\r\n /**\r\n * Convert quality code into text\r\n * @param {number} quality code\r\n * @returns {array} lines that decode qulity\r\n */\r\n static quality2text(quality) {\r\n const custom = quality & 0xFFFF0000;\r\n const text = QUALITY_BITS[quality];\r\n let result;\r\n if (text) {\r\n result = [text];\r\n } else if (quality & 0x01) {\r\n result = [QUALITY_BITS[0x01], '0x' + (quality & (0xFFFF & ~1)).toString(16)];\r\n } else if (quality & 0x02) {\r\n result = [QUALITY_BITS[0x02], '0x' + (quality & (0xFFFF & ~2)).toString(16)];\r\n } else {\r\n result = ['0x' + quality.toString(16)];\r\n }\r\n if (custom) {\r\n result.push('0x' + (custom >> 16).toString(16).toUpperCase());\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Deep copy object\r\n * @param {object} object\r\n * @returns {object}\r\n */\r\n static clone(object) {\r\n return JSON.parse(JSON.stringify(object));\r\n }\r\n\r\n /**\r\n * Get states of object\r\n * @param {object} obj\r\n * @returns {object} states as an object in form {\"value1\": \"label1\", \"value2\": \"label2\"} or null\r\n */\r\n static getStates(obj) {\r\n let states = obj?.common?.states;\r\n if (states) {\r\n if (typeof states === 'string' && states[0] === '{') {\r\n try {\r\n states = JSON.parse(states);\r\n } catch (ex) {\r\n console.error(`Cannot parse states: ${states}`);\r\n states = null;\r\n }\r\n } else\r\n // if old format val1:text1;val2:text2\r\n if (typeof states === 'string') {\r\n const parts = states.split(';');\r\n states = {};\r\n for (let p = 0; p < parts.length; p++) {\r\n const s = parts[p].split(':');\r\n states[s[0]] = s[1];\r\n }\r\n } else if (Array.isArray(states)) {\r\n const result = {};\r\n states.forEach((value, key) => result[key] = value);\r\n return result;\r\n }\r\n }\r\n return states;\r\n }\r\n\r\n /**\r\n * Get svg file as text\r\n * @param {string} url URL of SVG file\r\n * @returns {object} Promise with \"data:image...\"\r\n */\r\n static getSvg(url) {\r\n return fetch(url)\r\n .then(response => response.blob())\r\n .then(blob => {\r\n return new Promise(resolve => {\r\n const reader = new FileReader();\r\n reader.onload = function() { // do not optimize this function. \"this\" is important.\r\n resolve(this.result);\r\n };\r\n reader.readAsDataURL(blob);\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport default Utils;\r\n","import * as React from 'react';\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nexport default function useId(idOverride) {\n var _React$useState = React.useState(idOverride),\n defaultId = _React$useState[0],\n setDefaultId = _React$useState[1];\n\n var id = idOverride || defaultId;\n React.useEffect(function () {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the random value for client-side rendering only.\n // We can't use it server-side.\n setDefaultId(\"mui-\".concat(Math.round(Math.random() * 1e5)));\n }\n }, [defaultId]);\n return id;\n}","import { deepmerge } from '@material-ui/utils';\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n\n });\n}\n\nexport default merge;","export { default } from './Button';","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc.defaultView || window;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/**\n * This module mostly exists for optimizations in the build process\n * through rollup and terser. We define some global constants which\n * are normally undefined. However terser overrides these with global\n * definitions which can be evaluated by the static analyzer when\n * creating a bundle.\n *\n * In turn the `isDebugBuild` and `isBrowserBundle` functions are pure\n * and can help us remove unused code from the bundles.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\ndeclare const __SENTRY_NO_DEBUG__: boolean | undefined;\n\n/**\n * Figures out if we're building with debug functionality.\n *\n * @returns true if this is a debug build\n */\nexport function isDebugBuild(): boolean {\n return typeof __SENTRY_NO_DEBUG__ !== 'undefined' && !__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n","import defineProperty from \"./defineProperty.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","export { default } from './Dialog';","export { default } from './DialogActions';","export { default } from './DialogContent';","export { default } from './DialogContentText';","export { default } from './DialogTitle';","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return _extends({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return _extends({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, _defineProperty({}, breakpoints.up('sm'), _extends({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, _defineProperty(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), _defineProperty(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\nimport { deepmerge } from '@material-ui/utils';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport indigo from '../colors/indigo';\nimport pink from '../colors/pink';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport green from '../colors/green';\nimport { darken, getContrastRatio, lighten } from './colorManipulator';\nexport var light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: grey[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport var dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: grey[800],\n default: '#303030'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\n\nexport default function createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: indigo[300],\n main: indigo[500],\n dark: indigo[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: pink.A200,\n main: pink.A400,\n dark: pink.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: red[300],\n main: red[500],\n dark: red[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: orange[300],\n main: orange[500],\n dark: orange[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: blue[300],\n main: blue[500],\n dark: blue[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: green[300],\n main: green[500],\n dark: green[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = _objectWithoutProperties(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n\n function getContrastText(background) {\n var contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = getContrastRatio(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = _extends({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : _formatMuiErrorMessage(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: common,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nexport default function createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = _objectWithoutProperties(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return _extends({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return deepmerge(_extends({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","var shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","var shape = {\n borderRadius: 4\n};\nexport default shape;","import { createUnarySpacing } from '@material-ui/system';\nvar warnOnce;\nexport default function createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = createUnarySpacing({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\nimport createBreakpoints from './createBreakpoints';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport transitions from './transitions';\nimport zIndex from './zIndex';\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = _objectWithoutProperties(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n\n var palette = createPalette(paletteInput);\n var breakpoints = createBreakpoints(breakpointsInput);\n var spacing = createSpacing(spacingInput);\n var muiTheme = deepmerge({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: createMixins(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: shadows,\n typography: createTypography(palette, typographyInput),\n spacing: spacing,\n shape: shape,\n transitions: transitions,\n zIndex: zIndex\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return deepmerge(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: _defineProperty({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\nexport function createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\nexport default createTheme;","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","var common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj) {\n var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\"\n}), 'Delete');\n\nexports.default = _default;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\nexport default isBrowser;\n","import { isRegExp, isString } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString: string): string {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n","export { default } from './FormControl';\nexport { default as useFormControl } from './useFormControl';","export { default } from './Modal';\nexport { default as ModalManager } from './ModalManager';","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport PropTypes from 'prop-types';\nimport merge from './merge'; // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nvar values = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n};\nvar defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: function up(key) {\n return \"@media (min-width:\".concat(values[key], \"px)\");\n }\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n if (process.env.NODE_ENV !== 'production') {\n if (!props.theme) {\n console.error('Material-UI: You are calling a style function without a theme value.');\n }\n }\n\n if (Array.isArray(propValue)) {\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n return propValue.reduce(function (acc, item, index) {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (_typeof(propValue) === 'object') {\n var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n\n return Object.keys(propValue).reduce(function (acc, breakpoint) {\n acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);\n return acc;\n }, {});\n }\n\n var output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var base = styleFunction(props);\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n var extended = themeBreakpoints.keys.reduce(function (acc, key) {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme: props.theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return merge(base, extended);\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n\nexport default breakpoints;","import React from 'react';\nimport { ProviderContext } from '.';\n\n// @ts-ignore\nexport default React.createContext();\n","import Slide from '@material-ui/core/Slide';\nimport { SnackbarClassKey } from '@material-ui/core/Snackbar';\nimport { CloseReason, ContainerClassKey, SnackbarProviderProps, VariantType, SnackbarOrigin, VariantClassKey } from '../index';\nimport { SnackbarItemProps } from '../SnackbarItem';\nimport { Snack } from '../SnackbarProvider';\n\nexport const allClasses: {\n mui: Record;\n container: Record;\n} = {\n mui: {\n root: {},\n anchorOriginTopCenter: {},\n anchorOriginBottomCenter: {},\n anchorOriginTopRight: {},\n anchorOriginBottomRight: {},\n anchorOriginTopLeft: {},\n anchorOriginBottomLeft: {},\n },\n container: {\n containerRoot: {},\n containerAnchorOriginTopCenter: {},\n containerAnchorOriginBottomCenter: {},\n containerAnchorOriginTopRight: {},\n containerAnchorOriginBottomRight: {},\n containerAnchorOriginTopLeft: {},\n containerAnchorOriginBottomLeft: {},\n },\n};\n\nexport const MESSAGES = {\n NO_PERSIST_ALL: 'WARNING - notistack: Reached maxSnack while all enqueued snackbars have \\'persist\\' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented.',\n};\n\nexport const SNACKBAR_INDENTS = {\n view: { default: 20, dense: 4 },\n snackbar: { default: 6, dense: 2 },\n};\n\nexport const DEFAULTS = {\n maxSnack: 3,\n dense: false,\n hideIconVariant: false,\n variant: 'default' as VariantType,\n autoHideDuration: 5000,\n anchorOrigin: { vertical: 'bottom', horizontal: 'left' } as SnackbarOrigin,\n TransitionComponent: Slide,\n transitionDuration: {\n enter: 225,\n exit: 195,\n },\n};\n\nexport const capitalise = (text: string): string => text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const originKeyExtractor = (anchor: Snack['anchorOrigin']): string => (\n `${capitalise(anchor.vertical)}${capitalise(anchor.horizontal)}`\n);\n\n/**\n * Omit SnackbarContainer class keys that are not needed for SnackbarItem\n */\nexport const omitContainerKeys = (classes: SnackbarProviderProps['classes']): SnackbarItemProps['classes'] => (\n // @ts-ignore\n Object.keys(classes).filter(key => !allClasses.container[key]).reduce((obj, key) => ({ ...obj, [key]: classes[key] }), {})\n);\n\nexport const REASONS: { [key: string]: CloseReason } = {\n TIMEOUT: 'timeout',\n CLICKAWAY: 'clickaway',\n MAXSNACK: 'maxsnack',\n INSTRUCTED: 'instructed',\n};\n\n/** Tranforms classes name */\nexport const transformer = {\n toContainerAnchorOrigin: (origin: string) => `containerAnchorOrigin${origin}` as ContainerClassKey,\n toAnchorOrigin: ({ vertical, horizontal }: SnackbarOrigin) => (\n `anchorOrigin${capitalise(vertical)}${capitalise(horizontal)}` as SnackbarClassKey\n ),\n toVariant: (variant: VariantType) => `variant${capitalise(variant)}` as VariantClassKey,\n};\n\nexport const isDefined = (value: string | null | undefined | number): boolean => (!!value || value === 0);\n\nconst numberOrNull = (numberish?: number | null) => (\n typeof numberish === 'number' || numberish === null\n);\n\n// @ts-ignore\nexport const merge = (options, props, defaults) => (name: keyof Snack): any => {\n if (name === 'autoHideDuration') {\n if (numberOrNull(options.autoHideDuration)) return options.autoHideDuration;\n if (numberOrNull(props.autoHideDuration)) return props.autoHideDuration;\n return DEFAULTS.autoHideDuration;\n }\n\n return options[name] || props[name] || defaults[name];\n};\n\nexport function objectMerge(options = {}, props = {}, defaults = {}) {\n return {\n ...defaults,\n ...props,\n ...options,\n };\n}\n","import React, { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { createStyles, Theme, withStyles, WithStyles } from '@material-ui/core/styles';\nimport { SnackbarContentProps } from '../index';\n\nconst styles = (theme: Theme) => createStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n flexGrow: 1,\n [theme.breakpoints.up('sm')]: {\n flexGrow: 'initial',\n minWidth: 288,\n },\n }\n});\n\ninterface Props extends WithStyles, SnackbarContentProps { }\n\nconst SnackbarContent = forwardRef(({ classes, className, ...props }, ref) => (\n
\n))\n\nexport default withStyles(styles)(SnackbarContent);\n","import { Snack } from '../SnackbarProvider';\n\nconst DIRECTION = {\n right: 'left',\n left: 'right',\n bottom: 'up',\n top: 'down',\n} as const;\nexport type DirectionType = typeof DIRECTION[keyof typeof DIRECTION]\n\nexport const getTransitionDirection = (anchorOrigin: Snack['anchorOrigin']): DirectionType => {\n if (anchorOrigin.horizontal !== 'center') {\n return DIRECTION[anchorOrigin.horizontal];\n }\n return DIRECTION[anchorOrigin.vertical];\n};\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\nimport { IconVariant } from '../index';\n\ntype Icon = (props: SvgIconProps) => JSX.Element;\n\nconst CheckIcon: Icon = props => (\n \n \n \n);\n\nconst WarningIcon: Icon = props => (\n \n \n \n);\n\nconst ErrorIcon: Icon = props => (\n \n \n \n);\n\nconst InfoIcon: Icon = props => (\n \n \n \n);\n\nconst iconStyles = {\n fontSize: 20,\n marginInlineEnd: 8,\n};\n\nconst defaultIconVariants: IconVariant = {\n default: undefined,\n success: ,\n warning: ,\n error: ,\n info: ,\n};\n\nexport default defaultIconVariants;\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/createChainedFunction.js\n */\nexport default function createChainedFunction(funcs, extraArg) {\n return funcs.reduce((acc, func) => {\n if (func == null) return acc;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof func !== 'function') {\n // eslint-disable-next-line no-console\n console.error('Invalid Argument Type. must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction(...args) {\n const argums = [...args];\n if (extraArg && argums.indexOf(extraArg) === -1) {\n argums.push(extraArg);\n }\n acc.apply(this, argums);\n func.apply(this, argums);\n };\n }, () => { });\n}\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/useEventCallback.js\n */\nimport * as React from 'react';\n\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\nexport default function useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useCallback((...args) => (0, ref.current)(...args), []);\n}\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Snackbar/Snackbar.js\n */\nimport * as React from 'react';\nimport ClickAwayListener from '@material-ui/core/ClickAwayListener';\nimport { REASONS } from '../utils/constants';\nimport useEventCallback from '../utils/useEventCallback';\n\nconst Snackbar = React.forwardRef((props, ref) => {\n const {\n children,\n autoHideDuration,\n ClickAwayListenerProps,\n disableWindowBlurListener = false,\n onClose,\n onMouseEnter,\n onMouseLeave,\n open,\n resumeHideDuration,\n ...other\n } = props;\n\n const timerAutoHide = React.useRef();\n\n const handleClose = useEventCallback((...args) => {\n if (onClose) {\n onClose(...args);\n }\n });\n\n const setAutoHideTimer = useEventCallback((autoHideDurationParam) => {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(() => {\n handleClose(null, REASONS.TIMEOUT);\n }, autoHideDurationParam);\n });\n\n React.useEffect(() => {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return () => {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]);\n\n /**\n * Pause the timer when the user is interacting with the Snackbar\n * or when the user hide the window.\n */\n const handlePause = () => {\n clearTimeout(timerAutoHide.current);\n };\n\n /**\n * Restart the timer when the user is no longer interacting with the Snackbar\n * or when the window is shown back.\n */\n const handleResume = React.useCallback(() => {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n const handleMouseEnter = (event) => {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n handlePause();\n };\n\n const handleMouseLeave = (event) => {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n handleResume();\n };\n\n const handleClickAway = (event) => {\n if (onClose) {\n onClose(event, REASONS.CLICKAWAY);\n }\n };\n\n React.useEffect(() => {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n\n return () => {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]);\n\n return (\n \n
\n {children}\n
\n
\n );\n});\n\nexport default Snackbar;\n","import React, { useState, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport { withStyles, WithStyles, createStyles, Theme, emphasize } from '@material-ui/core/styles';\nimport Collapse from '@material-ui/core/Collapse';\nimport SnackbarContent from '../SnackbarContent';\nimport { getTransitionDirection } from './SnackbarItem.util';\nimport { allClasses, REASONS, objectMerge, DEFAULTS, transformer } from '../utils/constants';\nimport { SharedProps, RequiredBy, TransitionHandlerProps, SnackbarProviderProps as ProviderProps } from '../index';\nimport defaultIconVariants from '../utils/defaultIconVariants';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport { Snack } from '../SnackbarProvider';\nimport Snackbar from './Snackbar';\n\nconst styles = (theme: Theme) => {\n // @ts-ignore\n const mode = theme.palette.mode || theme.palette.type;\n const backgroundColor = emphasize(theme.palette.background.default, mode === 'light' ? 0.8 : 0.98);\n return createStyles({\n ...allClasses.mui,\n contentRoot: {\n ...theme.typography.body2,\n backgroundColor,\n color: theme.palette.getContrastText(backgroundColor),\n alignItems: 'center',\n padding: '6px 16px',\n borderRadius: '4px',\n boxShadow: '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)',\n },\n lessPadding: {\n paddingLeft: 8 * 2.5,\n },\n variantSuccess: {\n backgroundColor: '#43a047', // green\n color: '#fff',\n },\n variantError: {\n backgroundColor: '#d32f2f', // dark red\n color: '#fff',\n },\n variantInfo: {\n backgroundColor: '#2196f3', // nice blue\n color: '#fff',\n },\n variantWarning: {\n backgroundColor: '#ff9800', // amber\n color: '#fff',\n },\n message: {\n display: 'flex',\n alignItems: 'center',\n padding: '8px 0',\n },\n action: {\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: 16,\n marginRight: -8,\n },\n wrappedRoot: {\n position: 'relative',\n transform: 'translateX(0)',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n },\n });\n}\n\n\ntype RemovedProps =\n | 'variant' // the one received from Provider is processed and passed to snack prop \n | 'anchorOrigin' // same as above\n | 'autoHideDuration' // same as above\n | 'preventDuplicate' // the one recevied from enqueueSnackbar is processed in provider, therefore shouldn't be passed to SnackbarItem */\n\n\nexport interface SnackbarItemProps extends WithStyles, RequiredBy, 'onEntered' | 'onExited' | 'onClose'> {\n snack: Snack;\n dense: ProviderProps['dense'];\n iconVariant: ProviderProps['iconVariant'];\n hideIconVariant: ProviderProps['hideIconVariant'];\n}\n\nconst SnackbarItem: React.FC = ({ classes, ...props }) => {\n const timeout = useRef>();\n const [collapsed, setCollapsed] = useState(true);\n\n useEffect(() => (): void => {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n }, []);\n\n const handleClose = createChainedFunction([props.snack.onClose, props.onClose], props.snack.key);\n\n const handleEntered: TransitionHandlerProps['onEntered'] = () => {\n if (props.snack.requestClose) {\n handleClose(null, REASONS.INSTRCUTED);\n }\n };\n\n const handleExitedScreen = (): void => {\n timeout.current = setTimeout(() => {\n setCollapsed(!collapsed);\n }, 125);\n };\n\n const {\n style,\n dense,\n ariaAttributes: otherAriaAttributes,\n className: otherClassName,\n hideIconVariant,\n iconVariant,\n snack,\n action: otherAction,\n content: otherContent,\n TransitionComponent: otherTranComponent,\n TransitionProps: otherTranProps,\n transitionDuration: otherTranDuration,\n onEnter: ignoredOnEnter,\n onEntered: ignoredOnEntered,\n onEntering: ignoredOnEntering,\n onExit: ignoredOnExit,\n onExited: ignoredOnExited,\n onExiting: ignoredOnExiting,\n ...other\n } = props;\n\n const {\n persist,\n key,\n open,\n entered,\n requestClose,\n className: singleClassName,\n variant,\n content: singleContent,\n action: singleAction,\n ariaAttributes: singleAriaAttributes,\n anchorOrigin,\n message: snackMessage,\n TransitionComponent: singleTranComponent,\n TransitionProps: singleTranProps,\n transitionDuration: singleTranDuration,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n ...singleSnackProps\n } = snack;\n\n const icon = {\n ...defaultIconVariants,\n ...iconVariant,\n }[variant];\n\n const ariaAttributes = {\n 'aria-describedby': 'notistack-snackbar',\n ...objectMerge(singleAriaAttributes, otherAriaAttributes),\n };\n\n const TransitionComponent = singleTranComponent || otherTranComponent || DEFAULTS.TransitionComponent;\n const transitionDuration = objectMerge(singleTranDuration, otherTranDuration, DEFAULTS.transitionDuration);\n const transitionProps = {\n direction: getTransitionDirection(anchorOrigin),\n ...objectMerge(singleTranProps, otherTranProps),\n };\n\n let action = singleAction || otherAction;\n if (typeof action === 'function') {\n action = action(key);\n }\n\n let content = singleContent || otherContent;\n if (typeof content === 'function') {\n content = content(key, snack.message);\n }\n\n const callbacks: { [key in keyof TransitionHandlerProps]?: any } =\n ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].reduce((acc, cbName) => ({\n ...acc,\n // @ts-ignore\n [cbName]: createChainedFunction([props.snack[cbName], props[cbName]], props.snack.key),\n }), {});\n\n return (\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n {content || (\n \n
\n {!hideIconVariant ? icon : null}\n {snackMessage}\n
\n {action && (\n
{action}
\n )}\n \n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(SnackbarItem);\n","import React from 'react';\nimport clsx from 'clsx';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { SNACKBAR_INDENTS } from './utils/constants';\nimport { SnackbarProviderProps } from '.';\n\nconst collapse = {\n // Material-UI 4.12.x and above uses MuiCollapse-root; earlier versions use\n // Mui-Collapse-container. https://github.com/mui-org/material-ui/pull/24084\n container: '& > .MuiCollapse-container, & > .MuiCollapse-root',\n wrapper: '& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper',\n};\n\nconst xsWidthMargin = 16;\n\nconst useStyle = makeStyles((theme) => ({\n root: {\n boxSizing: 'border-box',\n display: 'flex',\n maxHeight: '100%',\n position: 'fixed',\n zIndex: theme.zIndex.snackbar,\n height: 'auto',\n width: 'auto',\n transition: 'top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms',\n // container itself is invisible and should not block clicks, clicks should be passed to its children\n pointerEvents: 'none',\n [collapse.container]: {\n pointerEvents: 'all',\n },\n [collapse.wrapper]: {\n padding: `${SNACKBAR_INDENTS.snackbar.default}px 0px`,\n transition: 'padding 300ms ease 0ms',\n },\n maxWidth: `calc(100% - ${SNACKBAR_INDENTS.view.default * 2}px)`,\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n maxWidth: `calc(100% - ${xsWidthMargin * 2}px)`,\n },\n },\n rootDense: {\n [collapse.wrapper]: {\n padding: `${SNACKBAR_INDENTS.snackbar.dense}px 0px`,\n },\n },\n top: {\n top: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default,\n flexDirection: 'column',\n },\n bottom: {\n bottom: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default,\n flexDirection: 'column-reverse',\n },\n left: {\n left: SNACKBAR_INDENTS.view.default,\n [theme.breakpoints.up('sm')]: {\n alignItems: 'flex-start',\n },\n [theme.breakpoints.down('xs')]: {\n left: `${xsWidthMargin}px`,\n },\n },\n right: {\n right: SNACKBAR_INDENTS.view.default,\n [theme.breakpoints.up('sm')]: {\n alignItems: 'flex-end',\n },\n [theme.breakpoints.down('xs')]: {\n right: `${xsWidthMargin}px`,\n },\n },\n center: {\n left: '50%',\n transform: 'translateX(-50%)',\n [theme.breakpoints.up('sm')]: {\n alignItems: 'center',\n },\n },\n}));\n\ninterface SnackbarContainerProps {\n children: JSX.Element | JSX.Element[];\n className?: string;\n dense: SnackbarProviderProps['dense'];\n anchorOrigin: NonNullable;\n}\n\nconst SnackbarContainer: React.FC = (props) => {\n const classes = useStyle();\n const { className, anchorOrigin, dense, ...other } = props;\n\n const combinedClassname = clsx(\n classes[anchorOrigin.vertical],\n classes[anchorOrigin.horizontal],\n { [classes.rootDense]: dense },\n classes.root, // root should come after others to override maxWidth\n className,\n );\n\n return (\n
\n );\n};\n\nexport default React.memo(SnackbarContainer);\n","import React, { Component } from 'react';\nimport { createPortal } from 'react-dom';\nimport clsx from 'clsx';\nimport SnackbarContext from './SnackbarContext';\nimport { MESSAGES, REASONS, originKeyExtractor, omitContainerKeys, DEFAULTS, merge, transformer, isDefined } from './utils/constants';\nimport SnackbarItem from './SnackbarItem';\nimport SnackbarContainer from './SnackbarContainer';\nimport warning from './utils/warning';\nimport { SnackbarProviderProps, SnackbarKey, SnackbarMessage, OptionsObject, RequiredBy, ProviderContext, TransitionHandlerProps } from '.';\nimport createChainedFunction from './utils/createChainedFunction';\n\ntype Reducer = (state: State) => State;\ntype SnacksByPosition = { [key: string]: Snack[] };\n\nexport interface Snack extends RequiredBy {\n message: SnackbarMessage;\n open: boolean;\n entered: boolean;\n requestClose: boolean;\n}\n\ninterface State {\n snacks: Snack[];\n queue: Snack[];\n contextValue: ProviderContext;\n}\n\nclass SnackbarProvider extends Component {\n constructor(props: SnackbarProviderProps) {\n super(props);\n this.state = {\n snacks: [],\n queue: [], // eslint-disable-line react/no-unused-state\n contextValue: {\n enqueueSnackbar: this.enqueueSnackbar,\n closeSnackbar: this.closeSnackbar,\n },\n };\n }\n\n get maxSnack(): number {\n return this.props.maxSnack || DEFAULTS.maxSnack;\n }\n\n /**\n * Adds a new snackbar to the queue to be presented.\n * Returns generated or user defined key referencing the new snackbar or null\n */\n enqueueSnackbar = (message: SnackbarMessage, opts: OptionsObject = {}): SnackbarKey => {\n const {\n key,\n preventDuplicate,\n ...options\n } = opts;\n\n const hasSpecifiedKey = isDefined(key);\n const id = hasSpecifiedKey ? (key as SnackbarKey) : new Date().getTime() + Math.random();\n\n const merger = merge(options, this.props, DEFAULTS);\n const snack: Snack = {\n key: id,\n ...options,\n message,\n open: true,\n entered: false,\n requestClose: false,\n variant: merger('variant'),\n anchorOrigin: merger('anchorOrigin'),\n autoHideDuration: merger('autoHideDuration'),\n };\n\n if (options.persist) {\n snack.autoHideDuration = undefined;\n }\n\n this.setState((state) => {\n if ((preventDuplicate === undefined && this.props.preventDuplicate) || preventDuplicate) {\n const compareFunction = (item: Snack): boolean => (\n hasSpecifiedKey ? item.key === key : item.message === message\n );\n\n const inQueue = state.queue.findIndex(compareFunction) > -1;\n const inView = state.snacks.findIndex(compareFunction) > -1;\n if (inQueue || inView) {\n return state;\n }\n }\n\n return this.handleDisplaySnack({\n ...state,\n queue: [...state.queue, snack],\n });\n });\n\n return id;\n };\n\n /**\n * Reducer: Display snack if there's space for it. Otherwise, immediately\n * begin dismissing the oldest message to start showing the new one.\n */\n handleDisplaySnack: Reducer = (state) => {\n const { snacks } = state;\n if (snacks.length >= this.maxSnack) {\n return this.handleDismissOldest(state);\n }\n return this.processQueue(state);\n };\n\n /**\n * Reducer: Display items (notifications) in the queue if there's space for them.\n */\n processQueue: Reducer = (state) => {\n const { queue, snacks } = state;\n if (queue.length > 0) {\n return {\n ...state,\n snacks: [...snacks, queue[0]],\n queue: queue.slice(1, queue.length),\n };\n }\n return state;\n };\n\n /**\n * Reducer: Hide oldest snackbar on the screen because there exists a new one which we have to display.\n * (ignoring the one with 'persist' flag. i.e. explicitly told by user not to get dismissed).\n *\n * Note 1: If there is already a message leaving the screen, no new messages are dismissed.\n * Note 2: If the oldest message has not yet entered the screen, only a request to close the\n * snackbar is made. Once it entered the screen, it will be immediately dismissed.\n */\n handleDismissOldest: Reducer = (state) => {\n if (state.snacks.some(item => !item.open || item.requestClose)) {\n return state;\n }\n\n let popped = false;\n let ignore = false;\n\n const persistentCount = state.snacks.reduce((acc, current) => (\n acc + (current.open && current.persist ? 1 : 0)\n ), 0);\n\n if (persistentCount === this.maxSnack) {\n warning(MESSAGES.NO_PERSIST_ALL);\n ignore = true;\n }\n\n const snacks = state.snacks.map((item) => {\n if (!popped && (!item.persist || ignore)) {\n popped = true;\n\n if (!item.entered) {\n return {\n ...item,\n requestClose: true,\n };\n }\n\n if (item.onClose) item.onClose(null, REASONS.MAXSNACK, item.key);\n if (this.props.onClose) this.props.onClose(null, REASONS.MAXSNACK, item.key);\n\n return {\n ...item,\n open: false,\n };\n }\n\n return { ...item };\n });\n\n return { ...state, snacks };\n };\n\n /**\n * Set the entered state of the snackbar with the given key.\n */\n handleEnteredSnack: TransitionHandlerProps['onEntered'] = (node, isAppearing, key) => {\n if (!isDefined(key)) {\n throw new Error('handleEnteredSnack Cannot be called with undefined key');\n }\n\n this.setState(({ snacks }) => ({\n snacks: snacks.map(item => (\n item.key === key ? { ...item, entered: true } : { ...item }\n )),\n }));\n }\n\n /**\n * Hide a snackbar after its timeout.\n */\n handleCloseSnack: TransitionHandlerProps['onClose'] = (event, reason, key) => {\n // should not use createChainedFunction for onClose.\n // because this.closeSnackbar called this function\n if (this.props.onClose) {\n this.props.onClose(event, reason, key);\n }\n\n if (reason === REASONS.CLICKAWAY) return;\n const shouldCloseAll = key === undefined;\n\n this.setState(({ snacks, queue }) => ({\n snacks: snacks.map((item) => {\n if (!shouldCloseAll && item.key !== key) {\n return { ...item };\n }\n\n return item.entered\n ? { ...item, open: false }\n : { ...item, requestClose: true };\n }),\n queue: queue.filter(item => item.key !== key), // eslint-disable-line react/no-unused-state\n }));\n };\n\n /**\n * Close snackbar with the given key\n */\n closeSnackbar: ProviderContext['closeSnackbar'] = (key) => {\n // call individual snackbar onClose callback passed through options parameter\n const toBeClosed = this.state.snacks.find(item => item.key === key);\n if (isDefined(key) && toBeClosed && toBeClosed.onClose) {\n toBeClosed.onClose(null, REASONS.INSTRUCTED, key);\n }\n\n this.handleCloseSnack(null, REASONS.INSTRUCTED, key);\n }\n\n /**\n * When we set open attribute of a snackbar to false (i.e. after we hide a snackbar),\n * it leaves the screen and immediately after leaving animation is done, this method\n * gets called. We remove the hidden snackbar from state and then display notifications\n * waiting in the queue (if any). If after this process the queue is not empty, the\n * oldest message is dismissed.\n */\n // @ts-ignore\n handleExitedSnack: TransitionHandlerProps['onExited'] = (event, key1, key2) => {\n const key = key1 || key2;\n if (!isDefined(key)) {\n throw new Error('handleExitedSnack Cannot be called with undefined key');\n }\n\n this.setState((state) => {\n const newState = this.processQueue({\n ...state,\n snacks: state.snacks.filter(item => item.key !== key),\n });\n\n if (newState.queue.length === 0) {\n return newState;\n }\n\n return this.handleDismissOldest(newState);\n });\n };\n\n render(): JSX.Element {\n const { contextValue } = this.state;\n const {\n maxSnack: dontspread1,\n preventDuplicate: dontspread2,\n variant: dontspread3,\n anchorOrigin: dontspread4,\n iconVariant,\n dense = DEFAULTS.dense,\n hideIconVariant = DEFAULTS.hideIconVariant,\n domRoot,\n children,\n classes = {},\n ...props\n } = this.props;\n\n const categ = this.state.snacks.reduce((acc, current) => {\n const category = originKeyExtractor(current.anchorOrigin);\n const existingOfCategory = acc[category] || [];\n return {\n ...acc,\n [category]: [...existingOfCategory, current],\n };\n }, {});\n\n const snackbars = Object.keys(categ).map((origin) => {\n const snacks = categ[origin];\n return (\n \n {snacks.map(snack => (\n \n ))}\n \n );\n });\n\n return (\n \n {children}\n {domRoot ? createPortal(snackbars, domRoot) : snackbars}\n \n );\n }\n}\n\nexport default SnackbarProvider;\n","import { useContext } from 'react';\nimport SnackbarContext from './SnackbarContext';\nimport { ProviderContext } from '.';\n\nexport default (): ProviderContext => useContext(SnackbarContext);\n","var grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nexport default grey;","var indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nexport default indigo;","var pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nexport default pink;","var red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","var orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","var blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","var green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport useControlled from '../utils/useControlled';\nimport useFormControl from '../FormControl/useFormControl';\nimport withStyles from '../styles/withStyles';\nimport IconButton from '../IconButton';\nexport var styles = {\n root: {\n padding: 9\n },\n checked: {},\n disabled: {},\n input: {\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n var autoFocus = props.autoFocus,\n checkedProp = props.checked,\n checkedIcon = props.checkedIcon,\n classes = props.classes,\n className = props.className,\n defaultChecked = props.defaultChecked,\n disabledProp = props.disabled,\n icon = props.icon,\n id = props.id,\n inputProps = props.inputProps,\n inputRef = props.inputRef,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onFocus = props.onFocus,\n readOnly = props.readOnly,\n required = props.required,\n tabIndex = props.tabIndex,\n type = props.type,\n value = props.value,\n other = _objectWithoutProperties(props, [\"autoFocus\", \"checked\", \"checkedIcon\", \"classes\", \"className\", \"defaultChecked\", \"disabled\", \"icon\", \"id\", \"inputProps\", \"inputRef\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"readOnly\", \"required\", \"tabIndex\", \"type\", \"value\"]);\n\n var _useControlled = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n checked = _useControlled2[0],\n setCheckedState = _useControlled2[1];\n\n var muiFormControl = useFormControl();\n\n var handleFocus = function handleFocus(event) {\n if (onFocus) {\n onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n\n var handleInputChange = function handleInputChange(event) {\n var newChecked = event.target.checked;\n setCheckedState(newChecked);\n\n if (onChange) {\n // TODO v5: remove the second argument.\n onChange(event, newChecked);\n }\n };\n\n var disabled = disabledProp;\n\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n\n var hasLabelFor = type === 'checkbox' || type === 'radio';\n return /*#__PURE__*/React.createElement(IconButton, _extends({\n component: \"span\",\n className: clsx(classes.root, className, checked && classes.checked, disabled && classes.disabled),\n disabled: disabled,\n tabIndex: null,\n role: undefined,\n onFocus: handleFocus,\n onBlur: handleBlur,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"input\", _extends({\n autoFocus: autoFocus,\n checked: checkedProp,\n defaultChecked: defaultChecked,\n className: classes.input,\n disabled: disabled,\n id: hasLabelFor && id,\n name: name,\n onChange: handleInputChange,\n readOnly: readOnly,\n ref: inputRef,\n required: required,\n tabIndex: tabIndex,\n type: type,\n value: value\n }, inputProps)), checked ? checkedIcon : icon);\n}); // NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\n\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /*\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwitchBase'\n})(SwitchBase);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Clear');\n\nexports.default = _default;","import React from 'react';\nexport default React.createContext(null);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: theme.typography.pxToRem(24),\n transition: theme.transitions.create('fill', {\n duration: theme.transitions.duration.shorter\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(35)\n }\n };\n};\nvar SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'svg' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n htmlColor = props.htmlColor,\n titleAccess = props.titleAccess,\n _props$viewBox = props.viewBox,\n viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"titleAccess\", \"viewBox\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n focusable: \"false\",\n viewBox: viewBox,\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, other), children, titleAccess ? /*#__PURE__*/React.createElement(\"title\", null, titleAccess) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n */\n color: PropTypes.oneOf(['action', 'disabled', 'error', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this property.\n */\n shapeRendering: PropTypes.string,\n\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default withStyles(styles, {\n name: 'MuiSvgIcon'\n})(SvgIcon);","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useEventCallback from '../utils/useEventCallback';\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = React.useState(false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = useEventCallback(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: childClassName\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Ripple from './Ripple';\nvar DURATION = 550;\nexport var DELAY_RIPPLE = 80;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n },\n\n /* Styles applied to the internal `Ripple` components `ripple` class. */\n ripple: {\n opacity: 0,\n position: 'absolute'\n },\n\n /* Styles applied to the internal `Ripple` components `rippleVisible` class. */\n rippleVisible: {\n opacity: 0.3,\n transform: 'scale(1)',\n animation: \"$enter \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */\n ripplePulsate: {\n animationDuration: \"\".concat(theme.transitions.duration.shorter, \"ms\")\n },\n\n /* Styles applied to the internal `Ripple` components `child` class. */\n child: {\n opacity: 1,\n display: 'block',\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the internal `Ripple` components `childLeaving` class. */\n childLeaving: {\n opacity: 0,\n animation: \"$exit \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `childPulsate` class. */\n childPulsate: {\n position: 'absolute',\n left: 0,\n top: 0,\n animation: \"$pulsate 2500ms \".concat(theme.transitions.easing.easeInOut, \" 200ms infinite\")\n },\n '@keyframes enter': {\n '0%': {\n transform: 'scale(0)',\n opacity: 0.1\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.3\n }\n },\n '@keyframes exit': {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n },\n '@keyframes pulsate': {\n '0%': {\n transform: 'scale(1)'\n },\n '50%': {\n transform: 'scale(0.92)'\n },\n '100%': {\n transform: 'scale(1)'\n }\n }\n };\n};\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nvar TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(props, ref) {\n var _props$center = props.center,\n centerProp = _props$center === void 0 ? false : _props$center,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"center\", \"classes\", \"className\"]);\n\n var _React$useState = React.useState([]),\n ripples = _React$useState[0],\n setRipples = _React$useState[1];\n\n var nextKey = React.useRef(0);\n var rippleCallback = React.useRef(null);\n React.useEffect(function () {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n var ignoringMouseDown = React.useRef(false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n var startTimer = React.useRef(null); // This is the hook called once the previous timeout is ready.\n\n var startTimerCommit = React.useRef(null);\n var container = React.useRef(null);\n React.useEffect(function () {\n return function () {\n clearTimeout(startTimer.current);\n };\n }, []);\n var startCommit = React.useCallback(function (params) {\n var pulsate = params.pulsate,\n rippleX = params.rippleX,\n rippleY = params.rippleY,\n rippleSize = params.rippleSize,\n cb = params.cb;\n setRipples(function (oldRipples) {\n return [].concat(_toConsumableArray(oldRipples), [/*#__PURE__*/React.createElement(Ripple, {\n key: nextKey.current,\n classes: classes,\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n })]);\n });\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n var start = React.useCallback(function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cb = arguments.length > 2 ? arguments[2] : undefined;\n var _options$pulsate = options.pulsate,\n pulsate = _options$pulsate === void 0 ? false : _options$pulsate,\n _options$center = options.center,\n center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,\n _options$fakeElement = options.fakeElement,\n fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n var element = fakeElement ? null : container.current;\n var rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n var rippleX;\n var rippleY;\n var rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n var _ref = event.touches ? event.touches[0] : event,\n clientX = _ref.clientX,\n clientY = _ref.clientY;\n\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = function () {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(function () {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }\n }, [centerProp, startCommit]);\n var pulsate = React.useCallback(function () {\n start({}, {\n pulsate: true\n });\n }, [start]);\n var stop = React.useCallback(function (event, cb) {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n event.persist();\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(function () {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(function (oldRipples) {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n React.useImperativeHandle(ref, function () {\n return {\n pulsate: pulsate,\n start: start,\n stop: stop\n };\n }, [pulsate, start, stop]);\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, className),\n ref: container\n }, other), /*#__PURE__*/React.createElement(TransitionGroup, {\n component: null,\n exit: true\n }, ripples));\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiTouchRipple'\n})( /*#__PURE__*/React.memo(TouchRipple));","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport clsx from 'clsx';\nimport { elementTypeAcceptingRef, refType } from '@material-ui/utils';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport TouchRipple from './TouchRipple';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = _objectWithoutProperties(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = React.useRef(null);\n\n function getButtonNode() {\n // #StrictMode ready\n return ReactDOM.findDOMNode(buttonRef.current);\n }\n\n var rippleRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n React.useImperativeHandle(action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n React.useEffect(function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return useEventCallback(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = useEventCallback(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = React.useRef(false);\n var handleKeyDown = useEventCallback(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = useEventCallback(function (event) {\n // calling preventDefault in keyUp on a \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _styles = require(\"@material-ui/styles\");\n\nvar _defaultTheme = _interopRequireDefault(require(\"./defaultTheme\"));\n\nfunction withStyles(stylesOrCreator, options) {\n return (0, _styles.withStyles)(stylesOrCreator, (0, _extends2.default)({\n defaultTheme: _defaultTheme.default\n }, options));\n}\n\nvar _default = withStyles;\nexports.default = _default;","/** @license Material-UI v4.12.1\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport { default as borders } from './borders';\nexport * from './borders';\nexport { default as breakpoints } from './breakpoints';\nexport { default as compose } from './compose';\nexport { default as styleFunctionSx } from './styleFunctionSx';\nexport * from './styleFunctionSx';\nexport { default as display } from './display';\nexport { default as flexbox } from './flexbox';\nexport * from './flexbox';\nexport { default as grid } from './grid';\nexport * from './grid';\nexport { default as palette } from './palette';\nexport * from './palette';\nexport { default as positions } from './positions';\nexport * from './positions';\nexport { default as shadows } from './shadows';\nexport { default as sizing } from './sizing';\nexport * from './sizing';\nexport { default as spacing } from './spacing';\nexport * from './spacing';\nexport { default as style } from './style';\nexport { default as typography } from './typography';\nexport * from './typography';","export default function requirePropFactory(componentNameInError) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n var requireProp = function requireProp(requiredProp) {\n return function (props, propName, componentName, location, propFullName) {\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameInError, \"` must be used on `\").concat(requiredProp, \"`.\"));\n }\n\n return null;\n };\n };\n\n return requireProp;\n}","import { borders, compose, display, flexbox, grid, palette, positions, shadows, sizing, spacing, typography, styleFunctionSx } from '@material-ui/system';\nimport styled from '../styles/styled';\nexport var styleFunction = styleFunctionSx(compose(borders, display, flexbox, grid, positions, palette, shadows, sizing, spacing, typography));\n/**\n * @ignore - do not document.\n */\n\nvar Box = styled('div')(styleFunction, {\n name: 'MuiBox'\n});\nexport default Box;","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { makeStyles as makeStylesWithoutDefault } from '@material-ui/styles';\nimport defaultTheme from './defaultTheme';\n\nfunction makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return makeStylesWithoutDefault(stylesOrCreator, _extends({\n defaultTheme: defaultTheme\n }, options));\n}\n\nexport default makeStyles;","import style from './style';\nimport compose from './compose';\nexport var displayPrint = style({\n prop: 'displayPrint',\n cssProperty: false,\n transform: function transform(value) {\n return {\n '@media print': {\n display: value\n }\n };\n }\n});\nexport var displayRaw = style({\n prop: 'display'\n});\nexport var overflow = style({\n prop: 'overflow'\n});\nexport var textOverflow = style({\n prop: 'textOverflow'\n});\nexport var visibility = style({\n prop: 'visibility'\n});\nexport var whiteSpace = style({\n prop: 'whiteSpace'\n});\nexport default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);","import style from './style';\nvar boxShadow = style({\n prop: 'boxShadow',\n themeKey: 'shadows'\n});\nexport default boxShadow;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 12,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE 11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -12,\n '$sizeSmall&': {\n marginLeft: -3\n }\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -12,\n '$sizeSmall&': {\n marginRight: -3\n }\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: 3,\n fontSize: theme.typography.pxToRem(18)\n },\n\n /* Styles applied to the children container element. */\n label: {\n width: '100%',\n display: 'flex',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n }\n };\n};\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nvar IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {\n var _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"edge\", \"children\", \"classes\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], disabled && classes.disabled, size === \"small\" && classes[\"size\".concat(capitalize(size))], {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge]),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes = {\n /**\n * The icon element.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n var found = React.Children.toArray(props.children).some(function (child) {\n return /*#__PURE__*/React.isValidElement(child) && child.props.onClick;\n });\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener ' + 'to a child of a button element.', 'Firefox will never trigger the event.', 'You should move the onClick listener to the parent button element.', 'https://github.com/mui-org/material-ui/issues/13957'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['start', 'end', false]),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiIconButton'\n})(IconButton);","import { createTheme } from '@material-ui/core/styles';\n\nimport orange from '@material-ui/core/colors/orange';\n\nconst step = (16 - 5) / 23 / 100;\n\n/**\n * Convert hex color in the format '#rrggbb' or '#rgb' to an RGB object.\n * @param {string} hex\n * @returns {{r: number, g: number, b: number}}\n */\nfunction toInt(hex) {\n const rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n\n if (hex.length === 7) {\n rgb.r = parseInt(hex.substr(1, 2), 16);\n rgb.g = parseInt(hex.substr(3, 2), 16);\n rgb.b = parseInt(hex.substr(5, 2), 16);\n } else if (hex.length === 4) {\n\n const r = hex.substr(1, 1);\n const g = hex.substr(2, 1);\n const b = hex.substr(3, 1);\n\n rgb.r = parseInt(r + r, 16);\n rgb.g = parseInt(g + g, 16);\n rgb.b = parseInt(b + b, 16);\n }\n\n return rgb;\n}\n\n/**\n * Convert an RGB object to a hex color string in the format '#rrggbb'.\n * @param {{r: number, g: number, b: number}} int\n * @returns {string}\n */\nfunction toHex(int) {\n return '#' + Math.round(int.r).toString(16) + Math.round(int.g).toString(16) + Math.round(int.b).toString(16);\n}\n\n/**\n * @param {string} color color in the format '#rrggbb' or '#rgb'\n * @param {string} overlayColor overlay color in the format '#rrggbb' or '#rgb'\n * @param {number} elevation elevation as an integer starting with 1\n * @returns {string} the hex color string in the format '#rrggbb'\n */\nfunction getElevation(color, overlayColor, elevation) {\n const rgb = toInt(color);\n const overlay = toInt(overlayColor);\n\n rgb.r += overlay.r * (0.05 + step * (elevation - 1));\n rgb.g += overlay.g * (0.05 + step * (elevation - 1));\n rgb.b += overlay.b * (0.05 + step * (elevation - 1));\n\n return toHex(rgb);\n}\n\n/**\n * Get all 24 elevations of the given color and overlay.\n * @param {string} color color in the format '#rrggbb' or '#rgb'\n * @param {string} overlay overlay color in the format '#rrggbb' or '#rgb'\n * @returns {import('@material-ui/core/styles/withStyles').CSSProperties}\n */\nfunction getElevations(color, overlay) {\n /** @type {import('@material-ui/core/styles/withStyles').CSSProperties} */\n const elevations = {};\n\n for(let i = 1; i <= 24; i++) {\n elevations['elevation' + i] = {\n backgroundColor: getElevation(color, overlay, i)\n }\n }\n\n return elevations;\n}\n\n/**\n * The theme creation factory function.\n * @param {string} type\n * @returns {import('./types').Theme}\n */\nconst Theme = type => {\n let theme;\n if (type === 'dark') {\n theme = {\n name: type,\n palette: {\n type: 'dark',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n primary: {\n main: '#4dabf5'\n },\n secondary: {\n main: '#436a93'\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff'\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#272727'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100]\n }\n }\n },\n MuiPaper: getElevations('#121212', '#fff')\n }\n };\n } else if (type === 'blue') {\n theme = {\n name: type,\n palette: {\n type: 'dark',\n background: {\n paper: '#151d21',\n default: '#151d21'\n },\n primary: {\n main: '#4dabf5'\n },\n secondary: {\n main: '#436a93'\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff'\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#2a3135'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100]\n }\n }\n },\n MuiPaper: getElevations('#151d21', '#fff')\n }\n };\n } else if (type === 'colored') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#3399CC'\n },\n secondary: {\n main: '#164477'\n },\n expert: '#96fc96'\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#3399CC'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else if (type === 'PT') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#0F99DE'\n },\n secondary: {\n main: '#88A536'\n },\n expert: '#BD1B24'\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#0F99DE'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else if (type === 'DX') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#F5F5F7'\n },\n secondary: {\n main: '#a9a9a9'\n },\n expert: '#BD1B24',\n text: {\n primary: '#007AFE',\n secondary: '#007AFE',\n disabled: '#007AFEAA',\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#a9a9a9'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#3399CC'\n },\n secondary: {\n main: '#164477'\n },\n expert: '#14bb00'\n },\n overrides: {\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n }\n\n theme.toolbar = {\n height: 48\n };\n\n // add save toolbar\n theme.saveToolbar = {\n background: theme.palette.primary.main,\n button: {\n borderRadius: 3,\n height: 32\n }\n };\n\n return createTheme(theme);\n};\n\nexport default Theme;\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport './loader.css'\n\nconst styles = theme => ({\n\n});\n\n/**\n * @typedef {object} LoaderProps\n * @property {string} [key] The key to identify this component.\n * @property {number} [size] The size in pixels of this loader.\n * @property {string} [themeType] The chosen theme type.\n * @property {string} [theme] The chosen theme.\n *\n * @extends {React.Component}\n */\nclass Loader extends React.Component {\n /**\n * @param {LoaderProps} props\n */\n constructor(props) {\n super(props);\n this.size = this.props.size || 234;\n }\n\n render() {\n const theme = this.props.themeType || this.props.theme || 'light';\n return
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
;\n }\n}\n\nLoader.propTypes = {\n size: PropTypes.number,\n themeType: PropTypes.string\n};\n\n/** @type {typeof Loader} */\nconst _export = withStyles(styles)(Loader);\nexport default _export;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z\"\n}), 'Save');\n\nexports.default = _default;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { isFilled, isAdornedStart } from '../InputBase/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport isMuiElement from '../utils/isMuiElement';\nimport FormControlContext from './FormControlContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top' // Fix alignment issue on Safari.\n\n },\n\n /* Styles applied to the root element if `margin=\"normal\"`. */\n marginNormal: {\n marginTop: 16,\n marginBottom: 8\n },\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n marginTop: 8,\n marginBottom: 4\n },\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n }\n};\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/components/text-fields/#components).\n *\n * ```jsx\n * \n * Email address\n * \n * We'll never share your email.\n * \n * ```\n *\n * ⚠️Only one input can be used within a FormControl.\n */\n\nvar FormControl = /*#__PURE__*/React.forwardRef(function FormControl(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n visuallyFocused = props.focused,\n _props$hiddenLabel = props.hiddenLabel,\n hiddenLabel = _props$hiddenLabel === void 0 ? false : _props$hiddenLabel,\n _props$margin = props.margin,\n margin = _props$margin === void 0 ? 'none' : _props$margin,\n _props$required = props.required,\n required = _props$required === void 0 ? false : _props$required,\n size = props.size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"fullWidth\", \"focused\", \"hiddenLabel\", \"margin\", \"required\", \"size\", \"variant\"]);\n\n var _React$useState = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialAdornedStart = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n var input = isMuiElement(child, ['Select']) ? child.props.input : child;\n\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n\n return initialAdornedStart;\n }),\n adornedStart = _React$useState[0],\n setAdornedStart = _React$useState[1];\n\n var _React$useState2 = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialFilled = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n if (isFilled(child.props, true)) {\n initialFilled = true;\n }\n });\n }\n\n return initialFilled;\n }),\n filled = _React$useState2[0],\n setFilled = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _focused = _React$useState3[0],\n setFocused = _React$useState3[1];\n\n var focused = visuallyFocused !== undefined ? visuallyFocused : _focused;\n\n if (disabled && focused) {\n setFocused(false);\n }\n\n var registerEffect;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var registeredInput = React.useRef(false);\n\n registerEffect = function registerEffect() {\n if (registeredInput.current) {\n console.error(['Material-UI: There are multiple InputBase components inside a FormControl.', 'This is not supported. It might cause infinite rendering loops.', 'Only use one InputBase.'].join('\\n'));\n }\n\n registeredInput.current = true;\n return function () {\n registeredInput.current = false;\n };\n };\n }\n\n var onFilled = React.useCallback(function () {\n setFilled(true);\n }, []);\n var onEmpty = React.useCallback(function () {\n setFilled(false);\n }, []);\n var childContext = {\n adornedStart: adornedStart,\n setAdornedStart: setAdornedStart,\n color: color,\n disabled: disabled,\n error: error,\n filled: filled,\n focused: focused,\n fullWidth: fullWidth,\n hiddenLabel: hiddenLabel,\n margin: (size === 'small' ? 'dense' : undefined) || margin,\n onBlur: function onBlur() {\n setFocused(false);\n },\n onEmpty: onEmpty,\n onFilled: onFilled,\n onFocus: function onFocus() {\n setFocused(true);\n },\n registerEffect: registerEffect,\n required: required,\n variant: variant\n };\n return /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: childContext\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, margin !== 'none' && classes[\"margin\".concat(capitalize(margin))], fullWidth && classes.fullWidth),\n ref: ref\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The contents of the form control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label should be displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the component will be displayed in focused state.\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the component will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label will be hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, the label will indicate that the input is required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the text field.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormControl'\n})(FormControl);","import { getGlobalObject } from './global';\nimport { isString } from './is';\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown, keyAttrs?: string[]): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n // eslint-disable-next-line no-plusplus\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n const elem = el as {\n tagName?: string;\n id?: string;\n className?: string;\n getAttribute(key: string): string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n const global = getGlobalObject();\n try {\n return global.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n","import { isDebugBuild } from './env';\nimport { getGlobalObject } from './global';\nimport { logger } from './logger';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === `function`) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n if (isDebugBuild()) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (global as any).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsv2json = exports.json2tsv = void 0;\nconst json2tsv_1 = require(\"./json2tsv\");\nvar json2tsv_2 = require(\"./json2tsv\");\nObject.defineProperty(exports, \"json2tsv\", { enumerable: true, get: function () { return json2tsv_2.json2tsv; } });\nconst tsv2json_1 = require(\"./tsv2json\");\nvar tsv2json_2 = require(\"./tsv2json\");\nObject.defineProperty(exports, \"tsv2json\", { enumerable: true, get: function () { return tsv2json_2.tsv2json; } });\n// eslint-disable-next-line import/no-anonymous-default-export\nexports.default = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\n// For CommonJS default export support\nmodule.exports = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\nmodule.exports.default = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\n//# sourceMappingURL=index.js.map","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\n\nfunction getScale(value) {\n return \"scale(\".concat(value, \", \").concat(Math.pow(value, 2), \")\");\n}\n\nvar styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n/**\n * The Grow transition is used by the [Tooltip](/components/tooltips/) and\n * [Popover](/components/popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? 'auto' : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var timer = React.useRef();\n var autoTimeout = React.useRef();\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var _getTransitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration,\n delay = _getTransitionProps.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay\n })].join(',');\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var _getTransitionProps2 = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration,\n delay = _getTransitionProps2.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay || duration * 0.333\n })].join(',');\n node.style.opacity = '0';\n node.style.transform = getScale(0.75);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTimeout.current || 0);\n }\n };\n\n React.useEffect(function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, show the component; triggers the enter or exit animation.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;","/* eslint-disable import/prefer-default-export */\n// Global index counter to preserve source order.\n// We create the style sheet during the creation of the component,\n// children are handled after the parents, so the order of style elements would be parent->child.\n// It is a problem though when a parent passes a className\n// which needs to override any child's styles.\n// StyleSheet of the child has a higher specificity, because of the source order.\n// So our solution is to render sheets them in the reverse order child->sheet, so\n// that parent has a higher specificity.\nvar indexCounter = -1e9;\nexport function increment() {\n indexCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (indexCounter >= 0) {\n console.warn(['Material-UI: You might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join('\\n'));\n }\n }\n\n return indexCounter;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { deepmerge } from '@material-ui/utils';\nimport noopTheme from './noopTheme';\nexport default function getStylesCreator(stylesOrCreator) {\n var themingEnabled = typeof stylesOrCreator === 'function';\n\n if (process.env.NODE_ENV !== 'production') {\n if (_typeof(stylesOrCreator) !== 'object' && !themingEnabled) {\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You need to provide a function generating the styles or a styles object.'].join('\\n'));\n }\n }\n\n return {\n create: function create(theme, name) {\n var styles;\n\n try {\n styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n if (themingEnabled === true && theme === noopTheme) {\n // TODO: prepend error message/name instead\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n throw err;\n }\n\n if (!name || !theme.overrides || !theme.overrides[name]) {\n return styles;\n }\n\n var overrides = theme.overrides[name];\n\n var stylesWithOverrides = _extends({}, styles);\n\n Object.keys(overrides).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!stylesWithOverrides[key]) {\n console.warn(['Material-UI: You are trying to override a style that does not exist.', \"Fix the `\".concat(key, \"` key of `theme.overrides.\").concat(name, \"`.\")].join('\\n'));\n }\n }\n\n stylesWithOverrides[key] = deepmerge(stylesWithOverrides[key], overrides[key]);\n });\n return stylesWithOverrides;\n },\n options: {}\n };\n}","// We use the same empty object to ref count the styles that don't need a theme object.\nvar noopTheme = {};\nexport default noopTheme;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { getDynamicStyles } from 'jss';\nimport mergeClasses from '../mergeClasses';\nimport multiKeyStore from './multiKeyStore';\nimport useTheme from '../useTheme';\nimport { StylesContext } from '../StylesProvider';\nimport { increment } from './indexCounter';\nimport getStylesCreator from '../getStylesCreator';\nimport noopTheme from '../getStylesCreator/noopTheme';\n\nfunction getClasses(_ref, classes, Component) {\n var state = _ref.state,\n stylesOptions = _ref.stylesOptions;\n\n if (stylesOptions.disableGeneration) {\n return classes || {};\n }\n\n if (!state.cacheClasses) {\n state.cacheClasses = {\n // Cache for the finalized classes value.\n value: null,\n // Cache for the last used classes prop pointer.\n lastProp: null,\n // Cache for the last used rendered classes pointer.\n lastJSS: {}\n };\n } // Tracks if either the rendered classes or classes prop has changed,\n // requiring the generation of a new finalized classes object.\n\n\n var generate = false;\n\n if (state.classes !== state.cacheClasses.lastJSS) {\n state.cacheClasses.lastJSS = state.classes;\n generate = true;\n }\n\n if (classes !== state.cacheClasses.lastProp) {\n state.cacheClasses.lastProp = classes;\n generate = true;\n }\n\n if (generate) {\n state.cacheClasses.value = mergeClasses({\n baseClasses: state.cacheClasses.lastJSS,\n newClasses: classes,\n Component: Component\n });\n }\n\n return state.cacheClasses.value;\n}\n\nfunction attach(_ref2, props) {\n var state = _ref2.state,\n theme = _ref2.theme,\n stylesOptions = _ref2.stylesOptions,\n stylesCreator = _ref2.stylesCreator,\n name = _ref2.name;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n\n if (!sheetManager) {\n sheetManager = {\n refs: 0,\n staticSheet: null,\n dynamicStyles: null\n };\n multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);\n }\n\n var options = _extends({}, stylesCreator.options, stylesOptions, {\n theme: theme,\n flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'\n });\n\n options.generateId = options.serverGenerateClassName || options.generateClassName;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n var staticSheet;\n\n if (stylesOptions.sheetsCache) {\n staticSheet = multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);\n }\n\n var styles = stylesCreator.create(theme, name);\n\n if (!staticSheet) {\n staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({\n link: false\n }, options));\n staticSheet.attach();\n\n if (stylesOptions.sheetsCache) {\n multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);\n }\n }\n\n if (sheetsRegistry) {\n sheetsRegistry.add(staticSheet);\n }\n\n sheetManager.staticSheet = staticSheet;\n sheetManager.dynamicStyles = getDynamicStyles(styles);\n }\n\n if (sheetManager.dynamicStyles) {\n var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({\n link: true\n }, options));\n dynamicSheet.update(props);\n dynamicSheet.attach();\n state.dynamicSheet = dynamicSheet;\n state.classes = mergeClasses({\n baseClasses: sheetManager.staticSheet.classes,\n newClasses: dynamicSheet.classes\n });\n\n if (sheetsRegistry) {\n sheetsRegistry.add(dynamicSheet);\n }\n } else {\n state.classes = sheetManager.staticSheet.classes;\n }\n\n sheetManager.refs += 1;\n}\n\nfunction update(_ref3, props) {\n var state = _ref3.state;\n\n if (state.dynamicSheet) {\n state.dynamicSheet.update(props);\n }\n}\n\nfunction detach(_ref4) {\n var state = _ref4.state,\n theme = _ref4.theme,\n stylesOptions = _ref4.stylesOptions,\n stylesCreator = _ref4.stylesCreator;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n sheetManager.refs -= 1;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);\n stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(sheetManager.staticSheet);\n }\n }\n\n if (state.dynamicSheet) {\n stylesOptions.jss.removeStyleSheet(state.dynamicSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(state.dynamicSheet);\n }\n }\n}\n\nfunction useSynchronousEffect(func, values) {\n var key = React.useRef([]);\n var output; // Store \"generation\" key. Just returns a new object every time\n\n var currentKey = React.useMemo(function () {\n return {};\n }, values); // eslint-disable-line react-hooks/exhaustive-deps\n // \"the first render\", or \"memo dropped the value\"\n\n if (key.current !== currentKey) {\n key.current = currentKey;\n output = func();\n }\n\n React.useEffect(function () {\n return function () {\n if (output) {\n output();\n }\n };\n }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n\nexport default function makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n classNamePrefixOption = options.classNamePrefix,\n Component = options.Component,\n _options$defaultTheme = options.defaultTheme,\n defaultTheme = _options$defaultTheme === void 0 ? noopTheme : _options$defaultTheme,\n stylesOptions2 = _objectWithoutProperties(options, [\"name\", \"classNamePrefix\", \"Component\", \"defaultTheme\"]);\n\n var stylesCreator = getStylesCreator(stylesOrCreator);\n var classNamePrefix = name || classNamePrefixOption || 'makeStyles';\n stylesCreator.options = {\n index: increment(),\n name: name,\n meta: classNamePrefix,\n classNamePrefix: classNamePrefix\n };\n\n var useStyles = function useStyles() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var theme = useTheme() || defaultTheme;\n\n var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2);\n\n var instance = React.useRef();\n var shouldUpdate = React.useRef();\n useSynchronousEffect(function () {\n var current = {\n name: name,\n state: {},\n stylesCreator: stylesCreator,\n stylesOptions: stylesOptions,\n theme: theme\n };\n attach(current, props);\n shouldUpdate.current = false;\n instance.current = current;\n return function () {\n detach(current);\n };\n }, [theme, stylesCreator]);\n React.useEffect(function () {\n if (shouldUpdate.current) {\n update(instance.current, props);\n }\n\n shouldUpdate.current = true;\n });\n var classes = getClasses(instance.current, props.classes, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(classes);\n }\n\n return classes;\n };\n\n return useStyles;\n}","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nvar _default = orange;\nexports.default = _default;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.text.primary,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n },\n '&$disabled': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // Ensure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `variant=\"text\"`. */\n text: {\n padding: '6px 8px'\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"primary\"`. */\n textPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"secondary\"`. */\n textSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n padding: '5px 15px',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabledBackground)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(alpha(theme.palette.primary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.primary.main),\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(alpha(theme.palette.secondary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.secondary.main),\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabled)\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&:active': {\n boxShadow: theme.shadows[8]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"primary\"`. */\n containedPrimary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"secondary\"`. */\n containedSecondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n '&$focusVisible': {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n '&$disabled': {\n boxShadow: 'none'\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit',\n borderColor: 'currentColor'\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"text\"`. */\n textSizeSmall: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"text\"`. */\n textSizeLarge: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"outlined\"`. */\n outlinedSizeSmall: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"outlined\"`. */\n outlinedSizeLarge: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"contained\"`. */\n containedSizeSmall: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"contained\"`. */\n containedSizeLarge: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {},\n\n /* Styles applied to the root element if `size=\"large\"`. */\n sizeLarge: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the startIcon element if supplied. */\n startIcon: {\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n '&$iconSizeSmall': {\n marginLeft: -2\n }\n },\n\n /* Styles applied to the endIcon element if supplied. */\n endIcon: {\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n '&$iconSizeSmall': {\n marginRight: -2\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"small\"`. */\n iconSizeSmall: {\n '& > *:first-child': {\n fontSize: 18\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"medium\"`. */\n iconSizeMedium: {\n '& > *:first-child': {\n fontSize: 20\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"large\"`. */\n iconSizeLarge: {\n '& > *:first-child': {\n fontSize: 22\n }\n }\n };\n};\nvar Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n endIconProp = props.endIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n startIconProp = props.startIcon,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'text' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"]);\n\n var startIcon = startIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.startIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, startIconProp);\n var endIcon = endIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.endIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, endIconProp);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes[\"\".concat(variant).concat(capitalize(color))], size !== 'medium' && [classes[\"\".concat(variant, \"Size\").concat(capitalize(size))], classes[\"size\".concat(capitalize(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, startIcon, children, endIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButton'\n})(Button);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport Modal from '../Modal';\nimport Backdrop from '../Backdrop';\nimport Fade from '../Fade';\nimport { duration } from '../styles/transitions';\nimport Paper from '../Paper';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n '@media print': {\n // Use !important to override the Modal inline-style.\n position: 'absolute !important'\n }\n },\n\n /* Styles applied to the container element if `scroll=\"paper\"`. */\n scrollPaper: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the container element if `scroll=\"body\"`. */\n scrollBody: {\n overflowY: 'auto',\n overflowX: 'hidden',\n textAlign: 'center',\n '&:after': {\n content: '\"\"',\n display: 'inline-block',\n verticalAlign: 'middle',\n height: '100%',\n width: '0'\n }\n },\n\n /* Styles applied to the container element. */\n container: {\n height: '100%',\n '@media print': {\n height: 'auto'\n },\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n margin: 32,\n position: 'relative',\n overflowY: 'auto',\n // Fix IE 11 issue, to remove at some point.\n '@media print': {\n overflowY: 'visible',\n boxShadow: 'none'\n }\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"paper\"`. */\n paperScrollPaper: {\n display: 'flex',\n flexDirection: 'column',\n maxHeight: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"body\"`. */\n paperScrollBody: {\n display: 'inline-block',\n verticalAlign: 'middle',\n textAlign: 'left' // 'initial' doesn't work on IE 11\n\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=false`. */\n paperWidthFalse: {\n maxWidth: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xs\"`. */\n paperWidthXs: {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444),\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"sm\"`. */\n paperWidthSm: {\n maxWidth: theme.breakpoints.values.sm,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.sm + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"md\"`. */\n paperWidthMd: {\n maxWidth: theme.breakpoints.values.md,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.md + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"lg\"`. */\n paperWidthLg: {\n maxWidth: theme.breakpoints.values.lg,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.lg + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xl\"`. */\n paperWidthXl: {\n maxWidth: theme.breakpoints.values.xl,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.xl + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `fullWidth={true}`. */\n paperFullWidth: {\n width: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `fullScreen={true}`. */\n paperFullScreen: {\n margin: 0,\n width: '100%',\n maxWidth: '100%',\n height: '100%',\n maxHeight: 'none',\n borderRadius: 0,\n '&$paperScrollBody': {\n margin: 0,\n maxWidth: '100%'\n }\n }\n };\n};\nvar defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * Dialogs are overlaid modal paper based components with a backdrop.\n */\n\nvar Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {\n var BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableBackdro = props.disableBackdropClick,\n disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableEscapeK = props.disableEscapeKeyDown,\n disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK,\n _props$fullScreen = props.fullScreen,\n fullScreen = _props$fullScreen === void 0 ? false : _props$fullScreen,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'sm' : _props$maxWidth,\n onBackdropClick = props.onBackdropClick,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onEscapeKeyDown = props.onEscapeKeyDown,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n open = props.open,\n _props$PaperComponent = props.PaperComponent,\n PaperComponent = _props$PaperComponent === void 0 ? Paper : _props$PaperComponent,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n _props$scroll = props.scroll,\n scroll = _props$scroll === void 0 ? 'paper' : _props$scroll,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Fade : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n ariaDescribedby = props['aria-describedby'],\n ariaLabelledby = props['aria-labelledby'],\n other = _objectWithoutProperties(props, [\"BackdropProps\", \"children\", \"classes\", \"className\", \"disableBackdropClick\", \"disableEscapeKeyDown\", \"fullScreen\", \"fullWidth\", \"maxWidth\", \"onBackdropClick\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onEscapeKeyDown\", \"onExit\", \"onExited\", \"onExiting\", \"open\", \"PaperComponent\", \"PaperProps\", \"scroll\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"aria-describedby\", \"aria-labelledby\"]);\n\n var mouseDownTarget = React.useRef();\n\n var handleMouseDown = function handleMouseDown(event) {\n mouseDownTarget.current = event.target;\n };\n\n var handleBackdropClick = function handleBackdropClick(event) {\n // Ignore the events not coming from the \"backdrop\"\n // We don't want to close the dialog when clicking the dialog content.\n if (event.target !== event.currentTarget) {\n return;\n } // Make sure the event starts and ends on the same DOM element.\n\n\n if (event.target !== mouseDownTarget.current) {\n return;\n }\n\n mouseDownTarget.current = null;\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (!disableBackdropClick && onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n return /*#__PURE__*/React.createElement(Modal, _extends({\n className: clsx(classes.root, className),\n BackdropComponent: Backdrop,\n BackdropProps: _extends({\n transitionDuration: transitionDuration\n }, BackdropProps),\n closeAfterTransition: true\n }, disableBackdropClick ? {\n disableBackdropClick: disableBackdropClick\n } : {}, {\n disableEscapeKeyDown: disableEscapeKeyDown,\n onEscapeKeyDown: onEscapeKeyDown,\n onClose: onClose,\n open: open,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n timeout: transitionDuration,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n onExit: onExit,\n onExiting: onExiting,\n onExited: onExited,\n role: \"none presentation\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.container, classes[\"scroll\".concat(capitalize(scroll))]),\n onMouseUp: handleBackdropClick,\n onMouseDown: handleMouseDown\n }, /*#__PURE__*/React.createElement(PaperComponent, _extends({\n elevation: 24,\n role: \"dialog\",\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": ariaLabelledby\n }, PaperProps, {\n className: clsx(classes.paper, classes[\"paperScroll\".concat(capitalize(scroll))], classes[\"paperWidth\".concat(capitalize(String(maxWidth)))], PaperProps.className, fullScreen && classes.paperFullScreen, fullWidth && classes.paperFullWidth)\n }), children))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Dialog.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The id(s) of the element(s) that describe the dialog.\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * The id(s) of the element(s) that label the dialog.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * Dialog children, usually the included sub-components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, clicking the backdrop will not fire the `onClose` callback.\n * @deprecated Use the onClose prop with the `reason` argument to filter the `backdropClick` events.\n */\n disableBackdropClick: deprecatedPropType(PropTypes.bool, 'Use the onClose prop with the `reason` argument to filter the `backdropClick` events.'),\n\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n */\n disableEscapeKeyDown: PropTypes.bool,\n\n /**\n * If `true`, the dialog will be full-screen\n */\n fullScreen: PropTypes.bool,\n\n /**\n * If `true`, the dialog stretches to `maxWidth`.\n *\n * Notice that the dialog width grow is limited by the default margin.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * Determine the max-width of the dialog.\n * The dialog width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false]),\n\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the onClose prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `backdropClick` events.'),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the dialog enters.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the escape key is pressed,\n * `disableKeyboard` is false and the modal is in focus.\n * @deprecated Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.\n */\n onEscapeKeyDown: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.'),\n\n /**\n * Callback fired before the dialog exits.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * If `true`, the Dialog is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * The component used to render the body of the dialog.\n */\n PaperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Determine the container for scrolling the dialog.\n */\n scroll: PropTypes.oneOf(['body', 'paper']),\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialog'\n})(Dialog);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogActions'\n})(DialogActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n overflowY: 'auto',\n padding: '8px 24px',\n '&:first-child': {\n // dialog without title\n paddingTop: 20\n }\n },\n\n /* Styles applied to the root element if `dividers={true}`. */\n dividers: {\n padding: '16px 24px',\n borderTop: \"1px solid \".concat(theme.palette.divider),\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n }\n };\n};\nvar DialogContent = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$dividers = props.dividers,\n dividers = _props$dividers === void 0 ? false : _props$dividers,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"dividers\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dividers && classes.dividers),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display the top and bottom dividers.\n */\n dividers: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogContent'\n})(DialogContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n marginBottom: 12\n }\n};\nvar DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(props, ref) {\n return /*#__PURE__*/React.createElement(Typography, _extends({\n component: \"p\",\n variant: \"body1\",\n color: \"textSecondary\",\n ref: ref\n }, props));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContentText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogContentText'\n})(DialogContentText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n margin: 0,\n padding: '16px 24px',\n flex: '0 0 auto'\n }\n};\nvar DialogTitle = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), disableTypography ? children : /*#__PURE__*/React.createElement(Typography, {\n component: \"h2\",\n variant: \"h6\"\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogTitle.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a typography component.\n * For instance, this can be useful to render an h4 instead of the default h2.\n */\n disableTypography: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogTitle'\n})(DialogTitle);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { duration } from '../styles/transitions';\nimport ClickAwayListener from '../ClickAwayListener';\nimport useEventCallback from '../utils/useEventCallback';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport Grow from '../Grow';\nimport SnackbarContent from '../SnackbarContent';\nexport var styles = function styles(theme) {\n var top1 = {\n top: 8\n };\n var bottom1 = {\n bottom: 8\n };\n var right = {\n justifyContent: 'flex-end'\n };\n var left = {\n justifyContent: 'flex-start'\n };\n var top3 = {\n top: 24\n };\n var bottom3 = {\n bottom: 24\n };\n var right3 = {\n right: 24\n };\n var left3 = {\n left: 24\n };\n var center = {\n left: '50%',\n right: 'auto',\n transform: 'translateX(-50%)'\n };\n return {\n /* Styles applied to the root element. */\n root: {\n zIndex: theme.zIndex.snackbar,\n position: 'fixed',\n display: 'flex',\n left: 8,\n right: 8,\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */\n anchorOriginTopCenter: _extends({}, top1, _defineProperty({}, theme.breakpoints.up('sm'), _extends({}, top3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */\n anchorOriginBottomCenter: _extends({}, bottom1, _defineProperty({}, theme.breakpoints.up('sm'), _extends({}, bottom3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */\n anchorOriginTopRight: _extends({}, top1, right, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n left: 'auto'\n }, top3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */\n anchorOriginBottomRight: _extends({}, bottom1, right, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n left: 'auto'\n }, bottom3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */\n anchorOriginTopLeft: _extends({}, top1, left, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n right: 'auto'\n }, top3, left3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */\n anchorOriginBottomLeft: _extends({}, bottom1, left, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n right: 'auto'\n }, bottom3, left3)))\n };\n};\nvar Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(props, ref) {\n var action = props.action,\n _props$anchorOrigin = props.anchorOrigin;\n _props$anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'bottom',\n horizontal: 'center'\n } : _props$anchorOrigin;\n\n var vertical = _props$anchorOrigin.vertical,\n horizontal = _props$anchorOrigin.horizontal,\n _props$autoHideDurati = props.autoHideDuration,\n autoHideDuration = _props$autoHideDurati === void 0 ? null : _props$autoHideDurati,\n children = props.children,\n classes = props.classes,\n className = props.className,\n ClickAwayListenerProps = props.ClickAwayListenerProps,\n ContentProps = props.ContentProps,\n _props$disableWindowB = props.disableWindowBlurListener,\n disableWindowBlurListener = _props$disableWindowB === void 0 ? false : _props$disableWindowB,\n message = props.message,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n open = props.open,\n resumeHideDuration = props.resumeHideDuration,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n } : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"action\", \"anchorOrigin\", \"autoHideDuration\", \"children\", \"classes\", \"className\", \"ClickAwayListenerProps\", \"ContentProps\", \"disableWindowBlurListener\", \"message\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"onMouseEnter\", \"onMouseLeave\", \"open\", \"resumeHideDuration\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n var timerAutoHide = React.useRef();\n\n var _React$useState = React.useState(true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var handleClose = useEventCallback(function () {\n if (onClose) {\n onClose.apply(void 0, arguments);\n }\n });\n var setAutoHideTimer = useEventCallback(function (autoHideDurationParam) {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(function () {\n handleClose(null, 'timeout');\n }, autoHideDurationParam);\n });\n React.useEffect(function () {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return function () {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]); // Pause the timer when the user is interacting with the Snackbar\n // or when the user hide the window.\n\n var handlePause = function handlePause() {\n clearTimeout(timerAutoHide.current);\n }; // Restart the timer when the user is no longer interacting with the Snackbar\n // or when the window is shown back.\n\n\n var handleResume = React.useCallback(function () {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n var handleMouseEnter = function handleMouseEnter(event) {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n\n handlePause();\n };\n\n var handleMouseLeave = function handleMouseLeave(event) {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n\n handleResume();\n };\n\n var handleClickAway = function handleClickAway(event) {\n if (onClose) {\n onClose(event, 'clickaway');\n }\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n };\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n React.useEffect(function () {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n return function () {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]); // So we only render active snackbars.\n\n if (!open && exited) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(ClickAwayListener, _extends({\n onClickAway: handleClickAway\n }, ClickAwayListenerProps), /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"anchorOrigin\".concat(capitalize(vertical)).concat(capitalize(horizontal))], className),\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEnter: createChainedFunction(handleEnter, onEnter),\n onEntered: onEntered,\n onEntering: onEntering,\n onExit: onExit,\n onExited: createChainedFunction(handleExited, onExited),\n onExiting: onExiting,\n timeout: transitionDuration,\n direction: vertical === 'top' ? 'down' : 'up'\n }, TransitionProps), children || /*#__PURE__*/React.createElement(SnackbarContent, _extends({\n message: message,\n action: action\n }, ContentProps)))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Snackbar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display. It renders after the message, at the end of the snackbar.\n */\n action: PropTypes.node,\n\n /**\n * The anchor of the `Snackbar`.\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['center', 'left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onClose` function. `onClose` should then set the state of the `open`\n * prop to hide the Snackbar. This behavior is disabled by default with\n * the `null` value.\n */\n autoHideDuration: PropTypes.number,\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children: PropTypes.element,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Props applied to the `ClickAwayListener` element.\n */\n ClickAwayListenerProps: PropTypes.object,\n\n /**\n * Props applied to the [`SnackbarContent`](/api/snackbar-content/) element.\n */\n ContentProps: PropTypes.object,\n\n /**\n * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.\n */\n disableWindowBlurListener: PropTypes.bool,\n\n /**\n * When displaying multiple consecutive Snackbars from a parent rendering a single\n * , add the key prop to ensure independent treatment of each message.\n * e.g. , otherwise, the message may update-in-place and\n * features such as autoHideDuration may be canceled.\n */\n key: PropTypes.any,\n\n /**\n * The message to display.\n */\n message: PropTypes.node,\n\n /**\n * Callback fired when the component requests to be closed.\n * Typically `onClose` is used to set state in the parent component,\n * which is used to control the `Snackbar` `open` prop.\n * The `reason` parameter can optionally be used to control the response to `onClose`,\n * for example ignoring `clickaway`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"timeout\"` (`autoHideDuration` expired), `\"clickaway\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the transition is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired before the transition is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * @ignore\n */\n onMouseEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n\n /**\n * If `true`, `Snackbar` is open.\n */\n open: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before dismissing after user interaction.\n * If `autoHideDuration` prop isn't specified, it does nothing.\n * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,\n * we default to `autoHideDuration / 2` ms.\n */\n resumeHideDuration: PropTypes.number,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiSnackbar'\n})(Snackbar);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');\n\nexports.default = _default;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minHeight: 36,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n borderRadius: '50%',\n padding: 0,\n minWidth: 0,\n width: 56,\n height: 56,\n boxShadow: theme.shadows[6],\n '&:active': {\n boxShadow: theme.shadows[12]\n },\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n },\n textDecoration: 'none'\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // assure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n primary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n secondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"extended\"`. */\n extended: {\n borderRadius: 48 / 2,\n padding: '0 16px',\n width: 'auto',\n minHeight: 'auto',\n minWidth: 48,\n height: 48,\n '&$sizeSmall': {\n width: 'auto',\n padding: '0 8px',\n borderRadius: 34 / 2,\n minWidth: 34,\n height: 34\n },\n '&$sizeMedium': {\n width: 'auto',\n padding: '0 16px',\n borderRadius: 40 / 2,\n minWidth: 40,\n height: 40\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `size=\"small\"``. */\n sizeSmall: {\n width: 40,\n height: 40\n },\n\n /* Styles applied to the root element if `size=\"medium\"``. */\n sizeMedium: {\n width: 48,\n height: 48\n }\n };\n};\nvar Fab = /*#__PURE__*/React.forwardRef(function Fab(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$size = props.size,\n size = _props$size === void 0 ? 'large' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circular' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableFocusRipple\", \"focusVisibleClassName\", \"size\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, size !== 'large' && classes[\"size\".concat(capitalize(size))], disabled && classes.disabled, variant === 'extended' && classes.extended, {\n 'primary': classes.primary,\n 'secondary': classes.secondary,\n 'inherit': classes.colorInherit\n }[color]),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? Fab.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n * 'round' is deprecated, use 'circular' instead.\n */\n variant: chainPropTypes(PropTypes.oneOf(['extended', 'circular', 'round']), function (props) {\n if (props.variant === 'round') {\n throw new Error('Material-UI: variant=\"round\" was renamed variant=\"circular\" for consistency.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFab'\n})(Fab);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `disableGutters={false}`. */\n gutters: _defineProperty({\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2)\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `variant=\"regular\"`. */\n regular: theme.mixins.toolbar,\n\n /* Styles applied to the root element if `variant=\"dense\"`. */\n dense: {\n minHeight: 48\n }\n };\n};\nvar Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'regular' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes[variant], className, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Toolbar.propTypes = {\n /**\n * Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, disables gutter padding.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['regular', 'dense'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiToolbar'\n})(Toolbar);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport SVG from 'react-inlinesvg';\n\nimport IconSystem from '@material-ui/icons/SettingsApplications';\nimport IconPhoto from '@material-ui/icons/Photo';\nimport IconGroup from '@material-ui/icons/SupervisedUserCircle';\nimport IconUser from '@material-ui/icons/PersonOutlined';\nimport IconHost from '@material-ui/icons/Router';\nimport IconConnection from '@material-ui/icons/Wifi';\nimport IconInfo from '@material-ui/icons/Info';\nimport IconMeta from '@material-ui/icons/Description';\nimport IconAlias from '../icons/IconAlias';\n\nimport Utils from './Utils';\n\nexport function getSystemIcon(obj) {\n let icon;\n const id = obj?._id;\n\n if (!id) {\n return null;\n }\n\n // system or design have special icons\n if (id.startsWith('_design/') || (id === 'system')) {\n icon = ;\n } else if (id === '0_userdata' || id === '0_userdata.0') {\n icon = ;\n } else if (id === 'alias' || id === 'alias.0') {\n icon = ;\n } else if (id === 'system.adapter') {\n icon = ;\n } else if (id === 'system.group') {\n icon = ;\n } else if (id === 'system.user') {\n icon = ;\n } else if (id === 'system.host') {\n icon = ;\n } else if (id.endsWith('.connection') || id.endsWith('.connected')) {\n icon = ;\n } else if (id.endsWith('.info')) {\n icon = ;\n } else if (obj?.type === 'meta') {\n icon = ;\n }\n\n return icon || null;\n}\n\nexport function getSelectIdIcon(obj, imagePrefix) {\n imagePrefix = imagePrefix || '.';//http://localhost:8081';\n let src = '';\n const common = obj?.common;\n\n if (common) {\n const cIcon = common.icon;\n if (cIcon) {\n if (!cIcon.startsWith('data:image/')) {\n if (cIcon.includes('.')) {\n let instance;\n if (obj.type === 'instance' || obj.type === 'adapter') {\n src = imagePrefix + '/adapter/' + common.name + '/' + cIcon;\n } else if (obj._id && obj._id.startsWith('system.adapter.')) {\n instance = obj._id.split('.', 3);\n if (cIcon[0] === '/') {\n instance[2] += cIcon;\n } else {\n instance[2] += '/' + cIcon;\n }\n src = imagePrefix + '/adapter/' + instance[2];\n } else {\n instance = obj._id.split('.', 2);\n if (cIcon[0] === '/') {\n instance[0] += cIcon;\n } else {\n instance[0] += '/' + cIcon;\n }\n src = imagePrefix + '/adapter/' + instance[0];\n }\n } else {\n return null;\n }\n } else {\n // base 64 image\n src = cIcon;\n }\n }\n }\n\n return src || null;\n}\n\nclass Icon extends React.Component {\n render() {\n if (this.props.src) {\n if (typeof this.props.src === 'string') {\n if (this.props.src.length < 3) {\n return {this.props.src}; // utf-8 char\n } else {\n if (this.props.src.startsWith('data:image/svg')) {\n return ;\n } else {\n return \"\";\n }\n }\n } else {\n return this.props.src;\n }\n } else {\n return null;\n }\n }\n}\n\nIcon.propTypes = {\n color: PropTypes.string,\n title: PropTypes.string,\n src: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n className: PropTypes.string,\n imagePrefix: PropTypes.string,\n style: PropTypes.object,\n styleUTF8: PropTypes.object,\n};\n\nexport default Icon;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.json2tsv = void 0;\nfunction assertString2DArray(arg) {\n if (!Array.isArray(arg)) {\n throw new TypeError(`Expected string[][], got ${typeof arg}`);\n }\n for (const x of arg) {\n if (!Array.isArray(x)) {\n throw new TypeError(`Expected string[][], got ${typeof x}[]`);\n }\n for (const y of x) {\n if (typeof y !== 'string') {\n throw new TypeError(`Expected string[][], got ${typeof y}[][]`);\n }\n }\n }\n}\nconst SPECIAL_CHAR_REGEX = /[\\t\\n\"]/;\nfunction hasSpecialChar(string) {\n return SPECIAL_CHAR_REGEX.test(string);\n}\nfunction json2tsv(json) {\n assertString2DArray(json);\n return json.map(row => {\n return row.map(cell => {\n return hasSpecialChar(cell) ? `\"${cell.replace(/\"/g, '\"\"')}\"` : cell;\n }).join('\\t');\n }).join('\\n');\n}\nexports.json2tsv = json2tsv;\n//# sourceMappingURL=json2tsv.js.map","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsv2json = void 0;\n/**\n * Modifies the given array, removing the extracted prefix.\n *\n * Assumes the array is nonempty.\n *\n * Here's how it works:\n * If a cell does not start with \", it is a 'raw' cell and everything is read verbatim until a \\t or \\n is found, which ends the cell.\n * If a cell starts with \", it starts in 'escaped' mode, ignoring this first \". In escaped mode, \\t and \\n are treated as normal characters. Once another \" is found, unless it is not a \"\", the escaped mode is over (but the cell isn't necessarily over yet - it will be over on the next \\t or \\n).\n * If the full tsv data finishes with a cell in escaped mode, then that cell is over.\n */\nfunction extractFirstCell(tsvCharacters) {\n const result = [];\n let escapedMode = tsvCharacters[0] === '\"';\n let index = escapedMode ? 1 : 0;\n function done(lineIsOver) {\n tsvCharacters.splice(0, index + 1);\n return { cell: result.join(''), lineIsOver };\n }\n while (index < tsvCharacters.length) {\n const char = tsvCharacters[index];\n const nextChar = tsvCharacters[index + 1];\n if (escapedMode) {\n if (char === '\"') {\n if (nextChar === '\"') {\n result.push('\"');\n index++;\n }\n else {\n escapedMode = false;\n }\n }\n else {\n result.push(char);\n }\n }\n else {\n if (char === '\\r' && nextChar === '\\n') {\n index++;\n return done(true);\n }\n if (char === '\\n')\n return done(true);\n if (char === '\\t')\n return done(false);\n result.push(char);\n }\n index++;\n }\n return done(true);\n}\nfunction tsv2json(tsv) {\n if (typeof tsv !== 'string')\n throw new TypeError(`Expected string, got ${typeof tsv}`);\n if (tsv === '')\n return [[]];\n const characters = [...tsv]; // Account for surrogate pairs\n const result = [];\n let currentRow = [];\n while (characters.length > 0) {\n const { cell, lineIsOver } = extractFirstCell(characters);\n currentRow.push(cell);\n if (lineIsOver) {\n result.push(currentRow);\n currentRow = [];\n }\n }\n return result;\n}\nexports.tsv2json = tsv2json;\n//# sourceMappingURL=tsv2json.js.map","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n",null,null,"/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst enum States {\n /** Pending */\n PENDING = 0,\n /** Resolved / OK */\n RESOLVED = 1,\n /** Rejected / Error */\n REJECTED = 2,\n}\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val as unknown as any);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value as unknown as any);\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };\n}\n\nexport { SyncPromise };\n","/* eslint-disable max-lines */\nimport {\n Breadcrumb,\n CaptureContext,\n Context,\n Contexts,\n Event,\n EventHint,\n EventProcessor,\n Extra,\n Extras,\n Primitive,\n RequestSession,\n Scope as ScopeInterface,\n ScopeContext,\n Severity,\n Span,\n Transaction,\n User,\n} from '@sentry/types';\nimport { dateTimestampInSeconds, getGlobalObject, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n\nimport { Session } from './session';\n\n/**\n * Absolute maximum number of breadcrumbs added to an event.\n * The `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: Primitive } = {};\n\n /** Extra */\n protected _extra: Extras = {};\n\n /** Contexts */\n protected _contexts: Contexts = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction Name */\n protected _transactionName?: string;\n\n /** Span */\n protected _span?: Span;\n\n /** Session */\n protected _session?: Session;\n\n /** Request Mode Session Status */\n protected _requestSession?: RequestSession;\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n protected _sdkProcessingMetadata?: { [key: string]: unknown } = {};\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n if (this._session) {\n this._session.update({ user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n public getRequestSession(): RequestSession | undefined {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n public setRequestSession(requestSession?: RequestSession): this {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n public setTransaction(name?: string): this {\n return this.setTransactionName(name);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts = { ...this._contexts, [key]: context };\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n public getTransaction(): Transaction | undefined {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext as (scope: T) => T)(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext as ScopeContext;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n this._breadcrumbs = [...this._breadcrumbs, mergedBreadcrumb].slice(-maxCrumbs);\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional information about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transactionName = this._span.transaction && this._span.transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = this._sdkProcessingMetadata;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n public setSDKProcessingMetadata(newData: { [key: string]: unknown }): this {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n void (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n","import { Session as SessionInterface, SessionContext, SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n\n/**\n * @inheritdoc\n */\nexport class Session implements SessionInterface {\n public userAgent?: string;\n public errors: number = 0;\n public release?: string;\n public sid: string = uuid4();\n public did?: string;\n public timestamp: number;\n public started: number;\n public duration?: number = 0;\n public status: SessionStatus = 'ok';\n public environment?: string;\n public ipAddress?: string;\n public init: boolean = true;\n public ignoreDuration: boolean = false;\n\n public constructor(context?: Omit) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n this.timestamp = startingTime;\n this.started = startingTime;\n if (context) {\n this.update(context);\n }\n }\n\n /** JSDoc */\n // eslint-disable-next-line complexity\n public update(context: SessionContext = {}): void {\n if (context.user) {\n if (!this.ipAddress && context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n\n if (!this.did && !context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n this.timestamp = context.timestamp || timestampInSeconds();\n if (context.ignoreDuration) {\n this.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n this.init = context.init;\n }\n if (!this.did && context.did) {\n this.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n if (this.ignoreDuration) {\n this.duration = undefined;\n } else if (typeof context.duration === 'number') {\n this.duration = context.duration;\n } else {\n const duration = this.timestamp - this.started;\n this.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n this.release = context.release;\n }\n if (context.environment) {\n this.environment = context.environment;\n }\n if (!this.ipAddress && context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n if (!this.userAgent && context.userAgent) {\n this.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n if (context.status) {\n this.status = context.status;\n }\n }\n\n /** JSDoc */\n public close(status?: Exclude): void {\n if (status) {\n this.update({ status });\n } else if (this.status === 'ok') {\n this.update({ status: 'exited' });\n } else {\n this.update();\n }\n }\n\n /** JSDoc */\n public toJSON(): {\n init: boolean;\n sid: string;\n did?: string;\n timestamp: string;\n started: string;\n duration?: number;\n status: SessionStatus;\n errors: number;\n attrs?: {\n release?: string;\n environment?: string;\n user_agent?: string;\n ip_address?: string;\n };\n } {\n return dropUndefinedKeys({\n sid: `${this.sid}`,\n init: this.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(this.started * 1000).toISOString(),\n timestamp: new Date(this.timestamp * 1000).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? `${this.did}` : undefined,\n duration: this.duration,\n attrs: {\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent,\n },\n });\n }\n}\n","/* eslint-disable max-lines */\nimport {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n CustomSamplingContext,\n Event,\n EventHint,\n Extra,\n Extras,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Primitive,\n SessionContext,\n Severity,\n Span,\n SpanContext,\n Transaction,\n TransactionContext,\n User,\n} from '@sentry/types';\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isNodeEnv, logger, uuid4 } from '@sentry/utils';\n\nimport { Scope } from './scope';\nimport { Session } from './session';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * A layer in the process stack.\n * @hidden\n */\nexport interface Layer {\n client?: Client;\n scope?: Scope;\n}\n\n/**\n * An object that contains a hub and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: {\n hub?: Hub;\n /**\n * Extra Hub properties injected by various SDKs\n */\n integrations?: Integration[];\n extensions?: {\n /** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n domain?: { [key: string]: any };\n } & {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n };\n}\n\n/**\n * @hidden\n * @deprecated Can be removed once `Hub.getActiveDomain` is removed.\n */\nexport interface DomainAsCarrier extends Carrier {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n members: { [key: string]: any }[];\n}\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [{}];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this.getStackTop().scope = scope;\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = uuid4();\n if (event.type !== 'transaction') {\n this._lastEventId = eventId;\n }\n\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const { scope, client } = this.getStackTop();\n\n if (!scope || !client) return;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const scope = this.getScope();\n if (scope) scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): void {\n const scope = this.getScope();\n if (scope) scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): void {\n const scope = this.getScope();\n if (scope) scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): void {\n const scope = this.getScope();\n if (scope) scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): void {\n const scope = this.getScope();\n if (scope) scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const scope = this.getScope();\n if (scope) scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const { scope, client } = this.getStackTop();\n if (scope && client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(context: SpanContext): Span {\n return this._callExtensionMethod('startSpan', context);\n }\n\n /**\n * @inheritDoc\n */\n public startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(endSession: boolean = false): void {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n public endSession(): void {\n const layer = this.getStackTop();\n const scope = layer && layer.scope;\n const session = scope && scope.getSession();\n if (session) {\n session.close();\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n if (scope) {\n scope.setSession();\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSession(context?: SessionContext): Session {\n const { scope, client } = this.getStackTop();\n const { release, environment } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const global = getGlobalObject<{ navigator?: { userAgent?: string } }>();\n const { userAgent } = global.navigator || {};\n\n const session = new Session({\n release,\n environment,\n ...(scope && { user: scope.getUser() }),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n if (scope) {\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n currentSession.update({ status: 'exited' });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n }\n\n return session;\n }\n\n /**\n * Sends the current Session on the scope\n */\n private _sendSessionUpdate(): void {\n const { scope, client } = this.getStackTop();\n if (!scope) return;\n\n const session = scope.getSession && scope.getSession();\n if (session) {\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _invokeClient(method: M, ...args: any[]): void {\n const { scope, client } = this.getStackTop();\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (client as any)[method](...args, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Returns the active domain, if one exists\n * @deprecated No longer used; remove in v7\n * @returns The domain, or undefined if there is no active domain\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function getActiveDomain(): DomainAsCarrier | undefined {\n logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n\n const sentry = getMainCarrier().__SENTRY__;\n\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n","export { Angular } from './angular';\nexport { CaptureConsole } from './captureconsole';\nexport { Debug } from './debug';\nexport { Dedupe } from './dedupe';\nexport { Ember } from './ember';\nexport { ExtraErrorData } from './extraerrordata';\nexport { Offline } from './offline';\nexport { ReportingObserver } from './reportingobserver';\nexport { RewriteFrames } from './rewriteframes';\nexport { SessionTiming } from './sessiontiming';\nexport { Transaction } from './transaction';\nexport { Vue } from './vue';\n","// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata\nexport const SDK_NAME = 'sentry.javascript.browser';\n","export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { isDebugBuild } from './env';\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\nfunction dsnFromString(str: string): DsnComponents {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(`Invalid Sentry Dsn: ${str}`);\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n // TODO this is for backwards compatibility, and can be removed in a future version\n if ('user' in components && !('publicKey' in components)) {\n components.publicKey = components.user;\n }\n\n return {\n user: components.publicKey || '',\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean | void {\n if (!isDebugBuild()) {\n return;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray = ['protocol', 'publicKey', 'host', 'projectId'];\n requiredComponents.forEach(component => {\n if (!dsn[component]) {\n throw new SentryError(`Invalid Sentry Dsn: ${component} missing`);\n }\n });\n\n if (!projectId.match(/^\\d+$/)) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n }\n\n if (!isValidProtocol(protocol)) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid port ${port}`);\n }\n\n return true;\n}\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport function makeDsn(from: DsnLike): DsnComponents {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n\n validateDsn(components);\n\n return components;\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n} & { initialized?: boolean };\n\n/**\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n return integrations.reduce((acc, integrations) => {\n if (acc.every(accIntegration => integrations.name !== accIntegration.name)) {\n acc.push(integrations);\n }\n return acc;\n }, [] as Integration[]);\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n\n let integrations: Integration[] = [...filterDuplicates(defaultIntegrations)];\n\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = [\n ...integrations.filter(integrations =>\n userIntegrations.every(userIntegration => userIntegration.name !== integrations.name),\n ),\n // And filter out duplicated user options integrations\n ...filterDuplicates(userIntegrations),\n ];\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n addNonEnumerableProperty(integrations, 'initialized', true);\n return integrations;\n}\n","/* eslint-disable max-lines */\nimport { Scope, Session } from '@sentry/hub';\nimport {\n Client,\n DsnComponents,\n Event,\n EventHint,\n Integration,\n IntegrationClass,\n Options,\n Severity,\n Transport,\n} from '@sentry/types';\nimport {\n checkOrSetAlreadyCaught,\n dateTimestampInSeconds,\n isDebugBuild,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n makeDsn,\n normalize,\n rejectedSyncPromise,\n resolvedSyncPromise,\n SentryError,\n SyncPromise,\n truncate,\n uuid4,\n} from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the environment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: DsnComponents;\n\n /** Array of used integrations. */\n protected _integrations: IntegrationIndex = {};\n\n /** Number of calls being processed */\n protected _numProcessing: number = 0;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!this._isEnabled()) {\n if (isDebugBuild()) {\n logger.warn('SDK not enabled, will not capture session.');\n }\n return;\n }\n\n if (!(typeof session.release === 'string')) {\n if (isDebugBuild()) {\n logger.warn('Discarded session because of missing or non-string release');\n }\n } else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): DsnComponents | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._getBackend().getTransport();\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return this.getTransport()\n .close(timeout)\n .then(transportFlushed => clientFinished && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n if (this._isEnabled() && !this._integrations.initialized) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n session.update({\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /** Deliver captured session to Sentry */\n protected _sendSession(session: Session): void {\n this._getBackend().sendSession(session);\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { normalizeDepth = 3 } = this.getOptions();\n const prepared: Event = {\n ...event,\n event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = resolvedSyncPromise(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n\n event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, baseClientNormalized: true };\n\n return normalized;\n }\n\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n protected _applyClientOptions(event: Event): void {\n const options = this.getOptions();\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\n protected _applyIntegrationsMetadata(event: Event): void {\n const integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationsArray];\n }\n }\n\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n protected _sendEvent(event: Event): void {\n this._getBackend().sendEvent(event);\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n logger.error(reason);\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { beforeSend, sampleRate } = this.getOptions();\n const transport = this.getTransport();\n\n type RecordLostEvent = NonNullable;\n type RecordLostEventParams = Parameters;\n\n function recordLostEvent(outcome: RecordLostEventParams[0], category: RecordLostEventParams[1]): void {\n if (transport.recordLostEvent) {\n transport.recordLostEvent(outcome, category);\n }\n }\n\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.'));\n }\n\n const isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n recordLostEvent('sample_rate', 'event');\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n ),\n );\n }\n\n return this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n recordLostEvent('event_processor', event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n\n const isInternalException = hint && hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n return _ensureBeforeSendRv(beforeSendResult);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n recordLostEvent('before_send', event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n\n const session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing += 1;\n void promise.then(\n value => {\n this._numProcessing -= 1;\n return value;\n },\n reason => {\n this._numProcessing -= 1;\n return reason;\n },\n );\n }\n}\n\n/**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\nfunction _ensureBeforeSendRv(rv: PromiseLike | Event | null): PromiseLike | Event | null {\n const nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return rv.then(\n event => {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n },\n e => {\n throw new SentryError(`beforeSend rejected with ${e}`);\n },\n );\n } else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n}\n","import { Event, Response, Transport } from '@sentry/types';\nimport { resolvedSyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return resolvedSyncPromise({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: 'skipped',\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return resolvedSyncPromise(true);\n }\n}\n","import { Event, EventHint, Options, Session, Severity, Transport } from '@sentry/types';\nimport { isDebugBuild, logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instantiate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates an {@link Event} from primitive inputs to `captureMessage`. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /** Submits the session to Sentry */\n sendSession(session: Session): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instantiate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n void this._transport.sendEvent(event).then(null, reason => {\n if (isDebugBuild()) {\n logger.error(`Error while sending event: ${reason}`);\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): void {\n if (!this._transport.sendSession) {\n if (isDebugBuild()) {\n logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n }\n return;\n }\n\n void this._transport.sendSession(session).then(null, reason => {\n if (isDebugBuild()) {\n logger.error(`Error while sending session: ${reason}`);\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n}\n","/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access, max-lines */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome =\n /^\\s*at (?:(.*?) ?\\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs =\n /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function computeStackTrace(ex: any): StackTrace {\n let stack = null;\n let popSize = 0;\n\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n popSize = ex.framesToPop;\n } else if (reactMinifiedRegexp.test(ex.message)) {\n popSize = 1;\n }\n }\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (const line of lines) {\n if ((parts = chrome.exec(line))) {\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, url] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n element = {\n url,\n func,\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(line))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(line))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n }\n\n let url = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, url] = extractSafariExtensionDetails(func, url);\n\n element = {\n url,\n func,\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[5],\n func: parts[3] || parts[4],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunatelly \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, url: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${url}` : `safari-web-extension:${url}`,\n ]\n : [func, url];\n};\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(\n exception: Record,\n syntheticException?: Error,\n rejection?: boolean,\n): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .reverse();\n}\n","import { Event, EventHint, Options, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n resolvedSyncPromise,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(options: Options, exception: unknown, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n options: Options,\n message: string,\n level: Severity = Severity.Info,\n hint?: EventHint,\n): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n isRejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n // eslint-disable-next-line no-param-reassign\n exception = errorEvent.error;\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n const domException = exception as DOMException;\n\n if ('stack' in (exception as Error)) {\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception as Record;\n event = eventFromPlainObject(objectException, syntheticException, options.isRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n","import { DsnComponents, DsnLike, SdkMetadata } from '@sentry/types';\nimport { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/**\n * Stores details about a Sentry SDK\n */\nexport interface APIDetails {\n /** The DSN as passed to Sentry.init() */\n initDsn: DsnLike;\n /** Metadata about the SDK (name, version, etc) for inclusion in envelope headers */\n metadata: SdkMetadata;\n /** The internally used Dsn object. */\n readonly dsn: DsnComponents;\n /** The envelope tunnel to use. */\n readonly tunnel?: string;\n}\n\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n *\n * @deprecated Please use APIDetails\n **/\nexport class API {\n /** The DSN as passed to Sentry.init() */\n public dsn: DsnLike;\n\n /** Metadata about the SDK (name, version, etc) for inclusion in envelope headers */\n public metadata: SdkMetadata;\n\n /** The internally used Dsn object. */\n private readonly _dsnObject: DsnComponents;\n\n /** The envelope tunnel to use. */\n private readonly _tunnel?: string;\n\n /** Create a new instance of API */\n public constructor(dsn: DsnLike, metadata: SdkMetadata = {}, tunnel?: string) {\n this.dsn = dsn;\n this._dsnObject = makeDsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n\n /** Returns the Dsn object. */\n public getDsn(): DsnComponents {\n return this._dsnObject;\n }\n\n /** Does this transport force envelopes? */\n public forceEnvelope(): boolean {\n return !!this._tunnel;\n }\n\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n public getBaseApiEndpoint(): string {\n return getBaseApiEndpoint(this._dsnObject);\n }\n\n /** Returns the store endpoint URL. */\n public getStoreEndpoint(): string {\n return getStoreEndpoint(this._dsnObject);\n }\n\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n return getStoreEndpointWithUrlEncodedAuth(this._dsnObject);\n }\n\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n public getEnvelopeEndpointWithUrlEncodedAuth(): string {\n return getEnvelopeEndpointWithUrlEncodedAuth(this._dsnObject, this._tunnel);\n }\n}\n\n/** Initializes API Details */\nexport function initAPIDetails(dsn: DsnLike, metadata?: SdkMetadata, tunnel?: string): APIDetails {\n return {\n initDsn: dsn,\n metadata: metadata || {},\n dsn: makeDsn(dsn),\n tunnel,\n } as APIDetails;\n}\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents, target: 'store' | 'envelope'): string {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/${target}/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents): string {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n });\n}\n\n/** Returns the store endpoint URL. */\nfunction getStoreEndpoint(dsn: DsnComponents): string {\n return _getIngestEndpoint(dsn, 'store');\n}\n\n/**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getStoreEndpointWithUrlEncodedAuth(dsn: DsnComponents): string {\n return `${getStoreEndpoint(dsn)}?${_encodedAuth(dsn)}`;\n}\n\n/** Returns the envelope endpoint URL. */\nfunction _getEnvelopeEndpoint(dsn: DsnComponents): string {\n return _getIngestEndpoint(dsn, 'envelope');\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn: DsnComponents, tunnel?: string): string {\n return tunnel ? tunnel : `${_getEnvelopeEndpoint(dsn)}?${_encodedAuth(dsn)}`;\n}\n\n/**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\nexport function getRequestHeaders(\n dsn: DsnComponents,\n clientName: string,\n clientVersion: string,\n): { [key: string]: string } {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.publicKey}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(\n dsnLike: DsnLike,\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n },\n): string {\n const dsn = makeDsn(dsnLike);\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions += `&name=${encodeURIComponent(dialogOptions.user.name)}`;\n }\n if (dialogOptions.user.email) {\n encodedOptions += `&email=${encodeURIComponent(dialogOptions.user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n","import { Event, SdkInfo, SentryRequest, SentryRequestType, Session, SessionAggregates } from '@sentry/types';\nimport { dsnToString, normalize } from '@sentry/utils';\n\nimport { APIDetails, getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth } from './api';\n\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api: APIDetails): SdkInfo | undefined {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n const { name, version } = api.metadata.sdk;\n return { name, version };\n}\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event: Event, sdkInfo?: SdkInfo): Event {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session: Session | SessionAggregates, api: APIDetails): SentryRequest {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n const envelopeHeaders = JSON.stringify({\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!api.tunnel && { dsn: dsnToString(api.dsn) }),\n });\n // I know this is hacky but we don't want to add `session` to request type since it's never rate limited\n const type: SentryRequestType = 'aggregates' in session ? ('sessions' as SentryRequestType) : 'session';\n const itemHeaders = JSON.stringify({\n type,\n });\n\n return {\n body: `${envelopeHeaders}\\n${itemHeaders}\\n${JSON.stringify(session)}`,\n type,\n url: getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel),\n };\n}\n\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event: Event, api: APIDetails): SentryRequest {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n const eventType = event.type || 'event';\n const useEnvelope = eventType === 'transaction' || !!api.tunnel;\n\n const { transactionSampling } = event.sdkProcessingMetadata || {};\n const { method: samplingMethod, rate: sampleRate } = transactionSampling || {};\n\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809 and\n // https://github.com/getsentry/sentry-javascript/pull/4425. TL;DR: even though we normalize all events (which should\n // prevent this), something is causing `JSON.stringify` to throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for `skippedNormalization` and pull out the companion hack in the browser playwright tests\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n }\n\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n\n let body;\n try {\n // 99.9% of events should get through just fine - no change in behavior for them\n body = JSON.stringify(event);\n } catch (err) {\n // Record data about the error without replacing original event data, then force renormalization\n event.tags.JSONStringifyError = true;\n event.extra.JSONStringifyError = err;\n try {\n body = JSON.stringify(normalize(event));\n } catch (newErr) {\n // At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.\n // Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to\n // debug with this hack, we won't ever land here.\n const innerErr = newErr as Error;\n body = JSON.stringify({\n message: 'JSON.stringify error after renormalization',\n // setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually\n extra: { message: innerErr.message, stack: innerErr.stack },\n });\n }\n }\n\n const req: SentryRequest = {\n // this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved\n // the mystery\n // body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n body,\n type: eventType,\n url: useEnvelope\n ? getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel)\n : getStoreEndpointWithUrlEncodedAuth(api.dsn),\n };\n\n // https://develop.sentry.dev/sdk/envelopes/\n\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n const envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!api.tunnel && { dsn: dsnToString(api.dsn) }),\n });\n const itemHeaders = JSON.stringify({\n type: eventType,\n\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n\n // The content-type is assumed to be 'application/json' and not part of\n // the current spec for transaction items, so we don't bloat the request\n // body with it.\n //\n // content_type: 'application/json',\n //\n // The length is optional. It must be the number of bytes in req.Body\n // encoded as UTF-8. Since the server can figure this out and would\n // otherwise refuse events that report the length incorrectly, we decided\n // not to send the length to avoid problems related to reporting the wrong\n // size and to reduce request body size.\n //\n // length: new TextEncoder().encode(req.body).length,\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}`;\n req.body = envelope;\n }\n\n return req;\n}\n","import { SentryError } from './error';\nimport { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';\n\nexport interface PromiseBuffer {\n // exposes the internal array so tests can assert on the state of it.\n // XXX: this really should not be public api.\n $: Array>;\n add(taskProducer: () => PromiseLike): PromiseLike;\n drain(timeout?: number): PromiseLike;\n}\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit?: number): PromiseBuffer {\n const buffer: Array> = [];\n\n function isReady(): boolean {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task: PromiseLike): PromiseLike {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer: () => PromiseLike): PromiseLike {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout?: number): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n // eslint-disable-next-line no-plusplus\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n","import { forget, getGlobalObject, isDebugBuild, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\n\nconst global = getGlobalObject();\nlet cachedFetchImpl: FetchImpl;\n\nexport type FetchImpl = typeof fetch;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation(): FetchImpl {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n\n const document = global.document;\n let fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === `function`) {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n if (isDebugBuild()) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url: string, body: string): void {\n const isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n const hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n const sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n\n if (supportsFetch()) {\n const fetch = getNativeFetchImplementation();\n return forget(\n fetch(url, {\n body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }),\n );\n }\n}\n","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forget(promise: PromiseLike): void {\n void promise.then(null, e => {\n // TODO: Use a better logging mechanism\n // eslint-disable-next-line no-console\n console.error(e);\n });\n}\n","import {\n APIDetails,\n eventToSentryRequest,\n getEnvelopeEndpointWithUrlEncodedAuth,\n getStoreEndpointWithUrlEncodedAuth,\n initAPIDetails,\n sessionToSentryRequest,\n} from '@sentry/core';\nimport {\n Event,\n Outcome,\n Response as SentryResponse,\n SentryRequest,\n SentryRequestType,\n Session,\n Transport,\n TransportOptions,\n} from '@sentry/types';\nimport {\n dateTimestampInSeconds,\n dsnToString,\n eventStatusFromHttpCode,\n getGlobalObject,\n isDebugBuild,\n logger,\n makePromiseBuffer,\n parseRetryAfterHeader,\n PromiseBuffer,\n} from '@sentry/utils';\n\nimport { sendReport } from './utils';\n\nfunction requestTypeToCategory(ty: SentryRequestType): string {\n const tyStr = ty as string;\n return tyStr === 'event' ? 'error' : tyStr;\n}\n\nconst global = getGlobalObject();\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @deprecated\n */\n public url: string;\n\n /** Helper to get Sentry API endpoints. */\n protected readonly _api: APIDetails;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = makePromiseBuffer(30);\n\n /** Locks transport after receiving rate limits in a response */\n protected readonly _rateLimits: Record = {};\n\n protected _outcomes: { [key: string]: number } = {};\n\n public constructor(public options: TransportOptions) {\n this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);\n\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', () => {\n if (global.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): PromiseLike {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n\n /**\n * @inheritDoc\n */\n public recordLostEvent(reason: Outcome, category: SentryRequestType): void {\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n const key = `${requestTypeToCategory(category)}:${reason}`;\n logger.log(`Adding outcome: ${key}`);\n this._outcomes[key] = (this._outcomes[key] ?? 0) + 1;\n }\n\n /**\n * Send outcomes as an envelope\n */\n protected _flushOutcomes(): void {\n if (!this.options.sendClientReports) {\n return;\n }\n\n const outcomes = this._outcomes;\n this._outcomes = {};\n\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n logger.log('No outcomes to flush');\n return;\n }\n\n logger.log(`Flushing outcomes:\\n${JSON.stringify(outcomes, null, 2)}`);\n\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._api.dsn, this._api.tunnel);\n // Envelope header is required to be at least an empty object\n const envelopeHeader = JSON.stringify({ ...(this._api.tunnel && { dsn: dsnToString(this._api.dsn) }) });\n const itemHeaders = JSON.stringify({\n type: 'client_report',\n });\n const item = JSON.stringify({\n timestamp: dateTimestampInSeconds(),\n discarded_events: Object.keys(outcomes).map(key => {\n const [category, reason] = key.split(':');\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n }),\n });\n const envelope = `${envelopeHeader}\\n${itemHeaders}\\n${item}`;\n\n try {\n sendReport(url, envelope);\n } catch (e) {\n logger.error(e);\n }\n }\n\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n protected _handleResponse({\n requestType,\n response,\n headers,\n resolve,\n reject,\n }: {\n requestType: SentryRequestType;\n response: Response | XMLHttpRequest;\n headers: Record;\n resolve: (value?: SentryResponse | PromiseLike | null | undefined) => void;\n reject: (reason?: unknown) => void;\n }): void {\n const status = eventStatusFromHttpCode(response.status);\n /**\n * \"The name is case-insensitive.\"\n * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n */\n const limited = this._handleRateLimit(headers);\n if (limited && isDebugBuild()) {\n logger.warn(`Too many ${requestType} requests, backing off until: ${this._disabledUntil(requestType)}`);\n }\n\n if (status === 'success') {\n resolve({ status });\n return;\n }\n\n reject(response);\n }\n\n /**\n * Gets the time that given category is disabled until for rate limiting\n */\n protected _disabledUntil(requestType: SentryRequestType): Date {\n const category = requestTypeToCategory(requestType);\n return this._rateLimits[category] || this._rateLimits.all;\n }\n\n /**\n * Checks if a category is rate limited\n */\n protected _isRateLimited(requestType: SentryRequestType): boolean {\n return this._disabledUntil(requestType) > new Date(Date.now());\n }\n\n /**\n * Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.\n */\n protected _handleRateLimit(headers: Record): boolean {\n const now = Date.now();\n const rlHeader = headers['x-sentry-rate-limits'];\n const raHeader = headers['retry-after'];\n\n if (rlHeader) {\n // rate limit headers are of the form\n //
,
,..\n // where each
is of the form\n // : : : \n // where\n // is a delay in ms\n // is the event type(s) (error, transaction, etc) being rate limited and is of the form\n // ;;...\n // is what's being limited (org, project, or key) - ignored by SDK\n // is an arbitrary string like \"org_quota\" - ignored by SDK\n for (const limit of rlHeader.trim().split(',')) {\n const parameters = limit.split(':', 2);\n const headerDelay = parseInt(parameters[0], 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n for (const category of parameters[1].split(';')) {\n this._rateLimits[category || 'all'] = new Date(now + delay);\n }\n }\n return true;\n } else if (raHeader) {\n this._rateLimits.all = new Date(now + parseRetryAfterHeader(now, raHeader));\n return true;\n }\n return false;\n }\n\n protected abstract _sendRequest(\n sentryRequest: SentryRequest,\n originalPayload: Event | Session,\n ): PromiseLike;\n}\n","import { EventStatus } from '@sentry/types';\n/**\n * Converts an HTTP status code to sentry status {@link EventStatus}.\n *\n * @param code number HTTP status code\n * @returns EventStatus\n */\nexport function eventStatusFromHttpCode(code: number): EventStatus {\n if (code >= 200 && code < 300) {\n return 'success';\n }\n\n if (code === 429) {\n return 'rate_limit';\n }\n\n if (code >= 400 && code < 500) {\n return 'invalid';\n }\n\n if (code >= 500) {\n return 'failed';\n }\n\n return 'unknown';\n}\n","import { Event, Response, SentryRequest, Session, TransportOptions } from '@sentry/types';\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\nimport { FetchImpl, getNativeFetchImplementation } from './utils';\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /**\n * Fetch API reference which always points to native browser implementation.\n */\n private _fetch: typeof fetch;\n\n public constructor(options: TransportOptions, fetchImpl: FetchImpl = getNativeFetchImplementation()) {\n super(options);\n this._fetch = fetchImpl;\n }\n\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n protected _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike {\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: `Transport for ${sentryRequest.type} requests locked till ${this._disabledUntil(\n sentryRequest.type,\n )} due to too many requests.`,\n status: 429,\n });\n }\n\n const options: RequestInit = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n\n return this._buffer\n .add(\n () =>\n new SyncPromise((resolve, reject) => {\n void this._fetch(sentryRequest.url, options)\n .then(response => {\n const headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n this._handleResponse({\n requestType: sentryRequest.type,\n response,\n headers,\n resolve,\n reject,\n });\n })\n .catch(reject);\n }),\n )\n .then(undefined, reason => {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n this.recordLostEvent('queue_overflow', sentryRequest.type);\n } else {\n this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n }\n}\n","import { Event, Response, SentryRequest, Session } from '@sentry/types';\nimport { SentryError, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n protected _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike {\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: `Transport for ${sentryRequest.type} requests locked till ${this._disabledUntil(\n sentryRequest.type,\n )} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer\n .add(\n () =>\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = (): void => {\n if (request.readyState === 4) {\n const headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n this._handleResponse({ requestType: sentryRequest.type, response: request, headers, resolve, reject });\n }\n };\n\n request.open('POST', sentryRequest.url);\n for (const header in this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(this.options.headers, header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n }),\n )\n .then(undefined, reason => {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n this.recordLostEvent('queue_overflow', sentryRequest.type);\n } else {\n this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\n\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.denyUrls}.\n * By default, all errors will be sent.\n */\n allowUrls?: Array;\n\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To allow certain errors instead, use {@link Options.allowUrls}.\n * By default, all errors will be sent.\n */\n denyUrls?: Array;\n\n /** @deprecated use {@link Options.allowUrls} instead. */\n whitelistUrls?: Array;\n\n /** @deprecated use {@link Options.denyUrls} instead. */\n blacklistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike {\n return eventFromException(this._options, exception, hint);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n return eventFromMessage(this._options, message, level, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n tunnel: this._options.tunnel,\n sendClientReports: this._options.sendClientReports,\n _metadata: this._options._metadata,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n}\n","import { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';\nimport { DsnLike, Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n addNonEnumerableProperty,\n getGlobalObject,\n getOriginalFunction,\n isDebugBuild,\n logger,\n markFunctionWrapped,\n} from '@sentry/utils';\n\nconst global = getGlobalObject();\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sentryWrapped: WrappedFunction = function (this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options: ReportDialogOptions = {}): void {\n if (!global.document) {\n return;\n }\n\n if (!options.eventId) {\n if (isDebugBuild()) {\n logger.error(`Missing eventId option in showReportDialog call`);\n }\n return;\n }\n\n if (!options.dsn) {\n if (isDebugBuild()) {\n logger.error(`Missing dsn option in showReportDialog call`);\n }\n return;\n }\n\n const script = global.document.createElement('script');\n script.async = true;\n script.src = getReportDialogEndpoint(options.dsn, options);\n\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n\n const injectionPoint = global.document.head || global.document.body;\n\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isDebugBuild } from './env';\nimport { getGlobalObject } from './global';\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(callback);\n instrument(type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n if (isDebugBuild()) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function (originalConsoleMethod: () => any): Function {\n return function (...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.call(global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function (originalFetch: () => void): () => void {\n return function (...args: any[]): void {\n const handlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\ntype XHRSendInput = null | Blob | BufferSource | FormData | URLSearchParams | string;\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n body?: XHRSendInput;\n };\n}\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen: () => void): () => void {\n return function (this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const url = args[1];\n const xhrInfo: SentryWrappedXMLHttpRequest['__sentry_xhr__'] = (xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = function (): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhr.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr,\n });\n }\n };\n\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original: WrappedFunction): Function {\n return function (...readyStateArgs: any[]): void {\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n } else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n return originalOpen.apply(xhr, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend: () => void): () => void {\n return function (this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n if (this.__sentry_xhr__ && args[0] !== undefined) {\n this.__sentry_xhr__.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function (this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function (this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\nconst debounceDuration = 1000;\nlet debounceTimerID: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous: Event | undefined, current: Event): boolean {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event: Event): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n\n try {\n const target = event.target as HTMLElement;\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {\n return (event: Event): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = global.setTimeout(() => {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: Function;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n global.document.addEventListener('click', globalDOMEventHandler, false);\n global.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (global as any)[target] && (global as any)[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount += 1;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount -= 1;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function (msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function (e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n parseUrl,\n safeJoin,\n severityFromString,\n} from '@sentry/utils';\n\n/** JSDoc */\ninterface BreadcrumbsOptions {\n console: boolean;\n dom: boolean | { serializeAttribute: string | string[] };\n fetch: boolean;\n history: boolean;\n sentry: boolean;\n xhr: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /** JSDoc */\n private readonly _options: BreadcrumbsOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n public addSentryBreadcrumb(event: Event): void {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this._options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this._options.dom));\n }\n if (this._options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this._options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this._options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n }\n}\n\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _domBreadcrumb(dom: BreadcrumbsOptions['dom']): (handlerData: { [key: string]: any }) => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _innerDomBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node, keyAttrs)\n : htmlTreeAsString(handlerData.event as unknown as Node, keyAttrs);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {};\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: {\n method,\n url,\n status_code,\n },\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n input: body,\n },\n );\n\n return;\n }\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}\n","import { BaseClient, Scope, SDK_VERSION } from '@sentry/core';\nimport { Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { injectReportDialog, ReportDialogOptions } from './helpers';\nimport { Breadcrumbs } from './integrations';\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(BrowserBackend, options);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n\n injectReportDialog({\n ...options,\n dsn: options.dsn || this.getDsn(),\n });\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _sendEvent(event: Event): void {\n const integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n super._sendEvent(event);\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function (this: WrappedFunction, ...args: any[]): string {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration, StackFrame } from '@sentry/types';\nimport { getEventDescription, isDebugBuild, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n allowUrls: Array;\n denyUrls: Array;\n ignoreErrors: Array;\n ignoreInternal: boolean;\n\n /** @deprecated use {@link InboundFiltersOptions.allowUrls} instead. */\n whitelistUrls: Array;\n /** @deprecated use {@link InboundFiltersOptions.denyUrls} instead. */\n blacklistUrls: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n\n public constructor(private readonly _options: Partial = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n // This checks prevents most of the occurrences of the bug linked below:\n // https://github.com/getsentry/sentry-javascript/issues/2622\n // The bug is caused by multiple SDK instances, where one is minified and one is using non-mangled code.\n // Unfortunatelly we cannot fix it reliably (thus reserved property in rollup's terser config),\n // as we cannot force people using multiple instances in their apps to sync SDK versions.\n const options = typeof self._mergeOptions === 'function' ? self._mergeOptions(clientOptions) : {};\n if (typeof self._shouldDropEvent !== 'function') {\n return event;\n }\n return self._shouldDropEvent(event, options) ? null : event;\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: Partial): boolean {\n if (this._isSentryError(event, options)) {\n if (isDebugBuild()) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n }\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n if (isDebugBuild()) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n }\n return true;\n }\n if (this._isDeniedUrl(event, options)) {\n if (isDebugBuild()) {\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n }\n return true;\n }\n if (!this._isAllowedUrl(event, options)) {\n if (isDebugBuild()) {\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n }\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: Partial): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n // @ts-ignore can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n\n return false;\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: Partial): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isDeniedUrl(event: Event, options: Partial): boolean {\n // TODO: Use Glob instead?\n if (!options.denyUrls || !options.denyUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.denyUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isAllowedUrl(event: Event, options: Partial): boolean {\n // TODO: Use Glob instead?\n if (!options.allowUrls || !options.allowUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.allowUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: Partial = {}): Partial {\n return {\n allowUrls: [\n // eslint-disable-next-line deprecation/deprecation\n ...(this._options.whitelistUrls || []),\n ...(this._options.allowUrls || []),\n // eslint-disable-next-line deprecation/deprecation\n ...(clientOptions.whitelistUrls || []),\n ...(clientOptions.allowUrls || []),\n ],\n denyUrls: [\n // eslint-disable-next-line deprecation/deprecation\n ...(this._options.blacklistUrls || []),\n ...(this._options.denyUrls || []),\n // eslint-disable-next-line deprecation/deprecation\n ...(clientOptions.blacklistUrls || []),\n ...(clientOptions.denyUrls || []),\n ],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n if (isDebugBuild()) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n }\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n return this._getLastValidUrl(event.stacktrace.frames);\n }\n let frames;\n try {\n // @ts-ignore we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? this._getLastValidUrl(frames) : null;\n } catch (oO) {\n if (isDebugBuild()) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n }\n return null;\n }\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject, getOriginalFunction } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** JSDoc */\ninterface TryCatchOptions {\n setTimeout: boolean;\n setInterval: boolean;\n requestAnimationFrame: boolean;\n XMLHttpRequest: boolean;\n eventTarget: boolean | string[];\n}\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /** JSDoc */\n private readonly _options: TryCatchOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n const global = getGlobalObject();\n\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', _wrapTimeFunction);\n }\n\n if (this._options.setInterval) {\n fill(global, 'setInterval', _wrapTimeFunction);\n }\n\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n}\n\n/** JSDoc */\nfunction _wrapTimeFunction(original: () => void): () => number {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original: any): (callback: () => void) => any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: any, callback: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.call(\n this,\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n}\n\n/** JSDoc */\nfunction _wrapXHR(originalSend: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: XMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original: WrappedFunction): () => any {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\n/** JSDoc */\nfunction _wrapEventTarget(target: string): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const global = getGlobalObject() as { [key: string]: any };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = global[target] && global[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original: () => void): (\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn as any as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (\n originalRemoveEventListener: () => void,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = fn as unknown as WrappedFunction;\n try {\n const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n },\n );\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Hub, Integration, Primitive, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isDebugBuild,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\ntype GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';\n\n/** JSDoc */\ntype GlobalHandlersIntegrations = Record;\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n private _installFunc: Record void) | undefined> = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n const options = this._options;\n\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (const key in options) {\n const installFunc = this._installFunc[key as GlobalHandlersIntegrationsOptionKeys];\n if (installFunc && options[key as GlobalHandlersIntegrationsOptionKeys]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key as GlobalHandlersIntegrationsOptionKeys] = undefined;\n }\n }\n }\n}\n\n/** JSDoc */\nfunction _installGlobalOnErrorHandler(): void {\n addInstrumentationHandler(\n 'error',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const [hub, attachStacktrace] = getHubAndAttachStacktrace();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n const { msg, url, line, column, error } = data;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n\n const event =\n error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(\n eventFromUnknownInput(error || msg, undefined, {\n attachStacktrace,\n isRejection: false,\n }),\n url,\n line,\n column,\n );\n\n event.level = Severity.Error;\n\n addMechanismAndCapture(hub, error, event, 'onerror');\n },\n );\n}\n\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler(): void {\n addInstrumentationHandler(\n 'unhandledrejection',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e: any) => {\n const [hub, attachStacktrace] = getHubAndAttachStacktrace();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace,\n isRejection: true,\n });\n\n event.level = Severity.Error;\n\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n },\n );\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type: string): void {\n if (isDebugBuild()) {\n logger.log(`Global Handler attached: ${type}`);\n }\n}\n\nfunction addMechanismAndCapture(hub: Hub, error: EventHint['originalException'], event: Event, type: string): void {\n addExceptionMechanism(event, {\n handled: false,\n type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\n\nfunction getHubAndAttachStacktrace(): [Hub, boolean | undefined] {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const attachStacktrace = client && client.getOptions().attachStacktrace;\n return [hub, attachStacktrace];\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\ninterface LinkedErrorsOptions {\n key: string;\n limit: number;\n}\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n private readonly _key: LinkedErrorsOptions['key'];\n\n /**\n * @inheritDoc\n */\n private readonly _limit: LinkedErrorsOptions['limit'];\n\n /**\n * @inheritDoc\n */\n public constructor(options: Partial = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n return self ? _handler(self._key, self._limit, event, hint) : event;\n });\n }\n}\n\n/**\n * @inheritDoc\n */\nexport function _handler(key: string, limit: number, event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = _walkErrorTree(limit, hint.originalException as ExtendedError, key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n}\n\n/**\n * JSDOC\n */\nexport function _walkErrorTree(limit: number, error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return _walkErrorTree(limit, error[key], key, [exception, ...stack]);\n}\n","import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string = Dedupe.id;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((currentEvent: Event) => {\n const self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(`Event dropped due to being a duplicate of previously captured event.`);\n return null;\n }\n } catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n }\n}\n\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n } else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (global.location && global.location.href);\n const { referrer } = global.document || {};\n const { userAgent } = global.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...(url && { url }), headers };\n\n return { ...event, request };\n }\n return event;\n });\n }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { Hub } from '@sentry/types';\nimport { addInstrumentationHandler, getGlobalObject, isDebugBuild, logger, resolvedSyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient } from './client';\nimport { ReportDialogOptions, wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n initAndBind(BrowserClient, options);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n const client = hub.getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n if (isDebugBuild()) {\n logger.warn('Cannot flush events. No client defined.');\n }\n return resolvedSyncPromise(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n if (isDebugBuild()) {\n logger.warn('Cannot flush events and disable SDK. No client defined.');\n }\n return resolvedSyncPromise(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn: (...args: any) => any): any {\n return internalWrap(fn)();\n}\n\nfunction startSessionOnHub(hub: Hub): void {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking(): void {\n const window = getGlobalObject();\n const document = window.document;\n\n if (typeof document === 'undefined') {\n if (isDebugBuild()) {\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n }\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n","import { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\n// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js\nconst angularPattern = /^\\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\\] (.*?)\\n?(\\S+)$/;\n\n/**\n * AngularJS integration\n *\n * Provides an $exceptionHandler for AngularJS\n */\nexport class Angular implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'AngularJS';\n\n /**\n * moduleName used in Angular's DI resolution algorithm\n */\n public static moduleName: string = 'ngSentry';\n\n /**\n * @inheritDoc\n */\n public name: string = Angular.id;\n\n /**\n * Angular's instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _angular: any;\n\n /**\n * ngSentry module instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _module: any;\n\n /**\n * Returns current hub.\n */\n private _getCurrentHub?: () => Hub;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(options: { angular?: any } = {}) {\n logger.log('You are still using the Angular integration, consider moving to @sentry/angular');\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this._angular = options.angular || getGlobalObject().angular;\n\n if (!this._angular) {\n logger.error('AngularIntegration is missing an Angular instance');\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._module = this._angular.module(Angular.moduleName, []);\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._module) {\n return;\n }\n\n this._getCurrentHub = getCurrentHub;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._module.config([\n '$provide',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ($provide: any): void => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n $provide.decorator('$exceptionHandler', ['$delegate', this._$exceptionHandlerDecorator.bind(this)]);\n },\n ]);\n }\n\n /**\n * Angular's exceptionHandler for Sentry integration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _$exceptionHandlerDecorator($delegate: any): any {\n return (exception: Error, cause?: string): void => {\n const hub = this._getCurrentHub && this._getCurrentHub();\n\n if (hub && hub.getIntegration(Angular)) {\n hub.withScope(scope => {\n if (cause) {\n scope.setExtra('cause', cause);\n }\n\n scope.addEventProcessor((event: Event) => {\n const ex = event.exception && event.exception.values && event.exception.values[0];\n\n if (ex) {\n const matches = angularPattern.exec(ex.value || '');\n\n if (matches) {\n // This type now becomes something like: $rootScope:inprog\n ex.type = matches[1];\n ex.value = matches[2];\n event.message = `${ex.type}: ${ex.value}`;\n // auto set a new tag specifically for the angular error url\n event.extra = {\n ...event.extra,\n angularDocs: matches[3].substr(0, 250),\n };\n }\n }\n\n return event;\n });\n\n hub.captureException(exception);\n });\n }\n $delegate(exception, cause);\n };\n }\n}\n","import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { fill, getGlobalObject, safeJoin, severityFromString } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** Send Console API calls as Sentry Events */\nexport class CaptureConsole implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'CaptureConsole';\n\n /**\n * @inheritDoc\n */\n public name: string = CaptureConsole.id;\n\n /**\n * @inheritDoc\n */\n private readonly _levels: string[] = ['log', 'info', 'warn', 'error', 'debug', 'assert'];\n\n /**\n * @inheritDoc\n */\n public constructor(options: { levels?: string[] } = {}) {\n if (options.levels) {\n this._levels = options.levels;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!('console' in global)) {\n return;\n }\n\n this._levels.forEach((level: string) => {\n if (!(level in global.console)) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(global.console, level, (originalConsoleMethod: () => any) => (...args: any[]): void => {\n const hub = getCurrentHub();\n\n if (hub.getIntegration(CaptureConsole)) {\n hub.withScope(scope => {\n scope.setLevel(severityFromString(level));\n scope.setExtra('arguments', args);\n scope.addEventProcessor(event => {\n event.logger = 'console';\n return event;\n });\n\n let message = safeJoin(args, ' ');\n if (level === 'assert') {\n if (args[0] === false) {\n message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;\n scope.setExtra('arguments', args.slice(1));\n hub.captureMessage(message);\n }\n } else if (level === 'error' && args[0] instanceof Error) {\n hub.captureException(args[0]);\n } else {\n hub.captureMessage(message);\n }\n });\n }\n\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.call(global.console, args);\n }\n });\n });\n }\n}\n","import { Event, EventHint, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { consoleSandbox } from '@sentry/utils';\n\n/** JSDoc */\ninterface DebugOptions {\n stringify?: boolean;\n debugger?: boolean;\n}\n\n/** JSDoc */\nexport class Debug implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Debug';\n\n /**\n * @inheritDoc\n */\n public name: string = Debug.id;\n\n /** JSDoc */\n private readonly _options: DebugOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: DebugOptions) {\n this._options = {\n debugger: false,\n stringify: false,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(Debug);\n if (self) {\n if (self._options.debugger) {\n // eslint-disable-next-line no-debugger\n debugger;\n }\n\n /* eslint-disable no-console */\n consoleSandbox(() => {\n if (self._options.stringify) {\n console.log(JSON.stringify(event, null, 2));\n if (hint) {\n console.log(JSON.stringify(hint, null, 2));\n }\n } else {\n console.log(event);\n if (hint) {\n console.log(hint);\n }\n }\n });\n /* eslint-enable no-console */\n }\n return event;\n });\n }\n}\n","import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string = Dedupe.id;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((currentEvent: Event) => {\n const self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(`Event dropped due to being a duplicate of previously captured event.`);\n return null;\n }\n } catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n }\n}\n\n/** JSDoc */\nexport function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n } else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n}\n","import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, isInstanceOf, logger } from '@sentry/utils';\n\n/** JSDoc */\nexport class Ember implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Ember';\n\n /**\n * @inheritDoc\n */\n public name: string = Ember.id;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any\n private readonly _Ember: any;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(options: { Ember?: any } = {}) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this._Ember = options.Ember || getGlobalObject().Ember;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._Ember) {\n logger.error('EmberIntegration is missing an Ember instance');\n return;\n }\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n const oldOnError = this._Ember.onerror;\n\n this._Ember.onerror = (error: Error): void => {\n if (getCurrentHub().getIntegration(Ember)) {\n getCurrentHub().captureException(error, { originalException: error });\n }\n\n if (typeof oldOnError === 'function') {\n oldOnError.call(this._Ember, error);\n } else if (this._Ember.testing) {\n throw error;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._Ember.RSVP.on('error', (reason: unknown): void => {\n if (getCurrentHub().getIntegration(Ember)) {\n getCurrentHub().withScope(scope => {\n if (isInstanceOf(reason, Error)) {\n scope.setExtra('context', 'Unhandled Promise error detected');\n getCurrentHub().captureException(reason, { originalException: reason as Error });\n } else {\n scope.setExtra('reason', reason);\n getCurrentHub().captureMessage('Unhandled Promise error detected');\n }\n });\n }\n });\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n","import { Event, EventHint, EventProcessor, ExtendedError, Hub, Integration } from '@sentry/types';\nimport { isError, isPlainObject, logger, normalize } from '@sentry/utils';\n\n/** JSDoc */\ninterface ExtraErrorDataOptions {\n depth?: number;\n}\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class ExtraErrorData implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ExtraErrorData';\n\n /**\n * @inheritDoc\n */\n public name: string = ExtraErrorData.id;\n\n /** JSDoc */\n private readonly _options: ExtraErrorDataOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: ExtraErrorDataOptions) {\n this._options = {\n depth: 3,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(ExtraErrorData);\n if (!self) {\n return event;\n }\n return self.enhanceEventWithErrorData(event, hint);\n });\n }\n\n /**\n * Attaches extracted information from the Error object to extra field in the Event\n */\n public enhanceEventWithErrorData(event: Event, hint?: EventHint): Event {\n if (!hint || !hint.originalException || !isError(hint.originalException)) {\n return event;\n }\n const name = (hint.originalException as ExtendedError).name || hint.originalException.constructor.name;\n\n const errorData = this._extractErrorData(hint.originalException as ExtendedError);\n\n if (errorData) {\n let contexts = {\n ...event.contexts,\n };\n\n const normalizedErrorData = normalize(errorData, this._options.depth);\n if (isPlainObject(normalizedErrorData)) {\n contexts = {\n ...event.contexts,\n [name]: {\n ...normalizedErrorData,\n },\n };\n }\n\n return {\n ...event,\n contexts,\n };\n }\n\n return event;\n }\n\n /**\n * Extract extra information from the Error object\n */\n private _extractErrorData(error: ExtendedError): Record | null {\n // We are trying to enhance already existing event, so no harm done if it won't succeed\n try {\n const nativeKeys = [\n 'name',\n 'message',\n 'stack',\n 'line',\n 'column',\n 'fileName',\n 'lineNumber',\n 'columnNumber',\n 'toJSON',\n ];\n\n const extraErrorInfo: Record = {};\n\n // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n for (const key of Object.keys(error)) {\n if (nativeKeys.indexOf(key) !== -1) {\n continue;\n }\n const value = error[key];\n extraErrorInfo[key] = isError(value) ? (value as Error).toString() : value;\n }\n\n // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n if (typeof error.toJSON === 'function') {\n const serializedError = error.toJSON() as Record;\n\n for (const key of Object.keys(serializedError)) {\n const value = serializedError[key];\n extraErrorInfo[key] = isError(value) ? (value as Error).toString() : value;\n }\n }\n\n return extraErrorInfo;\n } catch (oO) {\n logger.error('Unable to extract extra data from the Error object:', oO);\n }\n\n return null;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, logger, normalize, uuid4 } from '@sentry/utils';\nimport localForage from 'localforage';\n\ntype LocalForage = {\n setItem(key: string, value: T, callback?: (err: any, value: T) => void): Promise;\n iterate(\n iteratee: (value: T, key: string, iterationNumber: number) => U,\n callback?: (err: any, result: U) => void,\n ): Promise;\n removeItem(key: string, callback?: (err: any) => void): Promise;\n};\n\n/**\n * cache offline errors and send when connected\n */\nexport class Offline implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Offline';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = Offline.id;\n\n /**\n * the global instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public global: any;\n\n /**\n * the current hub instance\n */\n public hub?: Hub;\n\n /**\n * maximum number of events to store while offline\n */\n public maxStoredEvents: number;\n\n /**\n * event cache\n */\n public offlineEventStore: LocalForage;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { maxStoredEvents?: number } = {}) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.global = getGlobalObject();\n this.maxStoredEvents = options.maxStoredEvents || 30; // set a reasonable default\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this.offlineEventStore = localForage.createInstance({\n name: 'sentry/offlineEventStore',\n });\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n this.hub = getCurrentHub();\n\n if ('addEventListener' in this.global) {\n this.global.addEventListener('online', () => {\n void this._sendEvents().catch(() => {\n logger.warn('could not send cached events');\n });\n });\n }\n\n addGlobalEventProcessor((event: Event) => {\n if (this.hub && this.hub.getIntegration(Offline)) {\n // cache if we are positively offline\n if ('navigator' in this.global && 'onLine' in this.global.navigator && !this.global.navigator.onLine) {\n void this._cacheEvent(event)\n .then((_event: Event): Promise => this._enforceMaxEvents())\n .catch((_error): void => {\n logger.warn('could not cache event while offline');\n });\n\n // return null on success or failure, because being offline will still result in an error\n return null;\n }\n }\n\n return event;\n });\n\n // if online now, send any events stored in a previous offline session\n if ('navigator' in this.global && 'onLine' in this.global.navigator && this.global.navigator.onLine) {\n void this._sendEvents().catch(() => {\n logger.warn('could not send cached events');\n });\n }\n }\n\n /**\n * cache an event to send later\n * @param event an event\n */\n private async _cacheEvent(event: Event): Promise {\n return this.offlineEventStore.setItem(uuid4(), normalize(event));\n }\n\n /**\n * purge excess events if necessary\n */\n private async _enforceMaxEvents(): Promise {\n const events: Array<{ event: Event; cacheKey: string }> = [];\n\n return this.offlineEventStore\n .iterate((event: Event, cacheKey: string, _index: number): void => {\n // aggregate events\n events.push({ cacheKey, event });\n })\n .then(\n (): Promise =>\n // this promise resolves when the iteration is finished\n this._purgeEvents(\n // purge all events past maxStoredEvents in reverse chronological order\n events\n .sort((a, b) => (b.event.timestamp || 0) - (a.event.timestamp || 0))\n .slice(this.maxStoredEvents < events.length ? this.maxStoredEvents : events.length)\n .map(event => event.cacheKey),\n ),\n )\n .catch((_error): void => {\n logger.warn('could not enforce max events');\n });\n }\n\n /**\n * purge event from cache\n */\n private async _purgeEvent(cacheKey: string): Promise {\n return this.offlineEventStore.removeItem(cacheKey);\n }\n\n /**\n * purge events from cache\n */\n private async _purgeEvents(cacheKeys: string[]): Promise {\n // trail with .then to ensure the return type as void and not void|void[]\n return Promise.all(cacheKeys.map(cacheKey => this._purgeEvent(cacheKey))).then();\n }\n\n /**\n * send all events\n */\n private async _sendEvents(): Promise {\n return this.offlineEventStore.iterate((event: Event, cacheKey: string, _index: number): void => {\n if (this.hub) {\n this.hub.captureEvent(event);\n\n void this._purgeEvent(cacheKey).catch((_error): void => {\n logger.warn('could not purge event from cache');\n });\n } else {\n logger.warn('no hub found - could not send cached event');\n }\n });\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, supportsReportingObserver } from '@sentry/utils';\n\n/** JSDoc */\ninterface Report {\n [key: string]: any;\n type: ReportTypes;\n url: string;\n body?: ReportBody;\n}\n\n/** JSDoc */\nconst enum ReportTypes {\n /** JSDoc */\n Crash = 'crash',\n /** JSDoc */\n Deprecation = 'deprecation',\n /** JSDoc */\n Intervention = 'intervention',\n}\n\n/** JSDoc */\ntype ReportBody = CrashReportBody | DeprecationReportBody | InterventionReportBody;\n\n/** JSDoc */\ninterface CrashReportBody {\n [key: string]: any;\n crashId: string;\n reason?: string;\n}\n\n/** JSDoc */\ninterface DeprecationReportBody {\n [key: string]: any;\n id: string;\n anticipatedRemoval?: Date;\n message: string;\n sourceFile?: string;\n lineNumber?: number;\n columnNumber?: number;\n}\n\n/** JSDoc */\ninterface InterventionReportBody {\n [key: string]: any;\n id: string;\n message: string;\n sourceFile?: string;\n lineNumber?: number;\n columnNumber?: number;\n}\n\n/** Reporting API integration - https://w3c.github.io/reporting/ */\nexport class ReportingObserver implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ReportingObserver';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = ReportingObserver.id;\n\n /**\n * Returns current hub.\n */\n private _getCurrentHub?: () => Hub;\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n types?: ReportTypes[];\n } = {\n types: [ReportTypes.Crash, ReportTypes.Deprecation, ReportTypes.Intervention],\n },\n ) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!supportsReportingObserver()) {\n return;\n }\n\n this._getCurrentHub = getCurrentHub;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const observer = new (getGlobalObject().ReportingObserver)(this.handler.bind(this), {\n buffered: true,\n types: this._options.types,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n observer.observe();\n }\n\n /**\n * @inheritDoc\n */\n public handler(reports: Report[]): void {\n const hub = this._getCurrentHub && this._getCurrentHub();\n if (!hub || !hub.getIntegration(ReportingObserver)) {\n return;\n }\n for (const report of reports) {\n hub.withScope(scope => {\n scope.setExtra('url', report.url);\n\n const label = `ReportingObserver [${report.type}]`;\n let details = 'No details available';\n\n if (report.body) {\n // Object.keys doesn't work on ReportBody, as all properties are inheirted\n const plainBody: {\n [key: string]: any;\n } = {};\n\n // eslint-disable-next-line guard-for-in\n for (const prop in report.body) {\n plainBody[prop] = report.body[prop];\n }\n\n scope.setExtra('body', plainBody);\n\n if (report.type === ReportTypes.Crash) {\n const body = report.body as CrashReportBody;\n // A fancy way to create a message out of crashId OR reason OR both OR fallback\n details = [body.crashId || '', body.reason || ''].join(' ').trim() || details;\n } else {\n const body = report.body as DeprecationReportBody | InterventionReportBody;\n details = body.message || details;\n }\n }\n\n hub.captureMessage(`${label}: ${details}`);\n });\n }\n }\n}\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up++;\n } else if (up) {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n // eslint-disable-next-line no-plusplus\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(\n resolvedPath.split('/').filter(p => !!p),\n !resolvedAbsolute,\n ).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n /* eslint-disable no-param-reassign */\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n /* eslint-enable no-param-reassign */\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(\n path.split('/').filter(p => !!p),\n !isPathAbsolute,\n ).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n","import { Event, EventProcessor, Hub, Integration, StackFrame, Stacktrace } from '@sentry/types';\nimport { basename, relative } from '@sentry/utils';\n\ntype StackFrameIteratee = (frame: StackFrame) => StackFrame;\n\n/** Rewrite event frames paths */\nexport class RewriteFrames implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'RewriteFrames';\n\n /**\n * @inheritDoc\n */\n public name: string = RewriteFrames.id;\n\n /**\n * @inheritDoc\n */\n private readonly _root?: string;\n\n /**\n * @inheritDoc\n */\n private readonly _prefix: string = 'app:///';\n\n /**\n * @inheritDoc\n */\n public constructor(options: { root?: string; prefix?: string; iteratee?: StackFrameIteratee } = {}) {\n if (options.root) {\n this._root = options.root;\n }\n if (options.prefix) {\n this._prefix = options.prefix;\n }\n if (options.iteratee) {\n this._iteratee = options.iteratee;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(RewriteFrames);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /** JSDoc */\n public process(originalEvent: Event): Event {\n let processedEvent = originalEvent;\n\n if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n processedEvent = this._processExceptionsEvent(processedEvent);\n }\n\n if (originalEvent.stacktrace) {\n processedEvent = this._processStacktraceEvent(processedEvent);\n }\n\n return processedEvent;\n }\n\n /**\n * @inheritDoc\n */\n private readonly _iteratee: StackFrameIteratee = (frame: StackFrame) => {\n if (!frame.filename) {\n return frame;\n }\n // Check if the frame filename begins with `/` or a Windows-style prefix such as `C:\\`\n const isWindowsFrame = /^[A-Z]:\\\\/.test(frame.filename);\n const startsWithSlash = /^\\//.test(frame.filename);\n if (isWindowsFrame || startsWithSlash) {\n const filename = isWindowsFrame\n ? frame.filename\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n : frame.filename;\n const base = this._root ? relative(this._root, filename) : basename(filename);\n frame.filename = `${this._prefix}${base}`;\n }\n return frame;\n };\n\n /** JSDoc */\n private _processExceptionsEvent(event: Event): Event {\n try {\n return {\n ...event,\n exception: {\n ...event.exception,\n // The check for this is performed inside `process` call itself, safe to skip here\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n values: event.exception!.values!.map(value => ({\n ...value,\n stacktrace: this._processStacktrace(value.stacktrace),\n })),\n },\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n private _processStacktraceEvent(event: Event): Event {\n try {\n return {\n ...event,\n stacktrace: this._processStacktrace(event.stacktrace),\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n private _processStacktrace(stacktrace?: Stacktrace): Stacktrace {\n return {\n ...stacktrace,\n frames: stacktrace && stacktrace.frames && stacktrace.frames.map(f => this._iteratee(f)),\n };\n }\n}\n","import { Event, EventProcessor, Hub, Integration } from '@sentry/types';\n\n/** This function adds duration since Sentry was initialized till the time event was sent */\nexport class SessionTiming implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'SessionTiming';\n\n /**\n * @inheritDoc\n */\n public name: string = SessionTiming.id;\n\n /** Exact time Client was initialized expressed in milliseconds since Unix Epoch. */\n protected readonly _startTime: number = Date.now();\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(SessionTiming);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public process(event: Event): Event {\n const now = Date.now();\n\n return {\n ...event,\n extra: {\n ...event.extra,\n ['session:start']: this._startTime,\n ['session:duration']: now - this._startTime,\n ['session:end']: now,\n },\n };\n }\n}\n","import { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types';\n\n/** Add node transaction to the event */\nexport class Transaction implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Transaction';\n\n /**\n * @inheritDoc\n */\n public name: string = Transaction.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(Transaction);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public process(event: Event): Event {\n const frames = this._getFramesFromEvent(event);\n\n // use for loop so we don't have to reverse whole frames array\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame.in_app === true) {\n event.transaction = this._getTransaction(frame);\n break;\n }\n }\n\n return event;\n }\n\n /** JSDoc */\n private _getFramesFromEvent(event: Event): StackFrame[] {\n const exception = event.exception && event.exception.values && event.exception.values[0];\n return (exception && exception.stacktrace && exception.stacktrace.frames) || [];\n }\n\n /** JSDoc */\n private _getTransaction(frame: StackFrame): string {\n return frame.module || frame.function ? `${frame.module || '?'}/${frame.function || '?'}` : '';\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventProcessor, Hub, Integration, IntegrationClass, Scope, Span, Transaction } from '@sentry/types';\nimport { basename, getGlobalObject, logger, timestampWithMs } from '@sentry/utils';\n\n/**\n * Used to extract Tracing integration from the current client,\n * without the need to import `Tracing` itself from the @sentry/apm package.\n * @deprecated as @sentry/tracing should be used over @sentry/apm.\n */\nconst TRACING_GETTER = {\n id: 'Tracing',\n} as any as IntegrationClass;\n\n/**\n * Used to extract BrowserTracing integration from @sentry/tracing\n */\nconst BROWSER_TRACING_GETTER = {\n id: 'BrowserTracing',\n} as any as IntegrationClass;\n\nconst VUE_OP = 'ui.vue';\n\n/** Global Vue object limited to the methods/attributes we require */\ninterface VueInstance {\n config: {\n errorHandler?(error: Error, vm?: ViewModel, info?: string): void;\n };\n util?: {\n warn(...input: any): void;\n };\n mixin(hooks: { [key: string]: () => void }): void;\n}\n\n/** Representation of Vue component internals */\ninterface ViewModel {\n [key: string]: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n $root: object;\n $options: {\n [key: string]: any;\n name?: string;\n propsData?: { [key: string]: any };\n _componentTag?: string;\n __file?: string;\n $_sentryPerfHook?: boolean;\n };\n $once(hook: string, cb: () => void): void;\n}\n\n/** Vue Integration configuration */\ninterface IntegrationOptions {\n /** Vue instance to be used inside the integration */\n Vue: VueInstance;\n\n /**\n * When set to `false`, Sentry will suppress reporting of all props data\n * from your Vue components for privacy concerns.\n */\n attachProps: boolean;\n /**\n * When set to `true`, original Vue's `logError` will be called as well.\n * https://github.com/vuejs/vue/blob/c2b1cfe9ccd08835f2d99f6ce60f67b4de55187f/src/core/util/error.js#L38-L48\n */\n logErrors: boolean;\n\n /**\n * When set to `true`, enables tracking of components lifecycle performance.\n * It requires `Tracing` integration to be also enabled.\n */\n tracing: boolean;\n\n /** {@link TracingOptions} */\n tracingOptions: TracingOptions;\n}\n\n/** Vue specific configuration for Tracing Integration */\ninterface TracingOptions {\n /**\n * Decides whether to track components by hooking into its lifecycle methods.\n * Can be either set to `boolean` to enable/disable tracking for all of them.\n * Or to an array of specific component names (case-sensitive).\n */\n trackComponents: boolean | string[];\n /** How long to wait until the tracked root activity is marked as finished and sent of to Sentry */\n timeout: number;\n /**\n * List of hooks to keep track of during component lifecycle.\n * Available hooks: 'activate' | 'create' | 'destroy' | 'mount' | 'update'\n * Based on https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\n */\n hooks: Operation[];\n}\n\n/** Optional metadata attached to Sentry Event */\ninterface Metadata {\n [key: string]: any;\n componentName?: string;\n propsData?: { [key: string]: any };\n lifecycleHook?: string;\n}\n\n// https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\ntype Hook =\n | 'activated'\n | 'beforeCreate'\n | 'beforeDestroy'\n | 'beforeMount'\n | 'beforeUpdate'\n | 'created'\n | 'deactivated'\n | 'destroyed'\n | 'mounted'\n | 'updated';\n\ntype Operation = 'activate' | 'create' | 'destroy' | 'mount' | 'update';\n\n// Mappings from operation to corresponding lifecycle hook.\nconst HOOKS: { [key in Operation]: Hook[] } = {\n activate: ['activated', 'deactivated'],\n create: ['beforeCreate', 'created'],\n destroy: ['beforeDestroy', 'destroyed'],\n mount: ['beforeMount', 'mounted'],\n update: ['beforeUpdate', 'updated'],\n};\n\nconst COMPONENT_NAME_REGEXP = /(?:^|[-_/])(\\w)/g;\nconst ROOT_COMPONENT_NAME = 'root';\nconst ANONYMOUS_COMPONENT_NAME = 'anonymous component';\n\n/** JSDoc */\nexport class Vue implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Vue';\n\n /**\n * @inheritDoc\n */\n public name: string = Vue.id;\n\n private readonly _options: IntegrationOptions;\n\n /**\n * Cache holding already processed component names\n */\n private readonly _componentsCache: { [key: string]: string } = {};\n private _rootSpan?: Span;\n private _rootSpanTimer?: ReturnType;\n private _tracingActivity?: number;\n\n /**\n * @inheritDoc\n */\n public constructor(\n options: Partial & { tracingOptions: Partial }>,\n ) {\n logger.log('You are still using the Vue.js integration, consider moving to @sentry/vue');\n this._options = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Vue: getGlobalObject().Vue,\n attachProps: true,\n logErrors: false,\n tracing: false,\n ...options,\n tracingOptions: {\n hooks: ['mount', 'update'],\n timeout: 2000,\n trackComponents: false,\n ...options.tracingOptions,\n },\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._options.Vue) {\n logger.error('Vue integration is missing a Vue instance');\n return;\n }\n\n this._attachErrorHandler(getCurrentHub);\n\n if (this._options.tracing) {\n this._startTracing(getCurrentHub);\n }\n }\n\n /**\n * Extract component name from the ViewModel\n */\n private _getComponentName(vm: ViewModel): string {\n // Such level of granularity is most likely not necessary, but better safe than sorry. — Kamil\n if (!vm) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$root === vm) {\n return ROOT_COMPONENT_NAME;\n }\n\n if (!vm.$options) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$options.name) {\n return vm.$options.name;\n }\n\n if (vm.$options._componentTag) {\n return vm.$options._componentTag;\n }\n\n // injected by vue-loader\n if (vm.$options.__file) {\n const unifiedFile = vm.$options.__file.replace(/^[a-zA-Z]:/, '').replace(/\\\\/g, '/');\n const filename = basename(unifiedFile, '.vue');\n return (\n this._componentsCache[filename] ||\n (this._componentsCache[filename] = filename.replace(COMPONENT_NAME_REGEXP, (_, c: string) =>\n c ? c.toUpperCase() : '',\n ))\n );\n }\n\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n /** Keep it as attribute function, to keep correct `this` binding inside the hooks callbacks */\n // eslint-disable-next-line @typescript-eslint/typedef\n private readonly _applyTracingHooks = (vm: ViewModel, getCurrentHub: () => Hub): void => {\n // Don't attach twice, just in case\n if (vm.$options.$_sentryPerfHook) {\n return;\n }\n vm.$options.$_sentryPerfHook = true;\n\n const name = this._getComponentName(vm);\n const rootMount = name === ROOT_COMPONENT_NAME;\n const spans: { [key: string]: Span } = {};\n\n // Render hook starts after once event is emitted,\n // but it ends before the second event of the same type.\n //\n // Because of this, we start measuring inside the first event,\n // but finish it before it triggers, to skip the event emitter timing itself.\n const rootHandler = (hook: Hook): void => {\n const now = timestampWithMs();\n\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (this._rootSpan) {\n this._finishRootSpan(now, getCurrentHub);\n } else {\n vm.$once(`hook:${hook}`, () => {\n // Create an activity on the first event call. There'll be no second call, as rootSpan will be in place,\n // thus new event handler won't be attached.\n\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line deprecation/deprecation\n const tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n this._tracingActivity = (tracingIntegration as any).constructor.pushActivity('Vue Application Render');\n const transaction = (tracingIntegration as any).constructor.getTransaction();\n if (transaction) {\n this._rootSpan = transaction.startChild({\n description: 'Application Render',\n op: VUE_OP,\n });\n }\n // Use functionality from @sentry/tracing\n } else {\n const activeTransaction = getActiveTransaction(getCurrentHub());\n if (activeTransaction) {\n this._rootSpan = activeTransaction.startChild({\n description: 'Application Render',\n op: VUE_OP,\n });\n }\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n });\n }\n };\n\n const childHandler = (hook: Hook, operation: Operation): void => {\n // Skip components that we don't want to track to minimize the noise and give a more granular control to the user\n const shouldTrack = Array.isArray(this._options.tracingOptions.trackComponents)\n ? this._options.tracingOptions.trackComponents.indexOf(name) > -1\n : this._options.tracingOptions.trackComponents;\n\n if (!this._rootSpan || !shouldTrack) {\n return;\n }\n\n const now = timestampWithMs();\n const span = spans[operation];\n\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (span) {\n span.finish();\n this._finishRootSpan(now, getCurrentHub);\n } else {\n vm.$once(`hook:${hook}`, () => {\n if (this._rootSpan) {\n spans[operation] = this._rootSpan.startChild({\n description: `Vue <${name}>`,\n op: `${VUE_OP}.${operation}`,\n });\n }\n });\n }\n };\n\n // Each component has it's own scope, so all activities are only related to one of them\n this._options.tracingOptions.hooks.forEach(operation => {\n // Retrieve corresponding hooks from Vue lifecycle.\n // eg. mount => ['beforeMount', 'mounted']\n const internalHooks = HOOKS[operation];\n\n if (!internalHooks) {\n logger.warn(`Unknown hook: ${operation}`);\n return;\n }\n\n internalHooks.forEach(internalHook => {\n const handler = rootMount\n ? rootHandler.bind(this, internalHook)\n : childHandler.bind(this, internalHook, operation);\n const currentValue = vm.$options[internalHook];\n\n if (Array.isArray(currentValue)) {\n vm.$options[internalHook] = [handler, ...currentValue];\n } else if (typeof currentValue === 'function') {\n vm.$options[internalHook] = [handler, currentValue];\n } else {\n vm.$options[internalHook] = [handler];\n }\n });\n });\n };\n\n /** Finish top-level span and activity with a debounce configured using `timeout` option */\n private _finishRootSpan(timestamp: number, getCurrentHub: () => Hub): void {\n if (this._rootSpanTimer) {\n clearTimeout(this._rootSpanTimer);\n }\n\n this._rootSpanTimer = setTimeout(() => {\n if (this._tracingActivity) {\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n // eslint-disable-next-line deprecation/deprecation\n const tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (tracingIntegration as any).constructor.popActivity(this._tracingActivity);\n }\n }\n\n // We should always finish the span, only should pop activity if using @sentry/apm\n if (this._rootSpan) {\n this._rootSpan.finish(timestamp);\n }\n }, this._options.tracingOptions.timeout);\n }\n\n /** Inject configured tracing hooks into Vue's component lifecycles */\n private _startTracing(getCurrentHub: () => Hub): void {\n const applyTracingHooks = this._applyTracingHooks;\n\n this._options.Vue.mixin({\n beforeCreate(this: ViewModel): void {\n // eslint-disable-next-line deprecation/deprecation\n if (getCurrentHub().getIntegration(TRACING_GETTER) || getCurrentHub().getIntegration(BROWSER_TRACING_GETTER)) {\n // `this` points to currently rendered component\n applyTracingHooks(this, getCurrentHub);\n } else {\n logger.error('Vue integration has tracing enabled, but Tracing integration is not configured');\n }\n },\n });\n }\n\n /** Inject Sentry's handler into owns Vue's error handler */\n private _attachErrorHandler(getCurrentHub: () => Hub): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const currentErrorHandler = this._options.Vue.config.errorHandler;\n\n this._options.Vue.config.errorHandler = (error: Error, vm?: ViewModel, info?: string): void => {\n const metadata: Metadata = {};\n\n if (vm) {\n try {\n metadata.componentName = this._getComponentName(vm);\n\n if (this._options.attachProps) {\n metadata.propsData = vm.$options.propsData;\n }\n } catch (_oO) {\n logger.warn('Unable to extract metadata from Vue component.');\n }\n }\n\n if (info) {\n metadata.lifecycleHook = info;\n }\n\n if (getCurrentHub().getIntegration(Vue)) {\n // Capture exception in the next event loop, to make sure that all breadcrumbs are recorded in time.\n setTimeout(() => {\n getCurrentHub().withScope(scope => {\n scope.setContext('vue', metadata);\n getCurrentHub().captureException(error);\n });\n });\n }\n\n if (typeof currentErrorHandler === 'function') {\n currentErrorHandler.call(this._options.Vue, error, vm, info);\n }\n\n if (this._options.logErrors) {\n if (this._options.Vue.util) {\n this._options.Vue.util.warn(`Error in ${info}: \"${error && error.toString()}\"`, vm);\n }\n // eslint-disable-next-line no-console\n console.error(error);\n }\n };\n }\n}\n\ninterface HubType extends Hub {\n getScope?(): Scope | undefined;\n}\n\n/** Grabs active transaction off scope */\nexport function getActiveTransaction(hub: HubType): T | undefined {\n if (hub && hub.getScope) {\n const scope = hub.getScope() as Scope;\n if (scope) {\n return scope.getTransaction() as T | undefined;\n }\n }\n\n return undefined;\n}\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport Connection, {PROGRESS} from './Connection';\nimport PropTypes from 'prop-types';\nimport * as Sentry from '@sentry/browser';\nimport * as SentryIntegrations from '@sentry/integrations';\n\nimport DialogError from './Dialogs/Error';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport IconClose from '@material-ui/icons/Close';\n\nimport printPrompt from './Prompt';\nimport theme from './Theme';\nimport Loader from './Components/Loader';\nimport Router from './Components/Router';\nimport Utils from './Components/Utils';\nimport SaveCloseButtons from './Components/SaveCloseButtons';\nimport I18n from './i18n';\n\nimport './index.css';\n\nif (!window.localStorage) {\n window.localStorage = {\n getItem: () => null,\n setItem: () => null,\n };\n}\n\n/**\n * @extends {Router}\n */\nclass GenericApp extends Router {\n /**\n * @param {import('./types').GenericAppProps} props\n * @param {import('./types').GenericAppSettings | undefined} settings\n */\n constructor(props, settings) {\n // Remove `!Connection.isWeb() && window.adapterName !== 'material'` when iobroker.socket will support native ws\n if (!Connection.isWeb() && window.io && window.location.port === '3000') {\n try {\n const io = new window.SocketClient();\n delete window.io;\n window.io = io;\n } catch (e) {\n // ignore\n }\n }\n\n super(props);\n\n printPrompt();\n\n let query = (window.location.search || '').replace(/^\\?/, '').replace(/#.*$/, '');\n let args = {};\n query.trim().split('&').filter(t => t.trim()).forEach(b => {\n const parts = b.split('=');\n args[parts[0]] = parts.length === 2 ? parts[1] : true;\n if (args[parts[0]] === 'true') {\n args[parts[0]] = true;\n } else if (args[parts[0]] === 'false') {\n args[parts[0]] = false;\n }\n });\n\n // extract instance from URL\n this.instance = args.instance !== undefined ? parseInt(args.instance, 10) || 0 : (parseInt(window.location.search.slice(1), 10) || 0);\n // extract adapter name from URL\n const tmp = window.location.pathname.split('/');\n this.adapterName = settings?.adapterName || props.adapterName || window.adapterName || tmp[tmp.length - 2] || 'iot';\n this.instanceId = `system.adapter.${this.adapterName}.${this.instance}`;\n this.newReact = args.newReact === true; // it is admin5\n\n const location = Router.getLocation();\n location.tab = location.tab || window.localStorage.getItem(this.adapterName + '-adapter') || '';\n\n const themeInstance = this.createTheme();\n\n this.state = {\n selectedTab: window.localStorage.getItem(this.adapterName + '-adapter') || '',\n selectedTabNum: -1,\n native: {},\n errorText: '',\n changed: false,\n connected: false,\n loaded: false,\n isConfigurationError: '',\n expertMode: false,\n toast: '',\n theme: themeInstance,\n themeName: this.getThemeName(themeInstance),\n themeType: this.getThemeType(themeInstance),\n bottomButtons: (settings && settings.bottomButtons) === false ? false : ((props && props.bottomButtons) === false ? false : true),\n width: GenericApp.getWidth(),\n };\n\n // init translations\n const translations = {\n 'en': require('./i18n/en.json'),\n 'de': require('./i18n/de.json'),\n 'ru': require('./i18n/ru.json'),\n 'pt': require('./i18n/pt.json'),\n 'nl': require('./i18n/nl.json'),\n 'fr': require('./i18n/fr.json'),\n 'it': require('./i18n/it.json'),\n 'es': require('./i18n/es.json'),\n 'pl': require('./i18n/pl.json'),\n 'zh-cn': require('./i18n/zh-cn.json'),\n };\n\n // merge together\n if (settings && settings.translations) {\n Object.keys(settings.translations).forEach(lang => translations[lang] = Object.assign(translations[lang], settings.translations[lang]));\n } else if (props.translations) {\n Object.keys(props.translations).forEach(lang => translations[lang] = Object.assign(translations[lang], props.translations[lang]));\n }\n\n I18n.setTranslations(translations);\n\n this.savedNative = {}; // to detect if the config changed\n\n this.encryptedFields = props.encryptedFields || settings?.encryptedFields || [];\n\n this.sentryDSN = (settings && settings.sentryDSN) || props.sentryDSN;\n\n this.socket = new Connection({\n ...(props?.socket || settings?.socket),\n name: this.adapterName,\n doNotLoadAllObjects: settings?.doNotLoadAllObjects,\n onProgress: progress => {\n if (progress === PROGRESS.CONNECTING) {\n this.setState({connected: false});\n } else if (progress === PROGRESS.READY) {\n this.setState({connected: true});\n } else {\n this.setState({connected: true});\n }\n },\n onReady: (objects, scripts) => {\n I18n.setLanguage(this.socket.systemLang);\n\n // subscribe because of language and expert mode\n this.socket.subscribeObject('system.config', this.onSystemConfigChanged)\n .then(() => this.getSystemConfig())\n .then(obj => {\n this._secret = (typeof obj !== 'undefined' && obj.native && obj.native.secret) || 'Zgfr56gFe87jJOM';\n this._systemConfig = obj?.common || {};\n return this.socket.getObject(this.instanceId);\n })\n .then(instanceObj => {\n let waitPromise;\n\n const sentryEnabled =\n this._systemConfig.diag !== 'none' &&\n instanceObj &&\n instanceObj.common &&\n instanceObj.common.name &&\n instanceObj.common.version &&\n !instanceObj.common.disableDataReporting &&\n window.location.host !== 'localhost:3000';\n\n // activate sentry plugin\n if (!this.sentryStarted && this.sentryDSN && sentryEnabled) {\n this.sentryStarted = true;\n\n Sentry.init({\n dsn: this.sentryDSN,\n release: `iobroker.${instanceObj.common.name}@${instanceObj.common.version}`,\n integrations: [\n new SentryIntegrations.Dedupe()\n ]\n });\n }\n\n // read UUID and init sentry with it.\n // for backward compatibility it will be processed separately from above logic: some adapters could still have this.sentryDSN as undefined\n if (!this.sentryInited && sentryEnabled) {\n this.sentryInited = true;\n\n waitPromise = this.socket.getObject('system.meta.uuid')\n .then(uuidObj => {\n if (uuidObj && uuidObj.native && uuidObj.native.uuid) {\n Sentry.configureScope(scope =>\n scope.setUser({id: uuidObj.native.uuid}));\n }\n });\n }\n\n waitPromise = waitPromise || Promise.resolve();\n\n waitPromise\n .then(() => {\n if (instanceObj) {\n this.common = instanceObj?.common;\n this.onPrepareLoad(instanceObj.native, instanceObj.encryptedNative); // decode all secrets\n this.savedNative = JSON.parse(JSON.stringify(instanceObj.native));\n this.setState({native: instanceObj.native, loaded: true, expertMode: this.getExpertMode()}, () =>\n this.onConnectionReady && this.onConnectionReady());\n } else {\n console.warn('Cannot load instance settings');\n this.setState({native: {}, loaded: true, expertMode: this.getExpertMode()}, () => this.onConnectionReady && this.onConnectionReady());\n }\n });\n });\n },\n onError: err => {\n console.error(err);\n this.showError(err);\n }\n });\n }\n\n onSystemConfigChanged = (id, obj) => {\n if (obj && id === 'system.config') {\n if (this.socket.systemLang !== obj?.common.language) {\n this.socket.systemLang = obj?.common.language || 'en';\n I18n.setLanguage(this.socket.systemLang);\n }\n\n if (this._systemConfig.expertMode !== !!obj?.common?.expertMode) {\n this._systemConfig = obj?.common || {};\n this.setState({expertMode: this.getExpertMode()});\n } else {\n this._systemConfig = obj?.common || {};\n }\n }\n }\n\n /**\n * Called immediately after a component is mounted. Setting state here will trigger re-rendering.\n */\n componentDidMount() {\n window.addEventListener('resize', this.onResize, true);\n window.addEventListener('message', this.onReceiveMessage, false);\n super.componentDidMount();\n }\n\n /**\n * Called immediately before a component is destroyed.\n */\n componentWillUnmount() {\n window.removeEventListener('resize', this.onResize, true);\n window.removeEventListener('message', this.onReceiveMessage, false);\n super.componentWillUnmount();\n }\n\n onReceiveMessage = message => {\n if (message?.data) {\n if (message.data === 'updateTheme') {\n const newThemeName = Utils.getThemeName()\n Utils.setThemeName(Utils.getThemeName());\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n }, () => {\n this.props.onThemeChange && this.props.onThemeChange(newThemeName);\n this.onThemeChanged && this.onThemeChanged(newThemeName);\n });\n } else if (message.data === 'updateExpertMode') {\n this.onToggleExpertMode && this.onToggleExpertMode(this.getExpertMode());\n } else {\n console.warn('Received unknown message: ' + JSON.stringify(message.data));\n }\n }\n };\n\n /**\n * @private\n */\n onResize = () => {\n this.resizeTimer && clearTimeout(this.resizeTimer);\n this.resizeTimer = setTimeout(() => {\n this.resizeTimer = null;\n this.setState({width: GenericApp.getWidth()});\n }, 200);\n };\n\n /**\n * Gets the width depending on the window inner width.\n * @returns {import('./types').Width}\n */\n static getWidth() {\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n const SIZES = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n };\n const width = window.innerWidth;\n const keys = Object.keys(SIZES).reverse();\n const widthComputed = keys.find(key => width >= SIZES[key]);\n\n return widthComputed || 'xs';\n }\n\n /**\n * Get a theme\n * @param {string} name Theme name\n * @returns {import('./types').Theme}\n */\n createTheme(name = '') {\n return theme(Utils.getThemeName(name));\n }\n\n /**\n * Get the theme name\n * @param {import('./types').Theme} theme Theme\n * @returns {string} Theme name\n */\n getThemeName(theme) {\n return theme.name;\n }\n\n /**\n * Get the theme type\n * @param {import('./types').Theme} theme Theme\n * @returns {string} Theme type\n */\n getThemeType(theme) {\n return theme.palette.type;\n }\n\n /**\n * Changes the current theme\n */\n toggleTheme() {\n const themeName = this.state.themeName;\n\n // dark => blue => colored => light => dark\n const newThemeName = themeName === 'dark' ? 'blue' :\n (themeName === 'blue' ? 'colored' :\n (themeName === 'colored' ? 'light' : 'dark'));\n\n Utils.setThemeName(newThemeName);\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n });\n }\n\n /**\n * Gets the system configuration.\n * @returns {Promise}\n */\n getSystemConfig() {\n return this.socket.getSystemConfig();\n }\n\n /**\n * Get current expert mode\n * @returns {boolean}\n */\n getExpertMode() {\n return window.sessionStorage.getItem('App.expertMode') === 'true' || !!this._systemConfig.expertMode;\n }\n\n /**\n * Gets called when the socket.io connection is ready.\n * You can overload this function to execute own commands.\n */\n onConnectionReady() {\n }\n\n /**\n * Encrypts a string.\n * @param {string} value\n * @returns {string}\n */\n encrypt(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(this._secret[i % this._secret.length].charCodeAt(0) ^ value.charCodeAt(i));\n }\n return result;\n }\n\n /**\n * Decrypts a string.\n * @param {string} value\n * @returns {string}\n */\n decrypt(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(this._secret[i % this._secret.length].charCodeAt(0) ^ value.charCodeAt(i));\n }\n return result;\n }\n\n /**\n * Gets called when the navigation hash changes.\n * You may override this if needed.\n */\n onHashChanged() {\n const location = Router.getLocation();\n if (location.tab !== this.state.selectedTab) {\n this.selectTab(location.tab);\n }\n }\n\n /**\n * Selects the given tab.\n * @param {string} tab\n * @param {number} [index]\n */\n selectTab(tab, index) {\n window.localStorage[this.adapterName + '-adapter'] = tab;\n this.setState({selectedTab: tab, selectedTabNum: index})\n }\n\n /**\n * Gets called before the settings are saved.\n * You may override this if needed.\n * @param {Record} settings\n */\n onPrepareSave(settings) {\n // here you can encode values\n this.encryptedFields && this.encryptedFields.forEach(attr => {\n if (settings[attr]) {\n settings[attr] = this.encrypt(settings[attr]);\n }\n });\n\n return true;\n }\n\n /**\n * Gets called after the settings are loaded.\n * You may override this if needed.\n * @param {Record} settings\n * @param {string[]} encryptedNative optional list of fields to be decrypted\n */\n onPrepareLoad(settings, encryptedNative) {\n // here you can encode values\n this.encryptedFields && this.encryptedFields.forEach(attr => {\n if (settings[attr]) {\n settings[attr] = this.decrypt(settings[attr]);\n }\n });\n encryptedNative && encryptedNative.forEach(attr => {\n this.encryptedFields = this.encryptedFields || [];\n !this.encryptedFields.includes(attr) && this.encryptedFields.push(attr);\n if (settings[attr]) {\n settings[attr] = this.decrypt(settings[attr]);\n }\n });\n }\n\n /**\n * Gets the extendable instances.\n * @returns {Promise}\n */\n getExtendableInstances() {\n return new Promise(resolve => {\n this.socket._socket.emit('getObjectView', 'system', 'instance', null, (err, doc) => {\n if (err) {\n resolve([]);\n } else {\n resolve(doc.rows.filter(item => item.value.common.webExtendable).map(item => item.value));\n }\n });\n });\n }\n\n /**\n * Gets the IP addresses of the given host.\n * @param {string} host\n */\n getIpAddresses(host) {\n return new Promise((resolve, reject) => {\n this.socket._socket.emit('getHostByIp', host || this.common.host, (ip, _host) => {\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - ' + I18n.t('ra_Listen on all IPs'), address: '0.0.0.0', family: 'ipv4'}];\n const IPs6 = [{name: '[IPv6] ::', address: '::', family: 'ipv6'}];\n if (_host) {\n host = _host;\n if (host.native.hardware && host.native.hardware.networkInterfaces) {\n Object.keys(host.native.hardware.networkInterfaces).forEach(eth =>\n host.native.hardware.networkInterfaces[eth].forEach(inter => {\n if (inter.family !== 'IPv6') {\n IPs4.push({name: '[' + inter.family + '] ' + inter.address + ' - ' + eth, address: inter.address, family: 'ipv4'});\n } else {\n IPs6.push({name: '[' + inter.family + '] ' + inter.address + ' - ' + eth, address: inter.address, family: 'ipv6'});\n }\n }));\n }\n IPs6.forEach(ip => IPs4.push(ip));\n }\n resolve(IPs4);\n });\n });\n }\n\n /**\n * Saves the settings to the server.\n * @param {boolean} isClose True if the user is closing the dialog.\n */\n onSave(isClose) {\n let oldObj;\n if (this.state.isConfigurationError) {\n this.setState({errorText: this.state.isConfigurationError});\n return;\n }\n\n this.socket.getObject(this.instanceId)\n .then(_oldObj => {\n oldObj = _oldObj || {};\n\n for (const a in this.state.native) {\n if (this.state.native.hasOwnProperty(a)) {\n if (this.state.native[a] === null) {\n oldObj.native[a] = null;\n } else\n if (this.state.native[a] !== undefined) {\n oldObj.native[a] = JSON.parse(JSON.stringify(this.state.native[a]));\n } else {\n delete oldObj.native[a];\n }\n }\n }\n\n if (this.state.common) {\n for (const b in this.state.common) {\n if (this.state.common[b] === null) {\n oldObj.common[b] = null;\n } else\n if (this.state.common[b] !== undefined) {\n oldObj.common[b] = JSON.parse(JSON.stringify(this.state.common[b]));\n } else {\n delete oldObj.common[b];\n }\n }\n }\n\n if (this.onPrepareSave(oldObj.native) !== false) {\n return this.socket.setObject(this.instanceId, oldObj);\n } else {\n return Promise.reject('Invalid configuration');\n }\n })\n .then(() => {\n this.savedNative = oldObj.native;\n globalThis.changed = false;\n this.setState({changed: false});\n isClose && GenericApp.onClose();\n })\n .catch(e => {\n console.error(`Cannot save configuration: ${e}`);\n });\n }\n\n /**\n * Renders the toast.\n * @returns {JSX.Element | null} The JSX element.\n */\n renderToast() {\n if (!this.state.toast) return null;\n return (\n this.setState({toast: ''})}\n ContentProps={{\n 'aria-describedby': 'message-id',\n }}\n message={{this.state.toast}}\n action={[\n this.setState({toast: ''})}\n >\n \n ,\n ]}\n />);\n }\n\n /**\n * Closes the dialog.\n * @private\n */\n static onClose() {\n if (typeof window.parent !== 'undefined' && window.parent) {\n try {\n if (window.parent.$iframeDialog && typeof window.parent.$iframeDialog.close === 'function') {\n window.parent.$iframeDialog.close();\n } else {\n window.parent.postMessage('close', '*');\n }\n } catch (e) {\n window.parent.postMessage('close', '*');\n }\n }\n }\n\n /**\n * Renders the error dialog.\n * @returns {JSX.Element | null} The JSX element.\n */\n renderError() {\n if (!this.state.errorText) {\n return null;\n } else {\n return this.setState({errorText: ''})}/>;\n }\n }\n\n /**\n * Checks if the configuration has changed.\n * @param {Record} [native] the new state\n */\n getIsChanged(native) {\n native = native || this.state.native;\n const isChanged = JSON.stringify(native) !== JSON.stringify(this.savedNative);\n\n if(isChanged) {\n globalThis.changed = true;\n } else {\n globalThis.changed = false;\n }\n\n return isChanged;\n }\n\n /**\n * Gets called when loading the configuration.\n * @param {Record} newNative The new configuration object.\n */\n onLoadConfig(newNative) {\n if (JSON.stringify(newNative) !== JSON.stringify(this.state.native)) {\n this.setState({native: newNative, changed: this.getIsChanged(newNative)})\n }\n }\n\n /**\n * Sets the configuration error.\n * @param {string} errorText\n */\n setConfigurationError(errorText) {\n if (this.state.isConfigurationError !== errorText) {\n this.setState({isConfigurationError: errorText});\n }\n }\n\n /**\n * Renders the save and close buttons.\n * @returns {JSX.Element | undefined} The JSX element.\n */\n renderSaveCloseButtons() {\n if (this.state.bottomButtons) {\n return this.onSave(isClose)}\n onClose={() => GenericApp.onClose()}\n />;\n } else {\n return null;\n }\n }\n\n /**\n * @private\n * @param {Record} obj\n * @param {any} attrs\n * @param {any} value\n * @returns {boolean | undefined}\n */\n _updateNativeValue(obj, attrs, value) {\n if (typeof attrs !== 'object') {\n attrs = attrs.split('.');\n }\n const attr = attrs.shift();\n if (!attrs.length) {\n if (value && typeof value === 'object') {\n if (JSON.stringify(obj[attr]) !== JSON.stringify(value)) {\n obj[attr] = value;\n return true;\n }\n } else if (obj[attr] !== value) {\n obj[attr] = value;\n return true;\n } else {\n return false;\n }\n\n } else {\n obj[attr] = obj[attr] || {};\n if (typeof obj[attr] !== 'object') {\n throw new Error('attribute ' + attr + ' is no object, but ' + typeof obj[attr]);\n }\n return this._updateNativeValue(obj[attr], attrs, value);\n }\n }\n\n /**\n * Update the native value\n * @param {string} attr The attribute name with dots as delimiter.\n * @param {any} value The new value.\n * @param {(() => void)} [cb] Callback which will be called upon completion.\n */\n updateNativeValue(attr, value, cb) {\n const native = JSON.parse(JSON.stringify(this.state.native));\n if (this._updateNativeValue(native, attr, value)) {\n const changed = this.getIsChanged(native);\n this.setState({native, changed}, cb);\n }\n }\n\n /**\n * Set the error text to be shown.\n * @param {string | JSX.Element} text\n */\n showError(text) {\n this.setState({errorText: text});\n }\n\n /**\n * Sets the toast to be shown.\n * @param {string} toast\n */\n showToast(toast) {\n this.setState({toast});\n }\n\n /**\n * Renders this component.\n * @returns {JSX.Element} The JSX element.\n */\n render() {\n if (!this.state.loaded) {\n return ;\n }\n\n return
\n {this.renderError()}\n {this.renderToast()}\n {this.renderSaveCloseButtons()}\n
;\n }\n}\n\nGenericApp.propTypes = {\n adapterName: PropTypes.string, // (optional) name of adapter\n onThemeChange: PropTypes.func, // (optional) called by theme change\n socket: PropTypes.object, // (optional) socket information (host, port)\n encryptedFields: PropTypes.array, // (optional) list of native attributes, that must be encrypted\n bottomButtons: PropTypes.bool, // If the bottom buttons (Save/Close) must be shown\n};\n\nexport default GenericApp;\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport type MemoFunc = [(obj: any) => boolean, (obj: any) => void];\n\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder(): MemoFunc {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner: any = hasWeakSet ? new WeakSet() : [];\n function memoize(obj: any): boolean {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj: any): void {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n","/*!\n localForage -- Offline Storage, Improved\n Version 1.10.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {\n return;\n }\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb || !idb.open) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support\n // (see: https://github.com/pouchdb/pouchdb/issues/5572).\n // Safari 10.1 shipped with fetch, we can use that to detect it.\n // Note: this creates issues with `window.fetch` polyfills and\n // overrides; see:\n // https://github.com/localForage/localForage/issues/856\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n // See: https://github.com/mozilla/localForage/issues/128\n // See: https://github.com/mozilla/localForage/issues/272\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\nfunction normalizeKey(key) {\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n return key;\n}\n\nfunction getCallback() {\n if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n return arguments[arguments.length - 1];\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs = void 0;\nvar dbContexts = {};\nvar toString = Object.prototype.toString;\n\n// Transaction Modes\nvar READ_ONLY = 'readonly';\nvar READ_WRITE = 'readwrite';\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve, reject) {\n deferredOperation.resolve = resolve;\n deferredOperation.reject = reject;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n return deferredOperation.promise;\n }\n}\n\nfunction _rejectReadiness(dbInfo, err) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Reject its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.reject(err);\n return deferredOperation.promise;\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n var db = openreq.result;\n db.onversionchange = function (e) {\n // Triggered when the database is modified (e.g. adding an objectStore) or\n // deleted (even when initiated by other sessions in different tabs).\n // Closing the connection here prevents those operations from being blocked.\n // If the database is accessed again later by this instance, the connection\n // will be reopened or the database recreated as needed.\n e.target.close();\n };\n resolve(db);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Try to establish a new db connection to replace the\n// current one which is broken (i.e. experiencing\n// InvalidStateError while creating a transaction).\nfunction _tryReconnect(dbInfo) {\n _deferReadiness(dbInfo);\n\n var dbContext = dbContexts[dbInfo.name];\n var forages = dbContext.forages;\n\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n if (forage._dbInfo.db) {\n forage._dbInfo.db.close();\n forage._dbInfo.db = null;\n }\n }\n dbInfo.db = null;\n\n return _getOriginalConnection(dbInfo).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n // store the latest db reference\n // in case the db was upgraded\n dbInfo.db = dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n })[\"catch\"](function (err) {\n _rejectReadiness(dbInfo, err);\n throw err;\n });\n}\n\n// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n// so we have to do it with callbacks\nfunction createTransaction(dbInfo, mode, callback, retries) {\n if (retries === undefined) {\n retries = 1;\n }\n\n try {\n var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n callback(null, tx);\n } catch (err) {\n if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n return Promise$1.resolve().then(function () {\n if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n // increase the db version, to create the new ObjectStore\n if (dbInfo.db) {\n dbInfo.version = dbInfo.db.version + 1;\n }\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n }).then(function () {\n return _tryReconnect(dbInfo).then(function () {\n createTransaction(dbInfo, mode, callback, retries - 1);\n });\n })[\"catch\"](callback);\n }\n\n callback(err);\n }\n}\n\nfunction createDbContext() {\n return {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = createDbContext();\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n // when the iterator callback returns any\n // (non-`undefined`) value, then we stop\n // the iteration immediately\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n var req = store.put(value, key);\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var advanced = false;\n var req = store.openKeyCursor();\n\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openKeyCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\n var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n return db;\n });\n\n if (!options.storeName) {\n promise = dbPromise.then(function (db) {\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n }\n\n var dropDBPromise = new Promise$1(function (resolve, reject) {\n var req = idb.deleteDatabase(options.name);\n\n req.onerror = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n reject(req.error);\n };\n\n req.onblocked = function () {\n // Closing all open connections in onversionchange handler should prevent this situation, but if\n // we do get here, it just means the request remains pending - eventually it will succeed or error\n console.warn('dropInstance blocked for database \"' + options.name + '\" until all open connections are closed');\n };\n\n req.onsuccess = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n resolve(db);\n };\n });\n\n return dropDBPromise.then(function (db) {\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n var _forage = forages[i];\n _advanceReadiness(_forage._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n } else {\n promise = dbPromise.then(function (db) {\n if (!db.objectStoreNames.contains(options.storeName)) {\n return;\n }\n\n var newVersion = db.version + 1;\n\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n forage._dbInfo.version = newVersion;\n }\n\n var dropObjectPromise = new Promise$1(function (resolve, reject) {\n var req = idb.open(options.name, newVersion);\n\n req.onerror = function (err) {\n var db = req.result;\n db.close();\n reject(err);\n };\n\n req.onupgradeneeded = function () {\n var db = req.result;\n db.deleteObjectStore(options.storeName);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n db.close();\n resolve(db);\n };\n });\n\n return dropObjectPromise.then(function (db) {\n dbContext.db = db;\n for (var j = 0; j < forages.length; j++) {\n var _forage2 = forages[j];\n _forage2._dbInfo.db = db;\n _advanceReadiness(_forage2._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n }\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n _support: isIndexedDBValid(),\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys,\n dropInstance: dropInstance\n};\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n\nfunction createDbTable(t, dbInfo, callback, errorCallback) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n}\n\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n createDbTable(t, dbInfo, function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n }, reject);\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n t.executeSql(sqlStatement, args, callback, function (t, error) {\n if (error.code === error.SYNTAX_ERR) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n if (!results.rows.length) {\n // if the table is missing (was deleted)\n // re-create it table and retry\n createDbTable(t, dbInfo, function () {\n t.executeSql(sqlStatement, args, callback, errorCallback);\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// https://www.w3.org/TR/webdatabase/#databases\n// > There is no way to enumerate or delete the databases available for an origin from this API.\nfunction getAllStoreNames(db) {\n return new Promise$1(function (resolve, reject) {\n db.transaction(function (t) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n var storeNames = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n storeNames.push(results.rows.item(i).name);\n }\n\n resolve({\n db: db,\n storeNames: storeNames\n });\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n}\n\nfunction dropInstance$1(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n var db;\n if (options.name === currentConfig.name) {\n // use the db reference of the current instance\n db = self._dbInfo.db;\n } else {\n db = openDatabase(options.name, '', '', 0);\n }\n\n if (!options.storeName) {\n // drop all database tables\n resolve(getAllStoreNames(db));\n } else {\n resolve({\n db: db,\n storeNames: [options.storeName]\n });\n }\n }).then(function (operationInfo) {\n return new Promise$1(function (resolve, reject) {\n operationInfo.db.transaction(function (t) {\n function dropTable(storeName) {\n return new Promise$1(function (resolve, reject) {\n t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n }\n\n var operations = [];\n for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n operations.push(dropTable(operationInfo.storeNames[i]));\n }\n\n Promise$1.all(operations).then(function () {\n resolve();\n })[\"catch\"](function (e) {\n reject(e);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n _support: isWebSQLValid(),\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1,\n dropInstance: dropInstance$1\n};\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n // in IE8 typeof localStorage.setItem === 'object'\n !!localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getKeyPrefix(options, defaultConfig) {\n var keyPrefix = options.name + '/';\n\n if (options.storeName !== defaultConfig.storeName) {\n keyPrefix += options.storeName + '/';\n }\n return keyPrefix;\n}\n\n// Check if localStorage throws when saving an item\nfunction checkIfLocalStorageThrows() {\n var localStorageTestKey = '_localforage_support_test';\n\n try {\n localStorage.setItem(localStorageTestKey, true);\n localStorage.removeItem(localStorageTestKey);\n\n return false;\n } catch (e) {\n return true;\n }\n}\n\n// Check if localStorage is usable and allows to save an item\n// This method checks if localStorage is usable in Safari Private Browsing\n// mode, or in any other case where the available quota for localStorage\n// is 0 and there wasn't any saved items yet.\nfunction _isLocalStorageUsable() {\n return !checkIfLocalStorageThrows() || localStorage.length > 0;\n}\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\n if (!_isLocalStorageUsable()) {\n return Promise$1.reject();\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n var itemKey = localStorage.key(i);\n if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance$2(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n var currentConfig = this.config();\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n if (!options.storeName) {\n resolve(options.name + '/');\n } else {\n resolve(_getKeyPrefix(options, self._defaultConfig));\n }\n }).then(function (keyPrefix) {\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n _support: isLocalStorageValid(),\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2,\n dropInstance: dropInstance$2\n};\n\nvar sameValue = function sameValue(x, y) {\n return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n};\n\nvar includes = function includes(array, searchElement) {\n var len = array.length;\n var i = 0;\n while (i < len) {\n if (sameValue(array[i], searchElement)) {\n return true;\n }\n i++;\n }\n\n return false;\n};\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\n// Drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar DefinedDrivers = {};\n\nvar DriverSupport = {};\n\nvar DefaultDrivers = {\n INDEXEDDB: asyncStorage,\n WEBSQL: webSQLStorage,\n LOCALSTORAGE: localStorageWrapper\n};\n\nvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\nvar OptionalDriverMethods = ['dropInstance'];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var _key in arg) {\n if (arg.hasOwnProperty(_key)) {\n if (isArray(arg[_key])) {\n arguments[0][_key] = arg[_key].slice();\n } else {\n arguments[0][_key] = arg[_key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n for (var driverTypeKey in DefaultDrivers) {\n if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n var driver = DefaultDrivers[driverTypeKey];\n var driverName = driver._driver;\n this[driverTypeKey] = driverName;\n\n if (!DefinedDrivers[driverName]) {\n // we don't need to wait for the promise,\n // since the default drivers can be defined\n // in a blocking manner\n this.defineDriver(driver);\n }\n }\n }\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n\n var driverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0, len = driverMethods.length; i < len; i++) {\n var driverMethodName = driverMethods[i];\n\n // when the property is there,\n // it should be a method even when optional\n var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var configureMissingMethods = function configureMissingMethods() {\n var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n return function () {\n var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n var promise = Promise$1.reject(error);\n executeCallback(promise, arguments[arguments.length - 1]);\n return promise;\n };\n };\n\n for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n var optionalDriverMethod = OptionalDriverMethods[_i];\n if (!driverObject[optionalDriverMethod]) {\n driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n }\n }\n };\n\n configureMissingMethods();\n\n var setDriverSupport = function setDriverSupport(support) {\n if (DefinedDrivers[driverName]) {\n console.info('Redefining LocalForage driver: ' + driverName);\n }\n DefinedDrivers[driverName] = driverObject;\n DriverSupport[driverName] = support;\n // don't use a then, so that we can define\n // drivers that have simple _support methods\n // in a blocking manner\n resolve();\n };\n\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n driverObject._support().then(setDriverSupport, reject);\n } else {\n setDriverSupport(!!driverObject._support);\n }\n } else {\n setDriverSupport(true);\n }\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!DriverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (file, acceptedFiles) {\n if (file && acceptedFiles) {\n var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');\n var fileName = file.name || '';\n var mimeType = (file.type || '').toLowerCase();\n var baseMimeType = mimeType.replace(/\\/.*$/, '');\n return acceptedFilesArray.some(function (type) {\n var validType = type.trim().toLowerCase();\n\n if (validType.charAt(0) === '.') {\n return fileName.toLowerCase().endsWith(validType);\n } else if (validType.endsWith('/*')) {\n // This is something like a image/* mime type\n return baseMimeType === validType.replace(/\\/.*$/, '');\n }\n\n return mimeType === validType;\n });\n }\n\n return true;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport NativeSelectInput from './NativeSelectInput';\nimport withStyles from '../styles/withStyles';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the select component `root` class. */\n root: {},\n\n /* Styles applied to the select component `select` class. */\n select: {\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n minWidth: 16,\n // So it doesn't collapse.\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE 11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n '&$disabled': {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n '&&': {\n paddingRight: 24\n }\n },\n\n /* Styles applied to the select component if `variant=\"filled\"`. */\n filled: {\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component if `variant=\"outlined\"`. */\n outlined: {\n borderRadius: theme.shape.borderRadius,\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component `selectMenu` class. */\n selectMenu: {\n height: 'auto',\n // Resets for multpile select with chips\n minHeight: '1.1876em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n\n /* Pseudo-class applied to the select component `disabled` class. */\n disabled: {},\n\n /* Styles applied to the icon component. */\n icon: {\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - 12px)',\n // Center vertically\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the icon component if the popup is open. */\n iconOpen: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the icon component if `variant=\"filled\"`. */\n iconFilled: {\n right: 7\n },\n\n /* Styles applied to the icon component if `variant=\"outlined\"`. */\n iconOutlined: {\n right: 7\n },\n\n /* Styles applied to the underlying native input component. */\n nativeInput: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%'\n }\n };\n};\nvar defaultInput = /*#__PURE__*/React.createElement(Input, null);\n/**\n * An alternative to `;\n\n if (this.props.dense) {\n return select;\n } else {\n return \n {this.props.label}\n {select}\n ;\n\n }\n }\n}\n\nSelectWithIcon.propTypes = {\n t: PropTypes.func,\n lang: PropTypes.string,\n themeType: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n list: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n options: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n label: PropTypes.string,\n different: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n fullWidth: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n removePrefix: PropTypes.string,\n allowNone: PropTypes.bool,\n inputProps: PropTypes.object,\n};\n\nexport default withStyles(styles)(SelectWithIcon);","export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n","import isBrowser from './isBrowser';\n\nconst timeoutDuration = (function(){\n const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}());\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nexport default function getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`]) +\n parseFloat(styles[`border${sideB}Width`])\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.width;\n const height =\n sizes.height || element.clientHeight || result.height;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop);\n const marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getReferenceNode from './getReferenceNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\nimport getReferenceNode from './getReferenceNode';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n constructor(reference, popper, options = {}) {\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = { ...Popper.Defaults, ...options };\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: [],\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n scheduleUpdate = () => requestAnimationFrame(this.update);\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\n}\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z\"\n}), 'FileCopy');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z\"\n}), 'ImportExport');\n\nexports.default = _default;","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,"function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport accepts from \"attr-accept\"; // Error codes\n\nexport var FILE_INVALID_TYPE = \"file-invalid-type\";\nexport var FILE_TOO_LARGE = \"file-too-large\";\nexport var FILE_TOO_SMALL = \"file-too-small\";\nexport var TOO_MANY_FILES = \"too-many-files\";\nexport var ErrorCode = {\n FileInvalidType: FILE_INVALID_TYPE,\n FileTooLarge: FILE_TOO_LARGE,\n FileTooSmall: FILE_TOO_SMALL,\n TooManyFiles: TOO_MANY_FILES\n}; // File Errors\n\nexport var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr(accept) {\n accept = Array.isArray(accept) && accept.length === 1 ? accept[0] : accept;\n var messageSuffix = Array.isArray(accept) ? \"one of \".concat(accept.join(\", \")) : accept;\n return {\n code: FILE_INVALID_TYPE,\n message: \"File type must be \".concat(messageSuffix)\n };\n};\nexport var getTooLargeRejectionErr = function getTooLargeRejectionErr(maxSize) {\n return {\n code: FILE_TOO_LARGE,\n message: \"File is larger than \".concat(maxSize, \" \").concat(maxSize === 1 ? \"byte\" : \"bytes\")\n };\n};\nexport var getTooSmallRejectionErr = function getTooSmallRejectionErr(minSize) {\n return {\n code: FILE_TOO_SMALL,\n message: \"File is smaller than \".concat(minSize, \" \").concat(minSize === 1 ? \"byte\" : \"bytes\")\n };\n};\nexport var TOO_MANY_FILES_REJECTION = {\n code: TOO_MANY_FILES,\n message: \"Too many files\"\n}; // Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with\n// that MIME type will always be accepted\n\nexport function fileAccepted(file, accept) {\n var isAcceptable = file.type === \"application/x-moz-file\" || accepts(file, accept);\n return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];\n}\nexport function fileMatchSize(file, minSize, maxSize) {\n if (isDefined(file.size)) {\n if (isDefined(minSize) && isDefined(maxSize)) {\n if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];\n } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n }\n\n return [true, null];\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n\nexport function allFilesAccepted(_ref) {\n var files = _ref.files,\n accept = _ref.accept,\n minSize = _ref.minSize,\n maxSize = _ref.maxSize,\n multiple = _ref.multiple,\n maxFiles = _ref.maxFiles;\n\n if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {\n return false;\n }\n\n return files.every(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 1),\n accepted = _fileAccepted2[0];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 1),\n sizeMatch = _fileMatchSize2[0];\n\n return accepted && sizeMatch;\n });\n} // React's synthetic events has event.isPropagationStopped,\n// but to remain compatibility with other libs (Preact) fall back\n// to check event.cancelBubble\n\nexport function isPropagationStopped(event) {\n if (typeof event.isPropagationStopped === \"function\") {\n return event.isPropagationStopped();\n } else if (typeof event.cancelBubble !== \"undefined\") {\n return event.cancelBubble;\n }\n\n return false;\n}\nexport function isEvtWithFiles(event) {\n if (!event.dataTransfer) {\n return !!event.target && !!event.target.files;\n } // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file\n\n\n return Array.prototype.some.call(event.dataTransfer.types, function (type) {\n return type === \"Files\" || type === \"application/x-moz-file\";\n });\n}\nexport function isKindFile(item) {\n return _typeof(item) === \"object\" && item !== null && item.kind === \"file\";\n} // allow the entire document to be a drag target\n\nexport function onDocumentDragOver(event) {\n event.preventDefault();\n}\n\nfunction isIe(userAgent) {\n return userAgent.indexOf(\"MSIE\") !== -1 || userAgent.indexOf(\"Trident/\") !== -1;\n}\n\nfunction isEdge(userAgent) {\n return userAgent.indexOf(\"Edge/\") !== -1;\n}\n\nexport function isIeOrEdge() {\n var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.navigator.userAgent;\n return isIe(userAgent) || isEdge(userAgent);\n}\n/**\n * This is intended to be used to compose event handlers\n * They are executed in order until one of them calls `event.isPropagationStopped()`.\n * Note that the check is done on the first invoke too,\n * meaning that if propagation was stopped before invoking the fns,\n * no handlers will be executed.\n *\n * @param {Function} fns the event hanlder functions\n * @return {Function} the event handler to add to an element\n */\n\nexport function composeEventHandlers() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return fns.some(function (fn) {\n if (!isPropagationStopped(event) && fn) {\n fn.apply(void 0, [event].concat(args));\n }\n\n return isPropagationStopped(event);\n });\n };\n}\n/**\n * canUseFileSystemAccessAPI checks if the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)\n * is supported by the browser.\n * @returns {boolean}\n */\n\nexport function canUseFileSystemAccessAPI() {\n return \"showOpenFilePicker\" in window;\n}\n/**\n * filePickerOptionsTypes returns the {types} option for https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n * based on the accept attr (see https://github.com/react-dropzone/attr-accept)\n * E.g: converts ['image/*', 'text/*'] to {'image/*': [], 'text/*': []}\n * @param {string|string[]} accept\n */\n\nexport function filePickerOptionsTypes(accept) {\n accept = typeof accept === \"string\" ? accept.split(\",\") : accept;\n return [{\n description: \"everything\",\n // TODO: Need to handle filtering more elegantly than this!\n accept: Array.isArray(accept) ? // Accept just MIME types as per spec\n // NOTE: accept can be https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers\n accept.filter(function (item) {\n return item === \"audio/*\" || item === \"video/*\" || item === \"image/*\" || item === \"text/*\" || /\\w+\\/[-+.\\w]+/g.test(item);\n }).reduce(function (a, b) {\n return _objectSpread(_objectSpread({}, a), {}, _defineProperty({}, b, []));\n }, {}) : {}\n }];\n}\n/**\n * Check if v is an exception caused by aborting a request (e.g window.showOpenFilePicker()).\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException.\n * @param {any} v\n * @returns {boolean} True if v is an abort exception.\n */\n\nexport function isAbort(v) {\n return v instanceof DOMException && (v.name === \"AbortError\" || v.code === v.ABORT_ERR);\n}\n/**\n * Check if v is a security error.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException.\n * @param {any} v\n * @returns {boolean} True if v is a security error.\n */\n\nexport function isSecurityError(v) {\n return v instanceof DOMException && (v.name === \"SecurityError\" || v.code === v.SECURITY_ERR);\n}","var _excluded = [\"children\"],\n _excluded2 = [\"open\"],\n _excluded3 = [\"refKey\", \"role\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"onClick\", \"onDragEnter\", \"onDragOver\", \"onDragLeave\", \"onDrop\"],\n _excluded4 = [\"refKey\", \"onChange\", \"onClick\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* eslint prefer-template: 0 */\nimport React, { forwardRef, Fragment, useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { fromEvent } from \"file-selector\";\nimport { allFilesAccepted, composeEventHandlers, fileAccepted, fileMatchSize, filePickerOptionsTypes, canUseFileSystemAccessAPI, isAbort, isEvtWithFiles, isIeOrEdge, isPropagationStopped, isSecurityError, onDocumentDragOver, TOO_MANY_FILES_REJECTION } from \"./utils/index\";\n/**\n * Convenience wrapper component for the `useDropzone` hook\n *\n * ```jsx\n * \n * {({getRootProps, getInputProps}) => (\n *
\n * \n *

Drag 'n' drop some files here, or click to select files

\n *
\n * )}\n *
\n * ```\n */\n\nvar Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n params = _objectWithoutProperties(_ref, _excluded);\n\n var _useDropzone = useDropzone(params),\n open = _useDropzone.open,\n props = _objectWithoutProperties(_useDropzone, _excluded2);\n\n useImperativeHandle(ref, function () {\n return {\n open: open\n };\n }, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element\n\n return /*#__PURE__*/React.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {\n open: open\n })));\n});\nDropzone.displayName = \"Dropzone\"; // Add default props for react-docgen\n\nvar defaultProps = {\n disabled: false,\n getFilesFromEvent: fromEvent,\n maxSize: Infinity,\n minSize: 0,\n multiple: true,\n maxFiles: 0,\n preventDropOnDocument: true,\n noClick: false,\n noKeyboard: false,\n noDrag: false,\n noDragEventsBubbling: false,\n validator: null,\n useFsAccessApi: true\n};\nDropzone.defaultProps = defaultProps;\nDropzone.propTypes = {\n /**\n * Render function that exposes the dropzone state and prop getter fns\n *\n * @param {object} params\n * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render\n * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render\n * @param {Function} params.open Open the native file selection dialog\n * @param {boolean} params.isFocused Dropzone area is in focus\n * @param {boolean} params.isFileDialogActive File dialog is opened\n * @param {boolean} params.isDragActive Active drag is in progress\n * @param {boolean} params.isDragAccept Dragged files are accepted\n * @param {boolean} params.isDragReject Some dragged files are rejected\n * @param {File[]} params.draggedFiles Files in active drag\n * @param {File[]} params.acceptedFiles Accepted files\n * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected\n */\n children: PropTypes.func,\n\n /**\n * Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n */\n accept: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * If true, disables click to open the native file selection dialog\n */\n noClick: PropTypes.bool,\n\n /**\n * If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n */\n noKeyboard: PropTypes.bool,\n\n /**\n * If true, disables drag 'n' drop\n */\n noDrag: PropTypes.bool,\n\n /**\n * If true, stops drag event propagation to parents\n */\n noDragEventsBubbling: PropTypes.bool,\n\n /**\n * Minimum file size (in bytes)\n */\n minSize: PropTypes.number,\n\n /**\n * Maximum file size (in bytes)\n */\n maxSize: PropTypes.number,\n\n /**\n * Maximum accepted number of files\n * The default value is 0 which means there is no limitation to how many files are accepted.\n */\n maxFiles: PropTypes.number,\n\n /**\n * Enable/disable the dropzone\n */\n disabled: PropTypes.bool,\n\n /**\n * Use this to provide a custom file aggregator\n *\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n getFilesFromEvent: PropTypes.func,\n\n /**\n * Cb for when closing the file dialog with no selection\n */\n onFileDialogCancel: PropTypes.func,\n\n /**\n * Cb for when opening the file dialog\n */\n onFileDialogOpen: PropTypes.func,\n\n /**\n * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `` click event.\n */\n useFsAccessApi: PropTypes.bool,\n\n /**\n * Cb for when the `dragenter` event occurs.\n *\n * @param {DragEvent} event\n */\n onDragEnter: PropTypes.func,\n\n /**\n * Cb for when the `dragleave` event occurs\n *\n * @param {DragEvent} event\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Cb for when the `dragover` event occurs\n *\n * @param {DragEvent} event\n */\n onDragOver: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n *\n * @param {File[]} acceptedFiles\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n onDrop: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n *\n * @param {File[]} files\n * @param {(DragEvent|Event)} event\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n *\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event\n */\n onDropRejected: PropTypes.func,\n\n /**\n * Custom validation function\n * @param {File} file\n * @returns {FileError|FileError[]}\n */\n validator: PropTypes.func\n};\nexport default Dropzone;\n/**\n * A function that is invoked for the `dragenter`,\n * `dragover` and `dragleave` events.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dragCb\n * @param {DragEvent} event\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dropCb\n * @param {File[]} acceptedFiles List of accepted files\n * @param {FileRejection[]} fileRejections List of rejected files and why they were rejected\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are files (such as link, text, etc.).\n *\n * @callback dropAcceptedCb\n * @param {File[]} files List of accepted files that meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n *\n * @callback dropRejectedCb\n * @param {File[]} files List of rejected files that do not meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is used aggregate files,\n * in a asynchronous fashion, from drag or input change events.\n *\n * @callback getFilesFromEvent\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n * @returns {(File[]|Promise)}\n */\n\n/**\n * An object with the current dropzone state and some helper functions.\n *\n * @typedef {object} DropzoneState\n * @property {Function} getRootProps Returns the props you should apply to the root drop container you render\n * @property {Function} getInputProps Returns the props you should apply to hidden file input you render\n * @property {Function} open Open the native file selection dialog\n * @property {boolean} isFocused Dropzone area is in focus\n * @property {boolean} isFileDialogActive File dialog is opened\n * @property {boolean} isDragActive Active drag is in progress\n * @property {boolean} isDragAccept Dragged files are accepted\n * @property {boolean} isDragReject Some dragged files are rejected\n * @property {File[]} draggedFiles Files in active drag\n * @property {File[]} acceptedFiles Accepted files\n * @property {FileRejection[]} fileRejections Rejected files and why they were rejected\n */\n\nvar initialState = {\n isFocused: false,\n isFileDialogActive: false,\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false,\n draggedFiles: [],\n acceptedFiles: [],\n fileRejections: []\n};\n/**\n * A React hook that creates a drag 'n' drop area.\n *\n * ```jsx\n * function MyDropzone(props) {\n * const {getRootProps, getInputProps} = useDropzone({\n * onDrop: acceptedFiles => {\n * // do something with the File objects, e.g. upload to some server\n * }\n * });\n * return (\n *
\n * \n *

Drag and drop some files here, or click to select files

\n *
\n * )\n * }\n * ```\n *\n * @function useDropzone\n *\n * @param {object} props\n * @param {string|string[]} [props.accept] Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n * @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window\n * @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog\n * @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n * @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop\n * @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents\n * @param {number} [props.minSize=0] Minimum file size (in bytes)\n * @param {number} [props.maxSize=Infinity] Maximum file size (in bytes)\n * @param {boolean} [props.disabled=false] Enable/disable the dropzone\n * @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator\n * @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection\n * @param {boolean} [props.useFsAccessApi] Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `` click event.\n * @param {Function} [props.onFileDialogOpen] Cb for when opening the file dialog\n * @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs.\n * @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs\n * @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs\n * @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n * @param {dropAcceptedCb} [props.onDropAccepted]\n * @param {dropRejectedCb} [props.onDropRejected]\n *\n * @returns {DropzoneState}\n */\n\nexport function useDropzone() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _defaultProps$options = _objectSpread(_objectSpread({}, defaultProps), options),\n accept = _defaultProps$options.accept,\n disabled = _defaultProps$options.disabled,\n getFilesFromEvent = _defaultProps$options.getFilesFromEvent,\n maxSize = _defaultProps$options.maxSize,\n minSize = _defaultProps$options.minSize,\n multiple = _defaultProps$options.multiple,\n maxFiles = _defaultProps$options.maxFiles,\n onDragEnter = _defaultProps$options.onDragEnter,\n onDragLeave = _defaultProps$options.onDragLeave,\n onDragOver = _defaultProps$options.onDragOver,\n onDrop = _defaultProps$options.onDrop,\n onDropAccepted = _defaultProps$options.onDropAccepted,\n onDropRejected = _defaultProps$options.onDropRejected,\n onFileDialogCancel = _defaultProps$options.onFileDialogCancel,\n onFileDialogOpen = _defaultProps$options.onFileDialogOpen,\n useFsAccessApi = _defaultProps$options.useFsAccessApi,\n preventDropOnDocument = _defaultProps$options.preventDropOnDocument,\n noClick = _defaultProps$options.noClick,\n noKeyboard = _defaultProps$options.noKeyboard,\n noDrag = _defaultProps$options.noDrag,\n noDragEventsBubbling = _defaultProps$options.noDragEventsBubbling,\n validator = _defaultProps$options.validator;\n\n var onFileDialogOpenCb = useMemo(function () {\n return typeof onFileDialogOpen === \"function\" ? onFileDialogOpen : noop;\n }, [onFileDialogOpen]);\n var onFileDialogCancelCb = useMemo(function () {\n return typeof onFileDialogCancel === \"function\" ? onFileDialogCancel : noop;\n }, [onFileDialogCancel]);\n var rootRef = useRef(null);\n var inputRef = useRef(null);\n\n var _useReducer = useReducer(reducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n var isFocused = state.isFocused,\n isFileDialogActive = state.isFileDialogActive,\n draggedFiles = state.draggedFiles;\n var fsAccessApiWorksRef = useRef(typeof window !== \"undefined\" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI()); // Update file dialog active state when the window is focused on\n\n var onWindowFocus = function onWindowFocus() {\n // Execute the timeout only if the file dialog is opened in the browser\n if (!fsAccessApiWorksRef.current && isFileDialogActive) {\n setTimeout(function () {\n if (inputRef.current) {\n var files = inputRef.current.files;\n\n if (!files.length) {\n dispatch({\n type: \"closeDialog\"\n });\n onFileDialogCancelCb();\n }\n }\n }, 300);\n }\n };\n\n useEffect(function () {\n window.addEventListener(\"focus\", onWindowFocus, false);\n return function () {\n window.removeEventListener(\"focus\", onWindowFocus, false);\n };\n }, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);\n var dragTargetsRef = useRef([]);\n\n var onDocumentDrop = function onDocumentDrop(event) {\n if (rootRef.current && rootRef.current.contains(event.target)) {\n // If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return;\n }\n\n event.preventDefault();\n dragTargetsRef.current = [];\n };\n\n useEffect(function () {\n if (preventDropOnDocument) {\n document.addEventListener(\"dragover\", onDocumentDragOver, false);\n document.addEventListener(\"drop\", onDocumentDrop, false);\n }\n\n return function () {\n if (preventDropOnDocument) {\n document.removeEventListener(\"dragover\", onDocumentDragOver);\n document.removeEventListener(\"drop\", onDocumentDrop);\n }\n };\n }, [rootRef, preventDropOnDocument]);\n var onDragEnterCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (draggedFiles) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n dispatch({\n draggedFiles: draggedFiles,\n isDragActive: true,\n type: \"setDraggedFiles\"\n });\n\n if (onDragEnter) {\n onDragEnter(event);\n }\n });\n }\n }, [getFilesFromEvent, onDragEnter, noDragEventsBubbling]);\n var onDragOverCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event);\n var hasFiles = isEvtWithFiles(event);\n\n if (hasFiles && event.dataTransfer) {\n try {\n event.dataTransfer.dropEffect = \"copy\";\n } catch (_unused) {}\n /* eslint-disable-line no-empty */\n\n }\n\n if (hasFiles && onDragOver) {\n onDragOver(event);\n }\n\n return false;\n }, [onDragOver, noDragEventsBubbling]);\n var onDragLeaveCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event); // Only deactivate once the dropzone and all children have been left\n\n var targets = dragTargetsRef.current.filter(function (target) {\n return rootRef.current && rootRef.current.contains(target);\n }); // Make sure to remove a target present multiple times only once\n // (Firefox may fire dragenter/dragleave multiple times on the same element)\n\n var targetIdx = targets.indexOf(event.target);\n\n if (targetIdx !== -1) {\n targets.splice(targetIdx, 1);\n }\n\n dragTargetsRef.current = targets;\n\n if (targets.length > 0) {\n return;\n }\n\n dispatch({\n isDragActive: false,\n type: \"setDraggedFiles\",\n draggedFiles: []\n });\n\n if (isEvtWithFiles(event) && onDragLeave) {\n onDragLeave(event);\n }\n }, [rootRef, onDragLeave, noDragEventsBubbling]);\n var setFiles = useCallback(function (files, event) {\n var acceptedFiles = [];\n var fileRejections = [];\n files.forEach(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 2),\n accepted = _fileAccepted2[0],\n acceptError = _fileAccepted2[1];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2),\n sizeMatch = _fileMatchSize2[0],\n sizeError = _fileMatchSize2[1];\n\n var customErrors = validator ? validator(file) : null;\n\n if (accepted && sizeMatch && !customErrors) {\n acceptedFiles.push(file);\n } else {\n var errors = [acceptError, sizeError];\n\n if (customErrors) {\n errors = errors.concat(customErrors);\n }\n\n fileRejections.push({\n file: file,\n errors: errors.filter(function (e) {\n return e;\n })\n });\n }\n });\n\n if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {\n // Reject everything and empty accepted files\n acceptedFiles.forEach(function (file) {\n fileRejections.push({\n file: file,\n errors: [TOO_MANY_FILES_REJECTION]\n });\n });\n acceptedFiles.splice(0);\n }\n\n dispatch({\n acceptedFiles: acceptedFiles,\n fileRejections: fileRejections,\n type: \"setFiles\"\n });\n\n if (onDrop) {\n onDrop(acceptedFiles, fileRejections, event);\n }\n\n if (fileRejections.length > 0 && onDropRejected) {\n onDropRejected(fileRejections, event);\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted(acceptedFiles, event);\n }\n }, [dispatch, multiple, accept, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);\n var onDropCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [];\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n setFiles(files, event);\n });\n }\n\n dispatch({\n type: \"reset\"\n });\n }, [getFilesFromEvent, setFiles, noDragEventsBubbling]); // Fn for opening the file dialog programmatically\n\n var openFileDialog = useCallback(function () {\n // No point to use FS access APIs if context is not secure\n // https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#feature_detection\n if (fsAccessApiWorksRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb(); // https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n\n var opts = {\n multiple: multiple,\n types: filePickerOptionsTypes(accept)\n };\n window.showOpenFilePicker(opts).then(function (handles) {\n return getFilesFromEvent(handles);\n }).then(function (files) {\n setFiles(files, null);\n dispatch({\n type: \"closeDialog\"\n });\n }).catch(function (e) {\n // AbortError means the user canceled\n if (isAbort(e)) {\n onFileDialogCancelCb(e);\n dispatch({\n type: \"closeDialog\"\n });\n } else if (isSecurityError(e)) {\n fsAccessApiWorksRef.current = false; // CORS, so cannot use this API\n // Try using the input\n\n if (inputRef.current) {\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }\n });\n return;\n }\n\n if (inputRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb();\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, accept, multiple]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone\n\n var onKeyDownCb = useCallback(function (event) {\n // Ignore keyboard events bubbling up the DOM tree\n if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {\n return;\n }\n\n if (event.keyCode === 32 || event.keyCode === 13) {\n event.preventDefault();\n openFileDialog();\n }\n }, [rootRef, openFileDialog]); // Update focus state for the dropzone\n\n var onFocusCb = useCallback(function () {\n dispatch({\n type: \"focus\"\n });\n }, []);\n var onBlurCb = useCallback(function () {\n dispatch({\n type: \"blur\"\n });\n }, []); // Cb to open the file dialog when click occurs on the dropzone\n\n var onClickCb = useCallback(function () {\n if (noClick) {\n return;\n } // In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()\n // to ensure React can handle state changes\n // See: https://github.com/react-dropzone/react-dropzone/issues/450\n\n\n if (isIeOrEdge()) {\n setTimeout(openFileDialog, 0);\n } else {\n openFileDialog();\n }\n }, [noClick, openFileDialog]);\n\n var composeHandler = function composeHandler(fn) {\n return disabled ? null : fn;\n };\n\n var composeKeyboardHandler = function composeKeyboardHandler(fn) {\n return noKeyboard ? null : composeHandler(fn);\n };\n\n var composeDragHandler = function composeDragHandler(fn) {\n return noDrag ? null : composeHandler(fn);\n };\n\n var stopPropagation = function stopPropagation(event) {\n if (noDragEventsBubbling) {\n event.stopPropagation();\n }\n };\n\n var getRootProps = useMemo(function () {\n return function () {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$refKey = _ref2.refKey,\n refKey = _ref2$refKey === void 0 ? \"ref\" : _ref2$refKey,\n role = _ref2.role,\n onKeyDown = _ref2.onKeyDown,\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick,\n onDragEnter = _ref2.onDragEnter,\n onDragOver = _ref2.onDragOver,\n onDragLeave = _ref2.onDragLeave,\n onDrop = _ref2.onDrop,\n rest = _objectWithoutProperties(_ref2, _excluded3);\n\n return _objectSpread(_objectSpread(_defineProperty({\n onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),\n onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),\n onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),\n onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter, onDragEnterCb)),\n onDragOver: composeDragHandler(composeEventHandlers(onDragOver, onDragOverCb)),\n onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave, onDragLeaveCb)),\n onDrop: composeDragHandler(composeEventHandlers(onDrop, onDropCb)),\n role: typeof role === \"string\" && role !== \"\" ? role : \"button\"\n }, refKey, rootRef), !disabled && !noKeyboard ? {\n tabIndex: 0\n } : {}), rest);\n };\n }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);\n var onInputElementClick = useCallback(function (event) {\n event.stopPropagation();\n }, []);\n var getInputProps = useMemo(function () {\n return function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? \"ref\" : _ref3$refKey,\n onChange = _ref3.onChange,\n onClick = _ref3.onClick,\n rest = _objectWithoutProperties(_ref3, _excluded4);\n\n var inputProps = _defineProperty({\n accept: accept,\n multiple: multiple,\n type: \"file\",\n style: {\n display: \"none\"\n },\n onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),\n autoComplete: \"off\",\n tabIndex: -1\n }, refKey, inputRef);\n\n return _objectSpread(_objectSpread({}, inputProps), rest);\n };\n }, [inputRef, accept, multiple, onDropCb, disabled]);\n var fileCount = draggedFiles.length;\n var isDragAccept = fileCount > 0 && allFilesAccepted({\n files: draggedFiles,\n accept: accept,\n minSize: minSize,\n maxSize: maxSize,\n multiple: multiple,\n maxFiles: maxFiles\n });\n var isDragReject = fileCount > 0 && !isDragAccept;\n return _objectSpread(_objectSpread({}, state), {}, {\n isDragAccept: isDragAccept,\n isDragReject: isDragReject,\n isFocused: isFocused && !disabled,\n getRootProps: getRootProps,\n getInputProps: getInputProps,\n rootRef: rootRef,\n inputRef: inputRef,\n open: composeHandler(openFileDialog)\n });\n}\n\nfunction reducer(state, action) {\n /* istanbul ignore next */\n switch (action.type) {\n case \"focus\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: true\n });\n\n case \"blur\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: false\n });\n\n case \"openDialog\":\n return _objectSpread(_objectSpread({}, initialState), {}, {\n isFileDialogActive: true\n });\n\n case \"closeDialog\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: false\n });\n\n case \"setDraggedFiles\":\n /* eslint no-case-declarations: 0 */\n var isDragActive = action.isDragActive,\n draggedFiles = action.draggedFiles;\n return _objectSpread(_objectSpread({}, state), {}, {\n draggedFiles: draggedFiles,\n isDragActive: isDragActive\n });\n\n case \"setFiles\":\n return _objectSpread(_objectSpread({}, state), {}, {\n acceptedFiles: action.acceptedFiles,\n fileRejections: action.fileRejections\n });\n\n case \"reset\":\n return _objectSpread({}, initialState);\n\n default:\n return state;\n }\n}\n\nfunction noop() {}\n\nexport { ErrorCode } from \"./utils\";","import getPrototypeOf from \"./getPrototypeOf.js\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","import superPropBase from \"./superPropBase.js\";\nexport default function _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get.apply(this, arguments);\n}","import nested from '../ThemeProvider/nested';\n/**\n * This is the list of the style rule name we use as drop in replacement for the built-in\n * pseudo classes (:checked, :disabled, :focused, etc.).\n *\n * Why do they exist in the first place?\n * These classes are used at a specificity of 2.\n * It allows them to override previously definied styles as well as\n * being untouched by simple user overrides.\n */\n\nvar pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters.\n// When new generator function is created, rule counter is reset.\n// We need to reset the rule counter for SSR for each request.\n//\n// It's inspired by\n// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js\n\nexport default function createGenerateClassName() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$disableGloba = options.disableGlobal,\n disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,\n _options$productionPr = options.productionPrefix,\n productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,\n _options$seed = options.seed,\n seed = _options$seed === void 0 ? '' : _options$seed;\n var seedPrefix = seed === '' ? '' : \"\".concat(seed, \"-\");\n var ruleCounter = 0;\n\n var getNextCounterId = function getNextCounterId() {\n ruleCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (ruleCounter >= 1e10) {\n console.warn(['Material-UI: You might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join(''));\n }\n }\n\n return ruleCounter;\n };\n\n return function (rule, styleSheet) {\n var name = styleSheet.options.name; // Is a global static MUI style?\n\n if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {\n // We can use a shorthand class name, we never use the keys to style the components.\n if (pseudoClasses.indexOf(rule.key) !== -1) {\n return \"Mui-\".concat(rule.key);\n }\n\n var prefix = \"\".concat(seedPrefix).concat(name, \"-\").concat(rule.key);\n\n if (!styleSheet.options.theme[nested] || seed !== '') {\n return prefix;\n }\n\n return \"\".concat(prefix, \"-\").concat(getNextCounterId());\n }\n\n if (process.env.NODE_ENV === 'production') {\n return \"\".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId());\n }\n\n var suffix = \"\".concat(rule.key, \"-\").concat(getNextCounterId()); // Help with debuggability.\n\n if (styleSheet.options.classNamePrefix) {\n return \"\".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, \"-\").concat(suffix);\n }\n\n return \"\".concat(seedPrefix).concat(suffix);\n };\n}","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport { elementAcceptingRef, exactProp } from '@material-ui/utils';\n\nfunction mapEventPropToEvent(eventProp) {\n return eventProp.substring(2).toLowerCase();\n}\n\nfunction clickedRootScrollbar(event) {\n return document.documentElement.clientWidth < event.clientX || document.documentElement.clientHeight < event.clientY;\n}\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n */\n\n\nfunction ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = React.useRef(false);\n var nodeRef = React.useRef(null);\n var activatedRef = React.useRef(false);\n var syntheticEventRef = React.useRef(false);\n React.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = useEventCallback(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = ownerDocument(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n React.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = ownerDocument(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n React.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = ownerDocument(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ClickAwayListener.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The wrapped element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * If `true`, the React tree is ignored and only the DOM tree is considered.\n * This prop changes how portaled elements are handled.\n */\n disableReactTree: PropTypes.bool,\n\n /**\n * The mouse event to listen to. You can disable the listener by providing `false`.\n */\n mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]),\n\n /**\n * Callback fired when a \"click away\" event is detected.\n */\n onClickAway: PropTypes.func.isRequired,\n\n /**\n * The touch event to listen to. You can disable the listener by providing `false`.\n */\n touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);\n}\n\nexport default ClickAwayListener;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nvar styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\nvar defaultTimeout = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The Fade transition is used by the [Modal](/components/modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"TransitionComponent\", \"timeout\"]);\n\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport InputBase from '../InputBase';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {\n 'label + &': {\n marginTop: 16\n }\n },\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if color secondary. */\n colorSecondary: {\n '&$underline:after': {\n borderBottomColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if `disableUnderline={false}`. */\n underline: {\n '&:after': {\n borderBottom: \"2px solid \".concat(theme.palette.primary.main),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&$focused:after': {\n transform: 'scaleX(1)'\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: \"1px solid \".concat(bottomLineColor),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&:hover:not($disabled):before': {\n borderBottom: \"2px solid \".concat(theme.palette.text.primary),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: \"1px solid \".concat(bottomLineColor)\n }\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted'\n }\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {},\n\n /* Styles applied to the `input` element. */\n input: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {},\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {},\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {}\n };\n};\nvar Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {\n var disableUnderline = props.disableUnderline,\n classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = _objectWithoutProperties(props, [\"disableUnderline\", \"classes\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"]);\n\n return /*#__PURE__*/React.createElement(InputBase, _extends({\n classes: _extends({}, classes, {\n root: clsx(classes.root, !disableUnderline && classes.underline),\n underline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nInput.muiName = 'Input';\nexport default withStyles(styles, {\n name: 'MuiInput'\n})(Input);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n\n/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport formControlState from '../FormControl/formControlState';\nimport FormControlContext, { useFormControl } from '../FormControl/FormControlContext';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport useForkRef from '../utils/useForkRef';\nimport TextareaAutosize from '../TextareaAutosize';\nimport { isFilled } from './utils';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n var placeholderHidden = {\n opacity: '0 !important'\n };\n var placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return {\n '@global': {\n '@keyframes mui-auto-fill': {},\n '@keyframes mui-auto-fill-cancel': {}\n },\n\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.1876em',\n // Reset (19px), match the native input line-height\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n '&$disabled': {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n }),\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {},\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {},\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n '&$marginDense': {\n paddingTop: 4 - 1\n }\n },\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the `input` element. */\n input: {\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.1876em',\n // Reset (19px), match the native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE 11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE 11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n '-webkit-appearance': 'none'\n },\n // Show and hide the placeholder logic\n 'label[data-shrink=false] + $formControl &': {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE 11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE 11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n '&$disabled': {\n opacity: 1 // Reset iOS opacity\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 4 - 1\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n height: 'auto',\n resize: 'none',\n padding: 0\n },\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {\n // Improve type search style.\n '-moz-appearance': 'textfield',\n '-webkit-appearance': 'textfield'\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {},\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {},\n\n /* Styles applied to the `input` element if `hiddenLabel={true}`. */\n inputHiddenLabel: {}\n };\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\nvar InputBase = /*#__PURE__*/React.forwardRef(function InputBase(props, ref) {\n var ariaDescribedby = props['aria-describedby'],\n autoComplete = props.autoComplete,\n autoFocus = props.autoFocus,\n classes = props.classes,\n className = props.className,\n color = props.color,\n defaultValue = props.defaultValue,\n disabled = props.disabled,\n endAdornment = props.endAdornment,\n error = props.error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n id = props.id,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$inputProps = props.inputProps,\n inputPropsProp = _props$inputProps === void 0 ? {} : _props$inputProps,\n inputRefProp = props.inputRef,\n margin = props.margin,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n placeholder = props.placeholder,\n readOnly = props.readOnly,\n renderSuffix = props.renderSuffix,\n rows = props.rows,\n rowsMax = props.rowsMax,\n rowsMin = props.rowsMin,\n maxRows = props.maxRows,\n minRows = props.minRows,\n startAdornment = props.startAdornment,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n valueProp = props.value,\n other = _objectWithoutProperties(props, [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"classes\", \"className\", \"color\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"rowsMax\", \"rowsMin\", \"maxRows\", \"minRows\", \"startAdornment\", \"type\", \"value\"]);\n\n var value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n\n var _React$useRef = React.useRef(value != null),\n isControlled = _React$useRef.current;\n\n var inputRef = React.useRef();\n var handleInputRefWarning = React.useCallback(function (instance) {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['Material-UI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `inputRef` prop.', 'Make sure the `inputRef` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n var handleInputPropsRefProp = useForkRef(inputPropsProp.ref, handleInputRefWarning);\n var handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);\n var handleInputRef = useForkRef(inputRef, handleInputRefProp);\n\n var _React$useState = React.useState(false),\n focused = _React$useState[0],\n setFocused = _React$useState[1];\n\n var muiFormControl = useFormControl();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(function () {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'margin', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n React.useEffect(function () {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n var onFilled = muiFormControl && muiFormControl.onFilled;\n var onEmpty = muiFormControl && muiFormControl.onEmpty;\n var checkDirty = React.useCallback(function (obj) {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(function () {\n if (isControlled) {\n checkDirty({\n value: value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n var handleFocus = function handleFocus(event) {\n // Fix a bug with IE 11 where the focus/blur events are triggered\n // while the input is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n var handleChange = function handleChange(event) {\n if (!isControlled) {\n var element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.\" : _formatMuiErrorMessage(1));\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange.apply(inputPropsProp, [event].concat(args));\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange.apply(void 0, [event].concat(args));\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n React.useEffect(function () {\n checkDirty(inputRef.current);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n var handleClick = function handleClick(event) {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var InputComponent = inputComponent;\n\n var inputProps = _extends({}, inputPropsProp, {\n ref: handleInputRef\n });\n\n if (typeof InputComponent !== 'string') {\n inputProps = _extends({\n // Rename ref to inputRef as we don't know the\n // provided `inputComponent` structure.\n inputRef: handleInputRef,\n type: type\n }, inputProps, {\n ref: null\n });\n } else if (multiline) {\n if (rows && !maxRows && !minRows && !rowsMax && !rowsMin) {\n InputComponent = 'textarea';\n } else {\n inputProps = _extends({\n minRows: rows || minRows,\n rowsMax: rowsMax,\n maxRows: maxRows\n }, inputProps);\n InputComponent = TextareaAutosize;\n }\n } else {\n inputProps = _extends({\n type: type\n }, inputProps);\n }\n\n var handleAutoFill = function handleAutoFill(event) {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n React.useEffect(function () {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fullWidth && classes.fullWidth, fcs.focused && classes.focused, muiFormControl && classes.formControl, multiline && classes.multiline, startAdornment && classes.adornedStart, endAdornment && classes.adornedEnd, fcs.margin === 'dense' && classes.marginDense),\n onClick: handleClick,\n ref: ref\n }, other), startAdornment, /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: null\n }, /*#__PURE__*/React.createElement(InputComponent, _extends({\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp\n }, inputProps, {\n className: clsx(classes.input, inputPropsProp.className, fcs.disabled && classes.disabled, multiline && classes.inputMultiline, fcs.hiddenLabel && classes.inputHiddenLabel, startAdornment && classes.inputAdornedStart, endAdornment && classes.inputAdornedEnd, type === 'search' && classes.inputTypeSearch, fcs.margin === 'dense' && classes.inputMarginDense),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))), endAdornment, renderSuffix ? renderSuffix(_extends({}, fcs, {\n startAdornment: startAdornment\n })) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the input is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Maximum number of rows to display.\n * @deprecated Use `maxRows` instead.\n */\n rowsMax: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display.\n * @deprecated Use `minRows` instead.\n */\n rowsMin: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiInputBase'\n})(InputBase);","import warning from 'tiny-warning';\nimport { createRule } from 'jss';\n\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\n\nvar functionPlugin = function functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = createRule(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n }\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule;\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (process.env.NODE_ENV === 'development') {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;\n break;\n }\n }\n }\n }\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n};\n\nexport default functionPlugin;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { RuleList } from 'jss';\n\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule =\n/*#__PURE__*/\nfunction () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (rule) this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Replace rule, run plugins.\n */\n ;\n\n _proto.replaceRule = function replaceRule(name, style, options) {\n var newRule = this.rules.replace(name, style, options);\n if (newRule) this.options.jss.plugins.onProcessRule(newRule);\n return newRule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule =\n/*#__PURE__*/\nfunction () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, _extends({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n sheet.addRule(name, rules[name], _extends({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n sheet.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (!options.selector && options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule, sheet) {\n if (rule.type !== 'style' || !sheet) return;\n handleNestedGlobalContainerRule(rule, sheet);\n handlePrefixedGlobalRule(rule, sheet);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\nexport default jssGlobal;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport warning from 'tiny-warning';\n\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n return rule.selector;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : void 0;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return _extends({}, prevOptions, {\n index: prevOptions.index + 1\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = _extends({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n var name = styleRule.key + \"-\" + prop;\n\n if ('replaceRule' in container) {\n // for backward compatibility\n container.replaceRule(name, style[prop], _extends({}, options, {\n selector: selector\n }));\n } else {\n container.addRule(name, style[prop], _extends({}, options, {\n selector: selector\n }));\n }\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\nexport default jssNested;\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n","import { hasCSSTOMSupport } from 'jss';\n\nvar px = hasCSSTOMSupport && CSS ? CSS.px : 'px';\nvar ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';\nvar percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n 'border-block': px,\n 'border-block-end': px,\n 'border-block-end-width': px,\n 'border-block-start': px,\n 'border-block-start-width': px,\n 'border-block-width': px,\n 'border-inline': px,\n 'border-inline-end': px,\n 'border-inline-end-width': px,\n 'border-inline-start': px,\n 'border-inline-start-width': px,\n 'border-inline-width': px,\n 'border-start-start-radius': px,\n 'border-start-end-radius': px,\n 'border-end-start-radius': px,\n 'border-end-end-radius': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n 'margin-block': px,\n 'margin-block-end': px,\n 'margin-block-start': px,\n 'margin-inline': px,\n 'margin-inline-end': px,\n 'margin-inline-start': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n 'padding-block': px,\n 'padding-block-end': px,\n 'padding-block-start': px,\n 'padding-inline': px,\n 'padding-inline-end': px,\n 'padding-inline-start': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n inset: px,\n 'inset-block': px,\n 'inset-block-end': px,\n 'inset-block-start': px,\n 'inset-inline': px,\n 'inset-inline-end': px,\n 'inset-inline-start': px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-decoration-thickness': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n gap: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'row-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n\n/**\n * Clones the object and adds a camel cased property version.\n */\n\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (value == null) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n } // eslint-disable-next-line no-restricted-globals\n\n } else if (typeof value === 'number' && isNaN(value) === false) {\n var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.\n\n if (unit && !(value === 0 && unit === px)) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default defaultUnit;\n","import isInBrowser from 'is-in-browser';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\n\n// Export javascript style and css style vendor prefixes.\nvar js = '';\nvar css = '';\nvar vendor = '';\nvar browser = '';\nvar isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.\n\nif (isInBrowser) {\n // Order matters. We need to check Webkit the last one because\n // other vendors use to add Webkit prefixes to some properties\n var jsCssMap = {\n Moz: '-moz-',\n ms: '-ms-',\n O: '-o-',\n Webkit: '-webkit-'\n };\n\n var _document$createEleme = document.createElement('p'),\n style = _document$createEleme.style;\n\n var testProp = 'Transform';\n\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n js = key;\n css = jsCssMap[key];\n break;\n }\n } // Correctly detect the Edge browser.\n\n\n if (js === 'Webkit' && 'msHyphens' in style) {\n js = 'ms';\n css = jsCssMap.ms;\n browser = 'edge';\n } // Correctly detect the Safari browser.\n\n\n if (js === 'Webkit' && '-apple-trailing-word' in style) {\n vendor = 'apple';\n }\n}\n/**\n * Vendor prefix string for the current browser.\n *\n * @type {{js: String, css: String, vendor: String, browser: String}}\n * @api public\n */\n\n\nvar prefix = {\n js: js,\n css: css,\n vendor: vendor,\n browser: browser,\n isTouch: isTouch\n};\n\n/**\n * Test if a keyframe at-rule should be prefixed or not\n *\n * @param {String} vendor prefix string for the current browser.\n * @return {String}\n * @api public\n */\n\nfunction supportedKeyframes(key) {\n // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'\n if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.\n // https://caniuse.com/#search=keyframes\n\n if (prefix.js === 'ms') return key;\n return \"@\" + prefix.css + \"keyframes\" + key.substr(10);\n}\n\n// https://caniuse.com/#search=appearance\n\nvar appearence = {\n noPrefill: ['appearance'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'appearance') return false;\n if (prefix.js === 'ms') return \"-webkit-\" + prop;\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=color-adjust\n\nvar colorAdjust = {\n noPrefill: ['color-adjust'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'color-adjust') return false;\n if (prefix.js === 'Webkit') return prefix.css + \"print-\" + prop;\n return prop;\n }\n};\n\nvar regExp = /[-\\s]+(.)?/g;\n/**\n * Replaces the letter with the capital letter\n *\n * @param {String} match\n * @param {String} c\n * @return {String}\n * @api private\n */\n\nfunction toUpper(match, c) {\n return c ? c.toUpperCase() : '';\n}\n/**\n * Convert dash separated strings to camel-cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction camelize(str) {\n return str.replace(regExp, toUpper);\n}\n\n/**\n * Convert dash separated strings to pascal cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction pascalize(str) {\n return camelize(\"-\" + str);\n}\n\n// but we can use a longhand property instead.\n// https://caniuse.com/#search=mask\n\nvar mask = {\n noPrefill: ['mask'],\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^mask/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var longhand = 'mask-image';\n\n if (camelize(longhand) in style) {\n return prop;\n }\n\n if (prefix.js + pascalize(longhand) in style) {\n return prefix.css + prop;\n }\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=text-orientation\n\nvar textOrientation = {\n noPrefill: ['text-orientation'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'text-orientation') return false;\n\n if (prefix.vendor === 'apple' && !prefix.isTouch) {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=transform\n\nvar transform = {\n noPrefill: ['transform'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transform') return false;\n\n if (options.transform) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=transition\n\nvar transition = {\n noPrefill: ['transition'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transition') return false;\n\n if (options.transition) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=writing-mode\n\nvar writingMode = {\n noPrefill: ['writing-mode'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'writing-mode') return false;\n\n if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=user-select\n\nvar userSelect = {\n noPrefill: ['user-select'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'user-select') return false;\n\n if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=multicolumn\n// https://github.com/postcss/autoprefixer/issues/491\n// https://github.com/postcss/autoprefixer/issues/177\n\nvar breakPropsOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^break-/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var jsProp = \"WebkitColumn\" + pascalize(prop);\n return jsProp in style ? prefix.css + \"column-\" + prop : false;\n }\n\n if (prefix.js === 'Moz') {\n var _jsProp = \"page\" + pascalize(prop);\n\n return _jsProp in style ? \"page-\" + prop : false;\n }\n\n return false;\n }\n};\n\n// See https://github.com/postcss/autoprefixer/issues/324.\n\nvar inlineLogicalOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^(border|margin|padding)-inline/.test(prop)) return false;\n if (prefix.js === 'Moz') return prop;\n var newProp = prop.replace('-inline', '');\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\n// Camelization is required because we can't test using.\n// CSS syntax for e.g. in FF.\n\nvar unprefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n return camelize(prop) in style ? prop : false;\n }\n};\n\nvar prefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.\n\n if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.\n\n if (prop[0] === '-' && prop[1] === '-') return prop;\n if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.\n\n if (prefix.js !== 'Webkit' && \"Webkit\" + pascalized in style) return \"-webkit-\" + prop;\n return false;\n }\n};\n\n// https://caniuse.com/#search=scroll-snap\n\nvar scrollSnap = {\n supportedProperty: function supportedProperty(prop) {\n if (prop.substring(0, 11) !== 'scroll-snap') return false;\n\n if (prefix.js === 'ms') {\n return \"\" + prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=overscroll-behavior\n\nvar overscrollBehavior = {\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'overscroll-behavior') return false;\n\n if (prefix.js === 'ms') {\n return prefix.css + \"scroll-chaining\";\n }\n\n return prop;\n }\n};\n\nvar propMap = {\n 'flex-grow': 'flex-positive',\n 'flex-shrink': 'flex-negative',\n 'flex-basis': 'flex-preferred-size',\n 'justify-content': 'flex-pack',\n order: 'flex-order',\n 'align-items': 'flex-align',\n 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.\n\n}; // Support old flex spec from 2012.\n\nvar flex2012 = {\n supportedProperty: function supportedProperty(prop, style) {\n var newProp = propMap[prop];\n if (!newProp) return false;\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\nvar propMap$1 = {\n flex: 'box-flex',\n 'flex-grow': 'box-flex',\n 'flex-direction': ['box-orient', 'box-direction'],\n order: 'box-ordinal-group',\n 'align-items': 'box-align',\n 'flex-flow': ['box-orient', 'box-direction'],\n 'justify-content': 'box-pack'\n};\nvar propKeys = Object.keys(propMap$1);\n\nvar prefixCss = function prefixCss(p) {\n return prefix.css + p;\n}; // Support old flex spec from 2009.\n\n\nvar flex2009 = {\n supportedProperty: function supportedProperty(prop, style, _ref) {\n var multiple = _ref.multiple;\n\n if (propKeys.indexOf(prop) > -1) {\n var newProp = propMap$1[prop];\n\n if (!Array.isArray(newProp)) {\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n\n if (!multiple) return false;\n\n for (var i = 0; i < newProp.length; i++) {\n if (!(prefix.js + pascalize(newProp[0]) in style)) {\n return false;\n }\n }\n\n return newProp.map(prefixCss);\n }\n\n return false;\n }\n};\n\n// plugins = [\n// ...plugins,\n// breakPropsOld,\n// inlineLogicalOld,\n// unprefixed,\n// prefixed,\n// scrollSnap,\n// flex2012,\n// flex2009\n// ]\n// Plugins without 'noPrefill' value, going last.\n// 'flex-*' plugins should be at the bottom.\n// 'flex2009' going after 'flex2012'.\n// 'prefixed' going after 'unprefixed'\n\nvar plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];\nvar propertyDetectors = plugins.filter(function (p) {\n return p.supportedProperty;\n}).map(function (p) {\n return p.supportedProperty;\n});\nvar noPrefill = plugins.filter(function (p) {\n return p.noPrefill;\n}).reduce(function (a, p) {\n a.push.apply(a, _toConsumableArray(p.noPrefill));\n return a;\n}, []);\n\nvar el;\nvar cache = {};\n\nif (isInBrowser) {\n el = document.createElement('p'); // We test every property on vendor prefix requirement.\n // Once tested, result is cached. It gives us up to 70% perf boost.\n // http://jsperf.com/element-style-object-access-vs-plain-object\n //\n // Prefill cache with known css properties to reduce amount of\n // properties we need to feature test at runtime.\n // http://davidwalsh.name/vendor-prefix\n\n var computed = window.getComputedStyle(document.documentElement, '');\n\n for (var key$1 in computed) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];\n } // Properties that cannot be correctly detected using the\n // cache prefill method.\n\n\n noPrefill.forEach(function (x) {\n return delete cache[x];\n });\n}\n/**\n * Test if a property is supported, returns supported property with vendor\n * prefix if required. Returns `false` if not supported.\n *\n * @param {String} prop dash separated\n * @param {Object} [options]\n * @return {String|Boolean}\n * @api public\n */\n\n\nfunction supportedProperty(prop, options) {\n if (options === void 0) {\n options = {};\n }\n\n // For server-side rendering.\n if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {\n return cache[prop];\n } // Check if 'transition' or 'transform' natively supported in browser.\n\n\n if (prop === 'transition' || prop === 'transform') {\n options[prop] = prop in el.style;\n } // Find a plugin for current prefix property.\n\n\n for (var i = 0; i < propertyDetectors.length; i++) {\n cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.\n\n if (cache[prop]) break;\n } // Reset styles for current property.\n // Firefox can even throw an error for invalid properties, e.g., \"0\".\n\n\n try {\n el.style[prop] = '';\n } catch (err) {\n return false;\n }\n\n return cache[prop];\n}\n\nvar cache$1 = {};\nvar transitionProperties = {\n transition: 1,\n 'transition-property': 1,\n '-webkit-transition': 1,\n '-webkit-transition-property': 1\n};\nvar transPropsRegExp = /(^\\s*[\\w-]+)|, (\\s*[\\w-]+)(?![^()]*\\))/g;\nvar el$1;\n/**\n * Returns prefixed value transition/transform if needed.\n *\n * @param {String} match\n * @param {String} p1\n * @param {String} p2\n * @return {String}\n * @api private\n */\n\nfunction prefixTransitionCallback(match, p1, p2) {\n if (p1 === 'var') return 'var';\n if (p1 === 'all') return 'all';\n if (p2 === 'all') return ', all';\n var prefixedValue = p1 ? supportedProperty(p1) : \", \" + supportedProperty(p2);\n if (!prefixedValue) return p1 || p2;\n return prefixedValue;\n}\n\nif (isInBrowser) el$1 = document.createElement('p');\n/**\n * Returns prefixed value if needed. Returns `false` if value is not supported.\n *\n * @param {String} property\n * @param {String} value\n * @return {String|Boolean}\n * @api public\n */\n\nfunction supportedValue(property, value) {\n // For server-side rendering.\n var prefixedValue = value;\n if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.\n // We want only prefixable values here.\n // eslint-disable-next-line no-restricted-globals\n\n if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {\n return prefixedValue;\n } // Create cache key for current value.\n\n\n var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {\n return cache$1[cacheKey];\n } // IE can even throw an error in some cases, for e.g. style.content = 'bar'.\n\n\n try {\n // Test value as it is.\n el$1.style[property] = prefixedValue;\n } catch (err) {\n // Return false if value not supported.\n cache$1[cacheKey] = false;\n return false;\n } // If 'transition' or 'transition-property' property.\n\n\n if (transitionProperties[property]) {\n prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);\n } else if (el$1.style[property] === '') {\n // Value with a vendor prefix.\n prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert \"flex\" to \"-ms-flexbox\" for IE10.\n\n if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.\n\n el$1.style[property] = prefixedValue; // Return false if value not supported.\n\n if (el$1.style[property] === '') {\n cache$1[cacheKey] = false;\n return false;\n }\n } // Reset styles for current property.\n\n\n el$1.style[property] = ''; // Write current value to cache.\n\n cache$1[cacheKey] = prefixedValue;\n return cache$1[cacheKey];\n}\n\nexport { prefix, supportedKeyframes, supportedProperty, supportedValue };\n","import { supportedKeyframes, supportedValue, supportedProperty } from 'css-vendor';\nimport { toCssValue } from 'jss';\n\n/**\n * Add vendor prefix to a property name when needed.\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = supportedKeyframes(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = supportedProperty(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return supportedValue(prop, toCssValue(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default jssVendorPrefixer;\n","/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;\n","import functions from 'jss-plugin-rule-value-function';\nimport global from 'jss-plugin-global';\nimport nested from 'jss-plugin-nested';\nimport camelCase from 'jss-plugin-camel-case';\nimport defaultUnit from 'jss-plugin-default-unit';\nimport vendorPrefixer from 'jss-plugin-vendor-prefixer';\nimport propsSort from 'jss-plugin-props-sort'; // Subset of jss-preset-default with only the plugins the Material-UI components are using.\n\nexport default function jssPreset() {\n return {\n plugins: [functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing.\n // This way, we can get a performance boost.\n // In the documentation, we are using `autoprefixer` to solve this problem.\n typeof window === 'undefined' ? null : vendorPrefixer(), propsSort()]\n };\n}","/** @license React v17.0.2\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");u=w(\"react.memo\");v=w(\"react.lazy\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"\"+b.valueOf().toString()+\"\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0c?98:c,function(){a(!0)});gg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/**\r\n * Copyright 2020-2021, bluefox \r\n *\r\n * MIT License\r\n *\r\n **/\r\nimport PropTypes from 'prop-types';\r\n\r\n/** Possible progress states. */\r\nexport const PROGRESS = {\r\n /** The socket is connecting. */\r\n CONNECTING: 0,\r\n /** The socket is successfully connected. */\r\n CONNECTED: 1,\r\n /** All objects are loaded. */\r\n OBJECTS_LOADED: 2,\r\n /** The socket is ready for use. */\r\n READY: 3\r\n};\r\n\r\nconst PERMISSION_ERROR = 'permissionError';\r\nconst NOT_CONNECTED = 'notConnectedError';\r\nconst TIMEOUT_FOR_ADMIN4 = 1300;\r\n\r\nexport const ERRORS = {\r\n PERMISSION_ERROR,\r\n NOT_CONNECTED\r\n};\r\n\r\nfunction fixAdminUI(obj) {\r\n if (obj && obj.common && !obj.common.adminUI) {\r\n if (obj.common.noConfig) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'none';\r\n } else if (obj.common.jsonConfig) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'json';\r\n } else if (obj.common.materialize) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'materialize';\r\n } else {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'html';\r\n }\r\n\r\n if (obj.common.jsonCustom) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.custom = 'json';\r\n } else if (obj.common.supportCustoms) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.custom = 'json';\r\n }\r\n\r\n if (obj.common.materializeTab && obj.common.adminTab) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.tab = 'materialize';\r\n } else if (obj.common.adminTab) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.tab = 'html';\r\n }\r\n\r\n obj.common.adminUI && console.debug(`Please add to \"${obj._id.replace(/\\.\\d+$/, '')}\" common.adminUI=${JSON.stringify(obj.common.adminUI)}`);\r\n }\r\n return obj;\r\n}\r\n\r\nclass Connection {\r\n /**\r\n * @param {import('./types').ConnectionProps} props\r\n */\r\n constructor(props) {\r\n props = props || { protocol: window.location.protocol, host: window.location.hostname };\r\n this.props = props;\r\n\r\n this.autoSubscribes = this.props.autoSubscribes || [];\r\n this.autoSubscribeLog = this.props.autoSubscribeLog;\r\n\r\n this.props.protocol = this.props.protocol || window.location.protocol;\r\n this.props.host = this.props.host || window.location.hostname;\r\n this.props.port = this.props.port || (window.location.port === '3000' ? (Connection.isWeb() ? 8082 : 8081) : window.location.port);\r\n this.props.ioTimeout = Math.max(this.props.ioTimeout || 20000, 20000);\r\n this.props.cmdTimeout = Math.max(this.props.cmdTimeout || 5000, 5000);\r\n\r\n // breaking change. Do not load all objects by default is true\r\n this.doNotLoadAllObjects = this.props.doNotLoadAllObjects === undefined ? true : this.props.doNotLoadAllObjects;\r\n this.doNotLoadACL = this.props.doNotLoadACL === undefined ? true : this.props.doNotLoadACL;\r\n\r\n /** @type {Record} */\r\n this.states = {};\r\n this.objects = null;\r\n this.acl = null;\r\n this.firstConnect = true;\r\n this.waitForRestart = false;\r\n /** @type {ioBroker.Languages} */\r\n this.systemLang = 'en';\r\n this.connected = false;\r\n this._waitForFirstConnection = new Promise(resolve => { this._waitForFirstConnectionResolve = resolve });\r\n\r\n /** @type {Record} */\r\n this.statesSubscribes = {}; // subscribe for states\r\n\r\n /** @type {Record} */\r\n this.objectsSubscribes = {}; // subscribe for objects\r\n this.onProgress = this.props.onProgress || function () { };\r\n this.onError = this.props.onError || function (err) { console.error(err); };\r\n this.loaded = false;\r\n this.loadTimer = null;\r\n this.loadCounter = 0;\r\n this.admin5only = this.props.admin5only || false;\r\n\r\n /** @type {((connected: boolean) => void)[]} */\r\n this.onConnectionHandlers = [];\r\n /** @type {((message: string) => void)[]} */\r\n this.onLogHandlers = [];\r\n\r\n /** @type {Record>} */\r\n this._promises = {};\r\n this.startSocket();\r\n }\r\n\r\n /**\r\n * Checks if this connection is running in a web adapter and not in an admin.\r\n * @returns {boolean} True if running in a web adapter or in a socketio adapter.\r\n */\r\n static isWeb() {\r\n return window.adapterName === 'material' || window.adapterName === 'vis' || window.socketUrl !== undefined;\r\n }\r\n\r\n /**\r\n * Starts the socket.io connection.\r\n * @returns {void}\r\n */\r\n startSocket() {\r\n // if socket io is not yet loaded\r\n if (typeof window.io === 'undefined') {\r\n // if in index.html the onLoad function not defined\r\n if (typeof window.registerSocketOnLoad !== 'function') {\r\n // poll if loaded\r\n this.scriptLoadCounter = this.scriptLoadCounter || 0;\r\n this.scriptLoadCounter++;\r\n\r\n if (this.scriptLoadCounter < 30) {\r\n // wait till the script loaded\r\n setTimeout(() => this.startSocket(), 100);\r\n return;\r\n } else {\r\n window.alert('Cannot load socket.io.js!');\r\n }\r\n } else {\r\n // register on load\r\n window.registerSocketOnLoad(() => this.startSocket());\r\n }\r\n return;\r\n } else {\r\n // socket was initialized, do not repeat\r\n if (this._socket) {\r\n return;\r\n }\r\n }\r\n\r\n let host = this.props.host;\r\n let port = this.props.port;\r\n let protocol = this.props.protocol.replace(':', '');\r\n\r\n // if web adapter, socket io could be on other port or even host\r\n if (window.socketUrl) {\r\n let parts = window.socketUrl.split(':');\r\n host = parts[0] || host;\r\n port = parts[1] || port;\r\n if (host.includes('://')) {\r\n parts = host.split('://');\r\n protocol = parts[0];\r\n host = parts[1];\r\n }\r\n }\r\n\r\n const url = port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`;\r\n\r\n this._socket = window.io.connect(\r\n url,\r\n {\r\n query: 'ws=true',\r\n name: this.props.name,\r\n timeout: this.props.ioTimeout\r\n }\r\n );\r\n\r\n this._socket.on('connect', noTimeout => {\r\n // If the user is not admin it takes some time to install the handlers, because all rights must be checked\r\n if (noTimeout !== true) {\r\n setTimeout(() =>\r\n this.getVersion()\r\n .then(info => {\r\n const [major, minor, patch] = info.version.split('.');\r\n const v = parseInt(major, 10) * 10000 + parseInt(minor, 10) * 100 + parseInt(patch, 10);\r\n if (v < 40102) {\r\n this._authTimer = null;\r\n // possible this is old version of admin\r\n this.onPreConnect(false, false);\r\n } else {\r\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\r\n }\r\n }), 500);\r\n } else {\r\n // iobroker websocket waits, till all handlers are installed\r\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\r\n }\r\n });\r\n\r\n this._socket.on('reconnect', () => {\r\n this.onProgress(PROGRESS.READY);\r\n this.connected = true;\r\n\r\n if (this.waitForRestart) {\r\n window.location.reload(false);\r\n } else {\r\n this._subscribe(true);\r\n this.onConnectionHandlers.forEach(cb => cb(true));\r\n }\r\n });\r\n\r\n this._socket.on('disconnect', () => {\r\n this.connected = false;\r\n this.subscribed = false;\r\n this.onProgress(PROGRESS.CONNECTING);\r\n this.onConnectionHandlers.forEach(cb => cb(false));\r\n });\r\n\r\n this._socket.on('reauthenticate', () =>\r\n this.authenticate());\r\n\r\n this._socket.on('log', message => {\r\n this.props.onLog && this.props.onLog(message);\r\n this.onLogHandlers.forEach(cb => cb(message));\r\n });\r\n\r\n this._socket.on('error', err => {\r\n let _err = err || '';\r\n if (typeof _err.toString !== 'function') {\r\n _err = JSON.stringify(_err);\r\n console.error(`Received strange error: ${_err}`);\r\n }\r\n _err = _err.toString();\r\n if (_err.includes('User not authorized')) {\r\n this.authenticate();\r\n } else {\r\n window.alert(`Socket Error: ${err}`);\r\n }\r\n });\r\n\r\n this._socket.on('connect_error', err =>\r\n console.error(`Connect error: ${err}`));\r\n\r\n this._socket.on('permissionError', err =>\r\n this.onError({ message: 'no permission', operation: err.operation, type: err.type, id: (err.id || '') }));\r\n\r\n this._socket.on('objectChange', (id, obj) =>\r\n setTimeout(() => this.objectChange(id, obj), 0));\r\n\r\n this._socket.on('stateChange', (id, state) =>\r\n setTimeout(() => this.stateChange(id, state), 0));\r\n\r\n this._socket.on('cmdStdout', (id, text) =>\r\n this.onCmdStdoutHandler && this.onCmdStdoutHandler(id, text));\r\n\r\n this._socket.on('cmdStderr', (id, text) =>\r\n this.onCmdStderrHandler && this.onCmdStderrHandler(id, text));\r\n\r\n this._socket.on('cmdExit', (id, exitCode) =>\r\n this.onCmdExitHandler && this.onCmdExitHandler(id, exitCode));\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {boolean} isOk\r\n * @param {boolean} isSecure\r\n */\r\n onPreConnect(isOk, isSecure) {\r\n if (this._authTimer) {\r\n clearTimeout(this._authTimer);\r\n this._authTimer = null;\r\n }\r\n\r\n this.connected = true;\r\n this.isSecure = isSecure;\r\n\r\n if (this.waitForRestart) {\r\n window.location.reload(false);\r\n } else {\r\n if (this.firstConnect) {\r\n // retry strategy\r\n this.loadTimer = setTimeout(() => {\r\n this.loadTimer = null;\r\n this.loadCounter++;\r\n if (this.loadCounter < 10) {\r\n this.onConnect();\r\n }\r\n }, 1000);\r\n\r\n if (!this.loaded) {\r\n this.onConnect();\r\n }\r\n } else {\r\n this.onProgress(PROGRESS.READY);\r\n }\r\n\r\n this._subscribe(true);\r\n this.onConnectionHandlers.forEach(cb => cb(true));\r\n }\r\n\r\n if (this._waitForFirstConnectionResolve) {\r\n this._waitForFirstConnectionResolve();\r\n this._waitForFirstConnectionResolve = null;\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the socket is connected.\r\n * @returns {boolean} true if connected.\r\n */\r\n isConnected() {\r\n return this.connected;\r\n }\r\n\r\n /**\r\n * Checks if the socket is connected.\r\n * @returns {Promise} Promise resolves if once connected.\r\n */\r\n waitForFirstConnection() {\r\n return this._waitForFirstConnection;\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n _getUserPermissions(cb) {\r\n if (this.doNotLoadACL) {\r\n return cb && cb();\r\n } else {\r\n this._socket.emit('getUserPermissions', cb);\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n onConnect() {\r\n this._getUserPermissions((err, acl) => {\r\n if (err) {\r\n return this.onError('Cannot read user permissions: ' + err);\r\n } else\r\n if (!this.doNotLoadACL) {\r\n if (this.loaded) {\r\n return;\r\n }\r\n this.loaded = true;\r\n clearTimeout(this.loadTimer);\r\n this.loadTimer = null;\r\n\r\n this.onProgress(PROGRESS.CONNECTED);\r\n this.firstConnect = false;\r\n\r\n this.acl = acl;\r\n }\r\n\r\n // Read system configuration\r\n return (this.admin5only && !window.vendorPrefix ? this.getCompactSystemConfig() : this.getSystemConfig())\r\n .then(data => {\r\n if (this.doNotLoadACL) {\r\n if (this.loaded) {\r\n return undefined;\r\n }\r\n this.loaded = true;\r\n clearTimeout(this.loadTimer);\r\n this.loadTimer = null;\r\n\r\n this.onProgress(PROGRESS.CONNECTED);\r\n this.firstConnect = false;\r\n }\r\n\r\n this.systemConfig = data;\r\n if (this.systemConfig && this.systemConfig.common) {\r\n this.systemLang = this.systemConfig.common.language;\r\n } else {\r\n this.systemLang = window.navigator.userLanguage || window.navigator.language;\r\n\r\n if (this.systemLang !== 'en' && this.systemLang !== 'de' && this.systemLang !== 'ru') {\r\n this.systemConfig.common.language = 'en';\r\n this.systemLang = 'en';\r\n }\r\n }\r\n\r\n this.props.onLanguage && this.props.onLanguage(this.systemLang);\r\n\r\n if (!this.doNotLoadAllObjects) {\r\n return this.getObjects()\r\n .then(() => {\r\n this.onProgress(PROGRESS.READY);\r\n this.props.onReady && this.props.onReady(this.objects);\r\n });\r\n } else {\r\n this.objects = this.admin5only ? {} : { 'system.config': data };\r\n this.onProgress(PROGRESS.READY);\r\n this.props.onReady && this.props.onReady(this.objects);\r\n }\r\n return undefined;\r\n })\r\n .catch(e => this.onError('Cannot read system config: ' + e));\r\n });\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n authenticate() {\r\n if (window.location.search.includes('&href=')) {\r\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}${window.location.hash}`;\r\n } else {\r\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${window.location.search}${window.location.hash}`;\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n /**\r\n * Subscribe to changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {boolean} binary Set to true if the given state is binary and requires Base64 decoding.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n subscribeState(id, binary, cb) {\r\n if (typeof binary === 'function') {\r\n cb = binary;\r\n binary = false;\r\n }\r\n\r\n if (!this.statesSubscribes[id]) {\r\n let reg = id\r\n .replace(/\\./g, '\\\\.')\r\n .replace(/\\*/g, '.*')\r\n .replace(/\\(/g, '\\\\(')\r\n .replace(/\\)/g, '\\\\)')\r\n .replace(/\\+/g, '\\\\+')\r\n .replace(/\\[/g, '\\\\[');\r\n\r\n if (reg.indexOf('*') === -1) {\r\n reg += '$';\r\n }\r\n this.statesSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\r\n this.statesSubscribes[id].cbs.push(cb);\r\n if (this.connected) {\r\n this._socket.emit('subscribe', id);\r\n }\r\n } else {\r\n !this.statesSubscribes[id].cbs.includes(cb) && this.statesSubscribes[id].cbs.push(cb);\r\n }\r\n if (typeof cb === 'function' && this.connected) {\r\n if (binary) {\r\n this.getBinaryState(id)\r\n .then(base64 => cb(id, base64))\r\n .catch(e => console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(e)}`));\r\n } else {\r\n if (Connection.isWeb()) {\r\n this._socket.emit('getStates', id, (err, states) => {\r\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\r\n states && Object.keys(states).forEach(id => cb(id, states[id]));\r\n });\r\n } else {\r\n this._socket.emit('getForeignStates', id, (err, states) => {\r\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\r\n states && Object.keys(states).forEach(id => cb(id, states[id]));\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Unsubscribes all callbacks from changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n */\r\n /**\r\n * Unsubscribes the given callback from changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n unsubscribeState(id, cb) {\r\n if (this.statesSubscribes[id]) {\r\n if (cb) {\r\n const pos = this.statesSubscribes[id].cbs.indexOf(cb);\r\n pos !== -1 && this.statesSubscribes[id].cbs.splice(pos, 1);\r\n } else {\r\n this.statesSubscribes[id].cbs = [];\r\n }\r\n\r\n if (!this.statesSubscribes[id].cbs || !this.statesSubscribes[id].cbs.length) {\r\n delete this.statesSubscribes[id];\r\n this.connected && this._socket.emit('unsubscribe', id);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @param {import('./types').ObjectChangeHandler} cb The callback.\r\n * @returns {Promise}\r\n */\r\n subscribeObject(id, cb) {\r\n if (!this.objectsSubscribes[id]) {\r\n let reg = id.replace(/\\./g, '\\\\.').replace(/\\*/g, '.*');\r\n if (!reg.includes('*')) {\r\n reg += '$';\r\n }\r\n this.objectsSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\r\n this.objectsSubscribes[id].cbs.push(cb);\r\n this.connected && this._socket.emit('subscribeObjects', id);\r\n } else {\r\n !this.objectsSubscribes[id].cbs.includes(cb) && this.objectsSubscribes[id].cbs.push(cb);\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Unsubscribes all callbacks from changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Unsubscribes the given callback from changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @param {import('./types').ObjectChangeHandler} cb The callback.\r\n * @returns {Promise}\r\n */\r\n unsubscribeObject(id, cb) {\r\n if (this.objectsSubscribes[id]) {\r\n if (cb) {\r\n const pos = this.objectsSubscribes[id].cbs.indexOf(cb);\r\n pos !== -1 && this.objectsSubscribes[id].cbs.splice(pos, 1);\r\n } else {\r\n this.objectsSubscribes[id].cbs = [];\r\n }\r\n\r\n if (this.connected && (!this.objectsSubscribes[id].cbs || !this.objectsSubscribes[id].cbs.length)) {\r\n delete this.objectsSubscribes[id];\r\n this.connected && this._socket.emit('unsubscribeObjects', id);\r\n }\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {string} id\r\n * @param {ioBroker.Object | null | undefined} obj\r\n */\r\n objectChange(id, obj) {\r\n // update main.objects cache\r\n if (!this.objects) {\r\n return;\r\n }\r\n\r\n /** @type {import(\"./types\").OldObject} */\r\n let oldObj;\r\n\r\n let changed = false;\r\n if (obj) {\r\n if (obj._rev && this.objects[id]) {\r\n this.objects[id]._rev = obj._rev;\r\n }\r\n\r\n if (this.objects[id]) {\r\n oldObj = { _id: id, type: this.objects[id].type };\r\n }\r\n\r\n if (!this.objects[id] || JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\r\n this.objects[id] = obj;\r\n changed = true;\r\n }\r\n } else if (this.objects[id]) {\r\n oldObj = { _id: id, type: this.objects[id].type };\r\n delete this.objects[id];\r\n changed = true;\r\n }\r\n\r\n Object.keys(this.objectsSubscribes).forEach(_id => {\r\n if (_id === id || this.objectsSubscribes[_id].reg.test(id)) {\r\n //@ts-ignore\r\n this.objectsSubscribes[_id].cbs.forEach(cb => cb(id, obj, oldObj));\r\n }\r\n });\r\n\r\n if (changed && this.props.onObjectChange) {\r\n this.props.onObjectChange(id, obj);\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {string} id\r\n * @param {ioBroker.State | null | undefined} state\r\n */\r\n stateChange(id, state) {\r\n for (const task in this.statesSubscribes) {\r\n if (this.statesSubscribes.hasOwnProperty(task) && this.statesSubscribes[task].reg.test(id)) {\r\n this.statesSubscribes[task].cbs.forEach(cb => cb(id, state));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets all states.\r\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\r\n * @returns {Promise>}\r\n */\r\n getStates(disableProgressUpdate) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getStates', (err, res) => {\r\n this.states = res;\r\n //@ts-ignore\r\n !disableProgressUpdate && this.onProgress(PROGRESS.STATES_LOADED);\r\n return err ? reject(err) : resolve(this.states);\r\n }));\r\n }\r\n\r\n /**\r\n * Gets the given state.\r\n * @param {string} id The state ID.\r\n * @returns {Promise}\r\n */\r\n getState(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getState', id, (err, state) => err ? reject(err) : resolve(state)));\r\n }\r\n\r\n /**\r\n * Gets the given binary state.\r\n * @param {string} id The state ID.\r\n * @returns {Promise}\r\n */\r\n getBinaryState(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n // the data will come in base64\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getBinaryState', id, (err, state) => err ? reject(err) : resolve(state)));\r\n }\r\n\r\n /**\r\n * Sets the given binary state.\r\n * @param {string} id The state ID.\r\n * @param {string} base64 The Base64 encoded binary data.\r\n * @returns {Promise}\r\n */\r\n setBinaryState(id, base64) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n // the data will come in base64\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setBinaryState', id, base64, err => err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Sets the given state value.\r\n * @param {string} id The state ID.\r\n * @param {string | number | boolean | ioBroker.State | ioBroker.SettableState | null} val The state value.\r\n * @returns {Promise}\r\n */\r\n setState(id, val) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setState', id, val, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Gets all objects.\r\n * @param {(objects?: Record) => void} update Callback that is executed when all objects are retrieved.\r\n * @returns {void}\r\n */\r\n /**\r\n * Gets all objects.\r\n * @param {boolean} update Set to true to retrieve all objects from the server (instead of using the local cache).\r\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\r\n * @returns {Promise> | undefined}\r\n */\r\n getObjects(update, disableProgressUpdate) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n } else {\r\n return new Promise((resolve, reject) => {\r\n if (!update && this.objects) {\r\n return resolve(this.objects);\r\n }\r\n\r\n this._socket.emit(Connection.isWeb() ? 'getObjects' : 'getAllObjects', (err, res) => {\r\n this.objects = res;\r\n disableProgressUpdate && this.onProgress(PROGRESS.OBJECTS_LOADED);\r\n err ? reject(err) : resolve(this.objects);\r\n });\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {boolean} isEnable\r\n */\r\n _subscribe(isEnable) {\r\n if (isEnable && !this.subscribed) {\r\n this.subscribed = true;\r\n this.autoSubscribes.forEach(id => this._socket.emit('subscribeObjects', id));\r\n // re subscribe objects\r\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('subscribeObjects', id));\r\n // re-subscribe logs\r\n this.autoSubscribeLog && this._socket.emit('requireLog', true);\r\n // re subscribe states\r\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('subscribe', id));\r\n } else if (!isEnable && this.subscribed) {\r\n this.subscribed = false;\r\n // un-subscribe objects\r\n this.autoSubscribes.forEach(id => this._socket.emit('unsubscribeObjects', id));\r\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('unsubscribeObjects', id));\r\n // un-subscribe logs\r\n this.autoSubscribeLog && this._socket.emit('requireLog', false);\r\n\r\n // un-subscribe states\r\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('unsubscribe', id));\r\n }\r\n }\r\n\r\n /**\r\n * Requests log updates.\r\n * @param {boolean} isEnabled Set to true to get logs.\r\n * @returns {Promise}\r\n */\r\n requireLog(isEnabled) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('requireLog', isEnabled, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Deletes the given object.\r\n * @param {string} id The object ID.\r\n * @param {boolean} maintenance Force deletion of non conform IDs.\r\n * @returns {Promise}\r\n */\r\n delObject(id, maintenance) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('delObject', id, { maintenance: !!maintenance }, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Deletes the given object and all its children.\r\n * @param {string} id The object ID.\r\n * @param {boolean} maintenance Force deletion of non conform IDs.\r\n * @returns {Promise}\r\n */\r\n delObjects(id, maintenance) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('delObjects', id, {maintenance: !!maintenance}, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Sets the object.\r\n * @param {string} id The object ID.\r\n * @param {ioBroker.SettableObject} obj The object.\r\n * @returns {Promise}\r\n */\r\n setObject(id, obj) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!obj) {\r\n return Promise.reject('Null object is not allowed');\r\n }\r\n\r\n obj = JSON.parse(JSON.stringify(obj));\r\n\r\n if (obj.hasOwnProperty('from')) {\r\n delete obj.from;\r\n }\r\n if (obj.hasOwnProperty('user')) {\r\n delete obj.user;\r\n }\r\n if (obj.hasOwnProperty('ts')) {\r\n delete obj.ts;\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setObject', id, obj, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Gets the object with the given id from the server.\r\n * @param {string} id The object ID.\r\n * @returns {ioBroker.GetObjectPromise} The object.\r\n */\r\n getObject(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getObject', id, (err, obj) =>\r\n err ? reject(err) : resolve(obj)));\r\n }\r\n\r\n /**\r\n * Get all adapter instances.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Get all instances of the given adapter.\r\n * @param {string} adapter The name of the adapter.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getAdapterInstances(adapter, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (typeof adapter === 'boolean') {\r\n update = adapter;\r\n adapter = '';\r\n }\r\n adapter = adapter || '';\r\n\r\n if (!update && this._promises['instances_' + adapter]) {\r\n return this._promises['instances_' + adapter];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['instances_' + adapter] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n timeout = null;\r\n this.getObjectView(\r\n `system.adapter.${adapter}.`,\r\n `system.adapter.${adapter}.\\u9999`,\r\n 'instance'\r\n )\r\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\r\n .catch(e => reject(e));\r\n }, TIMEOUT_FOR_ADMIN4);\r\n\r\n this._socket.emit('getAdapterInstances', adapter, (err, instances) => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n return err ? reject(err) : resolve(instances);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['instances_' + adapter];\r\n }\r\n\r\n /**\r\n * Get all adapters.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Get adapters with the given name.\r\n * @param {string} adapter The name of the adapter.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getAdapters(adapter, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (typeof adapter === 'boolean') {\r\n update = adapter;\r\n adapter = '';\r\n }\r\n\r\n adapter = adapter || '';\r\n\r\n if (!update && this._promises['adapter_' + adapter]) {\r\n return this._promises['adapter_' + adapter];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['adapter_' + adapter] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n timeout = null;\r\n this.getObjectView(\r\n `system.adapter.${adapter}.`,\r\n `system.adapter.${adapter}.\\u9999`,\r\n 'adapter'\r\n )\r\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\r\n .catch(e => reject(e));\r\n }, TIMEOUT_FOR_ADMIN4);\r\n\r\n this._socket.emit('getAdapters', adapter, (err, adapters) => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n return err ? reject(err) : resolve(adapters);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['adapter_' + adapter];\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {any[]} objs\r\n * @param {(err?: any) => void} cb\r\n */\r\n _renameGroups(objs, cb) {\r\n if (!objs || !objs.length) {\r\n cb && cb();\r\n } else {\r\n let obj = objs.pop();\r\n let oldId = obj._id;\r\n obj._id = obj.newId;\r\n delete obj.newId;\r\n\r\n this.setObject(obj._id, obj)\r\n .then(() => this.delObject(oldId))\r\n .then(() => setTimeout(() => this._renameGroups(objs, cb), 0))\r\n .catch(err => cb && cb(err));\r\n }\r\n }\r\n\r\n /**\r\n * Rename a group.\r\n * @param {string} id The id.\r\n * @param {string} newId The new id.\r\n * @param {string | { [lang in ioBroker.Languages]?: string; }} newName The new name.\r\n */\r\n renameGroup(id, newId, newName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n return this.getGroups(true)\r\n .then(groups => {\r\n if (groups.length) {\r\n // find all elements\r\n const groupsToRename = groups\r\n .filter(group => group._id.startsWith(id + '.'));\r\n\r\n groupsToRename.forEach(group => group.newId = newId + group._id.substring(id.length));\r\n\r\n return new Promise((resolve, reject) =>\r\n this._renameGroups(groupsToRename, err => err ? reject(err) : resolve()))\r\n .then(() => {\r\n const obj = groups.find(group => group._id === id);\r\n\r\n if (obj) {\r\n obj._id = newId;\r\n if (newName !== undefined) {\r\n obj.common = obj.common || {};\r\n obj.common.name = newName;\r\n }\r\n\r\n return this.setObject(obj._id, obj)\r\n .then(() => this.delObject(id));\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Sends a message to a specific instance or all instances of some specific adapter.\r\n * @param {string} instance The instance to send this message to.\r\n * @param {string} [command] Command name of the target instance.\r\n * @param {ioBroker.MessagePayload} [data] The message data to send.\r\n * @returns {Promise}\r\n */\r\n sendTo(instance, command, data) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendTo', instance, command, data, result =>\r\n resolve(result)));\r\n }\r\n\r\n /**\r\n * Extend an object and create it if it might not exist.\r\n * @param {string} id The id.\r\n * @param {ioBroker.PartialObject} obj The object.\r\n */\r\n extendObject(id, obj) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n obj = JSON.parse(JSON.stringify(obj));\r\n\r\n if (obj.hasOwnProperty('from')) {\r\n delete obj.from;\r\n }\r\n if (obj.hasOwnProperty('user')) {\r\n delete obj.user;\r\n }\r\n if (obj.hasOwnProperty('ts')) {\r\n delete obj.ts;\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('extendObject', id, obj, err => err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Register a handler for log messages.\r\n * @param {(message: string) => void} handler The handler.\r\n */\r\n registerLogHandler(handler) {\r\n !this.onLogHandlers.includes(handler) && this.onLogHandlers.push(handler);\r\n }\r\n\r\n /**\r\n * Unregister a handler for log messages.\r\n * @param {(message: string) => void} handler The handler.\r\n */\r\n unregisterLogHandler(handler) {\r\n const pos = this.onLogHandlers.indexOf(handler);\r\n pos !== -1 && this.onLogHandlers.splice(pos, 1);\r\n }\r\n\r\n /**\r\n * Register a handler for the connection state.\r\n * @param {(connected: boolean) => void} handler The handler.\r\n */\r\n registerConnectionHandler(handler) {\r\n !this.onConnectionHandlers.includes(handler) && this.onConnectionHandlers.push(handler);\r\n }\r\n\r\n /**\r\n * Unregister a handler for the connection state.\r\n * @param {(connected: boolean) => void} handler The handler.\r\n */\r\n unregisterConnectionHandler(handler) {\r\n const pos = this.onConnectionHandlers.indexOf(handler);\r\n pos !== -1 && this.onConnectionHandlers.splice(pos, 1);\r\n }\r\n\r\n /**\r\n * Set the handler for standard output of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n registerCmdStdoutHandler(handler) {\r\n this.onCmdStdoutHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for standard output of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n unregisterCmdStdoutHandler(handler) {\r\n this.onCmdStdoutHandler = null;\r\n }\r\n\r\n /**\r\n * Set the handler for standard error of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n registerCmdStderrHandler(handler) {\r\n this.onCmdStderrHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for standard error of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n unregisterCmdStderrHandler(handler) {\r\n this.onCmdStderrHandler = null;\r\n }\r\n\r\n /**\r\n * Set the handler for exit of a command.\r\n * @param {(id: string, exitCode: number) => void} handler The handler.\r\n */\r\n registerCmdExitHandler(handler) {\r\n this.onCmdExitHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for exit of a command.\r\n * @param {(id: string, exitCode: number) => void} handler The handler.\r\n */\r\n unregisterCmdExitHandler(handler) {\r\n this.onCmdExitHandler = null;\r\n }\r\n\r\n /**\r\n * Get all enums with the given name.\r\n * @param {string} [_enum] The name of the enum\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise>}\r\n */\r\n getEnums(_enum, update) {\r\n if (!update && this._promises['enums_' + (_enum || 'all')]) {\r\n return this._promises['enums_' + (_enum || 'all')];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['enums_' + (_enum || 'all')] = new Promise((resolve, reject) => {\r\n this._socket.emit('getObjectView', 'system', 'enum', { startkey: 'enum.' + (_enum || ''), endkey: 'enum.' + (_enum ? (_enum + '.') : '') + '\\u9999' }, (err, res) => {\r\n if (!err && res) {\r\n const _res = {};\r\n for (let i = 0; i < res.rows.length; i++) {\r\n if (_enum && res.rows[i].id === 'enum.' + _enum) {\r\n continue;\r\n }\r\n _res[res.rows[i].id] = res.rows[i].value;\r\n }\r\n resolve(_res);\r\n } else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['enums_' + (_enum || 'all')];\r\n }\r\n\r\n /**\r\n * Query a predefined object view.\r\n * @param {string} start The start ID.\r\n * @param {string} end The end ID.\r\n * @param {string} type The type of object.\r\n * @returns {Promise>}\r\n */\r\n getObjectView(start, end, type) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n start = start || '';\r\n end = end || '\\u9999';\r\n\r\n return new Promise((resolve, reject) => {\r\n this._socket.emit('getObjectView', 'system', type, { startkey: start, endkey: end }, (err, res) => {\r\n if (!err) {\r\n const _res = {};\r\n if (res && res.rows) {\r\n for (let i = 0; i < res.rows.length; i++) {\r\n _res[res.rows[i].id] = res.rows[i].value;\r\n }\r\n }\r\n resolve(_res);\r\n } else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Get the stored certificates.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise<{name: string; type: 'public' | 'private' | 'chained'}[]>}\r\n */\r\n getCertificates(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (this._promises.cert && !update) {\r\n return this._promises.cert;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.cert = this.getObject('system.certificates')\r\n .then(res => {\r\n const certs = [];\r\n if (res && res.native && res.native.certificates) {\r\n Object.keys(res.native.certificates).forEach(c => {\r\n const cert = res.native.certificates[c];\r\n if (!cert) {\r\n return;\r\n }\r\n const _cert = {\r\n name: c,\r\n type: ''\r\n };\r\n // If it is filename, it could be everything\r\n if (cert.length < 700 && (cert.indexOf('/') !== -1 || cert.indexOf('\\\\') !== -1)) {\r\n if (c.toLowerCase().includes('private')) {\r\n _cert.type = 'private';\r\n } else if (cert.toLowerCase().includes('private')) {\r\n _cert.type = 'private';\r\n } else if (c.toLowerCase().includes('public')) {\r\n _cert.type = 'public';\r\n } else if (cert.toLowerCase().includes('public')) {\r\n _cert.type = 'public';\r\n }\r\n certs.push(_cert);\r\n } else {\r\n _cert.type = (cert.substring(0, '-----BEGIN RSA PRIVATE KEY'.length) === '-----BEGIN RSA PRIVATE KEY' || cert.substring(0, '-----BEGIN PRIVATE KEY'.length) === '-----BEGIN PRIVATE KEY') ? 'private' : 'public';\r\n\r\n if (_cert.type === 'public') {\r\n const m = cert.split('-----END CERTIFICATE-----');\r\n if (m.filter(t => t.replace(/\\r\\n|\\r|\\n/, '').trim()).length > 1) {\r\n _cert.type = 'chained';\r\n }\r\n }\r\n\r\n certs.push(_cert);\r\n }\r\n });\r\n }\r\n return certs;\r\n });\r\n\r\n return this._promises.cert;\r\n }\r\n\r\n /**\r\n * Get the logs from a host (only for admin connection).\r\n * @param {string} host\r\n * @param {number} [linesNumber]\r\n * @returns {Promise}\r\n */\r\n getLogs(host, linesNumber) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'getLogs', linesNumber || 200, lines =>\r\n resolve(lines)));\r\n }\r\n\r\n /**\r\n * Get the log files (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getLogsFiles(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('readLogs', host, (err, files) =>\r\n err ? reject(err) : resolve(files)));\r\n }\r\n\r\n /**\r\n * Delete the logs from a host (only for admin connection).\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n delLogs(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('sendToHost', host, 'delLogs', null, error =>\r\n error ? reject(error) : resolve()));\r\n }\r\n\r\n /**\r\n * Read the meta items.\r\n * @returns {Promise}\r\n */\r\n readMetaItems() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getObjectView', 'system', 'meta', { startkey: '', endkey: '\\u9999' }, (err, objs) =>\r\n err ? reject(err) : resolve(objs.rows && objs.rows.map(obj => obj.value))));\r\n }\r\n\r\n /**\r\n * Read the directory of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The directory name.\r\n * @returns {Promise}\r\n */\r\n readDir(adapter, fileName) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('readDir', adapter, fileName, (err, files) =>\r\n err ? reject(err) : resolve(files)));\r\n }\r\n\r\n /**\r\n * Read a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @param {boolean} base64 If it must be a base64 format\r\n * @returns {Promise}\r\n */\r\n readFile(adapter, fileName, base64) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (!base64) {\r\n this._socket.emit('readFile', adapter, fileName, (err, data, type) => {\r\n //@ts-ignore\r\n err ? reject(err) : resolve(data, type);\r\n });\r\n } else {\r\n this._socket.emit('readFile64', adapter, fileName, base64, (err, data) =>\r\n err ? reject(err) : resolve(data));\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Write a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @param {Buffer | string} data The data (if it's a Buffer, it will be converted to Base64).\r\n * @returns {Promise}\r\n */\r\n writeFile64(adapter, fileName, data) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (typeof data === 'string') {\r\n this._socket.emit('writeFile', adapter, fileName, data, err =>\r\n err ? reject(err) : resolve());\r\n } else {\r\n const base64 = btoa(\r\n new Uint8Array(data)\r\n .reduce((data, byte) => data + String.fromCharCode(byte), '')\r\n );\r\n\r\n this._socket.emit('writeFile64', adapter, fileName, base64, err =>\r\n err ? reject(err) : resolve());\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Delete a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @returns {Promise}\r\n */\r\n deleteFile(adapter, fileName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('deleteFile', adapter, fileName, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Delete a folder of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} folderName The folder name.\r\n * @returns {Promise}\r\n */\r\n deleteFolder(adapter, folderName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('deleteFolder', adapter, folderName, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Get the list of all hosts.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getHosts(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.hosts) {\r\n return this._promises.hosts;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.hosts = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'host',\r\n {startkey: 'system.host.', endkey: 'system.host.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.hosts;\r\n }\r\n\r\n /**\r\n * Get the list of all users.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getUsers(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.users) {\r\n return this._promises.users;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.users = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'user',\r\n {startkey: 'system.user.', endkey: 'system.user.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.users;\r\n }\r\n\r\n /**\r\n * Get the list of all groups.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getGroups(update) {\r\n if (!update && this._promises.groups) {\r\n return this._promises.groups;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.groups = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'group',\r\n {startkey: 'system.group.', endkey: 'system.group.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.groups;\r\n }\r\n\r\n /**\r\n * Get the host information.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] optional read timeout.\r\n * @returns {Promise}\r\n */\r\n getHostInfo(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['hostInfo' + host]) {\r\n return this._promises['hostInfo' + host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['hostInfo' + host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getHostInfo timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getHostInfo', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getHostInfo\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getHostInfo\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises['hostInfo' + host];\r\n }\r\n\r\n /**\r\n * Get the host information (short version).\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] optional read timeout.\r\n * @returns {Promise}\r\n */\r\n getHostInfoShort(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['hostInfoShort' + host]) {\r\n return this._promises['hostInfoShort' + host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['hostInfoShort' + host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('hostInfoShort timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getHostInfoShort', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getHostInfoShort\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getHostInfoShort\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises['hostInfoShort' + host];\r\n }\r\n\r\n /**\r\n * Get the repository.\r\n * @param {string} host\r\n * @param {any} [args]\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] timeout in ms.\r\n * @returns {Promise}\r\n */\r\n getRepository(host, args, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.repo) {\r\n return this._promises.repo;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.repo = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getRepository timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getRepository', args, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getRepository\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getRepository\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.repo;\r\n }\r\n\r\n /**\r\n * Get the installed.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [cmdTimeout] timeout in ms (optional)\r\n * @returns {Promise}\r\n */\r\n getInstalled(host, update, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n this._promises.installed = this._promises.installed || {};\r\n\r\n if (!update && this._promises.installed[host]) {\r\n return this._promises.installed[host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.installed[host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getInstalled timeout');\r\n }\r\n }, cmdTimeout || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getInstalled', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getInstalled\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getInstalled\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.installed[host];\r\n }\r\n\r\n /**\r\n * Execute a command on a host.\r\n * @param {string} host The host name.\r\n * @param {string} cmd The command.\r\n * @param {string} cmdId The command ID.\r\n * @param {number} cmdTimeout Timeout of command in ms\r\n * @returns {Promise}\r\n */\r\n cmdExec(host, cmd, cmdId, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith(host)) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n let timeout = cmdTimeout && setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('cmdExec timeout');\r\n }\r\n }, cmdTimeout);\r\n\r\n this._socket.emit('cmdExec', host, cmdId, cmd, null, err => {\r\n if (!cmdTimeout || timeout) {\r\n timeout && clearTimeout(timeout);\r\n timeout = null;\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a given feature is supported.\r\n * @param {string} feature The feature to check.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n checkFeatureSupported(feature, update) {\r\n if (!update && this._promises['supportedFeatures_' + feature]) {\r\n return this._promises['supportedFeatures_' + feature];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['supportedFeatures_' + feature] = new Promise((resolve, reject) =>\r\n this._socket.emit('checkFeatureSupported', feature, (err, features) => {\r\n err ? reject(err) : resolve(features)\r\n }));\r\n\r\n return this._promises['supportedFeatures_' + feature];\r\n }\r\n\r\n /**\r\n * Read the base settings of a given host.\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n readBaseSettings(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\r\n .then(result => {\r\n if (result) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('readBaseSettings timeout');\r\n }\r\n }, this.props.cmdTimeout);\r\n\r\n if (host.startsWith('system.host.')) {\r\n host = host.replace(/^system\\.host\\./, '');\r\n }\r\n\r\n this._socket.emit('sendToHost', host, 'readBaseSettings', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"BaseSettings\"');\r\n } else if (!data) {\r\n reject('Cannot read \"BaseSettings\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n return Promise.reject('Not supported');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Write the base settings of a given host.\r\n * @param {string} host\r\n * @param {any} config\r\n * @returns {Promise}\r\n */\r\n writeBaseSettings(host, config) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\r\n .then(result => {\r\n if (result) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('writeBaseSettings timeout');\r\n }\r\n }, this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'writeBaseSettings', config, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not write \"BaseSettings\"');\r\n } else if (!data) {\r\n reject('Cannot write \"BaseSettings\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n return Promise.reject('Not supported');\r\n }\r\n })\r\n }\r\n\r\n /**\r\n * Send command to restart the iobroker on host\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n restartController(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) => {\r\n this._socket.emit('sendToHost', host, 'restartController', null, error => {\r\n error ? reject(error) : resolve(true);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Read statistics information from host\r\n * @param {string} host\r\n * @param {string} typeOfDiag one of none, normal, no-city, extended\r\n * @returns {Promise}\r\n */\r\n getDiagData(host, typeOfDiag) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise(resolve => {\r\n this._socket.emit('sendToHost', host, 'getDiagData', typeOfDiag, result =>\r\n resolve(result));\r\n });\r\n }\r\n\r\n /**\r\n * Read all states (which might not belong to this adapter) which match the given pattern.\r\n * @param {string} pattern\r\n * @returns {ioBroker.GetStatesPromise}\r\n */\r\n getForeignStates(pattern) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n if (Connection.isWeb()) {\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getStates', pattern || '*', (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n } else {\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getForeignStates', pattern || '*', (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n }\r\n }\r\n\r\n /**\r\n * Get foreign objects by pattern, by specific type and resolve their enums.\r\n * @param {string} pattern\r\n * @param {string} [type]\r\n * @returns {ioBroker.GetObjectsPromise}\r\n */\r\n getForeignObjects(pattern, type) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getForeignObjects', pattern || '*', type, (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n }\r\n\r\n /**\r\n * Gets the system configuration.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getSystemConfig(update) {\r\n if (!update && this._promises.systemConfig) {\r\n return this._promises.systemConfig;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.systemConfig = this.getObject('system.config')\r\n .then(systemConfig => {\r\n //@ts-ignore\r\n systemConfig = systemConfig || {};\r\n //@ts-ignore\r\n systemConfig.common = systemConfig.common || {};\r\n //@ts-ignore\r\n systemConfig.native = systemConfig.native || {};\r\n return systemConfig;\r\n });\r\n\r\n return this._promises.systemConfig;\r\n }\r\n\r\n /**\r\n * Sets the system configuration.\r\n * @param {ioBroker.SettableObjectWorker} obj\r\n * @returns {Promise>}\r\n */\r\n setSystemConfig(obj) {\r\n return this.setObject('system.config', obj)\r\n .then(() => this._promises.systemConfig = Promise.resolve(obj));\r\n }\r\n\r\n /**\r\n * Get the raw socket.io socket.\r\n * @returns {any}\r\n */\r\n getRawSocket() {\r\n return this._socket;\r\n }\r\n\r\n /**\r\n * Get the history of a given state.\r\n * @param {string} id\r\n * @param {ioBroker.GetHistoryOptions} options\r\n * @returns {Promise}\r\n */\r\n getHistory(id, options) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getHistory', id, options, (err, values) =>\r\n err ? reject(err) : resolve(values)));\r\n }\r\n\r\n /**\r\n * Get the history of a given state.\r\n * @param {string} id\r\n * @param {ioBroker.GetHistoryOptions} options\r\n * @returns {Promise<{values: ioBroker.GetHistoryResult; sesionId: string; stepIgnore: number}>}\r\n */\r\n getHistoryEx(id, options) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getHistory', id, options, (err, values, stepIgnore, sessionId) =>\r\n err ? reject(err) : resolve({ values, sessionId, stepIgnore })));\r\n }\r\n\r\n /**\r\n * Change the password of the given user.\r\n * @param {string} user\r\n * @param {string} password\r\n * @returns {Promise}\r\n */\r\n changePassword(user, password) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('changePassword', user, password, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Get the IP addresses of the given host.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getIpAddresses(host, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host = 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['IPs_' + host]) {\r\n return this._promises['IPs_' + host];\r\n }\r\n this._promises['IPs_' + host] = this.getObject(host)\r\n .then(obj => obj && obj.common ? obj.common.address || [] : []);\r\n\r\n return this._promises['IPs_' + host];\r\n }\r\n\r\n /**\r\n * Get the IP addresses with interface names of the given host or find host by IP.\r\n * @param {string} ipOrHostName\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise]>}\r\n */\r\n getHostByIp(ipOrHostName, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (ipOrHostName.startsWith('system.host.')) {\r\n ipOrHostName = ipOrHostName.replace(/^system\\.host\\./, '');\r\n }\r\n\r\n if (!update && this._promises['rIPs_' + ipOrHostName]) {\r\n return this._promises['rIPs_' + ipOrHostName];\r\n }\r\n this._promises['rIPs_' + ipOrHostName] = new Promise(resolve =>\r\n this._socket.emit('getHostByIp', ipOrHostName, (ip, host) => {\r\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - Listen on all IPs', address: '0.0.0.0', family: 'ipv4'}];\r\n const IPs6 = [{name: '[IPv6] :: - Listen on all IPs', address: '::', family: 'ipv6'}];\r\n if (host.native?.hardware?.networkInterfaces) {\r\n for (const eth in host.native.hardware.networkInterfaces) {\r\n if (!host.native.hardware.networkInterfaces.hasOwnProperty(eth)) {\r\n continue;\r\n }\r\n for (let num = 0; num < host.native.hardware.networkInterfaces[eth].length; num++) {\r\n if (host.native.hardware.networkInterfaces[eth][num].family !== 'IPv6') {\r\n IPs4.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv4'});\r\n } else {\r\n IPs6.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv6'});\r\n }\r\n }\r\n }\r\n }\r\n for (let i = 0; i < IPs6.length; i++) {\r\n IPs4.push(IPs6[i]);\r\n }\r\n resolve(IPs4);\r\n }));\r\n\r\n return this._promises['rIPs_' + ipOrHostName];\r\n }\r\n\r\n /**\r\n * Encrypt a text\r\n * @param {string} text\r\n * @returns {Promise}\r\n */\r\n encrypt(text) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('encrypt', text, (err, text) =>\r\n err ? reject(err) : resolve(text)));\r\n }\r\n\r\n /**\r\n * Decrypt a text\r\n * @param {string} encryptedText\r\n * @returns {Promise}\r\n */\r\n decrypt(encryptedText) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('decrypt', encryptedText, (err, text) =>\r\n err ? reject(err) : resolve(text)));\r\n }\r\n\r\n /**\r\n * Gets the version.\r\n * @returns {Promise<{version: string; serverName: string}>}\r\n */\r\n getVersion() {\r\n this._promises.version = this._promises.version || new Promise((resolve, reject) =>\r\n this._socket.emit('getVersion', (err, version, serverName) => {\r\n // support of old socket.io\r\n if (err && !version && typeof err === 'string' && err.match(/\\d+\\.\\d+\\.\\d+/)) {\r\n resolve({ version: err, serverName: 'socketio' });\r\n } else {\r\n return err ? reject(err) : resolve({ version, serverName });\r\n }\r\n }));\r\n\r\n return this._promises.version;\r\n }\r\n\r\n /**\r\n * Gets the web server name.\r\n * @returns {Promise}\r\n */\r\n getWebServerName() {\r\n this._promises.webName = this._promises.webName || new Promise((resolve, reject) =>\r\n this._socket.emit('getAdapterName', (err, name) =>\r\n err ? reject(err) : resolve(name)));\r\n\r\n return this._promises.webName;\r\n }\r\n\r\n /**\r\n * Gets the admin version.\r\n * @deprecated use getVersion()\r\n * @returns {Promise<{version: string; serverName: string}>}\r\n */\r\n getAdminVersion() {\r\n console.log('Deprecated: use getVersion');\r\n return this.getVersion();\r\n }\r\n\r\n /**\r\n * Change access rights for file\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @param {object} [options] like {mode: 0x644}\r\n * @returns {Promise<{entries: array}>}\r\n */\r\n chmodFile(adapter, filename, options) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('chmodFile', adapter, filename, options, (err, entries, id) =>\r\n err ? reject(err) : resolve({entries, id})));\r\n }\r\n\r\n /**\r\n * Change owner or/and owner group for file\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @param {object} [options] like {owner: 'newOwner', ownerGroup: 'newGroup'}\r\n * @returns {Promise<{entries: array}>}\r\n */\r\n chownFile(adapter, filename, options) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('chownFile', adapter, filename, options, (err, entries, id) =>\r\n err ? reject(err) : resolve({entries, id})));\r\n }\r\n\r\n /**\r\n * Check if the file exists\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @returns {Promise}\r\n */\r\n fileExists(adapter, filename) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('fileExists', adapter, filename, (err, exists) =>\r\n err ? reject(err) : resolve(exists)));\r\n }\r\n\r\n /**\r\n * Get the alarm notifications from a host (only for admin connection).\r\n * @param {string} host\r\n * @param {string} [category] - optional\r\n * @returns {Promise}\r\n */\r\n getNotifications(host, category) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'getNotifications', {category}, notifications =>\r\n resolve(notifications)));\r\n }\r\n\r\n /**\r\n * Clear the alarm notifications on a host (only for admin connection).\r\n * @param {string} host\r\n * @param {string} [category] - optional\r\n * @returns {Promise}\r\n */\r\n clearNotifications(host, category) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'clearNotifications', {category}, notifications =>\r\n resolve(notifications)));\r\n }\r\n\r\n /**\r\n * Read if only easy mode is allowed (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getIsEasyModeStrict() {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getIsEasyModeStrict', (error, isStrict) =>\r\n error ? reject(error) : resolve(isStrict)));\r\n }\r\n\r\n /**\r\n * Read easy mode configuration (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getEasyMode() {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getEasyMode', (error, config) =>\r\n error ? reject(error) : resolve(config)));\r\n }\r\n\r\n /**\r\n * Read current user\r\n * @returns {Promise}\r\n */\r\n getCurrentUser() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise(resolve =>\r\n this._socket.emit('authEnabled', (isSecure, user) =>\r\n resolve(user)));\r\n }\r\n\r\n getCurrentSession(cmdTimeout) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const controller = new AbortController();\r\n\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n controller.abort();\r\n reject('getCurrentSession timeout');\r\n }\r\n }, cmdTimeout || 5000);\r\n\r\n return fetch('./session', { signal: controller.signal })\r\n .then(res => res.json())\r\n .then(json => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n resolve(json);\r\n }\r\n })\r\n .catch(e => {\r\n reject('getCurrentSession: ' + e);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Read adapter ratings\r\n * @returns {Promise}\r\n */\r\n getRatings(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getRatings', update, (err, ratings) =>\r\n err ? reject(err) : resolve(ratings)));\r\n }\r\n\r\n /**\r\n * Read current web, socketio or admin namespace, like admin.0\r\n * @returns {Promise}\r\n */\r\n getCurrentInstance() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.currentInstance = this._promises.currentInstance ||\r\n new Promise((resolve, reject) =>\r\n this._socket.emit('getCurrentInstance', (err, namespace) =>\r\n err ? reject(err) : resolve(namespace)));\r\n\r\n return this._promises.currentInstance;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactAdapters(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.compactAdapters) {\r\n return this._promises.compactAdapters;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n this._promises.compactAdapters = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactAdapters', (err, adapters) =>\r\n err ? reject(err) : resolve(adapters)));\r\n\r\n return this._promises.compactAdapters;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactInstances(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.compactInstances) {\r\n return this._promises.compactInstances;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.compactInstances = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactInstances', (err, instances) =>\r\n err ? reject(err) : resolve(instances)));\r\n\r\n return this._promises.compactInstances;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n // reads only version of installed adapter\r\n getCompactInstalled(host, update, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n this._promises.installedCompact = this._promises.installedCompact || {};\r\n\r\n if (!update && this._promises.installedCompact[host]) {\r\n return this._promises.installedCompact[host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.installedCompact[host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getCompactInstalled timeout');\r\n }\r\n }, cmdTimeout || this.props.cmdTimeout);\r\n\r\n this._socket.emit('getCompactInstalled', host, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getCompactInstalled\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getCompactInstalled\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.installedCompact[host];\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactSystemConfig(update) {\r\n if (!update && this._promises.systemConfigCommon) {\r\n return this._promises.systemConfigCommon;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.systemConfigCommon = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactSystemConfig', (err, systemConfig) =>\r\n err ? reject(err) : resolve(systemConfig)));\r\n\r\n return this._promises.systemConfigCommon;\r\n }\r\n\r\n /**\r\n * Get the repository in compact form (only version and icon).\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] timeout in ms.\r\n * @returns {Promise}\r\n */\r\n getCompactRepository(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.repoCompact) {\r\n return this._promises.repoCompact;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.repoCompact = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getCompactRepository timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('getCompactRepository', host, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getCompactRepository\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getCompactRepository\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.repoCompact;\r\n }\r\n\r\n /**\r\n * Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getCompactHosts(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.hostsCompact) {\r\n return this._promises.hostsCompact;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.hostsCompact = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactHosts', (err, hosts) =>\r\n err ? reject(err) : resolve(hosts)));\r\n\r\n return this._promises.hostsCompact;\r\n }\r\n\r\n /**\r\n * Get uuid\r\n * @returns {Promise}\r\n */\r\n getUuid() {\r\n if (this._promises.uuid) {\r\n return this._promises.uuid;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.uuid = this.getObject('system.meta.uuid')\r\n //@ts-ignore\r\n .then(obj => obj?.native?.uuid);\r\n\r\n return this._promises.uuid;\r\n }\r\n\r\n /**\r\n * Logout current user\r\n * @returns {Promise}\r\n */\r\n logout() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('logout', err =>\r\n err ? reject(err) : resolve(null)));\r\n }\r\n}\r\n\r\nConnection.Connection = {\r\n onLog: PropTypes.func,\r\n onReady: PropTypes.func,\r\n onProgress: PropTypes.func,\r\n};\r\n\r\nexport default Connection;\r\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@material-ui/core/styles/withStyles';\n\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\n\nimport IconCheck from '@material-ui/icons/Check';\n\nimport I18n from '../i18n';\n\nconst styles = theme => ({\n titleBackground: {\n\n },\n titleColor: {\n\n }\n});\n\n/**\n * @typedef {object} DialogErrorProps\n * @property {string} [key] The key to identify this component.\n * @property {string} [title] The dialog title; default: Error (translated)\n * @property {string | JSX.Element} text The dialog text.\n * @property {() => void} [onClose] Close handler.\n * @property {{titleBackground: string; titleColor: string}} classes The styling class names.\n *\n * @extends {React.Component}\n */\nclass DialogError extends React.Component {\n handleOk() {\n this.props.onClose && this.props.onClose();\n };\n\n render() {\n return this.handleOk()}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n {this.props.title || I18n.t('ra_Error')}\n \n \n {this.props.text || I18n.t('ra_Unknown error!')}\n \n \n \n \n \n ;\n }\n}\n\nDialogError.propTypes = {\n onClose: PropTypes.func,\n title: PropTypes.string,\n text: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element\n ]),\n icon: PropTypes.object\n};\n\n/** @type {typeof DialogError} */\nconst _export = withStyles(styles)(DialogError);\nexport default _export;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createTheme = _interopRequireDefault(require(\"./createTheme\"));\n\nvar defaultTheme = (0, _createTheme.default)();\nvar _default = defaultTheme;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createMuiTheme = createMuiTheme;\nexports.default = void 0;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _createBreakpoints = _interopRequireDefault(require(\"./createBreakpoints\"));\n\nvar _createMixins = _interopRequireDefault(require(\"./createMixins\"));\n\nvar _createPalette = _interopRequireDefault(require(\"./createPalette\"));\n\nvar _createTypography = _interopRequireDefault(require(\"./createTypography\"));\n\nvar _shadows = _interopRequireDefault(require(\"./shadows\"));\n\nvar _shape = _interopRequireDefault(require(\"./shape\"));\n\nvar _createSpacing = _interopRequireDefault(require(\"./createSpacing\"));\n\nvar _transitions = _interopRequireDefault(require(\"./transitions\"));\n\nvar _zIndex = _interopRequireDefault(require(\"./zIndex\"));\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = (0, _objectWithoutProperties2.default)(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n var palette = (0, _createPalette.default)(paletteInput);\n var breakpoints = (0, _createBreakpoints.default)(breakpointsInput);\n var spacing = (0, _createSpacing.default)(spacingInput);\n var muiTheme = (0, _utils.deepmerge)({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: (0, _createMixins.default)(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: _shadows.default,\n typography: (0, _createTypography.default)(palette, typographyInput),\n spacing: spacing,\n shape: _shape.default,\n transitions: _transitions.default,\n zIndex: _zIndex.default\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return (0, _utils.deepmerge)(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: (0, _defineProperty2.default)({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\n\nfunction createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\n\nvar _default = createTheme;\nexports.default = _default;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createBreakpoints;\nexports.keys = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nvar keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.\n\nexports.keys = keys;\n\nfunction createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n } : _breakpoints$values,\n _breakpoints$unit = breakpoints.unit,\n unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,\n _breakpoints$step = breakpoints.step,\n step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,\n other = (0, _objectWithoutProperties2.default)(breakpoints, [\"values\", \"unit\", \"step\"]);\n\n function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n }\n\n function down(key) {\n var endIndex = keys.indexOf(key) + 1;\n var upperbound = values[keys[endIndex]];\n\n if (endIndex === keys.length) {\n // xl down applies to all sizes\n return up('xs');\n }\n\n var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;\n return \"@media (max-width:\".concat(value - step / 100).concat(unit, \")\");\n }\n\n function between(start, end) {\n var endIndex = keys.indexOf(end);\n\n if (endIndex === keys.length - 1) {\n return up(start);\n }\n\n return \"@media (min-width:\".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, \") and \") + \"(max-width:\".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, \")\");\n }\n\n function only(key) {\n return between(key, key);\n }\n\n var warnedOnce = false;\n\n function width(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn([\"Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.\", 'Use the `theme.breakpoints.values` instead.'].join('\\n'));\n }\n }\n\n return values[key];\n }\n\n return (0, _extends2.default)({\n keys: keys,\n values: values,\n up: up,\n down: down,\n between: between,\n only: only,\n width: width\n }, other);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createMixins;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _extends3 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nfunction createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return (0, _extends3.default)({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return (0, _extends3.default)({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, (0, _defineProperty2.default)({}, breakpoints.up('sm'), (0, _extends3.default)({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, (0, _defineProperty2.default)(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), (0, _defineProperty2.default)(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPalette;\nexports.dark = exports.light = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _common = _interopRequireDefault(require(\"../colors/common\"));\n\nvar _grey = _interopRequireDefault(require(\"../colors/grey\"));\n\nvar _indigo = _interopRequireDefault(require(\"../colors/indigo\"));\n\nvar _pink = _interopRequireDefault(require(\"../colors/pink\"));\n\nvar _red = _interopRequireDefault(require(\"../colors/red\"));\n\nvar _orange = _interopRequireDefault(require(\"../colors/orange\"));\n\nvar _blue = _interopRequireDefault(require(\"../colors/blue\"));\n\nvar _green = _interopRequireDefault(require(\"../colors/green\"));\n\nvar _colorManipulator = require(\"./colorManipulator\");\n\nvar light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: _common.default.white,\n default: _grey.default[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexports.light = light;\nvar dark = {\n text: {\n primary: _common.default.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: _grey.default[800],\n default: '#303030'\n },\n action: {\n active: _common.default.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nexports.dark = dark;\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = (0, _colorManipulator.lighten)(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = (0, _colorManipulator.darken)(intent.main, tonalOffsetDark);\n }\n }\n}\n\nfunction createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: _indigo.default[300],\n main: _indigo.default[500],\n dark: _indigo.default[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: _pink.default.A200,\n main: _pink.default.A400,\n dark: _pink.default.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: _red.default[300],\n main: _red.default[500],\n dark: _red.default[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: _orange.default[300],\n main: _orange.default[500],\n dark: _orange.default[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: _blue.default[300],\n main: _blue.default[500],\n dark: _blue.default[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: _green.default[300],\n main: _green.default[500],\n dark: _green.default[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = (0, _objectWithoutProperties2.default)(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n function getContrastText(background) {\n var contrastText = (0, _colorManipulator.getContrastRatio)(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = (0, _colorManipulator.getContrastRatio)(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = (0, _extends2.default)({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : (0, _utils.formatMuiErrorMessage)(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = (0, _utils.deepmerge)((0, _extends2.default)({\n // A collection of common colors.\n common: _common.default,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: _grey.default,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar common = {\n black: '#000',\n white: '#fff'\n};\nvar _default = common;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nvar _default = grey;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nvar _default = indigo;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nvar _default = pink;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nvar _default = red;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nvar _default = blue;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nvar _default = green;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hexToRgb = hexToRgb;\nexports.rgbToHex = rgbToHex;\nexports.hslToRgb = hslToRgb;\nexports.decomposeColor = decomposeColor;\nexports.recomposeColor = recomposeColor;\nexports.getContrastRatio = getContrastRatio;\nexports.getLuminance = getLuminance;\nexports.emphasize = emphasize;\nexports.fade = fade;\nexports.alpha = alpha;\nexports.darken = darken;\nexports.lighten = lighten;\n\nvar _utils = require(\"@material-ui/utils\");\n\n/* eslint-disable no-use-before-define */\n\n/**\n * Returns a number whose value is limited to the given range.\n *\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(\"Material-UI: The value provided \".concat(value, \" is out of range [\").concat(min, \", \").concat(max, \"].\"));\n }\n }\n\n return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n *\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nfunction hexToRgb(color) {\n color = color.substr(1);\n var re = new RegExp(\".{1,\".concat(color.length >= 6 ? 2 : 1, \"}\"), 'g');\n var colors = color.match(re);\n\n if (colors && colors[0].length === 1) {\n colors = colors.map(function (n) {\n return n + n;\n });\n }\n\n return colors ? \"rgb\".concat(colors.length === 4 ? 'a' : '', \"(\").concat(colors.map(function (n, index) {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', '), \")\") : '';\n}\n\nfunction intToHex(int) {\n var hex = int.toString(16);\n return hex.length === 1 ? \"0\".concat(hex) : hex;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n *\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\n\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n\n var _decomposeColor = decomposeColor(color),\n values = _decomposeColor.values;\n\n return \"#\".concat(values.map(function (n) {\n return intToHex(n);\n }).join(''));\n}\n/**\n * Converts a color from hsl format to rgb format.\n *\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\n\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n var _color = color,\n values = _color.values;\n var h = values[0];\n var s = values[1] / 100;\n var l = values[2] / 100;\n var a = s * Math.min(l, 1 - l);\n\n var f = function f(n) {\n var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n };\n\n var type = 'rgb';\n var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n\n return recomposeColor({\n type: type,\n values: rgb\n });\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\n\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n var marker = color.indexOf('(');\n var type = color.substring(0, marker);\n\n if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Unsupported `\".concat(color, \"` color.\\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().\") : (0, _utils.formatMuiErrorMessage)(3, color));\n }\n\n var values = color.substring(marker + 1, color.length - 1).split(',');\n values = values.map(function (value) {\n return parseFloat(value);\n });\n return {\n type: type,\n values: values\n };\n}\n/**\n * Converts a color object with type and values to a string.\n *\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\n\nfunction recomposeColor(color) {\n var type = color.type;\n var values = color.values;\n\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map(function (n, i) {\n return i < 3 ? parseInt(n, 10) : n;\n });\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = \"\".concat(values[1], \"%\");\n values[2] = \"\".concat(values[2], \"%\");\n }\n\n return \"\".concat(type, \"(\").concat(values.join(', '), \")\");\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\n\nfunction getContrastRatio(foreground, background) {\n var lumA = getLuminance(foreground);\n var lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\n\nfunction getLuminance(color) {\n color = decomposeColor(color);\n var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(function (val) {\n val /= 255; // normalized\n\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }); // Truncate at 3 digits\n\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction emphasize(color) {\n var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\n\nvar warnedOnce = false;\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0 -1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n *\n * @deprecated\n * Use `import { alpha } from '@material-ui/core/styles'` instead.\n */\n\nfunction fade(color, value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The `fade` color utility was renamed to `alpha` to better describe its functionality.', '', \"You should use `import { alpha } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return alpha(color, value);\n}\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha value is overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0-1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clamp(value);\n\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n\n color.values[3] = value;\n return recomposeColor(color);\n}\n/**\n * Darkens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Lightens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n }\n\n return recomposeColor(color);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createTypography;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nfunction createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = (0, _objectWithoutProperties2.default)(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return (0, _extends2.default)({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return (0, _utils.deepmerge)((0, _extends2.default)({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nvar _default = shadows;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar shape = {\n borderRadius: 4\n};\nvar _default = shape;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createSpacing;\n\nvar _system = require(\"@material-ui/system\");\n\nvar warnOnce;\n\nfunction createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = (0, _system.createUnarySpacing)({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.duration = exports.easing = void 0;\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nvar easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\n\nexports.easing = easing;\nvar duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nexports.duration = duration;\n\nfunction formatMs(milliseconds) {\n return \"\".concat(Math.round(milliseconds), \"ms\");\n}\n/**\n * @param {string|Array} props\n * @param {object} param\n * @param {string} param.prop\n * @param {number} param.duration\n * @param {string} param.easing\n * @param {number} param.delay\n */\n\n\nvar _default = {\n easing: easing,\n duration: duration,\n create: function create() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$duration = options.duration,\n durationOption = _options$duration === void 0 ? duration.standard : _options$duration,\n _options$easing = options.easing,\n easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 0 : _options$delay,\n other = (0, _objectWithoutProperties2.default)(options, [\"duration\", \"easing\", \"delay\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n var isString = function isString(value) {\n return typeof value === 'string';\n };\n\n var isNumber = function isNumber(value) {\n return !isNaN(parseFloat(value));\n };\n\n if (!isString(props) && !Array.isArray(props)) {\n console.error('Material-UI: Argument \"props\" must be a string or Array.');\n }\n\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(\"Material-UI: Argument \\\"duration\\\" must be a number or a string but found \".concat(durationOption, \".\"));\n }\n\n if (!isString(easingOption)) {\n console.error('Material-UI: Argument \"easing\" must be a string.');\n }\n\n if (!isNumber(delay) && !isString(delay)) {\n console.error('Material-UI: Argument \"delay\" must be a number or a string.');\n }\n\n if (Object.keys(other).length !== 0) {\n console.error(\"Material-UI: Unrecognized argument(s) [\".concat(Object.keys(other).join(','), \"].\"));\n }\n }\n\n return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {\n return \"\".concat(animatedProp, \" \").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), \" \").concat(easingOption, \" \").concat(typeof delay === 'string' ? delay : formatMs(delay));\n }).join(',');\n },\n getAutoHeightDuration: function getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n\n var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n\n return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);\n }\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nvar zIndex = {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nvar _default = zIndex;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"\n}), 'Check');\n\nexports.default = _default;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\n/**\n * Print the ioBroker welcome screen to the developer console.\n */\nfunction printPrompt() {\n const prompt = `\n██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ \n██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗\n██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝\n██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗\n██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║\n╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝\n`;\n\n console.log(prompt);\n console.log('Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters');\n console.log('Help us to create open source project with reactJS!');\n console.log('See you :)');\n}\n\nexport default printPrompt;","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\r\nimport React from 'react';\r\n\r\n/**\r\n * @template P Type of the properties object.\r\n * @template S Type of the internal state object.\r\n * @extends {React.Component}\r\n */\r\nclass Router extends React.Component {\r\n /**\r\n * @param {P} props The React properties of this component.\r\n */\r\n constructor(props) {\r\n super(props);\r\n this.onHashChangedBound = this.onHashChanged.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener('hashchange', this.onHashChangedBound);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('hashchange', this.onHashChangedBound);\r\n }\r\n\r\n onHashChanged() {\r\n // override this function\r\n }\r\n\r\n /**\r\n * Gets the location object.\r\n * @returns {{ tab: string; dialog: string; id: string; arg: string; }}\r\n */\r\n static getLocation() {\r\n let hash = window.location.hash;\r\n hash = hash.replace(/^#/, '');\r\n const parts = hash.split('/').map(item => {\r\n try {\r\n return item ? decodeURIComponent(item) : ''\r\n } catch (e) {\r\n console.error('Router: Cannot decode ' + item);\r\n return item || '';\r\n }\r\n });\r\n // #tabName/dialogName/deviceId\r\n return {\r\n tab: parts[0] || '',\r\n dialog: parts[1] || '',\r\n id: parts[2] || '',\r\n arg: parts[3] || ''\r\n };\r\n }\r\n\r\n /**\r\n * Navigate to a new location. Any parameters that are not set will be taken from the current location.\r\n * @param {string | undefined} [tab]\r\n * @param {string | undefined} [dialog]\r\n * @param {string | undefined} [id]\r\n * @param {string | undefined} [arg]\r\n */\r\n static doNavigate(tab, dialog, id, arg) {\r\n let hash = '';\r\n const location = Router.getLocation();\r\n if (arg !== undefined && !id) {\r\n id = location.id;\r\n }\r\n if (id && !dialog) {\r\n dialog = location.dialog;\r\n }\r\n if (dialog && !tab) {\r\n tab = location.tab;\r\n } else\r\n if (tab === null) {\r\n tab = location.tab;\r\n }\r\n\r\n if (tab) {\r\n hash = '#' + tab;\r\n if (dialog) {\r\n hash += '/' + dialog;\r\n\r\n if (id) {\r\n hash += '/' + id;\r\n if (arg !== undefined) {\r\n hash += '/' + arg;\r\n }\r\n }\r\n }\r\n }\r\n if (window.location.hash !== hash) {\r\n window.location.hash = hash;\r\n }\r\n }\r\n}\r\n\r\nexport default Router;","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport Fab from '@material-ui/core/Fab';\nimport PropTypes from 'prop-types';\n\nimport Toolbar from '@material-ui/core/Toolbar';\n\nimport I18n from '../i18n';\n\nimport IconSave from '@material-ui/icons/Save';\nimport IconClose from '@material-ui/icons/Close';\n\nconst styles = theme => ({\n buttonIcon: {\n marginRight: 8\n },\n});\n\n/**\n * @typedef {object} LogoProps\n * @property {boolean} noTextOnButtons Are the buttons without text\n * @property {any} theme Theme object (from this.state.theme)\n * @property {boolean} isIFrame bottom position 0 or 38 for iFrame\n * @property {function} onSave on Save handler\n * @property {function} onClose on Close handler\n *\n * @extends {React.Component}\n */\nclass SaveCloseButtons extends React.Component {\n constructor(props) {\n super(props);\n try {\n this.isIFrame = !props.newReact && window.self !== window.top;\n } catch (e) {\n this.isIFrame = !props.newReact;\n }\n }\n\n render() {\n const noTextOnButtons = this.props.noTextOnButtons;\n const buttonStyle = {\n borderRadius: this.props.theme.saveToolbar.button.borderRadius || 3,\n height: this.props.theme.saveToolbar.button.height || 32,\n };\n\n const style = {\n bottom: this.isIFrame ? 38 : 0,\n left: this.props.paddingLeft || 0,\n right: 0,\n position: 'absolute',\n background: this.props.theme.saveToolbar.background\n };\n if (this.props.dense) {\n style.minHeight = 48;\n }\n\n if (this.props.error) {\n buttonStyle.border = '1px solid red';\n }\n\n return \n this.props.onSave(false)}\n style={buttonStyle}\n >\n {!noTextOnButtons && I18n.t('ra_Save')}\n \n this.props.onSave(true)}\n style={Object.assign({}, buttonStyle, {marginLeft: 10})}>\n \n {!noTextOnButtons ? I18n.t('ra_Save and close') : '+'}\n {noTextOnButtons && }\n \n
\n this.props.onClose()} style={buttonStyle}>\n {!noTextOnButtons && I18n.t('ra_Close')}\n \n ;\n }\n}\n\nSaveCloseButtons.propTypes = {\n dense: PropTypes.bool,\n paddingLeft: PropTypes.number,\n noTextOnButtons: PropTypes.bool,\n theme: PropTypes.object,\n isIFrame: PropTypes.bool,\n changed: PropTypes.bool.isRequired,\n error: PropTypes.bool,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n newReact: PropTypes.bool,\n};\n\n/** @type {typeof SaveCloseButtons} */\nconst _export = withStyles(styles)(SaveCloseButtons);\nexport default _export;","/** @license React v17.0.2\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"object-assign\");var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z\"\n}), 'SettingsApplications');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"\n}), 'Photo');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm3.61 6.34c1.07 0 1.93.86 1.93 1.93 0 1.07-.86 1.93-1.93 1.93-1.07 0-1.93-.86-1.93-1.93-.01-1.07.86-1.93 1.93-1.93zm-6-1.58c1.3 0 2.36 1.06 2.36 2.36 0 1.3-1.06 2.36-2.36 2.36s-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36zm0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68zM11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09z\"\n}), 'SupervisedUserCircle');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'PersonOutlined');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.2 5.9l.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7zm-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1l.8-.8zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM8 18H6v-2h2v2zm3.5 0h-2v-2h2v2zm3.5 0h-2v-2h2v2z\"\n}), 'Router');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z\"\n}), 'Wifi');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\"\n}), 'Info');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z\"\n}), 'Description');\n\nexports.default = _default;","import React from 'react';\nimport PropTypes from 'prop-types';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nconst IconAlias = props => {\n return props.onClick && props.onClick(e)} viewBox=\"0 0 512 512\" width={props.width || 20} height={props.height || props.width || 20} xmlns=\"http://www.w3.org/2000/svg\" className={ props.className }>\n \n ;\n}\n\nIconAlias.propTypes = {\n onClick: PropTypes.func,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\n\nexport default IconAlias;","var unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nmodule.exports = _createForOfIteratorHelper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",null,null,"ace.define(\"ace/split\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/editor\",\"ace/virtual_renderer\",\"ace/edit_session\"], function(require, exports, module) {\n\"use strict\";\n\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\nvar Editor = require(\"./editor\").Editor;\nvar Renderer = require(\"./virtual_renderer\").VirtualRenderer;\nvar EditSession = require(\"./edit_session\").EditSession;\n\n\nvar Split = function(container, theme, splits) {\n this.BELOW = 1;\n this.BESIDE = 0;\n\n this.$container = container;\n this.$theme = theme;\n this.$splits = 0;\n this.$editorCSS = \"\";\n this.$editors = [];\n this.$orientation = this.BESIDE;\n\n this.setSplits(splits || 1);\n this.$cEditor = this.$editors[0];\n\n\n this.on(\"focus\", function(editor) {\n this.$cEditor = editor;\n }.bind(this));\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$createEditor = function() {\n var el = document.createElement(\"div\");\n el.className = this.$editorCSS;\n el.style.cssText = \"position: absolute; top:0px; bottom:0px\";\n this.$container.appendChild(el);\n var editor = new Editor(new Renderer(el, this.$theme));\n\n editor.on(\"focus\", function() {\n this._emit(\"focus\", editor);\n }.bind(this));\n\n this.$editors.push(editor);\n editor.setFontSize(this.$fontSize);\n return editor;\n };\n\n this.setSplits = function(splits) {\n var editor;\n if (splits < 1) {\n throw \"The number of splits have to be > 0!\";\n }\n\n if (splits == this.$splits) {\n return;\n } else if (splits > this.$splits) {\n while (this.$splits < this.$editors.length && this.$splits < splits) {\n editor = this.$editors[this.$splits];\n this.$container.appendChild(editor.container);\n editor.setFontSize(this.$fontSize);\n this.$splits ++;\n }\n while (this.$splits < splits) {\n this.$createEditor();\n this.$splits ++;\n }\n } else {\n while (this.$splits > splits) {\n editor = this.$editors[this.$splits - 1];\n this.$container.removeChild(editor.container);\n this.$splits --;\n }\n }\n this.resize();\n };\n this.getSplits = function() {\n return this.$splits;\n };\n this.getEditor = function(idx) {\n return this.$editors[idx];\n };\n this.getCurrentEditor = function() {\n return this.$cEditor;\n };\n this.focus = function() {\n this.$cEditor.focus();\n };\n this.blur = function() {\n this.$cEditor.blur();\n };\n this.setTheme = function(theme) {\n this.$editors.forEach(function(editor) {\n editor.setTheme(theme);\n });\n };\n this.setKeyboardHandler = function(keybinding) {\n this.$editors.forEach(function(editor) {\n editor.setKeyboardHandler(keybinding);\n });\n };\n this.forEach = function(callback, scope) {\n this.$editors.forEach(callback, scope);\n };\n\n\n this.$fontSize = \"\";\n this.setFontSize = function(size) {\n this.$fontSize = size;\n this.forEach(function(editor) {\n editor.setFontSize(size);\n });\n };\n\n this.$cloneSession = function(session) {\n var s = new EditSession(session.getDocument(), session.getMode());\n\n var undoManager = session.getUndoManager();\n s.setUndoManager(undoManager);\n s.setTabSize(session.getTabSize());\n s.setUseSoftTabs(session.getUseSoftTabs());\n s.setOverwrite(session.getOverwrite());\n s.setBreakpoints(session.getBreakpoints());\n s.setUseWrapMode(session.getUseWrapMode());\n s.setUseWorker(session.getUseWorker());\n s.setWrapLimitRange(session.$wrapLimitRange.min,\n session.$wrapLimitRange.max);\n s.$foldData = session.$cloneFoldData();\n\n return s;\n };\n this.setSession = function(session, idx) {\n var editor;\n if (idx == null) {\n editor = this.$cEditor;\n } else {\n editor = this.$editors[idx];\n }\n var isUsed = this.$editors.some(function(editor) {\n return editor.session === session;\n });\n\n if (isUsed) {\n session = this.$cloneSession(session);\n }\n editor.setSession(session);\n return session;\n };\n this.getOrientation = function() {\n return this.$orientation;\n };\n this.setOrientation = function(orientation) {\n if (this.$orientation == orientation) {\n return;\n }\n this.$orientation = orientation;\n this.resize();\n };\n this.resize = function() {\n var width = this.$container.clientWidth;\n var height = this.$container.clientHeight;\n var editor;\n\n if (this.$orientation == this.BESIDE) {\n var editorWidth = width / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = editorWidth + \"px\";\n editor.container.style.top = \"0px\";\n editor.container.style.left = i * editorWidth + \"px\";\n editor.container.style.height = height + \"px\";\n editor.resize();\n }\n } else {\n var editorHeight = height / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = width + \"px\";\n editor.container.style.top = i * editorHeight + \"px\";\n editor.container.style.left = \"0px\";\n editor.container.style.height = editorHeight + \"px\";\n editor.resize();\n }\n }\n };\n\n}).call(Split.prototype);\n\nexports.Split = Split;\n});\n\nace.define(\"ace/ext/split\",[\"require\",\"exports\",\"module\",\"ace/split\"], function(require, exports, module) {\n\"use strict\";\nmodule.exports = require(\"../split\");\n\n}); (function() {\n ace.require([\"ace/ext/split\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * Diff Match and Patch\n * Copyright 2018 The diff-match-patch Authors.\n * https://github.com/google/diff-match-patch\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Computes the difference between two texts to create a patch.\n * Applies the patch onto another text, allowing for errors.\n * @author fraser@google.com (Neil Fraser)\n */\n\n/**\n * Class containing the diff, match and patch methods.\n * @constructor\n */\nvar diff_match_patch = function() {\n\n // Defaults.\n // Redefine these in your program to override the defaults.\n\n // Number of seconds to map a diff before giving up (0 for infinity).\n this.Diff_Timeout = 1.0;\n // Cost of an empty edit operation in terms of edit characters.\n this.Diff_EditCost = 4;\n // At what point is no match declared (0.0 = perfection, 1.0 = very loose).\n this.Match_Threshold = 0.5;\n // How far to search for a match (0 = exact location, 1000+ = broad match).\n // A match this many characters away from the expected location will add\n // 1.0 to the score (0.0 is a perfect match).\n this.Match_Distance = 1000;\n // When deleting a large block of text (over ~64 characters), how close do\n // the contents have to be to match the expected contents. (0.0 = perfection,\n // 1.0 = very loose). Note that Match_Threshold controls how closely the\n // end points of a delete need to match.\n this.Patch_DeleteThreshold = 0.5;\n // Chunk size for context length.\n this.Patch_Margin = 4;\n\n // The number of bits in an int.\n this.Match_MaxBits = 32;\n};\n\n\n// DIFF FUNCTIONS\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Class representing one diff tuple.\n * ~Attempts to look like a two-element array (which is what this used to be).~\n * Constructor returns an actual two-element array, to allow destructing @JackuB\n * See https://github.com/JackuB/diff-match-patch/issues/14 for details\n * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.\n * @param {string} text Text to be deleted, inserted, or retained.\n * @constructor\n */\ndiff_match_patch.Diff = function(op, text) {\n return [op, text];\n};\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean=} opt_checklines Optional speedup flag. If present and false,\n * then don't run a line-level diff first to identify the changed areas.\n * Defaults to true, which does a faster, slightly less optimal diff.\n * @param {number=} opt_deadline Optional time when the diff should be complete\n * by. Used internally for recursive calls. Users should set DiffTimeout\n * instead.\n * @return {!Array.} Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,\n opt_deadline) {\n // Set a deadline by which time the diff must be complete.\n if (typeof opt_deadline == 'undefined') {\n if (this.Diff_Timeout <= 0) {\n opt_deadline = Number.MAX_VALUE;\n } else {\n opt_deadline = (new Date).getTime() + this.Diff_Timeout * 1000;\n }\n }\n var deadline = opt_deadline;\n\n // Check for null inputs.\n if (text1 == null || text2 == null) {\n throw new Error('Null input. (diff_main)');\n }\n\n // Check for equality (speedup).\n if (text1 == text2) {\n if (text1) {\n return [new diff_match_patch.Diff(DIFF_EQUAL, text1)];\n }\n return [];\n }\n\n if (typeof opt_checklines == 'undefined') {\n opt_checklines = true;\n }\n var checklines = opt_checklines;\n\n // Trim off common prefix (speedup).\n var commonlength = this.diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = this.diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = this.diff_compute_(text1, text2, checklines, deadline);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, commonprefix));\n }\n if (commonsuffix) {\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, commonsuffix));\n }\n this.diff_cleanupMerge(diffs);\n return diffs;\n};\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean} checklines Speedup flag. If false, then don't run a\n * line-level diff first to identify the changed areas.\n * If true, then run a faster, slightly less optimal diff.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,\n deadline) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [new diff_match_patch.Diff(DIFF_DELETE, text1)];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i != -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [new diff_match_patch.Diff(DIFF_INSERT, longtext.substring(0, i)),\n new diff_match_patch.Diff(DIFF_EQUAL, shorttext),\n new diff_match_patch.Diff(DIFF_INSERT,\n longtext.substring(i + shorttext.length))];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length == 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n // Check to see if the problem can be split in two.\n var hm = this.diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = this.diff_main(text1_a, text2_a, checklines, deadline);\n var diffs_b = this.diff_main(text1_b, text2_b, checklines, deadline);\n // Merge the results.\n return diffs_a.concat([new diff_match_patch.Diff(DIFF_EQUAL, mid_common)],\n diffs_b);\n }\n\n if (checklines && text1.length > 100 && text2.length > 100) {\n return this.diff_lineMode_(text1, text2, deadline);\n }\n\n return this.diff_bisect_(text1, text2, deadline);\n};\n\n\n/**\n * Do a quick line-level diff on both strings, then rediff the parts for\n * greater accuracy.\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {\n // Scan the text on a line-by-line basis first.\n var a = this.diff_linesToChars_(text1, text2);\n text1 = a.chars1;\n text2 = a.chars2;\n var linearray = a.lineArray;\n\n var diffs = this.diff_main(text1, text2, false, deadline);\n\n // Convert the diff back to original text.\n this.diff_charsToLines_(diffs, linearray);\n // Eliminate freak matches (e.g. blank lines)\n this.diff_cleanupSemantic(diffs);\n\n // Rediff any replacement blocks, this time character-by-character.\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete >= 1 && count_insert >= 1) {\n // Delete the offending records and add the merged ones.\n diffs.splice(pointer - count_delete - count_insert,\n count_delete + count_insert);\n pointer = pointer - count_delete - count_insert;\n var subDiff =\n this.diff_main(text_delete, text_insert, false, deadline);\n for (var j = subDiff.length - 1; j >= 0; j--) {\n diffs.splice(pointer, 0, subDiff[j]);\n }\n pointer = pointer + subDiff.length;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n pointer++;\n }\n diffs.pop(); // Remove the dummy entry at the end.\n\n return diffs;\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisect_ = function(text1, text2, deadline) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = (delta % 2 != 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Bail out if deadline is reached.\n if ((new Date()).getTime() > deadline) {\n break;\n }\n\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) == text2.charAt(y1)) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ==\n text2.charAt(text2_length - y2 - 1)) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisectSplit_ = function(text1, text2, x, y,\n deadline) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = this.diff_main(text1a, text2a, false, deadline);\n var diffsb = this.diff_main(text1b, text2b, false, deadline);\n\n return diffs.concat(diffsb);\n};\n\n\n/**\n * Split two texts into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {{chars1: string, chars2: string, lineArray: !Array.}}\n * An object containing the encoded text1, the encoded text2 and\n * the array of unique strings.\n * The zeroth element of the array of unique strings is intentionally blank.\n * @private\n */\ndiff_match_patch.prototype.diff_linesToChars_ = function(text1, text2) {\n var lineArray = []; // e.g. lineArray[4] == 'Hello\\n'\n var lineHash = {}; // e.g. lineHash['Hello\\n'] == 4\n\n // '\\x00' is a valid character, but various debuggers don't like it.\n // So we'll insert a junk entry to avoid generating a null character.\n lineArray[0] = '';\n\n /**\n * Split a text into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * Modifies linearray and linehash through being a closure.\n * @param {string} text String to encode.\n * @return {string} Encoded string.\n * @private\n */\n function diff_linesToCharsMunge_(text) {\n var chars = '';\n // Walk the text, pulling out a substring for each line.\n // text.split('\\n') would would temporarily double our memory footprint.\n // Modifying text would create many large strings to garbage collect.\n var lineStart = 0;\n var lineEnd = -1;\n // Keeping our own length variable is faster than looking it up.\n var lineArrayLength = lineArray.length;\n while (lineEnd < text.length - 1) {\n lineEnd = text.indexOf('\\n', lineStart);\n if (lineEnd == -1) {\n lineEnd = text.length - 1;\n }\n var line = text.substring(lineStart, lineEnd + 1);\n\n if (lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) :\n (lineHash[line] !== undefined)) {\n chars += String.fromCharCode(lineHash[line]);\n } else {\n if (lineArrayLength == maxLines) {\n // Bail out at 65535 because\n // String.fromCharCode(65536) == String.fromCharCode(0)\n line = text.substring(lineStart);\n lineEnd = text.length;\n }\n chars += String.fromCharCode(lineArrayLength);\n lineHash[line] = lineArrayLength;\n lineArray[lineArrayLength++] = line;\n }\n lineStart = lineEnd + 1;\n }\n return chars;\n }\n // Allocate 2/3rds of the space for text1, the rest for text2.\n var maxLines = 40000;\n var chars1 = diff_linesToCharsMunge_(text1);\n maxLines = 65535;\n var chars2 = diff_linesToCharsMunge_(text2);\n return {chars1: chars1, chars2: chars2, lineArray: lineArray};\n};\n\n\n/**\n * Rehydrate the text in a diff from a string of line hashes to real lines of\n * text.\n * @param {!Array.} diffs Array of diff tuples.\n * @param {!Array.} lineArray Array of unique strings.\n * @private\n */\ndiff_match_patch.prototype.diff_charsToLines_ = function(diffs, lineArray) {\n for (var i = 0; i < diffs.length; i++) {\n var chars = diffs[i][1];\n var text = [];\n for (var j = 0; j < chars.length; j++) {\n text[j] = lineArray[chars.charCodeAt(j)];\n }\n diffs[i][1] = text.join('');\n }\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\ndiff_match_patch.prototype.diff_commonPrefix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\ndiff_match_patch.prototype.diff_commonSuffix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 ||\n text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\ndiff_match_patch.prototype.diff_commonOverlap_ = function(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: https://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (found == 0 || text1.substring(text_length - length) ==\n text2.substring(0, length)) {\n best = length;\n length++;\n }\n }\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n * @private\n */\ndiff_match_patch.prototype.diff_halfMatch_ = function(text1, text2) {\n if (this.Diff_Timeout <= 0) {\n // Don't risk returning a non-optimal diff if we have unlimited time.\n return null;\n }\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = '';\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n var prefixLength = dmp.diff_commonPrefix(longtext.substring(i),\n shorttext.substring(j));\n var suffixLength = dmp.diff_commonSuffix(longtext.substring(0, i),\n shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 2));\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = diffs[pointer][1];\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (lastEquality && (lastEquality.length <=\n Math.max(length_insertions1, length_deletions1)) &&\n (lastEquality.length <= Math.max(length_insertions2,\n length_deletions2))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n this.diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = this.diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = this.diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n insertion.substring(0, overlap_length1)));\n diffs[pointer - 1][1] =\n deletion.substring(0, deletion.length - overlap_length1);\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n deletion.substring(0, overlap_length2)));\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] =\n insertion.substring(0, insertion.length - overlap_length2);\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] =\n deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n};\n\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemanticLossless = function(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(diff_match_patch.nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(diff_match_patch.nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 &&\n char1.match(diff_match_patch.whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 &&\n char2.match(diff_match_patch.whitespaceRegex_);\n var lineBreak1 = whitespace1 &&\n char1.match(diff_match_patch.linebreakRegex_);\n var lineBreak2 = whitespace2 &&\n char2.match(diff_match_patch.linebreakRegex_);\n var blankLine1 = lineBreak1 &&\n one.match(diff_match_patch.blanklineEndRegex_);\n var blankLine2 = lineBreak2 &&\n two.match(diff_match_patch.blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = this.diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n};\n\n// Define some regex patterns for matching boundaries.\ndiff_match_patch.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\ndiff_match_patch.whitespaceRegex_ = /\\s/;\ndiff_match_patch.linebreakRegex_ = /[\\r\\n]/;\ndiff_match_patch.blanklineEndRegex_ = /\\n\\r?\\n$/;\ndiff_match_patch.blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Reduce the number of edits by eliminating operationally trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupEfficiency = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Is there an insertion operation before the last equality.\n var pre_ins = false;\n // Is there a deletion operation before the last equality.\n var pre_del = false;\n // Is there an insertion operation after the last equality.\n var post_ins = false;\n // Is there a deletion operation after the last equality.\n var post_del = false;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n if (diffs[pointer][1].length < this.Diff_EditCost &&\n (post_ins || post_del)) {\n // Candidate found.\n equalities[equalitiesLength++] = pointer;\n pre_ins = post_ins;\n pre_del = post_del;\n lastEquality = diffs[pointer][1];\n } else {\n // Not a candidate, and can never become one.\n equalitiesLength = 0;\n lastEquality = null;\n }\n post_ins = post_del = false;\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_DELETE) {\n post_del = true;\n } else {\n post_ins = true;\n }\n /*\n * Five types to be split:\n * ABXYCD\n * AXCD\n * ABXC\n * AXCD\n * ABXC\n */\n if (lastEquality && ((pre_ins && pre_del && post_ins && post_del) ||\n ((lastEquality.length < this.Diff_EditCost / 2) &&\n (pre_ins + pre_del + post_ins + post_del) == 3))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n equalitiesLength--; // Throw away the equality we just deleted;\n lastEquality = null;\n if (pre_ins && pre_del) {\n // No changes made which could affect previous entry, keep going.\n post_ins = post_del = true;\n equalitiesLength = 0;\n } else {\n equalitiesLength--; // Throw away the previous equality.\n pointer = equalitiesLength > 0 ?\n equalities[equalitiesLength - 1] : -1;\n post_ins = post_del = false;\n }\n changes = true;\n }\n }\n pointer++;\n }\n\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupMerge = function(diffs) {\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n var commonlength;\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete + count_insert > 1) {\n if (count_delete !== 0 && count_insert !== 0) {\n // Factor out any common prefixies.\n commonlength = this.diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if ((pointer - count_delete - count_insert) > 0 &&\n diffs[pointer - count_delete - count_insert - 1][0] ==\n DIFF_EQUAL) {\n diffs[pointer - count_delete - count_insert - 1][1] +=\n text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n text_insert.substring(0, commonlength)));\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixies.\n commonlength = this.diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] = text_insert.substring(text_insert.length -\n commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length -\n commonlength);\n text_delete = text_delete.substring(0, text_delete.length -\n commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n pointer -= count_delete + count_insert;\n diffs.splice(pointer, count_delete + count_insert);\n if (text_delete.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_DELETE, text_delete));\n pointer++;\n }\n if (text_insert.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_INSERT, text_insert));\n pointer++;\n }\n pointer++;\n } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * loc is a location in text1, compute and return the equivalent location in\n * text2.\n * e.g. 'The cat' vs 'The big cat', 1->1, 5->8\n * @param {!Array.} diffs Array of diff tuples.\n * @param {number} loc Location within text1.\n * @return {number} Location within text2.\n */\ndiff_match_patch.prototype.diff_xIndex = function(diffs, loc) {\n var chars1 = 0;\n var chars2 = 0;\n var last_chars1 = 0;\n var last_chars2 = 0;\n var x;\n for (x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) { // Equality or deletion.\n chars1 += diffs[x][1].length;\n }\n if (diffs[x][0] !== DIFF_DELETE) { // Equality or insertion.\n chars2 += diffs[x][1].length;\n }\n if (chars1 > loc) { // Overshot the location.\n break;\n }\n last_chars1 = chars1;\n last_chars2 = chars2;\n }\n // Was the location was deleted?\n if (diffs.length != x && diffs[x][0] === DIFF_DELETE) {\n return last_chars2;\n }\n // Add the remaining character length.\n return last_chars2 + (loc - last_chars1);\n};\n\n\n/**\n * Convert a diff array into a pretty HTML report.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} HTML representation.\n */\ndiff_match_patch.prototype.diff_prettyHtml = function(diffs) {\n var html = [];\n var pattern_amp = /&/g;\n var pattern_lt = //g;\n var pattern_para = /\\n/g;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0]; // Operation (insert, delete, equal)\n var data = diffs[x][1]; // Text of change.\n var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')\n .replace(pattern_gt, '>').replace(pattern_para, '¶
');\n switch (op) {\n case DIFF_INSERT:\n html[x] = '' + text + '';\n break;\n case DIFF_DELETE:\n html[x] = '' + text + '';\n break;\n case DIFF_EQUAL:\n html[x] = '' + text + '';\n break;\n }\n }\n return html.join('');\n};\n\n\n/**\n * Compute and return the source text (all equalities and deletions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Source text.\n */\ndiff_match_patch.prototype.diff_text1 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute and return the destination text (all equalities and insertions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Destination text.\n */\ndiff_match_patch.prototype.diff_text2 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_DELETE) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute the Levenshtein distance; the number of inserted, deleted or\n * substituted characters.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {number} Number of changes.\n */\ndiff_match_patch.prototype.diff_levenshtein = function(diffs) {\n var levenshtein = 0;\n var insertions = 0;\n var deletions = 0;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0];\n var data = diffs[x][1];\n switch (op) {\n case DIFF_INSERT:\n insertions += data.length;\n break;\n case DIFF_DELETE:\n deletions += data.length;\n break;\n case DIFF_EQUAL:\n // A deletion and an insertion is one substitution.\n levenshtein += Math.max(insertions, deletions);\n insertions = 0;\n deletions = 0;\n break;\n }\n }\n levenshtein += Math.max(insertions, deletions);\n return levenshtein;\n};\n\n\n/**\n * Crush the diff into an encoded string which describes the operations\n * required to transform text1 into text2.\n * E.g. =3\\t-2\\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'.\n * Operations are tab-separated. Inserted text is escaped using %xx notation.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Delta text.\n */\ndiff_match_patch.prototype.diff_toDelta = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n switch (diffs[x][0]) {\n case DIFF_INSERT:\n text[x] = '+' + encodeURI(diffs[x][1]);\n break;\n case DIFF_DELETE:\n text[x] = '-' + diffs[x][1].length;\n break;\n case DIFF_EQUAL:\n text[x] = '=' + diffs[x][1].length;\n break;\n }\n }\n return text.join('\\t').replace(/%20/g, ' ');\n};\n\n\n/**\n * Given the original text1, and an encoded string which describes the\n * operations required to transform text1 into text2, compute the full diff.\n * @param {string} text1 Source string for the diff.\n * @param {string} delta Delta text.\n * @return {!Array.} Array of diff tuples.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.diff_fromDelta = function(text1, delta) {\n var diffs = [];\n var diffsLength = 0; // Keeping our own length var is faster in JS.\n var pointer = 0; // Cursor in text1\n var tokens = delta.split(/\\t/g);\n for (var x = 0; x < tokens.length; x++) {\n // Each token begins with a one character parameter which specifies the\n // operation of this token (delete, insert, equality).\n var param = tokens[x].substring(1);\n switch (tokens[x].charAt(0)) {\n case '+':\n try {\n diffs[diffsLength++] =\n new diff_match_patch.Diff(DIFF_INSERT, decodeURI(param));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in diff_fromDelta: ' + param);\n }\n break;\n case '-':\n // Fall through.\n case '=':\n var n = parseInt(param, 10);\n if (isNaN(n) || n < 0) {\n throw new Error('Invalid number in diff_fromDelta: ' + param);\n }\n var text = text1.substring(pointer, pointer += n);\n if (tokens[x].charAt(0) == '=') {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_EQUAL, text);\n } else {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_DELETE, text);\n }\n break;\n default:\n // Blank tokens are ok (from a trailing \\t).\n // Anything else is an error.\n if (tokens[x]) {\n throw new Error('Invalid diff operation in diff_fromDelta: ' +\n tokens[x]);\n }\n }\n }\n if (pointer != text1.length) {\n throw new Error('Delta length (' + pointer +\n ') does not equal source text length (' + text1.length + ').');\n }\n return diffs;\n};\n\n\n// MATCH FUNCTIONS\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc'.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n */\ndiff_match_patch.prototype.match_main = function(text, pattern, loc) {\n // Check for null inputs.\n if (text == null || pattern == null || loc == null) {\n throw new Error('Null input. (match_main)');\n }\n\n loc = Math.max(0, Math.min(loc, text.length));\n if (text == pattern) {\n // Shortcut (potentially not guaranteed by the algorithm)\n return 0;\n } else if (!text.length) {\n // Nothing to match.\n return -1;\n } else if (text.substring(loc, loc + pattern.length) == pattern) {\n // Perfect match at the perfect spot! (Includes case of null pattern)\n return loc;\n } else {\n // Do a fuzzy compare.\n return this.match_bitap_(text, pattern, loc);\n }\n};\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc' using the\n * Bitap algorithm.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n * @private\n */\ndiff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {\n if (pattern.length > this.Match_MaxBits) {\n throw new Error('Pattern too long for this browser.');\n }\n\n // Initialise the alphabet.\n var s = this.match_alphabet_(pattern);\n\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Compute and return the score for a match with e errors and x location.\n * Accesses loc and pattern through being a closure.\n * @param {number} e Number of errors in match.\n * @param {number} x Location of match.\n * @return {number} Overall score for match (0.0 = good, 1.0 = bad).\n * @private\n */\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length;\n var proximity = Math.abs(loc - x);\n if (!dmp.Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy;\n }\n return accuracy + (proximity / dmp.Match_Distance);\n }\n\n // Highest score beyond which we give up.\n var score_threshold = this.Match_Threshold;\n // Is there a nearby exact match? (speedup)\n var best_loc = text.indexOf(pattern, loc);\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length);\n if (best_loc != -1) {\n score_threshold =\n Math.min(match_bitapScore_(0, best_loc), score_threshold);\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1);\n best_loc = -1;\n\n var bin_min, bin_mid;\n var bin_max = pattern.length + text.length;\n var last_rd;\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0;\n bin_mid = bin_max;\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid;\n } else {\n bin_max = bin_mid;\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid;\n var start = Math.max(1, loc - bin_mid + 1);\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length;\n\n var rd = Array(finish + 2);\n rd[finish + 1] = (1 << d) - 1;\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)];\n if (d === 0) { // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;\n } else { // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) |\n (((last_rd[j + 1] | last_rd[j]) << 1) | 1) |\n last_rd[j + 1];\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1);\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score;\n best_loc = j - 1;\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc);\n } else {\n // Already passed loc, downhill from here on in.\n break;\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break;\n }\n last_rd = rd;\n }\n return best_loc;\n};\n\n\n/**\n * Initialise the alphabet for the Bitap algorithm.\n * @param {string} pattern The text to encode.\n * @return {!Object} Hash of character locations.\n * @private\n */\ndiff_match_patch.prototype.match_alphabet_ = function(pattern) {\n var s = {};\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] = 0;\n }\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] |= 1 << (pattern.length - i - 1);\n }\n return s;\n};\n\n\n// PATCH FUNCTIONS\n\n\n/**\n * Increase the context until it is unique,\n * but don't let the pattern expand beyond Match_MaxBits.\n * @param {!diff_match_patch.patch_obj} patch The patch to grow.\n * @param {string} text Source text.\n * @private\n */\ndiff_match_patch.prototype.patch_addContext_ = function(patch, text) {\n if (text.length == 0) {\n return;\n }\n if (patch.start2 === null) {\n throw Error('patch not initialized');\n }\n var pattern = text.substring(patch.start2, patch.start2 + patch.length1);\n var padding = 0;\n\n // Look for the first and last matches of pattern in text. If two different\n // matches are found, increase the pattern length.\n while (text.indexOf(pattern) != text.lastIndexOf(pattern) &&\n pattern.length < this.Match_MaxBits - this.Patch_Margin -\n this.Patch_Margin) {\n padding += this.Patch_Margin;\n pattern = text.substring(patch.start2 - padding,\n patch.start2 + patch.length1 + padding);\n }\n // Add one chunk for good luck.\n padding += this.Patch_Margin;\n\n // Add the prefix.\n var prefix = text.substring(patch.start2 - padding, patch.start2);\n if (prefix) {\n patch.diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, prefix));\n }\n // Add the suffix.\n var suffix = text.substring(patch.start2 + patch.length1,\n patch.start2 + patch.length1 + padding);\n if (suffix) {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, suffix));\n }\n\n // Roll back the start points.\n patch.start1 -= prefix.length;\n patch.start2 -= prefix.length;\n // Extend the lengths.\n patch.length1 += prefix.length + suffix.length;\n patch.length2 += prefix.length + suffix.length;\n};\n\n\n/**\n * Compute a list of patches to turn text1 into text2.\n * Use diffs if provided, otherwise compute it ourselves.\n * There are four ways to call this function, depending on what data is\n * available to the caller:\n * Method 1:\n * a = text1, b = text2\n * Method 2:\n * a = diffs\n * Method 3 (optimal):\n * a = text1, b = diffs\n * Method 4 (deprecated, use method 3):\n * a = text1, b = text2, c = diffs\n *\n * @param {string|!Array.} a text1 (methods 1,3,4) or\n * Array of diff tuples for text1 to text2 (method 2).\n * @param {string|!Array.=} opt_b text2 (methods 1,4) or\n * Array of diff tuples for text1 to text2 (method 3) or undefined (method 2).\n * @param {string|!Array.=} opt_c Array of diff tuples\n * for text1 to text2 (method 4) or undefined (methods 1,2,3).\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_make = function(a, opt_b, opt_c) {\n var text1, diffs;\n if (typeof a == 'string' && typeof opt_b == 'string' &&\n typeof opt_c == 'undefined') {\n // Method 1: text1, text2\n // Compute diffs from text1 and text2.\n text1 = /** @type {string} */(a);\n diffs = this.diff_main(text1, /** @type {string} */(opt_b), true);\n if (diffs.length > 2) {\n this.diff_cleanupSemantic(diffs);\n this.diff_cleanupEfficiency(diffs);\n }\n } else if (a && typeof a == 'object' && typeof opt_b == 'undefined' &&\n typeof opt_c == 'undefined') {\n // Method 2: diffs\n // Compute text1 from diffs.\n diffs = /** @type {!Array.} */(a);\n text1 = this.diff_text1(diffs);\n } else if (typeof a == 'string' && opt_b && typeof opt_b == 'object' &&\n typeof opt_c == 'undefined') {\n // Method 3: text1, diffs\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_b);\n } else if (typeof a == 'string' && typeof opt_b == 'string' &&\n opt_c && typeof opt_c == 'object') {\n // Method 4: text1, text2, diffs\n // text2 is not used.\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_c);\n } else {\n throw new Error('Unknown call format to patch_make.');\n }\n\n if (diffs.length === 0) {\n return []; // Get rid of the null case.\n }\n var patches = [];\n var patch = new diff_match_patch.patch_obj();\n var patchDiffLength = 0; // Keeping our own length var is faster in JS.\n var char_count1 = 0; // Number of characters into the text1 string.\n var char_count2 = 0; // Number of characters into the text2 string.\n // Start with text1 (prepatch_text) and apply the diffs until we arrive at\n // text2 (postpatch_text). We recreate the patches one by one to determine\n // context info.\n var prepatch_text = text1;\n var postpatch_text = text1;\n for (var x = 0; x < diffs.length; x++) {\n var diff_type = diffs[x][0];\n var diff_text = diffs[x][1];\n\n if (!patchDiffLength && diff_type !== DIFF_EQUAL) {\n // A new patch starts here.\n patch.start1 = char_count1;\n patch.start2 = char_count2;\n }\n\n switch (diff_type) {\n case DIFF_INSERT:\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length2 += diff_text.length;\n postpatch_text = postpatch_text.substring(0, char_count2) + diff_text +\n postpatch_text.substring(char_count2);\n break;\n case DIFF_DELETE:\n patch.length1 += diff_text.length;\n patch.diffs[patchDiffLength++] = diffs[x];\n postpatch_text = postpatch_text.substring(0, char_count2) +\n postpatch_text.substring(char_count2 +\n diff_text.length);\n break;\n case DIFF_EQUAL:\n if (diff_text.length <= 2 * this.Patch_Margin &&\n patchDiffLength && diffs.length != x + 1) {\n // Small equality inside a patch.\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length1 += diff_text.length;\n patch.length2 += diff_text.length;\n } else if (diff_text.length >= 2 * this.Patch_Margin) {\n // Time for a new patch.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n patch = new diff_match_patch.patch_obj();\n patchDiffLength = 0;\n // Unlike Unidiff, our patch lists have a rolling context.\n // https://github.com/google/diff-match-patch/wiki/Unidiff\n // Update prepatch text & pos to reflect the application of the\n // just completed patch.\n prepatch_text = postpatch_text;\n char_count1 = char_count2;\n }\n }\n break;\n }\n\n // Update the current character count.\n if (diff_type !== DIFF_INSERT) {\n char_count1 += diff_text.length;\n }\n if (diff_type !== DIFF_DELETE) {\n char_count2 += diff_text.length;\n }\n }\n // Pick up the leftover patch if not empty.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n }\n\n return patches;\n};\n\n\n/**\n * Given an array of patches, return another array that is identical.\n * @param {!Array.} patches Array of Patch objects.\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_deepCopy = function(patches) {\n // Making deep copies is hard in JavaScript.\n var patchesCopy = [];\n for (var x = 0; x < patches.length; x++) {\n var patch = patches[x];\n var patchCopy = new diff_match_patch.patch_obj();\n patchCopy.diffs = [];\n for (var y = 0; y < patch.diffs.length; y++) {\n patchCopy.diffs[y] =\n new diff_match_patch.Diff(patch.diffs[y][0], patch.diffs[y][1]);\n }\n patchCopy.start1 = patch.start1;\n patchCopy.start2 = patch.start2;\n patchCopy.length1 = patch.length1;\n patchCopy.length2 = patch.length2;\n patchesCopy[x] = patchCopy;\n }\n return patchesCopy;\n};\n\n\n/**\n * Merge a set of patches onto the text. Return a patched text, as well\n * as a list of true/false values indicating which patches were applied.\n * @param {!Array.} patches Array of Patch objects.\n * @param {string} text Old text.\n * @return {!Array.>} Two element Array, containing the\n * new text and an array of boolean values.\n */\ndiff_match_patch.prototype.patch_apply = function(patches, text) {\n if (patches.length == 0) {\n return [text, []];\n }\n\n // Deep copy the patches so that no changes are made to originals.\n patches = this.patch_deepCopy(patches);\n\n var nullPadding = this.patch_addPadding(patches);\n text = nullPadding + text + nullPadding;\n\n this.patch_splitMax(patches);\n // delta keeps track of the offset between the expected and actual location\n // of the previous patch. If there are patches expected at positions 10 and\n // 20, but the first patch was found at 12, delta is 2 and the second patch\n // has an effective expected position of 22.\n var delta = 0;\n var results = [];\n for (var x = 0; x < patches.length; x++) {\n var expected_loc = patches[x].start2 + delta;\n var text1 = this.diff_text1(patches[x].diffs);\n var start_loc;\n var end_loc = -1;\n if (text1.length > this.Match_MaxBits) {\n // patch_splitMax will only provide an oversized pattern in the case of\n // a monster delete.\n start_loc = this.match_main(text, text1.substring(0, this.Match_MaxBits),\n expected_loc);\n if (start_loc != -1) {\n end_loc = this.match_main(text,\n text1.substring(text1.length - this.Match_MaxBits),\n expected_loc + text1.length - this.Match_MaxBits);\n if (end_loc == -1 || start_loc >= end_loc) {\n // Can't find valid trailing context. Drop this patch.\n start_loc = -1;\n }\n }\n } else {\n start_loc = this.match_main(text, text1, expected_loc);\n }\n if (start_loc == -1) {\n // No match found. :(\n results[x] = false;\n // Subtract the delta for this failed patch from subsequent patches.\n delta -= patches[x].length2 - patches[x].length1;\n } else {\n // Found a match. :)\n results[x] = true;\n delta = start_loc - expected_loc;\n var text2;\n if (end_loc == -1) {\n text2 = text.substring(start_loc, start_loc + text1.length);\n } else {\n text2 = text.substring(start_loc, end_loc + this.Match_MaxBits);\n }\n if (text1 == text2) {\n // Perfect match, just shove the replacement text in.\n text = text.substring(0, start_loc) +\n this.diff_text2(patches[x].diffs) +\n text.substring(start_loc + text1.length);\n } else {\n // Imperfect match. Run a diff to get a framework of equivalent\n // indices.\n var diffs = this.diff_main(text1, text2, false);\n if (text1.length > this.Match_MaxBits &&\n this.diff_levenshtein(diffs) / text1.length >\n this.Patch_DeleteThreshold) {\n // The end points match, but the content is unacceptably bad.\n results[x] = false;\n } else {\n this.diff_cleanupSemanticLossless(diffs);\n var index1 = 0;\n var index2;\n for (var y = 0; y < patches[x].diffs.length; y++) {\n var mod = patches[x].diffs[y];\n if (mod[0] !== DIFF_EQUAL) {\n index2 = this.diff_xIndex(diffs, index1);\n }\n if (mod[0] === DIFF_INSERT) { // Insertion\n text = text.substring(0, start_loc + index2) + mod[1] +\n text.substring(start_loc + index2);\n } else if (mod[0] === DIFF_DELETE) { // Deletion\n text = text.substring(0, start_loc + index2) +\n text.substring(start_loc + this.diff_xIndex(diffs,\n index1 + mod[1].length));\n }\n if (mod[0] !== DIFF_DELETE) {\n index1 += mod[1].length;\n }\n }\n }\n }\n }\n }\n // Strip the padding off.\n text = text.substring(nullPadding.length, text.length - nullPadding.length);\n return [text, results];\n};\n\n\n/**\n * Add some padding on text start and end so that edges can match something.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} The padding string added to each side.\n */\ndiff_match_patch.prototype.patch_addPadding = function(patches) {\n var paddingLength = this.Patch_Margin;\n var nullPadding = '';\n for (var x = 1; x <= paddingLength; x++) {\n nullPadding += String.fromCharCode(x);\n }\n\n // Bump all the patches forward.\n for (var x = 0; x < patches.length; x++) {\n patches[x].start1 += paddingLength;\n patches[x].start2 += paddingLength;\n }\n\n // Add some padding on start of first diff.\n var patch = patches[0];\n var diffs = patch.diffs;\n if (diffs.length == 0 || diffs[0][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.start1 -= paddingLength; // Should be 0.\n patch.start2 -= paddingLength; // Should be 0.\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[0][1].length) {\n // Grow first equality.\n var extraLength = paddingLength - diffs[0][1].length;\n diffs[0][1] = nullPadding.substring(diffs[0][1].length) + diffs[0][1];\n patch.start1 -= extraLength;\n patch.start2 -= extraLength;\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n // Add some padding on end of last diff.\n patch = patches[patches.length - 1];\n diffs = patch.diffs;\n if (diffs.length == 0 || diffs[diffs.length - 1][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[diffs.length - 1][1].length) {\n // Grow last equality.\n var extraLength = paddingLength - diffs[diffs.length - 1][1].length;\n diffs[diffs.length - 1][1] += nullPadding.substring(0, extraLength);\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n return nullPadding;\n};\n\n\n/**\n * Look through the patches and break up any which are longer than the maximum\n * limit of the match algorithm.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_splitMax = function(patches) {\n var patch_size = this.Match_MaxBits;\n for (var x = 0; x < patches.length; x++) {\n if (patches[x].length1 <= patch_size) {\n continue;\n }\n var bigpatch = patches[x];\n // Remove the big old patch.\n patches.splice(x--, 1);\n var start1 = bigpatch.start1;\n var start2 = bigpatch.start2;\n var precontext = '';\n while (bigpatch.diffs.length !== 0) {\n // Create one of several smaller patches.\n var patch = new diff_match_patch.patch_obj();\n var empty = true;\n patch.start1 = start1 - precontext.length;\n patch.start2 = start2 - precontext.length;\n if (precontext !== '') {\n patch.length1 = patch.length2 = precontext.length;\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, precontext));\n }\n while (bigpatch.diffs.length !== 0 &&\n patch.length1 < patch_size - this.Patch_Margin) {\n var diff_type = bigpatch.diffs[0][0];\n var diff_text = bigpatch.diffs[0][1];\n if (diff_type === DIFF_INSERT) {\n // Insertions are harmless.\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n patch.diffs.push(bigpatch.diffs.shift());\n empty = false;\n } else if (diff_type === DIFF_DELETE && patch.diffs.length == 1 &&\n patch.diffs[0][0] == DIFF_EQUAL &&\n diff_text.length > 2 * patch_size) {\n // This is a large deletion. Let it pass in one chunk.\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n empty = false;\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n bigpatch.diffs.shift();\n } else {\n // Deletion or equality. Only take as much as we can stomach.\n diff_text = diff_text.substring(0,\n patch_size - patch.length1 - this.Patch_Margin);\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n if (diff_type === DIFF_EQUAL) {\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n } else {\n empty = false;\n }\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n if (diff_text == bigpatch.diffs[0][1]) {\n bigpatch.diffs.shift();\n } else {\n bigpatch.diffs[0][1] =\n bigpatch.diffs[0][1].substring(diff_text.length);\n }\n }\n }\n // Compute the head context for the next patch.\n precontext = this.diff_text2(patch.diffs);\n precontext =\n precontext.substring(precontext.length - this.Patch_Margin);\n // Append the end context for this patch.\n var postcontext = this.diff_text1(bigpatch.diffs)\n .substring(0, this.Patch_Margin);\n if (postcontext !== '') {\n patch.length1 += postcontext.length;\n patch.length2 += postcontext.length;\n if (patch.diffs.length !== 0 &&\n patch.diffs[patch.diffs.length - 1][0] === DIFF_EQUAL) {\n patch.diffs[patch.diffs.length - 1][1] += postcontext;\n } else {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, postcontext));\n }\n }\n if (!empty) {\n patches.splice(++x, 0, patch);\n }\n }\n }\n};\n\n\n/**\n * Take a list of patches and return a textual representation.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} Text representation of patches.\n */\ndiff_match_patch.prototype.patch_toText = function(patches) {\n var text = [];\n for (var x = 0; x < patches.length; x++) {\n text[x] = patches[x];\n }\n return text.join('');\n};\n\n\n/**\n * Parse a textual representation of patches and return a list of Patch objects.\n * @param {string} textline Text representation of patches.\n * @return {!Array.} Array of Patch objects.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.patch_fromText = function(textline) {\n var patches = [];\n if (!textline) {\n return patches;\n }\n var text = textline.split('\\n');\n var textPointer = 0;\n var patchHeader = /^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$/;\n while (textPointer < text.length) {\n var m = text[textPointer].match(patchHeader);\n if (!m) {\n throw new Error('Invalid patch string: ' + text[textPointer]);\n }\n var patch = new diff_match_patch.patch_obj();\n patches.push(patch);\n patch.start1 = parseInt(m[1], 10);\n if (m[2] === '') {\n patch.start1--;\n patch.length1 = 1;\n } else if (m[2] == '0') {\n patch.length1 = 0;\n } else {\n patch.start1--;\n patch.length1 = parseInt(m[2], 10);\n }\n\n patch.start2 = parseInt(m[3], 10);\n if (m[4] === '') {\n patch.start2--;\n patch.length2 = 1;\n } else if (m[4] == '0') {\n patch.length2 = 0;\n } else {\n patch.start2--;\n patch.length2 = parseInt(m[4], 10);\n }\n textPointer++;\n\n while (textPointer < text.length) {\n var sign = text[textPointer].charAt(0);\n try {\n var line = decodeURI(text[textPointer].substring(1));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in patch_fromText: ' + line);\n }\n if (sign == '-') {\n // Deletion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_DELETE, line));\n } else if (sign == '+') {\n // Insertion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_INSERT, line));\n } else if (sign == ' ') {\n // Minor equality.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, line));\n } else if (sign == '@') {\n // Start of next patch.\n break;\n } else if (sign === '') {\n // Blank line? Whatever.\n } else {\n // WTF?\n throw new Error('Invalid patch mode \"' + sign + '\" in: ' + line);\n }\n textPointer++;\n }\n }\n return patches;\n};\n\n\n/**\n * Class representing one patch operation.\n * @constructor\n */\ndiff_match_patch.patch_obj = function() {\n /** @type {!Array.} */\n this.diffs = [];\n /** @type {?number} */\n this.start1 = null;\n /** @type {?number} */\n this.start2 = null;\n /** @type {number} */\n this.length1 = 0;\n /** @type {number} */\n this.length2 = 0;\n};\n\n\n/**\n * Emulate GNU diff's format.\n * Header: @@ -382,8 +481,9 @@\n * Indices are printed as 1-based, not 0-based.\n * @return {string} The GNU diff string.\n */\ndiff_match_patch.patch_obj.prototype.toString = function() {\n var coords1, coords2;\n if (this.length1 === 0) {\n coords1 = this.start1 + ',0';\n } else if (this.length1 == 1) {\n coords1 = this.start1 + 1;\n } else {\n coords1 = (this.start1 + 1) + ',' + this.length1;\n }\n if (this.length2 === 0) {\n coords2 = this.start2 + ',0';\n } else if (this.length2 == 1) {\n coords2 = this.start2 + 1;\n } else {\n coords2 = (this.start2 + 1) + ',' + this.length2;\n }\n var text = ['@@ -' + coords1 + ' +' + coords2 + ' @@\\n'];\n var op;\n // Escape the body of the patch with %xx notation.\n for (var x = 0; x < this.diffs.length; x++) {\n switch (this.diffs[x][0]) {\n case DIFF_INSERT:\n op = '+';\n break;\n case DIFF_DELETE:\n op = '-';\n break;\n case DIFF_EQUAL:\n op = ' ';\n break;\n }\n text[x + 1] = op + encodeURI(this.diffs[x][1]) + '\\n';\n }\n return text.join('').replace(/%20/g, ' ');\n};\n\n\n// The following export code was added by @ForbesLindesay\nmodule.exports = diff_match_patch;\nmodule.exports['diff_match_patch'] = diff_match_patch;\nmodule.exports['DIFF_DELETE'] = DIFF_DELETE;\nmodule.exports['DIFF_INSERT'] = DIFF_INSERT;\nmodule.exports['DIFF_EQUAL'] = DIFF_EQUAL;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","var purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","var deepPurple = {\n 50: '#ede7f6',\n 100: '#d1c4e9',\n 200: '#b39ddb',\n 300: '#9575cd',\n 400: '#7e57c2',\n 500: '#673ab7',\n 600: '#5e35b1',\n 700: '#512da8',\n 800: '#4527a0',\n 900: '#311b92',\n A100: '#b388ff',\n A200: '#7c4dff',\n A400: '#651fff',\n A700: '#6200ea'\n};\nexport default deepPurple;","var lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","var cyan = {\n 50: '#e0f7fa',\n 100: '#b2ebf2',\n 200: '#80deea',\n 300: '#4dd0e1',\n 400: '#26c6da',\n 500: '#00bcd4',\n 600: '#00acc1',\n 700: '#0097a7',\n 800: '#00838f',\n 900: '#006064',\n A100: '#84ffff',\n A200: '#18ffff',\n A400: '#00e5ff',\n A700: '#00b8d4'\n};\nexport default cyan;","var teal = {\n 50: '#e0f2f1',\n 100: '#b2dfdb',\n 200: '#80cbc4',\n 300: '#4db6ac',\n 400: '#26a69a',\n 500: '#009688',\n 600: '#00897b',\n 700: '#00796b',\n 800: '#00695c',\n 900: '#004d40',\n A100: '#a7ffeb',\n A200: '#64ffda',\n A400: '#1de9b6',\n A700: '#00bfa5'\n};\nexport default teal;","var lightGreen = {\n 50: '#f1f8e9',\n 100: '#dcedc8',\n 200: '#c5e1a5',\n 300: '#aed581',\n 400: '#9ccc65',\n 500: '#8bc34a',\n 600: '#7cb342',\n 700: '#689f38',\n 800: '#558b2f',\n 900: '#33691e',\n A100: '#ccff90',\n A200: '#b2ff59',\n A400: '#76ff03',\n A700: '#64dd17'\n};\nexport default lightGreen;","var lime = {\n 50: '#f9fbe7',\n 100: '#f0f4c3',\n 200: '#e6ee9c',\n 300: '#dce775',\n 400: '#d4e157',\n 500: '#cddc39',\n 600: '#c0ca33',\n 700: '#afb42b',\n 800: '#9e9d24',\n 900: '#827717',\n A100: '#f4ff81',\n A200: '#eeff41',\n A400: '#c6ff00',\n A700: '#aeea00'\n};\nexport default lime;","var yellow = {\n 50: '#fffde7',\n 100: '#fff9c4',\n 200: '#fff59d',\n 300: '#fff176',\n 400: '#ffee58',\n 500: '#ffeb3b',\n 600: '#fdd835',\n 700: '#fbc02d',\n 800: '#f9a825',\n 900: '#f57f17',\n A100: '#ffff8d',\n A200: '#ffff00',\n A400: '#ffea00',\n A700: '#ffd600'\n};\nexport default yellow;","var amber = {\n 50: '#fff8e1',\n 100: '#ffecb3',\n 200: '#ffe082',\n 300: '#ffd54f',\n 400: '#ffca28',\n 500: '#ffc107',\n 600: '#ffb300',\n 700: '#ffa000',\n 800: '#ff8f00',\n 900: '#ff6f00',\n A100: '#ffe57f',\n A200: '#ffd740',\n A400: '#ffc400',\n A700: '#ffab00'\n};\nexport default amber;","var deepOrange = {\n 50: '#fbe9e7',\n 100: '#ffccbc',\n 200: '#ffab91',\n 300: '#ff8a65',\n 400: '#ff7043',\n 500: '#ff5722',\n 600: '#f4511e',\n 700: '#e64a19',\n 800: '#d84315',\n 900: '#bf360c',\n A100: '#ff9e80',\n A200: '#ff6e40',\n A400: '#ff3d00',\n A700: '#dd2c00'\n};\nexport default deepOrange;","var brown = {\n 50: '#efebe9',\n 100: '#d7ccc8',\n 200: '#bcaaa4',\n 300: '#a1887f',\n 400: '#8d6e63',\n 500: '#795548',\n 600: '#6d4c41',\n 700: '#5d4037',\n 800: '#4e342e',\n 900: '#3e2723',\n A100: '#d7ccc8',\n A200: '#bcaaa4',\n A400: '#8d6e63',\n A700: '#5d4037'\n};\nexport default brown;","var blueGrey = {\n 50: '#eceff1',\n 100: '#cfd8dc',\n 200: '#b0bec5',\n 300: '#90a4ae',\n 400: '#78909c',\n 500: '#607d8b',\n 600: '#546e7a',\n 700: '#455a64',\n 800: '#37474f',\n 900: '#263238',\n A100: '#cfd8dc',\n A200: '#b0bec5',\n A400: '#78909c',\n A700: '#455a64'\n};\nexport default blueGrey;","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar AccordionContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n AccordionContext.displayName = 'AccordionContext';\n}\n\nexport default AccordionContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from './AccordionContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar Accordion = /*#__PURE__*/React.forwardRef(function Accordion(props, ref) {\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'Accordion',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(AccordionContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Accordion.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The Accordion doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the accordion by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the accordion will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the accordion.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordion'\n})(Accordion);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionActions'\n})(AccordionActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionDetails'\n})(AccordionDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from '../Accordion/AccordionContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused, &$focusVisible': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focused: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$IconButtonProp = props.IconButtonProps,\n IconButtonProps = _props$IconButtonProp === void 0 ? {} : _props$IconButtonProp,\n onClick = props.onClick,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"focusVisibleClassName\", \"IconButtonProps\", \"onClick\"]);\n\n var _React$useContext = React.useContext(AccordionContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded),\n focusVisibleClassName: clsx(classes.focusVisible, classes.focused, focusVisibleClassName),\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n // Guard against when generation of classes is disabled in the stylesheets (`disableGeneration`).\n // For `disableGeneration` we don't have an accurate warning but `disableGeneration` is an advanced use case anyway.\n if (props.classes.focused !== undefined && props.classes.focused.indexOf(' ') !== -1) {\n return new Error(['Material-UI: The `classes.focused` key is deprecated.', 'Use `classes.focusVisible` instead.', 'The name of the pseudo-class was changed for consistency.'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionSummary'\n})(AccordionSummary);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport Person from '../internal/svg-icons/Person';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 40,\n height: 40,\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(20),\n lineHeight: 1,\n borderRadius: '50%',\n overflow: 'hidden',\n userSelect: 'none'\n },\n\n /* Styles applied to the root element if not `src` or `srcSet`. */\n colorDefault: {\n color: theme.palette.background.default,\n backgroundColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `variant=\"circle\"`. */\n circle: {},\n\n /* Styles applied to the root element if `variant=\"circular\"`. */\n circular: {},\n\n /* Styles applied to the root element if `variant=\"rounded\"`. */\n rounded: {\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"square\"`. */\n square: {\n borderRadius: 0\n },\n\n /* Styles applied to the img element if either `src` or `srcSet` is defined. */\n img: {\n width: '100%',\n height: '100%',\n textAlign: 'center',\n // Handle non-square image. The property isn't supported by IE 11.\n objectFit: 'cover',\n // Hide alt text.\n color: 'transparent',\n // Hide the image broken icon, only works on Chrome.\n textIndent: 10000\n },\n\n /* Styles applied to the fallback icon */\n fallback: {\n width: '75%',\n height: '75%'\n }\n };\n};\n\nfunction useLoaded(_ref) {\n var src = _ref.src,\n srcSet = _ref.srcSet;\n\n var _React$useState = React.useState(false),\n loaded = _React$useState[0],\n setLoaded = _React$useState[1];\n\n React.useEffect(function () {\n if (!src && !srcSet) {\n return undefined;\n }\n\n setLoaded(false);\n var active = true;\n var image = new Image();\n image.src = src;\n image.srcSet = srcSet;\n\n image.onload = function () {\n if (!active) {\n return;\n }\n\n setLoaded('loaded');\n };\n\n image.onerror = function () {\n if (!active) {\n return;\n }\n\n setLoaded('error');\n };\n\n return function () {\n active = false;\n };\n }, [src, srcSet]);\n return loaded;\n}\n\nvar Avatar = /*#__PURE__*/React.forwardRef(function Avatar(props, ref) {\n var alt = props.alt,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n imgProps = props.imgProps,\n sizes = props.sizes,\n src = props.src,\n srcSet = props.srcSet,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circular' : _props$variant,\n other = _objectWithoutProperties(props, [\"alt\", \"children\", \"classes\", \"className\", \"component\", \"imgProps\", \"sizes\", \"src\", \"srcSet\", \"variant\"]);\n\n var children = null; // Use a hook instead of onError on the img element to support server-side rendering.\n\n var loaded = useLoaded({\n src: src,\n srcSet: srcSet\n });\n var hasImg = src || srcSet;\n var hasImgNotFailing = hasImg && loaded !== 'error';\n\n if (hasImgNotFailing) {\n children = /*#__PURE__*/React.createElement(\"img\", _extends({\n alt: alt,\n src: src,\n srcSet: srcSet,\n sizes: sizes,\n className: classes.img\n }, imgProps));\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n children = alt[0];\n } else {\n children = /*#__PURE__*/React.createElement(Person, {\n className: classes.fallback\n });\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes.system, classes[variant], className, !hasImgNotFailing && classes.colorDefault),\n ref: ref\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? Avatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Used in combination with `src` or `srcSet` to\n * provide an alt attribute for the rendered `img` element.\n */\n alt: PropTypes.string,\n\n /**\n * Used to render icon or text elements inside the Avatar if `src` is not set.\n * This can be an element, or just a string.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n var classes = props.classes;\n\n if (classes == null) {\n return null;\n }\n\n if (classes.circle != null && // 2 classnames? one from withStyles the other must be custom\n classes.circle.split(' ').length > 1) {\n throw new Error(\"Material-UI: The `circle` class is deprecated. Use `circular` instead.\");\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Attributes applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps: PropTypes.object,\n\n /**\n * The `sizes` attribute for the `img` element.\n */\n sizes: PropTypes.string,\n\n /**\n * The `src` attribute for the `img` element.\n */\n src: PropTypes.string,\n\n /**\n * The `srcSet` attribute for the `img` element.\n * Use this attribute for responsive image display.\n */\n srcSet: PropTypes.string,\n\n /**\n * The shape of the avatar.\n */\n variant: chainPropTypes(PropTypes.oneOf(['circle', 'circular', 'rounded', 'square']), function (props) {\n var variant = props.variant;\n\n if (variant === 'circle') {\n throw new Error('Material-UI: `variant=\"circle\"` is deprecated. Use `variant=\"circular\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAvatar'\n})(Avatar);","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar RADIUS_STANDARD = 10;\nvar RADIUS_DOT = 4;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'inline-flex',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n flexShrink: 0\n },\n\n /* Styles applied to the badge `span` element. */\n badge: {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n boxSizing: 'border-box',\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(12),\n minWidth: RADIUS_STANDARD * 2,\n lineHeight: 1,\n padding: '0 6px',\n height: RADIUS_STANDARD * 2,\n borderRadius: RADIUS_STANDARD,\n zIndex: 1,\n // Render the badge on top of potential ripples.\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.enteringScreen\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.error.contrastText\n },\n\n /* Styles applied to the root element if `variant=\"dot\"`. */\n dot: {\n borderRadius: RADIUS_DOT,\n height: RADIUS_DOT * 2,\n minWidth: RADIUS_DOT * 2,\n padding: 0\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginTopRightRectangle: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangular\"`. */\n anchorOriginTopRightRectangular: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginBottomRightRectangle: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangular\"`. */\n anchorOriginBottomRightRectangular: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginTopLeftRectangle: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangular\"`. */\n anchorOriginTopLeftRectangular: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginBottomLeftRectangle: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangular\"`. */\n anchorOriginBottomLeftRectangular: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circle\"`. */\n anchorOriginTopRightCircle: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circular\"`. */\n anchorOriginTopRightCircular: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circle\"`. */\n anchorOriginBottomRightCircle: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circular\"`. */\n anchorOriginBottomRightCircular: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circle\"`. */\n anchorOriginTopLeftCircle: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circular\"`. */\n anchorOriginTopLeftCircular: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circle\"`. */\n anchorOriginBottomLeftCircle: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circular\"`. */\n anchorOriginBottomLeftCircular: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Pseudo-class to the badge `span` element if `invisible={true}`. */\n invisible: {\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.leavingScreen\n })\n }\n };\n};\nvar Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {\n var _props$anchorOrigin = props.anchorOrigin,\n anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'top',\n horizontal: 'right'\n } : _props$anchorOrigin,\n badgeContent = props.badgeContent,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n ComponentProp = _props$component === void 0 ? 'span' : _props$component,\n invisibleProp = props.invisible,\n _props$max = props.max,\n max = _props$max === void 0 ? 99 : _props$max,\n _props$overlap = props.overlap,\n overlap = _props$overlap === void 0 ? 'rectangle' : _props$overlap,\n _props$showZero = props.showZero,\n showZero = _props$showZero === void 0 ? false : _props$showZero,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchorOrigin\", \"badgeContent\", \"children\", \"classes\", \"className\", \"color\", \"component\", \"invisible\", \"max\", \"overlap\", \"showZero\", \"variant\"]);\n\n var invisible = invisibleProp;\n\n if (invisibleProp == null && (badgeContent === 0 && !showZero || badgeContent == null && variant !== 'dot')) {\n invisible = true;\n }\n\n var displayValue = '';\n\n if (variant !== 'dot') {\n displayValue = badgeContent > max ? \"\".concat(max, \"+\") : badgeContent;\n }\n\n return /*#__PURE__*/React.createElement(ComponentProp, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), children, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.badge, classes[\"\".concat(anchorOrigin.horizontal).concat(capitalize(anchorOrigin.vertical), \"}\")], classes[\"anchorOrigin\".concat(capitalize(anchorOrigin.vertical)).concat(capitalize(anchorOrigin.horizontal)).concat(capitalize(overlap))], color !== 'default' && classes[\"color\".concat(capitalize(color))], invisible && classes.invisible, variant === 'dot' && classes.dot)\n }, displayValue));\n});\nprocess.env.NODE_ENV !== \"production\" ? Badge.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The anchor of the badge.\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The content rendered within the badge.\n */\n badgeContent: PropTypes.node,\n\n /**\n * The badge will be added relative to this node.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n var classes = props.classes;\n\n if (classes == null) {\n return null;\n }\n\n [['anchorOriginTopRightRectangle', 'anchorOriginTopRightRectangular'], ['anchorOriginBottomRightRectangle', 'anchorOriginBottomRightRectangular'], ['anchorOriginTopLeftRectangle', 'anchorOriginTopLeftRectangular'], ['anchorOriginBottomLeftRectangle', 'anchorOriginBottomLeftRectangular'], ['anchorOriginTopRightCircle', 'anchorOriginTopRightCircular'], ['anchorOriginBottomRightCircle', 'anchorOriginBottomRightCircular'], ['anchorOriginTopLeftCircle', 'anchorOriginTopLeftCircular']].forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n deprecatedClassKey = _ref2[0],\n newClassKey = _ref2[1];\n\n if (classes[deprecatedClassKey] != null && // 2 classnames? one from withStyles the other must be custom\n classes[deprecatedClassKey].split(' ').length > 1) {\n throw new Error(\"Material-UI: The `\".concat(deprecatedClassKey, \"` class was deprecated. Use `\").concat(newClassKey, \"` instead.\"));\n }\n });\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'error', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the badge will be invisible.\n */\n invisible: PropTypes.bool,\n\n /**\n * Max count to show.\n */\n max: PropTypes.number,\n\n /**\n * Wrapped shape the badge should overlap.\n */\n overlap: chainPropTypes(PropTypes.oneOf(['circle', 'rectangle', 'circular', 'rectangular']), function (props) {\n var overlap = props.overlap;\n\n if (overlap === 'rectangle') {\n throw new Error('Material-UI: `overlap=\"rectangle\"` was deprecated. Use `overlap=\"rectangular\"` instead.');\n }\n\n if (overlap === 'circle') {\n throw new Error('Material-UI: `overlap=\"circle\"` was deprecated. Use `overlap=\"circular\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Controls whether the badge is hidden when `badgeContent` is zero.\n */\n showZero: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['dot', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBadge'\n})(Badge);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n justifyContent: 'center',\n height: 56,\n backgroundColor: theme.palette.background.paper\n }\n };\n};\nvar BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n onChange = props.onChange,\n _props$showLabels = props.showLabels,\n showLabels = _props$showLabels === void 0 ? false : _props$showLabels,\n value = props.value,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"onChange\", \"showLabels\", \"value\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), React.Children.map(children, function (child, childIndex) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The BottomNavigation component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n return /*#__PURE__*/React.cloneElement(child, {\n selected: childValue === value,\n showLabel: child.props.showLabel !== undefined ? child.props.showLabel : showLabels,\n value: childValue,\n onChange: onChange\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? BottomNavigation.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback.\n * @param {any} value We default to the index of the child.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, all `BottomNavigationAction`s will show their labels.\n * By default, only the selected `BottomNavigationAction` will show its label.\n */\n showLabels: PropTypes.bool,\n\n /**\n * The value of the currently selected `BottomNavigationAction`.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBottomNavigation'\n})(BottomNavigation);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport unsupportedProp from '../utils/unsupportedProp';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n transition: theme.transitions.create(['color', 'padding-top'], {\n duration: theme.transitions.duration.short\n }),\n padding: '6px 12px 8px',\n minWidth: 80,\n maxWidth: 168,\n color: theme.palette.text.secondary,\n flex: '1',\n '&$iconOnly': {\n paddingTop: 16\n },\n '&$selected': {\n paddingTop: 6,\n color: theme.palette.primary.main\n }\n },\n\n /* Pseudo-class applied to the root element if selected. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `showLabel={false}` and not selected. */\n iconOnly: {},\n\n /* Styles applied to the span element that wraps the icon and label. */\n wrapper: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n flexDirection: 'column'\n },\n\n /* Styles applied to the label's span element. */\n label: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(12),\n opacity: 1,\n transition: 'font-size 0.2s, opacity 0.2s',\n transitionDelay: '0.1s',\n '&$iconOnly': {\n opacity: 0,\n transitionDelay: '0s'\n },\n '&$selected': {\n fontSize: theme.typography.pxToRem(14)\n }\n }\n };\n};\nvar BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavigationAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n icon = props.icon,\n label = props.label,\n onChange = props.onChange,\n onClick = props.onClick,\n selected = props.selected,\n showLabel = props.showLabel,\n value = props.value,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"icon\", \"label\", \"onChange\", \"onClick\", \"selected\", \"showLabel\", \"value\"]);\n\n var handleChange = function handleChange(event) {\n if (onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n ref: ref,\n className: clsx(classes.root, className, selected ? classes.selected : !showLabel && classes.iconOnly),\n focusRipple: true,\n onClick: handleChange\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.wrapper\n }, icon, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.label, selected ? classes.selected : !showLabel && classes.iconOnly)\n }, label)));\n});\nprocess.env.NODE_ENV !== \"production\" ? BottomNavigationAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon element.\n */\n icon: PropTypes.node,\n\n /**\n * The label element.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n selected: PropTypes.bool,\n\n /**\n * If `true`, the `BottomNavigationAction` will show its label.\n * By default, only the selected `BottomNavigationAction`\n * inside `BottomNavigation` will show its label.\n */\n showLabel: PropTypes.bool,\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBottomNavigationAction'\n})(BottomNavigationAction);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'MoreHoriz');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport { emphasize } from '../styles/colorManipulator';\nimport MoreHorizIcon from '../internal/svg-icons/MoreHoriz';\nimport ButtonBase from '../ButtonBase';\n\nvar styles = function styles(theme) {\n return {\n root: {\n display: 'flex',\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n backgroundColor: theme.palette.grey[100],\n color: theme.palette.grey[700],\n borderRadius: 2,\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: theme.palette.grey[200]\n },\n '&:active': {\n boxShadow: theme.shadows[0],\n backgroundColor: emphasize(theme.palette.grey[200], 0.12)\n }\n },\n icon: {\n width: 24,\n height: 16\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction BreadcrumbCollapsed(props) {\n var classes = props.classes,\n other = _objectWithoutProperties(props, [\"classes\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"li\",\n className: classes.root,\n focusRipple: true\n }, other), /*#__PURE__*/React.createElement(MoreHorizIcon, {\n className: classes.icon\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? BreadcrumbCollapsed.propTypes = {\n /**\n * @ignore\n */\n classes: PropTypes.object.isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateBreadcrumbCollapsed'\n})(BreadcrumbCollapsed);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport BreadcrumbCollapsed from './BreadcrumbCollapsed';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the ol element. */\n ol: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n padding: 0,\n margin: 0,\n listStyle: 'none'\n },\n\n /* Styles applied to the li element. */\n li: {},\n\n /* Styles applied to the separator element. */\n separator: {\n display: 'flex',\n userSelect: 'none',\n marginLeft: 8,\n marginRight: 8\n }\n};\n\nfunction insertSeparators(items, className, separator) {\n return items.reduce(function (acc, current, index) {\n if (index < items.length - 1) {\n acc = acc.concat(current, /*#__PURE__*/React.createElement(\"li\", {\n \"aria-hidden\": true,\n key: \"separator-\".concat(index),\n className: className\n }, separator));\n } else {\n acc.push(current);\n }\n\n return acc;\n }, []);\n}\n\nvar Breadcrumbs = /*#__PURE__*/React.forwardRef(function Breadcrumbs(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'nav' : _props$component,\n _props$expandText = props.expandText,\n expandText = _props$expandText === void 0 ? 'Show path' : _props$expandText,\n _props$itemsAfterColl = props.itemsAfterCollapse,\n itemsAfterCollapse = _props$itemsAfterColl === void 0 ? 1 : _props$itemsAfterColl,\n _props$itemsBeforeCol = props.itemsBeforeCollapse,\n itemsBeforeCollapse = _props$itemsBeforeCol === void 0 ? 1 : _props$itemsBeforeCol,\n _props$maxItems = props.maxItems,\n maxItems = _props$maxItems === void 0 ? 8 : _props$maxItems,\n _props$separator = props.separator,\n separator = _props$separator === void 0 ? '/' : _props$separator,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"expandText\", \"itemsAfterCollapse\", \"itemsBeforeCollapse\", \"maxItems\", \"separator\"]);\n\n var _React$useState = React.useState(false),\n expanded = _React$useState[0],\n setExpanded = _React$useState[1];\n\n var renderItemsBeforeAndAfter = function renderItemsBeforeAndAfter(allItems) {\n var handleClickExpand = function handleClickExpand(event) {\n setExpanded(true); // The clicked element received the focus but gets removed from the DOM.\n // Let's keep the focus in the component after expanding.\n\n var focusable = event.currentTarget.parentNode.querySelector('a[href],button,[tabindex]');\n\n if (focusable) {\n focusable.focus();\n }\n }; // This defends against someone passing weird input, to ensure that if all\n // items would be shown anyway, we just show all items without the EllipsisItem\n\n\n if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['Material-UI: You have provided an invalid combination of props to the Breadcrumbs.', \"itemsAfterCollapse={\".concat(itemsAfterCollapse, \"} + itemsBeforeCollapse={\").concat(itemsBeforeCollapse, \"} >= maxItems={\").concat(maxItems, \"}\")].join('\\n'));\n }\n\n return allItems;\n }\n\n return [].concat(_toConsumableArray(allItems.slice(0, itemsBeforeCollapse)), [/*#__PURE__*/React.createElement(BreadcrumbCollapsed, {\n \"aria-label\": expandText,\n key: \"ellipsis\",\n onClick: handleClickExpand\n })], _toConsumableArray(allItems.slice(allItems.length - itemsAfterCollapse, allItems.length)));\n };\n\n var allItems = React.Children.toArray(children).filter(function (child) {\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Breadcrumbs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.isValidElement(child);\n }).map(function (child, index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n className: classes.li,\n key: \"child-\".concat(index)\n }, child);\n });\n return /*#__PURE__*/React.createElement(Typography, _extends({\n ref: ref,\n component: Component,\n color: \"textSecondary\",\n className: clsx(classes.root, className)\n }, other), /*#__PURE__*/React.createElement(\"ol\", {\n className: classes.ol\n }, insertSeparators(expanded || maxItems && allItems.length <= maxItems ? allItems : renderItemsBeforeAndAfter(allItems), classes.separator, separator)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Breadcrumbs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The breadcrumb children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default label for the expand button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n expandText: PropTypes.string,\n\n /**\n * If max items is exceeded, the number of items to show after the ellipsis.\n */\n itemsAfterCollapse: PropTypes.number,\n\n /**\n * If max items is exceeded, the number of items to show before the ellipsis.\n */\n itemsBeforeCollapse: PropTypes.number,\n\n /**\n * Specifies the maximum number of breadcrumbs to display. When there are more\n * than the maximum number, only the first `itemsBeforeCollapse` and last `itemsAfterCollapse`\n * will be shown, with an ellipsis in between.\n */\n maxItems: PropTypes.number,\n\n /**\n * Custom separator node.\n */\n separator: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBreadcrumbs'\n})(Breadcrumbs);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport { alpha } from '../styles/colorManipulator';\nimport withStyles from '../styles/withStyles';\nimport Button from '../Button'; // Force a side effect so we don't have any override priority issue.\n// eslint-disable-next-line no-unused-expressions\n\nButton.styles;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n boxShadow: theme.shadows[2]\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none'\n },\n\n /* Pseudo-class applied to child elements if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the children. */\n grouped: {\n minWidth: 40\n },\n\n /* Styles applied to the children if `orientation=\"horizontal\"`. */\n groupedHorizontal: {\n '&:not(:first-child)': {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n }\n },\n\n /* Styles applied to the children if `orientation=\"vertical\"`. */\n groupedVertical: {\n '&:not(:first-child)': {\n borderTopRightRadius: 0,\n borderTopLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"`. */\n groupedText: {},\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"horizontal\"`. */\n groupedTextHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"vertical\"`. */\n groupedTextVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"primary\"`. */\n groupedTextPrimary: {\n '&:not(:last-child)': {\n borderColor: alpha(theme.palette.primary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"secondary\"`. */\n groupedTextSecondary: {\n '&:not(:last-child)': {\n borderColor: alpha(theme.palette.secondary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"`. */\n groupedOutlined: {},\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"horizontal\"`. */\n groupedOutlinedHorizontal: {\n '&:not(:first-child)': {\n marginLeft: -1\n },\n '&:not(:last-child)': {\n borderRightColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"vertical\"`. */\n groupedOutlinedVertical: {\n '&:not(:first-child)': {\n marginTop: -1\n },\n '&:not(:last-child)': {\n borderBottomColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"primary\"`. */\n groupedOutlinedPrimary: {\n '&:hover': {\n borderColor: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"secondary\"`. */\n groupedOutlinedSecondary: {\n '&:hover': {\n borderColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"`. */\n groupedContained: {\n boxShadow: 'none'\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"horizontal\"`. */\n groupedContainedHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderRight: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"vertical\"`. */\n groupedContainedVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderBottom: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"primary\"`. */\n groupedContainedPrimary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.primary.dark\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"secondary\"`. */\n groupedContainedSecondary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.secondary.dark\n }\n }\n };\n};\nvar ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'outlined' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"disableRipple\", \"fullWidth\", \"orientation\", \"size\", \"variant\"]);\n\n var buttonClassName = clsx(classes.grouped, classes[\"grouped\".concat(capitalize(orientation))], classes[\"grouped\".concat(capitalize(variant))], classes[\"grouped\".concat(capitalize(variant)).concat(capitalize(orientation))], classes[\"grouped\".concat(capitalize(variant)).concat(color !== 'default' ? capitalize(color) : '')], disabled && classes.disabled);\n return /*#__PURE__*/React.createElement(Component, _extends({\n role: \"group\",\n className: clsx(classes.root, className, fullWidth && classes.fullWidth, disableElevation && classes.disableElevation, variant === 'contained' && classes.contained, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The ButtonGroup component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.cloneElement(child, {\n className: clsx(buttonClassName, child.props.className),\n color: child.props.color || color,\n disabled: child.props.disabled || disabled,\n disableElevation: child.props.disableElevation || disableElevation,\n disableFocusRipple: disableFocusRipple,\n disableRipple: disableRipple,\n fullWidth: fullWidth,\n size: child.props.size || size,\n variant: child.props.variant || variant\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ButtonGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button group.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the buttons will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the button keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the button ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If `true`, the buttons will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The group orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButtonGroup'\n})(ButtonGroup);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden'\n }\n};\nvar Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$raised = props.raised,\n raised = _props$raised === void 0 ? false : _props$raised,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"raised\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className),\n elevation: raised ? 8 : 1,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Card.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the card will use raised styling.\n */\n raised: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCard'\n})(Card);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n textAlign: 'inherit',\n width: '100%',\n '&:hover $focusHighlight': {\n opacity: theme.palette.action.hoverOpacity\n },\n '&$focusVisible $focusHighlight': {\n opacity: 0.12\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the action area is keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the overlay that covers the action area when it is keyboard focused. */\n focusHighlight: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n opacity: 0,\n backgroundColor: 'currentcolor',\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.short\n })\n }\n };\n};\nvar CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n focusVisibleClassName = props.focusVisibleClassName,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"focusVisibleClassName\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className),\n focusVisibleClassName: clsx(focusVisibleClassName, classes.focusVisible),\n ref: ref\n }, other), children, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.focusHighlight\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActionArea.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActionArea'\n})(CardActionArea);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar CardActions = /*#__PURE__*/React.forwardRef(function CardActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActions'\n})(CardActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n padding: 16,\n '&:last-child': {\n paddingBottom: 24\n }\n }\n};\nvar CardContent = /*#__PURE__*/React.forwardRef(function CardContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardContent'\n})(CardContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 16\n },\n\n /* Styles applied to the avatar element. */\n avatar: {\n flex: '0 0 auto',\n marginRight: 16\n },\n\n /* Styles applied to the action element. */\n action: {\n flex: '0 0 auto',\n alignSelf: 'flex-start',\n marginTop: -8,\n marginRight: -8\n },\n\n /* Styles applied to the content wrapper element. */\n content: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the title Typography element. */\n title: {},\n\n /* Styles applied to the subheader Typography element. */\n subheader: {}\n};\nvar CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader(props, ref) {\n var action = props.action,\n avatar = props.avatar,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n subheaderProp = props.subheader,\n subheaderTypographyProps = props.subheaderTypographyProps,\n titleProp = props.title,\n titleTypographyProps = props.titleTypographyProps,\n other = _objectWithoutProperties(props, [\"action\", \"avatar\", \"classes\", \"className\", \"component\", \"disableTypography\", \"subheader\", \"subheaderTypographyProps\", \"title\", \"titleTypographyProps\"]);\n\n var title = titleProp;\n\n if (title != null && title.type !== Typography && !disableTypography) {\n title = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: avatar ? 'body2' : 'h5',\n className: classes.title,\n component: \"span\",\n display: \"block\"\n }, titleTypographyProps), title);\n }\n\n var subheader = subheaderProp;\n\n if (subheader != null && subheader.type !== Typography && !disableTypography) {\n subheader = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: avatar ? 'body2' : 'body1',\n className: classes.subheader,\n color: \"textSecondary\",\n component: \"span\",\n display: \"block\"\n }, subheaderTypographyProps), subheader);\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), avatar && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.avatar\n }, avatar), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.content\n }, title, subheader), action && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.action\n }, action));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardHeader.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display in the card header.\n */\n action: PropTypes.node,\n\n /**\n * The Avatar for the Card Header.\n */\n avatar: PropTypes.node,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, `subheader` and `title` won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `title` text, and optional `subheader` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n subheader: PropTypes.node,\n\n /**\n * These props will be forwarded to the subheader\n * (as long as disableTypography is not `true`).\n */\n subheaderTypographyProps: PropTypes.object,\n\n /**\n * The content of the Card Title.\n */\n title: PropTypes.node,\n\n /**\n * These props will be forwarded to the title\n * (as long as disableTypography is not `true`).\n */\n titleTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardHeader'\n})(CardHeader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { chainPropTypes } from '@material-ui/utils';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'center'\n },\n\n /* Styles applied to the root element if `component=\"video, audio, picture, iframe, or img\"`. */\n media: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `component=\"picture or img\"`. */\n img: {\n // ⚠️ object-fit is not supported by IE 11.\n objectFit: 'cover'\n }\n};\nvar MEDIA_COMPONENTS = ['video', 'audio', 'picture', 'iframe', 'img'];\nvar CardMedia = /*#__PURE__*/React.forwardRef(function CardMedia(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n image = props.image,\n src = props.src,\n style = props.style,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"image\", \"src\", \"style\"]);\n\n var isMediaComponent = MEDIA_COMPONENTS.indexOf(Component) !== -1;\n var composedStyle = !isMediaComponent && image ? _extends({\n backgroundImage: \"url(\\\"\".concat(image, \"\\\")\")\n }, style) : style;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, isMediaComponent && classes.media, \"picture img\".indexOf(Component) !== -1 && classes.img),\n ref: ref,\n style: composedStyle,\n src: isMediaComponent ? image || src : undefined\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? CardMedia.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n if (!props.children && !props.image && !props.src && !props.component) {\n return new Error('Material-UI: Either `children`, `image`, `src` or `component` prop must be specified.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Image to be displayed as a background image.\n * Either `image` or `src` prop must be specified.\n * Note that caller must specify height otherwise the image will not be visible.\n */\n image: PropTypes.string,\n\n /**\n * An alias for `image` property.\n * Available only with media components.\n * Media components: `video`, `audio`, `picture`, `iframe`, `img`.\n */\n src: PropTypes.string,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardMedia'\n})(CardMedia);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport CancelIcon from '../internal/svg-icons/Cancel';\nimport withStyles from '../styles/withStyles';\nimport { emphasize, alpha } from '../styles/colorManipulator';\nimport useForkRef from '../utils/useForkRef';\nimport unsupportedProp from '../utils/unsupportedProp';\nimport capitalize from '../utils/capitalize';\nimport ButtonBase from '../ButtonBase';\nexport var styles = function styles(theme) {\n var backgroundColor = theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700];\n var deleteIconColor = alpha(theme.palette.text.primary, 0.26);\n return {\n /* Styles applied to the root element. */\n root: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(13),\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32,\n color: theme.palette.getContrastText(backgroundColor),\n backgroundColor: backgroundColor,\n borderRadius: 32 / 2,\n whiteSpace: 'nowrap',\n transition: theme.transitions.create(['background-color', 'box-shadow']),\n // label will inherit this from root, then `clickable` class overrides this for both\n cursor: 'default',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n textDecoration: 'none',\n border: 'none',\n // Remove `button` border\n padding: 0,\n // Remove `button` padding\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n '&$disabled': {\n opacity: 0.5,\n pointerEvents: 'none'\n },\n '& $avatar': {\n marginLeft: 5,\n marginRight: -6,\n width: 24,\n height: 24,\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n fontSize: theme.typography.pxToRem(12)\n },\n '& $avatarColorPrimary': {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.dark\n },\n '& $avatarColorSecondary': {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.dark\n },\n '& $avatarSmall': {\n marginLeft: 4,\n marginRight: -4,\n width: 18,\n height: 18,\n fontSize: theme.typography.pxToRem(10)\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n height: 24\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */\n clickable: {\n userSelect: 'none',\n WebkitTapHighlightColor: 'transparent',\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: emphasize(backgroundColor, 0.08)\n },\n '&:active': {\n boxShadow: theme.shadows[1]\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"primary\"` is defined or `clickable={true}`. */\n clickableColorPrimary: {\n '&:hover, &:focus': {\n backgroundColor: emphasize(theme.palette.primary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"secondary\"` is defined or `clickable={true}`. */\n clickableColorSecondary: {\n '&:hover, &:focus': {\n backgroundColor: emphasize(theme.palette.secondary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` is defined. */\n deletable: {\n '&:focus': {\n backgroundColor: emphasize(backgroundColor, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"primary\"` is defined. */\n deletableColorPrimary: {\n '&:focus': {\n backgroundColor: emphasize(theme.palette.primary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"secondary\"` is defined. */\n deletableColorSecondary: {\n '&:focus': {\n backgroundColor: emphasize(theme.palette.secondary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n backgroundColor: 'transparent',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity)\n },\n '& $avatar': {\n marginLeft: 4\n },\n '& $avatarSmall': {\n marginLeft: 2\n },\n '& $icon': {\n marginLeft: 4\n },\n '& $iconSmall': {\n marginLeft: 2\n },\n '& $deleteIcon': {\n marginRight: 5\n },\n '& $deleteIconSmall': {\n marginRight: 3\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(theme.palette.primary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(theme.palette.secondary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity)\n }\n },\n // TODO v5: remove\n\n /* Styles applied to the `avatar` element. */\n avatar: {},\n\n /* Styles applied to the `avatar` element if `size=\"small\"`. */\n avatarSmall: {},\n\n /* Styles applied to the `avatar` element if `color=\"primary\"`. */\n avatarColorPrimary: {},\n\n /* Styles applied to the `avatar` element if `color=\"secondary\"`. */\n avatarColorSecondary: {},\n\n /* Styles applied to the `icon` element. */\n icon: {\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n marginLeft: 5,\n marginRight: -6\n },\n\n /* Styles applied to the `icon` element if `size=\"small\"`. */\n iconSmall: {\n width: 18,\n height: 18,\n marginLeft: 4,\n marginRight: -4\n },\n\n /* Styles applied to the `icon` element if `color=\"primary\"`. */\n iconColorPrimary: {\n color: 'inherit'\n },\n\n /* Styles applied to the `icon` element if `color=\"secondary\"`. */\n iconColorSecondary: {\n color: 'inherit'\n },\n\n /* Styles applied to the label `span` element. */\n label: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingLeft: 12,\n paddingRight: 12,\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the label `span` element if `size=\"small\"`. */\n labelSmall: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the `deleteIcon` element. */\n deleteIcon: {\n WebkitTapHighlightColor: 'transparent',\n color: deleteIconColor,\n height: 22,\n width: 22,\n cursor: 'pointer',\n margin: '0 5px 0 -6px',\n '&:hover': {\n color: alpha(deleteIconColor, 0.4)\n }\n },\n\n /* Styles applied to the `deleteIcon` element if `size=\"small\"`. */\n deleteIconSmall: {\n height: 16,\n width: 16,\n marginRight: 4,\n marginLeft: -4\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"default\"`. */\n deleteIconColorPrimary: {\n color: alpha(theme.palette.primary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"default\"`. */\n deleteIconColorSecondary: {\n color: alpha(theme.palette.secondary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorPrimary: {\n color: alpha(theme.palette.primary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorSecondary: {\n color: alpha(theme.palette.secondary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.main\n }\n }\n };\n};\n\nfunction isDeleteKeyboardEvent(keyboardEvent) {\n return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';\n}\n/**\n * Chips represent complex entities in small blocks, such as a contact.\n */\n\n\nvar Chip = /*#__PURE__*/React.forwardRef(function Chip(props, ref) {\n var avatarProp = props.avatar,\n classes = props.classes,\n className = props.className,\n clickableProp = props.clickable,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n ComponentProp = props.component,\n deleteIconProp = props.deleteIcon,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n iconProp = props.icon,\n label = props.label,\n onClick = props.onClick,\n onDelete = props.onDelete,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'default' : _props$variant,\n other = _objectWithoutProperties(props, [\"avatar\", \"classes\", \"className\", \"clickable\", \"color\", \"component\", \"deleteIcon\", \"disabled\", \"icon\", \"label\", \"onClick\", \"onDelete\", \"onKeyDown\", \"onKeyUp\", \"size\", \"variant\"]);\n\n var chipRef = React.useRef(null);\n var handleRef = useForkRef(chipRef, ref);\n\n var handleDeleteIconClick = function handleDeleteIconClick(event) {\n // Stop the event from bubbling up to the `Chip`\n event.stopPropagation();\n\n if (onDelete) {\n onDelete(event);\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {\n // will be handled in keyUp, otherwise some browsers\n // might init navigation\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n var handleKeyUp = function handleKeyUp(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target) {\n if (onDelete && isDeleteKeyboardEvent(event)) {\n onDelete(event);\n } else if (event.key === 'Escape' && chipRef.current) {\n chipRef.current.blur();\n }\n }\n\n if (onKeyUp) {\n onKeyUp(event);\n }\n };\n\n var clickable = clickableProp !== false && onClick ? true : clickableProp;\n var small = size === 'small';\n var Component = ComponentProp || (clickable ? ButtonBase : 'div');\n var moreProps = Component === ButtonBase ? {\n component: 'div'\n } : {};\n var deleteIcon = null;\n\n if (onDelete) {\n var customClasses = clsx(color !== 'default' && (variant === \"default\" ? classes[\"deleteIconColor\".concat(capitalize(color))] : classes[\"deleteIconOutlinedColor\".concat(capitalize(color))]), small && classes.deleteIconSmall);\n deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? /*#__PURE__*/React.cloneElement(deleteIconProp, {\n className: clsx(deleteIconProp.props.className, classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n }) : /*#__PURE__*/React.createElement(CancelIcon, {\n className: clsx(classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n });\n }\n\n var avatar = null;\n\n if (avatarProp && /*#__PURE__*/React.isValidElement(avatarProp)) {\n avatar = /*#__PURE__*/React.cloneElement(avatarProp, {\n className: clsx(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes[\"avatarColor\".concat(capitalize(color))])\n });\n }\n\n var icon = null;\n\n if (iconProp && /*#__PURE__*/React.isValidElement(iconProp)) {\n icon = /*#__PURE__*/React.cloneElement(iconProp, {\n className: clsx(classes.icon, iconProp.props.className, small && classes.iconSmall, color !== 'default' && classes[\"iconColor\".concat(capitalize(color))])\n });\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (avatar && icon) {\n console.error('Material-UI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n role: clickable || onDelete ? 'button' : undefined,\n className: clsx(classes.root, className, color !== 'default' && [classes[\"color\".concat(capitalize(color))], clickable && classes[\"clickableColor\".concat(capitalize(color))], onDelete && classes[\"deletableColor\".concat(capitalize(color))]], variant !== \"default\" && [classes.outlined, {\n 'primary': classes.outlinedPrimary,\n 'secondary': classes.outlinedSecondary\n }[color]], disabled && classes.disabled, small && classes.sizeSmall, clickable && classes.clickable, onDelete && classes.deletable),\n \"aria-disabled\": disabled ? true : undefined,\n tabIndex: clickable || onDelete ? 0 : undefined,\n onClick: onClick,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n ref: handleRef\n }, moreProps, other), avatar || icon, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.label, small && classes.labelSmall)\n }, label), deleteIcon);\n});\nprocess.env.NODE_ENV !== \"production\" ? Chip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Avatar element.\n */\n avatar: PropTypes.element,\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the chip will appear clickable, and will raise when pressed,\n * even if the onClick prop is not defined.\n * If false, the chip will not be clickable, even if onClick prop is defined.\n * This can be used, for example,\n * along with the component prop to indicate an anchor Chip is clickable.\n */\n clickable: PropTypes.bool,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default delete icon element. Shown only if `onDelete` is set.\n */\n deleteIcon: PropTypes.element,\n\n /**\n * If `true`, the chip should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * Icon element.\n */\n icon: PropTypes.element,\n\n /**\n * The content of the label.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * Callback function fired when the delete icon is clicked.\n * If set, the delete icon will be shown.\n */\n onDelete: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The size of the chip.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['default', 'outlined'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiChip'\n})(Chip);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar SIZE = 44;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-block'\n },\n\n /* Styles applied to the root element if `variant=\"static\"`. */\n static: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {\n animation: '$circular-rotate 1.4s linear infinite'\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the `svg` element. */\n svg: {\n display: 'block' // Keeps the progress centered\n\n },\n\n /* Styles applied to the `circle` svg path. */\n circle: {\n stroke: 'currentColor' // Use butt to follow the specification, by chance, it's already the default CSS value.\n // strokeLinecap: 'butt',\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"static\"`. */\n circleStatic: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"indeterminate\"`. */\n circleIndeterminate: {\n animation: '$circular-dash 1.4s ease-in-out infinite',\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: '0px' // Add the unit to fix a Edge 16 and below bug.\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"determinate\"`. */\n circleDeterminate: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n '@keyframes circular-rotate': {\n '0%': {\n // Fix IE 11 wobbly\n transformOrigin: '50% 50%'\n },\n '100%': {\n transform: 'rotate(360deg)'\n }\n },\n '@keyframes circular-dash': {\n '0%': {\n strokeDasharray: '1px, 200px',\n strokeDashoffset: '0px'\n },\n '50%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-15px'\n },\n '100%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-125px'\n }\n },\n\n /* Styles applied to the `circle` svg path if `disableShrink={true}`. */\n circleDisableShrink: {\n animation: 'none'\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$disableShrink = props.disableShrink,\n disableShrink = _props$disableShrink === void 0 ? false : _props$disableShrink,\n _props$size = props.size,\n size = _props$size === void 0 ? 40 : _props$size,\n style = props.style,\n _props$thickness = props.thickness,\n thickness = _props$thickness === void 0 ? 3.6 : _props$thickness,\n _props$value = props.value,\n value = _props$value === void 0 ? 0 : _props$value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"disableShrink\", \"size\", \"style\", \"thickness\", \"value\", \"variant\"]);\n\n var circleStyle = {};\n var rootStyle = {};\n var rootProps = {};\n\n if (variant === 'determinate' || variant === 'static') {\n var circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = \"\".concat(((100 - value) / 100 * circumference).toFixed(3), \"px\");\n rootStyle.transform = 'rotate(-90deg)';\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'static': classes.static\n }[variant]),\n style: _extends({\n width: size,\n height: size\n }, rootStyle, style),\n ref: ref,\n role: \"progressbar\"\n }, rootProps, other), /*#__PURE__*/React.createElement(\"svg\", {\n className: classes.svg,\n viewBox: \"\".concat(SIZE / 2, \" \").concat(SIZE / 2, \" \").concat(SIZE, \" \").concat(SIZE)\n }, /*#__PURE__*/React.createElement(\"circle\", {\n className: clsx(classes.circle, disableShrink && classes.circleDisableShrink, {\n 'determinate': classes.circleDeterminate,\n 'indeterminate': classes.circleIndeterminate,\n 'static': classes.circleStatic\n }[variant]),\n style: circleStyle,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n */\n disableShrink: chainPropTypes(PropTypes.bool, function (props) {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('Material-UI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n\n return null;\n }),\n\n /**\n * The size of the circle.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, e.g '3rem'.\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The thickness of the circle.\n */\n thickness: PropTypes.number,\n\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n */\n variant: chainPropTypes(PropTypes.oneOf(['determinate', 'indeterminate', 'static']), function (props) {\n var variant = props.variant;\n\n if (variant === 'static') {\n throw new Error('Material-UI: `variant=\"static\"` was deprecated. Use `variant=\"determinate\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCircularProgress',\n flip: false\n})(CircularProgress);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _defineProperty({\n width: '100%',\n marginLeft: 'auto',\n boxSizing: 'border-box',\n marginRight: 'auto',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n display: 'block'\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `disableGutters={true}`. */\n disableGutters: {\n paddingLeft: 0,\n paddingRight: 0\n },\n\n /* Styles applied to the root element if `fixed={true}`. */\n fixed: Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {\n var value = theme.breakpoints.values[breakpoint];\n\n if (value !== 0) {\n acc[theme.breakpoints.up(breakpoint)] = {\n maxWidth: value\n };\n }\n\n return acc;\n }, {}),\n\n /* Styles applied to the root element if `maxWidth=\"xs\"`. */\n maxWidthXs: _defineProperty({}, theme.breakpoints.up('xs'), {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444)\n }),\n\n /* Styles applied to the root element if `maxWidth=\"sm\"`. */\n maxWidthSm: _defineProperty({}, theme.breakpoints.up('sm'), {\n maxWidth: theme.breakpoints.values.sm\n }),\n\n /* Styles applied to the root element if `maxWidth=\"md\"`. */\n maxWidthMd: _defineProperty({}, theme.breakpoints.up('md'), {\n maxWidth: theme.breakpoints.values.md\n }),\n\n /* Styles applied to the root element if `maxWidth=\"lg\"`. */\n maxWidthLg: _defineProperty({}, theme.breakpoints.up('lg'), {\n maxWidth: theme.breakpoints.values.lg\n }),\n\n /* Styles applied to the root element if `maxWidth=\"xl\"`. */\n maxWidthXl: _defineProperty({}, theme.breakpoints.up('xl'), {\n maxWidth: theme.breakpoints.values.xl\n })\n };\n};\nvar Container = /*#__PURE__*/React.forwardRef(function Container(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$fixed = props.fixed,\n fixed = _props$fixed === void 0 ? false : _props$fixed,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"fixed\", \"maxWidth\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, fixed && classes.fixed, disableGutters && classes.disableGutters, maxWidth !== false && classes[\"maxWidth\".concat(capitalize(String(maxWidth)))]),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Container.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * Set the max-width to match the min-width of the current breakpoint.\n * This is useful if you'd prefer to design for a fixed set of sizes\n * instead of trying to accommodate a fully fluid viewport.\n * It's fluid by default.\n */\n fixed: PropTypes.bool,\n\n /**\n * Determine the max-width of the container.\n * The container width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiContainer'\n})(Container);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport { exactProp } from '@material-ui/utils';\nexport var html = {\n WebkitFontSmoothing: 'antialiased',\n // Antialiasing.\n MozOsxFontSmoothing: 'grayscale',\n // Antialiasing.\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: 'border-box'\n};\nexport var body = function body(theme) {\n return _extends({\n color: theme.palette.text.primary\n }, theme.typography.body2, {\n backgroundColor: theme.palette.background.default,\n '@media print': {\n // Save printer ink.\n backgroundColor: theme.palette.common.white\n }\n });\n};\nexport var styles = function styles(theme) {\n return {\n '@global': {\n html: html,\n '*, *::before, *::after': {\n boxSizing: 'inherit'\n },\n 'strong, b': {\n fontWeight: theme.typography.fontWeightBold\n },\n body: _extends({\n margin: 0\n }, body(theme), {\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n '&::backdrop': {\n backgroundColor: theme.palette.background.default\n }\n })\n }\n };\n};\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n */\n\nfunction CssBaseline(props) {\n /* eslint-disable no-unused-vars */\n var _props$children = props.children,\n children = _props$children === void 0 ? null : _props$children,\n classes = props.classes;\n /* eslint-enable no-unused-vars */\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? CssBaseline.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n CssBaseline['propTypes' + ''] = exactProp(CssBaseline.propTypes);\n}\n\nexport default withStyles(styles, {\n name: 'MuiCssBaseline'\n})(CssBaseline);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 1,\n margin: 0,\n // Reset browser default style.\n border: 'none',\n flexShrink: 0,\n backgroundColor: theme.palette.divider\n },\n\n /* Styles applied to the root element if `absolute={true}`. */\n absolute: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n },\n\n /* Styles applied to the root element if `variant=\"inset\"`. */\n inset: {\n marginLeft: 72\n },\n\n /* Styles applied to the root element if `light={true}`. */\n light: {\n backgroundColor: alpha(theme.palette.divider, 0.08)\n },\n\n /* Styles applied to the root element if `variant=\"middle\"`. */\n middle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n height: '100%',\n width: 1\n },\n\n /* Styles applied to the root element if `flexItem={true}`. */\n flexItem: {\n alignSelf: 'stretch',\n height: 'auto'\n }\n };\n};\nvar Divider = /*#__PURE__*/React.forwardRef(function Divider(props, ref) {\n var _props$absolute = props.absolute,\n absolute = _props$absolute === void 0 ? false : _props$absolute,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'hr' : _props$component,\n _props$flexItem = props.flexItem,\n flexItem = _props$flexItem === void 0 ? false : _props$flexItem,\n _props$light = props.light,\n light = _props$light === void 0 ? false : _props$light,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$role = props.role,\n role = _props$role === void 0 ? Component !== 'hr' ? 'separator' : undefined : _props$role,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'fullWidth' : _props$variant,\n other = _objectWithoutProperties(props, [\"absolute\", \"classes\", \"className\", \"component\", \"flexItem\", \"light\", \"orientation\", \"role\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, variant !== 'fullWidth' && classes[variant], absolute && classes.absolute, flexItem && classes.flexItem, light && classes.light, orientation === 'vertical' && classes.vertical),\n role: role,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Absolutely position the element.\n */\n absolute: PropTypes.bool,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n */\n flexItem: PropTypes.bool,\n\n /**\n * If `true`, the divider will have a lighter color.\n */\n light: PropTypes.bool,\n\n /**\n * The divider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * @ignore\n */\n role: PropTypes.string,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['fullWidth', 'inset', 'middle'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDivider'\n})(Divider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Modal from '../Modal';\nimport Backdrop from '../Backdrop';\nimport withStyles from '../styles/withStyles';\nimport Slide from '../Slide';\nimport Paper from '../Paper';\nimport capitalize from '../utils/capitalize';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `variant=\"permanent or persistent\"`. */\n docked: {\n flex: '0 0 auto'\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n flex: '1 0 auto',\n zIndex: theme.zIndex.drawer,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n // temporary style\n position: 'fixed',\n top: 0,\n // We disable the focus ring for mouse, touch and keyboard users.\n // At some point, it would be better to keep it for keyboard users.\n // :focus-ring CSS pseudo-class will help.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"`. */\n paperAnchorLeft: {\n left: 0,\n right: 'auto'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"`. */\n paperAnchorRight: {\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"`. */\n paperAnchorTop: {\n top: 0,\n left: 0,\n bottom: 'auto',\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"`. */\n paperAnchorBottom: {\n top: 'auto',\n left: 0,\n bottom: 0,\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"` and `variant` is not \"temporary\". */\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"` and `variant` is not \"temporary\". */\n paperAnchorDockedTop: {\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"` and `variant` is not \"temporary\". */\n paperAnchorDockedRight: {\n borderLeft: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"` and `variant` is not \"temporary\". */\n paperAnchorDockedBottom: {\n borderTop: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Modal` component. */\n modal: {}\n };\n};\nvar oppositeDirection = {\n left: 'right',\n right: 'left',\n top: 'down',\n bottom: 'up'\n};\nexport function isHorizontal(anchor) {\n return ['left', 'right'].indexOf(anchor) !== -1;\n}\nexport function getAnchor(theme, anchor) {\n return theme.direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor;\n}\nvar defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The props of the [Modal](/api/modal/) component are available\n * when `variant=\"temporary\"` is set.\n */\n\nvar Drawer = /*#__PURE__*/React.forwardRef(function Drawer(props, ref) {\n var _props$anchor = props.anchor,\n anchorProp = _props$anchor === void 0 ? 'left' : _props$anchor,\n BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 16 : _props$elevation,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropPropsProp = _props$ModalProps.BackdropProps,\n ModalProps = _objectWithoutProperties(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n _props$open = props.open,\n open = _props$open === void 0 ? false : _props$open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SlideProps = props.SlideProps,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Slide : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchor\", \"BackdropProps\", \"children\", \"classes\", \"className\", \"elevation\", \"ModalProps\", \"onClose\", \"open\", \"PaperProps\", \"SlideProps\", \"TransitionComponent\", \"transitionDuration\", \"variant\"]);\n\n var theme = useTheme(); // Let's assume that the Drawer will always be rendered on user space.\n // We use this state is order to skip the appear transition during the\n // initial mount of the component.\n\n var mounted = React.useRef(false);\n React.useEffect(function () {\n mounted.current = true;\n }, []);\n var anchor = getAnchor(theme, anchorProp);\n var drawer = /*#__PURE__*/React.createElement(Paper, _extends({\n elevation: variant === 'temporary' ? elevation : 0,\n square: true\n }, PaperProps, {\n className: clsx(classes.paper, classes[\"paperAnchor\".concat(capitalize(anchor))], PaperProps.className, variant !== 'temporary' && classes[\"paperAnchorDocked\".concat(capitalize(anchor))])\n }), children);\n\n if (variant === 'permanent') {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes.docked, className),\n ref: ref\n }, other), drawer);\n }\n\n var slidingDrawer = /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: open,\n direction: oppositeDirection[anchor],\n timeout: transitionDuration,\n appear: mounted.current\n }, SlideProps), drawer);\n\n if (variant === 'persistent') {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes.docked, className),\n ref: ref\n }, other), slidingDrawer);\n } // variant === temporary\n\n\n return /*#__PURE__*/React.createElement(Modal, _extends({\n BackdropProps: _extends({}, BackdropProps, BackdropPropsProp, {\n transitionDuration: transitionDuration\n }),\n BackdropComponent: Backdrop,\n className: clsx(classes.root, classes.modal, className),\n open: open,\n onClose: onClose,\n ref: ref\n }, other, ModalProps), slidingDrawer);\n});\nprocess.env.NODE_ENV !== \"production\" ? Drawer.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Side from which the drawer will appear.\n */\n anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * The contents of the drawer.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The elevation of the drawer.\n */\n elevation: PropTypes.number,\n\n /**\n * Props applied to the [`Modal`](/api/modal/) element.\n */\n ModalProps: PropTypes.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the drawer is open.\n */\n open: PropTypes.bool,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Props applied to the [`Slide`](/api/slide/) element.\n */\n SlideProps: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDrawer',\n flip: false\n})(Drawer);","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar ExpansionPanelContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ExpansionPanelContext.displayName = 'ExpansionPanelContext';\n}\n\nexport default ExpansionPanelContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport ExpansionPanelContext from './ExpansionPanelContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanel component was renamed to Accordion to use a more common naming convention.\n *\n * You should use `import { Accordion } from '@material-ui/core'`\n * or `import Accordion from '@material-ui/core/Accordion'`.\n */\n\nvar ExpansionPanel = /*#__PURE__*/React.forwardRef(function ExpansionPanel(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanel component was renamed to Accordion to use a more common naming convention.', '', \"You should use `import { Accordion } from '@material-ui/core'`\", \"or `import Accordion from '@material-ui/core/Accordion'`\"].join('\\n'));\n }\n }\n\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'ExpansionPanel',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(ExpansionPanelContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The ExpansionPanel doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of ExpansionPanel to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the panel by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the panel will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the panel, otherwise collapse it.\n * Setting this prop enables control over the panel.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the panel.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanel'\n})(ExpansionPanel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.\n *\n * You should use `import { AccordionActions } from '@material-ui/core'`\n * or `import AccordionActions from '@material-ui/core/AccordionActions'`.\n */\n\nvar ExpansionPanelActions = /*#__PURE__*/React.forwardRef(function ExpansionPanelActions(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.', '', \"You should use `import { AccordionActions } from '@material-ui/core'`\", \"or `import AccordionActions from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelActions'\n})(ExpansionPanelActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.\n *\n * You should use `import { AccordionDetails } from '@material-ui/core'`\n * or `import AccordionDetails from '@material-ui/core/AccordionDetails'`.\n */\n\nvar ExpansionPanelDetails = /*#__PURE__*/React.forwardRef(function ExpansionPanelDetails(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.', '', \"You should use `import { AccordionDetails } from '@material-ui/core'`\", \"or `import AccordionDetails from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelDetails'\n})(ExpansionPanelDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport ExpansionPanelContext from '../ExpansionPanel/ExpansionPanelContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.\n *\n * You should use `import { AccordionSummary } from '@material-ui/core'`\n * or `import AccordionSummary from '@material-ui/core/AccordionSummary'`.\n */\n\nvar ExpansionPanelSummary = /*#__PURE__*/React.forwardRef(function ExpansionPanelSummary(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.', '', \"You should use `import { AccordionSummary } from '@material-ui/core'`\", \"or `import AccordionSummary from '@material-ui/core/AccordionSummary'`\"].join('\\n'));\n }\n }\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n IconButtonProps = props.IconButtonProps,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocusVisible = props.onFocusVisible,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"IconButtonProps\", \"onBlur\", \"onClick\", \"onFocusVisible\"]);\n\n var _React$useState = React.useState(false),\n focusedState = _React$useState[0],\n setFocusedState = _React$useState[1];\n\n var handleFocusVisible = function handleFocusVisible(event) {\n setFocusedState(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n setFocusedState(false);\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var _React$useContext = React.useContext(ExpansionPanelContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded, focusedState && classes.focused),\n onFocusVisible: handleFocusVisible,\n onBlur: handleBlur,\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelSummary'\n})(ExpansionPanelSummary);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'wrap'\n },\n\n /* Styles applied to the root element if `row={true}`. */\n row: {\n flexDirection: 'row'\n }\n};\n/**\n * `FormGroup` wraps controls such as `Checkbox` and `Switch`.\n * It provides compact row layout.\n * For the `Radio`, you should be using the `RadioGroup` component instead of this one.\n */\n\nvar FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$row = props.row,\n row = _props$row === void 0 ? false : _props$row,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"row\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, row && classes.row),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display group of elements in a compact row.\n */\n row: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormGroup'\n})(FormGroup);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.\n *\n * You should use `import { ImageList } from '@material-ui/core'`\n * or `import ImageList from '@material-ui/core/ImageList'`.\n */\n\nvar GridList = /*#__PURE__*/React.forwardRef(function GridList(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridList component was renamed to ImageList to align with the current Material Design naming.', '', \"You should use `import { ImageList } from '@material-ui/core'`\", \"or `import ImageList from '@material-ui/core/ImageList'`.\"].join('\\n'));\n }\n }\n\n var _props$cellHeight = props.cellHeight,\n cellHeight = _props$cellHeight === void 0 ? 180 : _props$cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? 4 : _props$spacing,\n style = props.style,\n other = _objectWithoutProperties(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"spacing\", \"style\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n style: _extends({\n margin: -spacing / 2\n }, style)\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The GridList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/React.cloneElement(child, {\n style: _extends({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: cellHeight === 'auto' ? 'auto' : cellHeight * childRows + spacing,\n padding: spacing / 2\n }, child.props.style)\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridList.propTypes = {\n /**\n * Number of px for one cell height.\n * You can set `'auto'` if you want to let the children determine the height.\n */\n cellHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]),\n\n /**\n * Grid Tiles that will be in Grid List.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Number of columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Number of px for the spacing between tiles.\n */\n spacing: PropTypes.number,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridList'\n})(GridList);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport debounce from '../utils/debounce';\nimport withStyles from '../styles/withStyles';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n tile: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, _toConsumableArray(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, _toConsumableArray(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, _toConsumableArray(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, _toConsumableArray(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar warnedOnce = false;\n/**\n * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.\n *\n * You should use `import { ImageListItem } from '@material-ui/core'`\n * or `import ImageListItem from '@material-ui/core/ImageListItem'`.\n */\n\nvar GridListTile = /*#__PURE__*/React.forwardRef(function GridListTile(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridListTile component was renamed to ImageListItem to align with the current Material Design naming.', '', \"You should use `import { ImageListItem } from '@material-ui/core'`\", \"or `import ImageListItem from '@material-ui/core/ImageListItem'`.\"].join('\\n'));\n }\n } // cols rows default values are for docs only\n\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = React.useRef(null);\n React.useEffect(function () {\n ensureImageCover(imgRef.current, classes);\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.tile\n }, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTile.propTypes = {\n /**\n * Theoretically you can pass any node as children, but the main use case is to pass an img,\n * in which case GridListTile takes care of making the image \"cover\" available space\n * (similar to `background-size: cover` or to `object-fit: cover`).\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Width of the tile in number of grid cells.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the tile in number of grid cells.\n */\n rows: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTile'\n})(GridListTile);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `titlePosition=\"bottom\"`. */\n titlePositionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `titlePosition=\"top\"`. */\n titlePositionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.\n *\n * You should use `import { ImageListItemBar } from '@material-ui/core'`\n * or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.\n */\n\nvar GridListTileBar = /*#__PURE__*/React.forwardRef(function GridListTileBar(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.', '', \"You should use `import { ImageListItemBar } from '@material-ui/core'`\", \"or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.\"].join('\\n'));\n }\n }\n\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$titlePosition = props.titlePosition,\n titlePosition = _props$titlePosition === void 0 ? 'bottom' : _props$titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"titlePosition\"]);\n\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, titlePosition === 'top' ? classes.titlePositionTop : classes.titlePositionBottom, subtitle && classes.rootSubtitle),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTileBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the tile itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on tile.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n */\n titlePosition: PropTypes.oneOf(['bottom', 'top'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTileBar'\n})(GridListTileBar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { getThemeProps, useTheme } from '@material-ui/styles';\nexport default function useMediaQuery(queryInput) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var theme = useTheme();\n var props = getThemeProps({\n theme: theme,\n name: 'MuiUseMediaQuery',\n props: {}\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['Material-UI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n var query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, ''); // Wait for jsdom to support the match media feature.\n // All the browsers Material-UI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n\n var supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n\n var _props$options = _extends({}, props, options),\n _props$options$defaul = _props$options.defaultMatches,\n defaultMatches = _props$options$defaul === void 0 ? false : _props$options$defaul,\n _props$options$matchM = _props$options.matchMedia,\n matchMedia = _props$options$matchM === void 0 ? supportMatchMedia ? window.matchMedia : null : _props$options$matchM,\n _props$options$noSsr = _props$options.noSsr,\n noSsr = _props$options$noSsr === void 0 ? false : _props$options$noSsr,\n _props$options$ssrMat = _props$options.ssrMatchMedia,\n ssrMatchMedia = _props$options$ssrMat === void 0 ? null : _props$options$ssrMat;\n\n var _React$useState = React.useState(function () {\n if (noSsr && supportMatchMedia) {\n return matchMedia(query).matches;\n }\n\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n } // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n\n\n return defaultMatches;\n }),\n match = _React$useState[0],\n setMatch = _React$useState[1];\n\n React.useEffect(function () {\n var active = true;\n\n if (!supportMatchMedia) {\n return undefined;\n }\n\n var queryList = matchMedia(query);\n\n var updateMatch = function updateMatch() {\n // Workaround Safari wrong implementation of matchMedia\n // TODO can we remove it?\n // https://github.com/mui-org/material-ui/pull/17315#issuecomment-528286677\n if (active) {\n setMatch(queryList.matches);\n }\n };\n\n updateMatch();\n queryList.addListener(updateMatch);\n return function () {\n active = false;\n queryList.removeListener(updateMatch);\n };\n }, [query, matchMedia, supportMatchMedia]);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue({\n query: query,\n match: match\n });\n }\n\n return match;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { getDisplayName } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport useTheme from '../styles/useTheme';\nimport { keys as breakpointKeys } from '../styles/createBreakpoints';\nimport useMediaQuery from '../useMediaQuery'; // By default, returns true if screen width is the same or greater than the given breakpoint.\n\nexport var isWidthUp = function isWidthUp(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return breakpointKeys.indexOf(breakpoint) <= breakpointKeys.indexOf(width);\n }\n\n return breakpointKeys.indexOf(breakpoint) < breakpointKeys.indexOf(width);\n}; // By default, returns true if screen width is the same or less than the given breakpoint.\n\nexport var isWidthDown = function isWidthDown(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return breakpointKeys.indexOf(width) <= breakpointKeys.indexOf(breakpoint);\n }\n\n return breakpointKeys.indexOf(width) < breakpointKeys.indexOf(breakpoint);\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nvar withWidth = function withWidth() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (Component) {\n var _options$withTheme = options.withTheme,\n withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme,\n _options$noSSR = options.noSSR,\n noSSR = _options$noSSR === void 0 ? false : _options$noSSR,\n initialWidthOption = options.initialWidth;\n\n function WithWidth(props) {\n var contextTheme = useTheme();\n var theme = props.theme || contextTheme;\n\n var _getThemeProps = getThemeProps({\n theme: theme,\n name: 'MuiWithWidth',\n props: _extends({}, props)\n }),\n initialWidth = _getThemeProps.initialWidth,\n width = _getThemeProps.width,\n other = _objectWithoutProperties(_getThemeProps, [\"initialWidth\", \"width\"]);\n\n var _React$useState = React.useState(false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n setMountedState(true);\n }, []);\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n var keys = theme.breakpoints.keys.slice().reverse();\n var widthComputed = keys.reduce(function (output, key) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var matches = useMediaQuery(theme.breakpoints.up(key));\n return !output && matches ? key : output;\n }, null);\n\n var more = _extends({\n width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption\n }, withThemeOption ? {\n theme: theme\n } : {}, other); // When rendering the component on the server,\n // we have no idea about the client browser screen width.\n // In order to prevent blinks and help the reconciliation of the React tree\n // we are not rendering the child component.\n //\n // An alternative is to use the `initialWidth` property.\n\n\n if (more.width === undefined) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(Component, more);\n }\n\n process.env.NODE_ENV !== \"production\" ? WithWidth.propTypes = {\n /**\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * @ignore\n */\n theme: PropTypes.object,\n\n /**\n * Bypass the width calculation logic.\n */\n width: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithWidth.displayName = \"WithWidth(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithWidth, Component);\n return WithWidth;\n };\n};\n\nexport default withWidth;","import PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport withWidth, { isWidthDown, isWidthUp } from '../withWidth';\nimport useTheme from '../styles/useTheme';\n/**\n * @ignore - internal component.\n */\n\nfunction HiddenJs(props) {\n var children = props.children,\n only = props.only,\n width = props.width;\n var theme = useTheme();\n var visible = true; // `only` check is faster to get out sooner if used.\n\n if (only) {\n if (Array.isArray(only)) {\n for (var i = 0; i < only.length; i += 1) {\n var breakpoint = only[i];\n\n if (width === breakpoint) {\n visible = false;\n break;\n }\n }\n } else if (only && width === only) {\n visible = false;\n }\n } // Allow `only` to be combined with other props. If already hidden, no need to check others.\n\n\n if (visible) {\n // determine visibility based on the smallest size up\n for (var _i = 0; _i < theme.breakpoints.keys.length; _i += 1) {\n var _breakpoint = theme.breakpoints.keys[_i];\n var breakpointUp = props[\"\".concat(_breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(_breakpoint, \"Down\")];\n\n if (breakpointUp && isWidthUp(_breakpoint, width) || breakpointDown && isWidthDown(_breakpoint, width)) {\n visible = false;\n break;\n }\n }\n }\n\n if (!visible) {\n return null;\n }\n\n return children;\n}\n\nHiddenJs.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * @ignore\n * width prop provided by withWidth decorator.\n */\n width: PropTypes.string.isRequired,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n};\n\nif (process.env.NODE_ENV !== 'production') {\n HiddenJs.propTypes = exactProp(HiddenJs.propTypes);\n}\n\nexport default withWidth()(HiddenJs);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\n\nvar styles = function styles(theme) {\n var hidden = {\n display: 'none'\n };\n return theme.breakpoints.keys.reduce(function (acc, key) {\n acc[\"only\".concat(capitalize(key))] = _defineProperty({}, theme.breakpoints.only(key), hidden);\n acc[\"\".concat(key, \"Up\")] = _defineProperty({}, theme.breakpoints.up(key), hidden);\n acc[\"\".concat(key, \"Down\")] = _defineProperty({}, theme.breakpoints.down(key), hidden);\n return acc;\n }, {});\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction HiddenCss(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n only = props.only,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"only\"]);\n\n var theme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n var unknownProps = Object.keys(other).filter(function (propName) {\n var isUndeclaredBreakpoint = !theme.breakpoints.keys.some(function (breakpoint) {\n return \"\".concat(breakpoint, \"Up\") === propName || \"\".concat(breakpoint, \"Down\") === propName;\n });\n return isUndeclaredBreakpoint;\n });\n\n if (unknownProps.length > 0) {\n console.error(\"Material-UI: Unsupported props received by ``: \".concat(unknownProps.join(', '), \". Did you forget to wrap this component in a ThemeProvider declaring these breakpoints?\"));\n }\n }\n\n var clsx = [];\n\n if (className) {\n clsx.push(className);\n }\n\n for (var i = 0; i < theme.breakpoints.keys.length; i += 1) {\n var breakpoint = theme.breakpoints.keys[i];\n var breakpointUp = props[\"\".concat(breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(breakpoint, \"Down\")];\n\n if (breakpointUp) {\n clsx.push(classes[\"\".concat(breakpoint, \"Up\")]);\n }\n\n if (breakpointDown) {\n clsx.push(classes[\"\".concat(breakpoint, \"Down\")]);\n }\n }\n\n if (only) {\n var onlyBreakpoints = Array.isArray(only) ? only : [only];\n onlyBreakpoints.forEach(function (breakpoint) {\n clsx.push(classes[\"only\".concat(capitalize(breakpoint))]);\n });\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: clsx.join(' ')\n }, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? HiddenCss.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateHiddenCss'\n})(HiddenCss);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport HiddenJs from './HiddenJs';\nimport HiddenCss from './HiddenCss';\n/**\n * Responsively hides children based on the selected implementation.\n */\n\nfunction Hidden(props) {\n var _props$implementation = props.implementation,\n implementation = _props$implementation === void 0 ? 'js' : _props$implementation,\n _props$lgDown = props.lgDown,\n lgDown = _props$lgDown === void 0 ? false : _props$lgDown,\n _props$lgUp = props.lgUp,\n lgUp = _props$lgUp === void 0 ? false : _props$lgUp,\n _props$mdDown = props.mdDown,\n mdDown = _props$mdDown === void 0 ? false : _props$mdDown,\n _props$mdUp = props.mdUp,\n mdUp = _props$mdUp === void 0 ? false : _props$mdUp,\n _props$smDown = props.smDown,\n smDown = _props$smDown === void 0 ? false : _props$smDown,\n _props$smUp = props.smUp,\n smUp = _props$smUp === void 0 ? false : _props$smUp,\n _props$xlDown = props.xlDown,\n xlDown = _props$xlDown === void 0 ? false : _props$xlDown,\n _props$xlUp = props.xlUp,\n xlUp = _props$xlUp === void 0 ? false : _props$xlUp,\n _props$xsDown = props.xsDown,\n xsDown = _props$xsDown === void 0 ? false : _props$xsDown,\n _props$xsUp = props.xsUp,\n xsUp = _props$xsUp === void 0 ? false : _props$xsUp,\n other = _objectWithoutProperties(props, [\"implementation\", \"lgDown\", \"lgUp\", \"mdDown\", \"mdUp\", \"smDown\", \"smUp\", \"xlDown\", \"xlUp\", \"xsDown\", \"xsUp\"]);\n\n if (implementation === 'js') {\n return /*#__PURE__*/React.createElement(HiddenJs, _extends({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n }\n\n return /*#__PURE__*/React.createElement(HiddenCss, _extends({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Hidden.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n} : void 0;\nexport default Hidden;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n fontSize: theme.typography.pxToRem(24),\n width: '1em',\n height: '1em',\n // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541\n // To remove at some point.\n overflow: 'hidden',\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(36)\n }\n };\n};\nvar Icon = /*#__PURE__*/React.forwardRef(function Icon(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"fontSize\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx('material-icons', classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n \"aria-hidden\": true,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Icon.propTypes = {\n /**\n * The name of the icon font ligature.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nIcon.muiName = 'Icon';\nexport default withStyles(styles, {\n name: 'MuiIcon'\n})(Icon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar ImageList = /*#__PURE__*/React.forwardRef(function ImageList(props, ref) {\n var cellHeight = props.cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$gap = props.gap,\n gapProp = _props$gap === void 0 ? 4 : _props$gap,\n _props$rowHeight = props.rowHeight,\n rowHeightProp = _props$rowHeight === void 0 ? 180 : _props$rowHeight,\n spacing = props.spacing,\n style = props.style,\n other = _objectWithoutProperties(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"gap\", \"rowHeight\", \"spacing\", \"style\"]);\n\n var gap = spacing || gapProp;\n var rowHeight = cellHeight || rowHeightProp;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n style: _extends({\n margin: -gap / 2\n }, style)\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The ImageList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/React.cloneElement(child, {\n style: _extends({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: rowHeight === 'auto' ? 'auto' : rowHeight * childRows + gap,\n padding: gap / 2\n }, child.props.style)\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageList.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Cell height in `px`.\n * Set to `'auto'` to let the children determine the height.\n * @deprecated Use rowHeight instead.\n */\n cellHeight: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]), 'Use the `rowHeight` prop instead.'),\n\n /**\n * Items that will be in the image list.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Number of columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The gap between items in `px`.\n */\n gap: PropTypes.number,\n\n /**\n * The height of one row in `px`.\n */\n rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n\n /**\n * The spacing between items in `px`.\n * @deprecated Use gap instead.\n */\n spacing: deprecatedPropType(PropTypes.number, 'Use the `gap` prop instead.'),\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageList'\n})(ImageList);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport debounce from '../utils/debounce';\nimport withStyles from '../styles/withStyles';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n item: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the item. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the item. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, _toConsumableArray(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, _toConsumableArray(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, _toConsumableArray(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, _toConsumableArray(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(props, ref) {\n // cols rows default values are for docs only\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = React.useRef(null);\n React.useEffect(function () {\n ensureImageCover(imgRef.current, classes);\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.item\n }, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItem.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * While you can pass any node as children, the main use case is for an img.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Width of the item in number of grid columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the item in number of grid rows.\n */\n rows: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageListItem'\n})(ImageListItem);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar ImageListItemBar = /*#__PURE__*/React.forwardRef(function ImageListItemBar(props, ref) {\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$position = props.position,\n positionProp = _props$position === void 0 ? 'bottom' : _props$position,\n titlePosition = props.titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"position\", \"titlePosition\"]);\n\n var position = titlePosition || positionProp;\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, subtitle && classes.rootSubtitle, {\n 'bottom': classes.positionBottom,\n 'top': classes.positionTop\n }[position]),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItemBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the item itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Position of the title bar.\n */\n position: PropTypes.oneOf(['bottom', 'top']),\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on item.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n * @deprecated Use position instead.\n */\n titlePosition: deprecatedPropType(PropTypes.oneOf(['bottom', 'top']), 'Use the `position` prop instead.')\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageListItemBar'\n})(ImageListItemBar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { darken, lighten } from '../styles/colorManipulator';\nimport useTheme from '../styles/useTheme';\nvar TRANSITION_DURATION = 4; // seconds\n\nexport var styles = function styles(theme) {\n var getColor = function getColor(color) {\n return theme.palette.type === 'light' ? lighten(color, 0.62) : darken(color, 0.5);\n };\n\n var backgroundPrimary = getColor(theme.palette.primary.main);\n var backgroundSecondary = getColor(theme.palette.secondary.main);\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n overflow: 'hidden',\n height: 4,\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root and bar2 element if `color=\"primary\"`; bar2 if `variant=\"buffer\"`. */\n colorPrimary: {\n backgroundColor: backgroundPrimary\n },\n\n /* Styles applied to the root and bar2 elements if `color=\"secondary\"`; bar2 if `variant=\"buffer\"`. */\n colorSecondary: {\n backgroundColor: backgroundSecondary\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {},\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `variant=\"buffer\"`. */\n buffer: {\n backgroundColor: 'transparent'\n },\n\n /* Styles applied to the root element if `variant=\"query\"`. */\n query: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"`. */\n dashed: {\n position: 'absolute',\n marginTop: 0,\n height: '100%',\n width: '100%',\n animation: '$buffer 3s infinite linear'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"primary\"`. */\n dashedColorPrimary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundPrimary, \" 0%, \").concat(backgroundPrimary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"secondary\"`. */\n dashedColorSecondary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundSecondary, \" 0%, \").concat(backgroundSecondary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the layered bar1 and bar2 elements. */\n bar: {\n width: '100%',\n position: 'absolute',\n left: 0,\n bottom: 0,\n top: 0,\n transition: 'transform 0.2s linear',\n transformOrigin: 'left'\n },\n\n /* Styles applied to the bar elements if `color=\"primary\"`; bar2 if `variant` not \"buffer\". */\n barColorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the bar elements if `color=\"secondary\"`; bar2 if `variant` not \"buffer\". */\n barColorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n\n /* Styles applied to the bar1 element if `variant=\"indeterminate or query\"`. */\n bar1Indeterminate: {\n width: 'auto',\n animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite'\n },\n\n /* Styles applied to the bar1 element if `variant=\"determinate\"`. */\n bar1Determinate: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar1 element if `variant=\"buffer\"`. */\n bar1Buffer: {\n zIndex: 1,\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar2 element if `variant=\"indeterminate or query\"`. */\n bar2Indeterminate: {\n width: 'auto',\n animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite'\n },\n\n /* Styles applied to the bar2 element if `variant=\"buffer\"`. */\n bar2Buffer: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n // Legends:\n // || represents the viewport\n // - represents a light background\n // x represents a dark background\n '@keyframes indeterminate1': {\n // |-----|---x-||-----||-----|\n '0%': {\n left: '-35%',\n right: '100%'\n },\n // |-----|-----||-----||xxxx-|\n '60%': {\n left: '100%',\n right: '-90%'\n },\n '100%': {\n left: '100%',\n right: '-90%'\n }\n },\n '@keyframes indeterminate2': {\n // |xxxxx|xxxxx||-----||-----|\n '0%': {\n left: '-200%',\n right: '100%'\n },\n // |-----|-----||-----||-x----|\n '60%': {\n left: '107%',\n right: '-8%'\n },\n '100%': {\n left: '107%',\n right: '-8%'\n }\n },\n '@keyframes buffer': {\n '0%': {\n opacity: 1,\n backgroundPosition: '0 -23px'\n },\n '50%': {\n opacity: 0,\n backgroundPosition: '0 -23px'\n },\n '100%': {\n opacity: 1,\n backgroundPosition: '-200px -23px'\n }\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n value = props.value,\n valueBuffer = props.valueBuffer,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"value\", \"valueBuffer\", \"variant\"]);\n\n var theme = useTheme();\n var rootProps = {};\n var inlineStyles = {\n bar1: {},\n bar2: {}\n };\n\n if (variant === 'determinate' || variant === 'buffer') {\n if (value !== undefined) {\n rootProps['aria-valuenow'] = Math.round(value);\n rootProps['aria-valuemin'] = 0;\n rootProps['aria-valuemax'] = 100;\n var transform = value - 100;\n\n if (theme.direction === 'rtl') {\n transform = -transform;\n }\n\n inlineStyles.bar1.transform = \"translateX(\".concat(transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');\n }\n }\n\n if (variant === 'buffer') {\n if (valueBuffer !== undefined) {\n var _transform = (valueBuffer || 0) - 100;\n\n if (theme.direction === 'rtl') {\n _transform = -_transform;\n }\n\n inlineStyles.bar2.transform = \"translateX(\".concat(_transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');\n }\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'buffer': classes.buffer,\n 'query': classes.query\n }[variant]),\n role: \"progressbar\"\n }, rootProps, {\n ref: ref\n }, other), variant === 'buffer' ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.dashed, classes[\"dashedColor\".concat(capitalize(color))])\n }) : null, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, classes[\"barColor\".concat(capitalize(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, {\n 'determinate': classes.bar1Determinate,\n 'buffer': classes.bar1Buffer\n }[variant]),\n style: inlineStyles.bar1\n }), variant === 'determinate' ? null : /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes[\"color\".concat(capitalize(color))], classes.bar2Buffer] : classes[\"barColor\".concat(capitalize(color))]),\n style: inlineStyles.bar2\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? LinearProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The value of the progress indicator for the determinate and buffer variants.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The value for the buffer variant.\n * Value between 0 and 100.\n */\n valueBuffer: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate or query when there is no progress value.\n */\n variant: PropTypes.oneOf(['buffer', 'determinate', 'indeterminate', 'query'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLinearProgress'\n})(LinearProgress);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useForkRef from '../utils/useForkRef';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `underline=\"none\"`. */\n underlineNone: {\n textDecoration: 'none'\n },\n\n /* Styles applied to the root element if `underline=\"hover\"`. */\n underlineHover: {\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline'\n }\n },\n\n /* Styles applied to the root element if `underline=\"always\"`. */\n underlineAlways: {\n textDecoration: 'underline'\n },\n // Same reset as ButtonBase.root\n\n /* Styles applied to the root element if `component=\"button\"`. */\n button: {\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$focusVisible': {\n outline: 'auto'\n }\n },\n\n /* Pseudo-class applied to the root element if the link is keyboard focused. */\n focusVisible: {}\n};\nvar Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'a' : _props$component,\n onBlur = props.onBlur,\n onFocus = props.onFocus,\n TypographyClasses = props.TypographyClasses,\n _props$underline = props.underline,\n underline = _props$underline === void 0 ? 'hover' : _props$underline,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'inherit' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"onBlur\", \"onFocus\", \"TypographyClasses\", \"underline\", \"variant\"]);\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n var handlerRef = useForkRef(ref, focusVisibleRef);\n\n var handleBlur = function handleBlur(event) {\n if (focusVisible) {\n onBlurVisible();\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var handleFocus = function handleFocus(event) {\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(Typography, _extends({\n className: clsx(classes.root, classes[\"underline\".concat(capitalize(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button),\n classes: TypographyClasses,\n color: color,\n component: component,\n onBlur: handleBlur,\n onFocus: handleFocus,\n ref: handlerRef,\n variant: variant\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n /**\n * The content of the link.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the link.\n */\n color: PropTypes.oneOf(['initial', 'inherit', 'primary', 'secondary', 'textPrimary', 'textSecondary', 'error']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * `classes` prop applied to the [`Typography`](/api/typography/) element.\n */\n TypographyClasses: PropTypes.object,\n\n /**\n * Controls when the link should have an underline.\n */\n underline: PropTypes.oneOf(['none', 'hover', 'always']),\n\n /**\n * Applies the theme typography styles.\n */\n variant: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLink'\n})(Link);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n flexShrink: 0\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n};\n/**\n * A simple wrapper to apply `List` styles to an `Avatar`.\n */\n\nvar ListItemAvatar = /*#__PURE__*/React.forwardRef(function ListItemAvatar(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n var context = React.useContext(ListContext);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemAvatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component – normally `Avatar`.\n */\n children: PropTypes.element.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemAvatar'\n})(ListItemAvatar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from '../List/ListContext';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n };\n};\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nvar ListItemIcon = /*#__PURE__*/React.forwardRef(function ListItemIcon(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n var context = React.useContext(ListContext);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@material-ui/icons` SVG icon element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemIcon'\n})(ListItemIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n right: 16,\n top: '50%',\n transform: 'translateY(-50%)'\n }\n};\n/**\n * Must be used as the last child of ListItem to function properly.\n */\n\nvar ListItemSecondaryAction = /*#__PURE__*/React.forwardRef(function ListItemSecondaryAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemSecondaryAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally an `IconButton` or selection control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nListItemSecondaryAction.muiName = 'ListItemSecondaryAction';\nexport default withStyles(styles, {\n name: 'MuiListItemSecondaryAction'\n})(ListItemSecondaryAction);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n },\n\n /* Styles applied to the `Typography` components if primary and secondary are set. */\n multiline: {\n marginTop: 6,\n marginBottom: 6\n },\n\n /* Styles applied to the `Typography` components if dense. */\n dense: {},\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 56\n },\n\n /* Styles applied to the primary `Typography` component. */\n primary: {},\n\n /* Styles applied to the secondary `Typography` component. */\n secondary: {}\n};\nvar ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n primaryProp = props.primary,\n primaryTypographyProps = props.primaryTypographyProps,\n secondaryProp = props.secondary,\n secondaryTypographyProps = props.secondaryTypographyProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"]);\n\n var _React$useContext = React.useContext(ListContext),\n dense = _React$useContext.dense;\n\n var primary = primaryProp != null ? primaryProp : children;\n\n if (primary != null && primary.type !== Typography && !disableTypography) {\n primary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps), primary);\n }\n\n var secondary = secondaryProp;\n\n if (secondary != null && secondary.type !== Typography && !disableTypography) {\n secondary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: \"body2\",\n className: classes.secondary,\n color: \"textSecondary\",\n display: \"block\"\n }, secondaryTypographyProps), secondary);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline),\n ref: ref\n }, other), primary, secondary);\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * If `true`, the children will be indented.\n * This should be used if there is no left avatar or left icon.\n */\n inset: PropTypes.bool,\n\n /**\n * The main content element.\n */\n primary: PropTypes.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: PropTypes.object,\n\n /**\n * The secondary content element.\n */\n secondary: PropTypes.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemText'\n})(ListItemText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n lineHeight: '48px',\n listStyle: 'none',\n color: theme.palette.text.secondary,\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(14)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the inner `component` element if `disableGutters={false}`. */\n gutters: {\n paddingLeft: 16,\n paddingRight: 16\n },\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 72\n },\n\n /* Styles applied to the root element if `disableSticky={false}`. */\n sticky: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n backgroundColor: 'inherit'\n }\n };\n};\nvar ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$disableSticky = props.disableSticky,\n disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"disableGutters\", \"disableSticky\", \"inset\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListSubheader.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'inherit']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the List Subheader will not have gutters.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will not stick to the top during scroll.\n */\n disableSticky: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will be indented.\n */\n inset: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListSubheader'\n})(ListSubheader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Paper from '../Paper';\nimport capitalize from '../utils/capitalize';\nimport LinearProgress from '../LinearProgress';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n background: theme.palette.background.default,\n padding: 8\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n position: 'fixed',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {},\n\n /* Styles applied to the dots container if `variant=\"dots\"`. */\n dots: {\n display: 'flex',\n flexDirection: 'row'\n },\n\n /* Styles applied to each dot if `variant=\"dots\"`. */\n dot: {\n backgroundColor: theme.palette.action.disabled,\n borderRadius: '50%',\n width: 8,\n height: 8,\n margin: '0 2px'\n },\n\n /* Styles applied to a dot if `variant=\"dots\"` and this is the active step. */\n dotActive: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the Linear Progress component if `variant=\"progress\"`. */\n progress: {\n width: '50%'\n }\n };\n};\nvar MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n backButton = props.backButton,\n classes = props.classes,\n className = props.className,\n LinearProgressProps = props.LinearProgressProps,\n nextButton = props.nextButton,\n _props$position = props.position,\n position = _props$position === void 0 ? 'bottom' : _props$position,\n steps = props.steps,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'dots' : _props$variant,\n other = _objectWithoutProperties(props, [\"activeStep\", \"backButton\", \"classes\", \"className\", \"LinearProgressProps\", \"nextButton\", \"position\", \"steps\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[\"position\".concat(capitalize(position))], className),\n ref: ref\n }, other), backButton, variant === 'text' && /*#__PURE__*/React.createElement(React.Fragment, null, activeStep + 1, \" / \", steps), variant === 'dots' && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.dots\n }, _toConsumableArray(new Array(steps)).map(function (_, index) {\n return /*#__PURE__*/React.createElement(\"div\", {\n key: index,\n className: clsx(classes.dot, index === activeStep && classes.dotActive)\n });\n })), variant === 'progress' && /*#__PURE__*/React.createElement(LinearProgress, _extends({\n className: classes.progress,\n variant: \"determinate\",\n value: Math.ceil(activeStep / (steps - 1) * 100)\n }, LinearProgressProps)), nextButton);\n});\nprocess.env.NODE_ENV !== \"production\" ? MobileStepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Defines which dot is highlighted when the variant is 'dots'.\n */\n activeStep: PropTypes.number,\n\n /**\n * A back button element. For instance, it can be a `Button` or an `IconButton`.\n */\n backButton: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Props applied to the `LinearProgress` element.\n */\n LinearProgressProps: PropTypes.object,\n\n /**\n * A next button element. For instance, it can be a `Button` or an `IconButton`.\n */\n nextButton: PropTypes.node,\n\n /**\n * Set the positioning type.\n */\n position: PropTypes.oneOf(['bottom', 'static', 'top']),\n\n /**\n * The total steps.\n */\n steps: PropTypes.number.isRequired,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['dots', 'progress', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiMobileStepper'\n})(MobileStepper);","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nvar useEnhancedEffect = typeof window !== 'undefined' && process.env.NODE_ENV !== 'test' ? React.useLayoutEffect : React.useEffect;\n/**\n * NoSsr purposely removes components from the subject of Server Side Rendering (SSR).\n *\n * This component can be useful in a variety of situations:\n * - Escape hatch for broken dependencies not supporting SSR.\n * - Improve the time-to-first paint on the client by only rendering above the fold.\n * - Reduce the rendering time on the server.\n * - Under too heavy server load, you can turn on service degradation.\n */\n\nfunction NoSsr(props) {\n var children = props.children,\n _props$defer = props.defer,\n defer = _props$defer === void 0 ? false : _props$defer,\n _props$fallback = props.fallback,\n fallback = _props$fallback === void 0 ? null : _props$fallback;\n\n var _React$useState = React.useState(false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n if (!defer) {\n setMountedState(true);\n }\n }, [defer]);\n React.useEffect(function () {\n if (defer) {\n setMountedState(true);\n }\n }, [defer]); // We need the Fragment here to force react-docgen to recognise NoSsr as a component.\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, mountedState ? children : fallback);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? NoSsr.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n\n /**\n * If `true`, the component will not only prevent server-side rendering.\n * It will also defer the rendering of the children into a different screen frame.\n */\n defer: PropTypes.bool,\n\n /**\n * The fallback content to display.\n */\n fallback: PropTypes.node\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n NoSsr['propTypes' + ''] = exactProp(NoSsr.propTypes);\n}\n\nexport default NoSsr;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'RadioButtonUnchecked');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z\"\n}), 'RadioButtonChecked');","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport RadioButtonUncheckedIcon from '../internal/svg-icons/RadioButtonUnchecked';\nimport RadioButtonCheckedIcon from '../internal/svg-icons/RadioButtonChecked';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'relative',\n display: 'flex',\n '&$checked $layer': {\n transform: 'scale(1)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.shortest\n })\n }\n },\n layer: {\n left: 0,\n position: 'absolute',\n transform: 'scale(0)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeIn,\n duration: theme.transitions.duration.shortest\n })\n },\n checked: {}\n };\n};\n/**\n * @ignore - internal component.\n */\n\nfunction RadioButtonIcon(props) {\n var checked = props.checked,\n classes = props.classes,\n fontSize = props.fontSize;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.root, checked && classes.checked)\n }, /*#__PURE__*/React.createElement(RadioButtonUncheckedIcon, {\n fontSize: fontSize\n }), /*#__PURE__*/React.createElement(RadioButtonCheckedIcon, {\n fontSize: fontSize,\n className: classes.layer\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? RadioButtonIcon.propTypes = {\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n fontSize: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateRadioButtonIcon'\n})(RadioButtonIcon);","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nvar RadioGroupContext = React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n RadioGroupContext.displayName = 'RadioGroupContext';\n}\n\nexport default RadioGroupContext;","import * as React from 'react';\nimport RadioGroupContext from './RadioGroupContext';\nexport default function useRadioGroup() {\n return React.useContext(RadioGroupContext);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport RadioButtonIcon from './RadioButtonIcon';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport withStyles from '../styles/withStyles';\nimport useRadioGroup from '../RadioGroup/useRadioGroup';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, {\n checked: true\n});\nvar defaultIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, null);\nvar Radio = /*#__PURE__*/React.forwardRef(function Radio(props, ref) {\n var checkedProp = props.checked,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n nameProp = props.name,\n onChangeProp = props.onChange,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checked\", \"classes\", \"color\", \"name\", \"onChange\", \"size\"]);\n\n var radioGroup = useRadioGroup();\n var checked = checkedProp;\n var onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);\n var name = nameProp;\n\n if (radioGroup) {\n if (typeof checked === 'undefined') {\n checked = radioGroup.value === props.value;\n }\n\n if (typeof name === 'undefined') {\n name = radioGroup.name;\n }\n }\n\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n color: color,\n type: \"radio\",\n icon: /*#__PURE__*/React.cloneElement(defaultIcon, {\n fontSize: size === 'small' ? 'small' : 'medium'\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(defaultCheckedIcon, {\n fontSize: size === 'small' ? 'small' : 'medium'\n }),\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))]),\n checked: classes.checked,\n disabled: classes.disabled\n },\n name: name,\n checked: checked,\n onChange: onChange,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Radio.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the radio will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiRadio'\n})(Radio);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport FormGroup from '../FormGroup';\nimport useForkRef from '../utils/useForkRef';\nimport useControlled from '../utils/useControlled';\nimport RadioGroupContext from './RadioGroupContext';\nimport useId from '../utils/unstable_useId';\nvar RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {\n var actions = props.actions,\n children = props.children,\n nameProp = props.name,\n valueProp = props.value,\n onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"actions\", \"children\", \"name\", \"value\", \"onChange\"]);\n\n var rootRef = React.useRef(null);\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: props.defaultValue,\n name: 'RadioGroup'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n value = _useControlled2[0],\n setValue = _useControlled2[1];\n\n React.useImperativeHandle(actions, function () {\n return {\n focus: function focus() {\n var input = rootRef.current.querySelector('input:not(:disabled):checked');\n\n if (!input) {\n input = rootRef.current.querySelector('input:not(:disabled)');\n }\n\n if (input) {\n input.focus();\n }\n }\n };\n }, []);\n var handleRef = useForkRef(ref, rootRef);\n\n var handleChange = function handleChange(event) {\n setValue(event.target.value);\n\n if (onChange) {\n onChange(event, event.target.value);\n }\n };\n\n var name = useId(nameProp);\n return /*#__PURE__*/React.createElement(RadioGroupContext.Provider, {\n value: {\n name: name,\n onChange: handleChange,\n value: value\n }\n }, /*#__PURE__*/React.createElement(FormGroup, _extends({\n role: \"radiogroup\",\n ref: handleRef\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? RadioGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string]),\n\n /**\n * The name used to reference the value of the control.\n * If you don't provide this prop, it falls back to a randomly generated name.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when a radio button is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * Value of the selected radio button. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default RadioGroup;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, refType } from '@material-ui/utils';\nimport setRef from '../utils/setRef';\nvar warnedOnce = false;\n/**\n * ⚠️⚠️⚠️\n * If you want the DOM element of a Material-UI component check out\n * [FAQ: How can I access the DOM element?](/getting-started/faq/#how-can-i-access-the-dom-element)\n * first.\n *\n * This component uses `findDOMNode` which is deprecated in React.StrictMode.\n *\n * Helper component to allow attaching a ref to a\n * wrapped element to access the underlying DOM element.\n *\n * It's highly inspired by https://github.com/facebook/react/issues/11401#issuecomment-340543801.\n * For example:\n * ```jsx\n * import React from 'react';\n * import RootRef from '@material-ui/core/RootRef';\n *\n * function MyComponent() {\n * const domRef = React.useRef();\n *\n * React.useEffect(() => {\n * console.log(domRef.current); // DOM node\n * }, []);\n *\n * return (\n * \n * \n * \n * );\n * }\n * ```\n *\n * @deprecated\n */\n\nvar RootRef = /*#__PURE__*/function (_React$Component) {\n _inherits(RootRef, _React$Component);\n\n var _super = _createSuper(RootRef);\n\n function RootRef() {\n _classCallCheck(this, RootRef);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(RootRef, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ref = ReactDOM.findDOMNode(this);\n setRef(this.props.rootRef, this.ref);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var ref = ReactDOM.findDOMNode(this);\n\n if (prevProps.rootRef !== this.props.rootRef || this.ref !== ref) {\n if (prevProps.rootRef !== this.props.rootRef) {\n setRef(prevProps.rootRef, null);\n }\n\n this.ref = ref;\n setRef(this.props.rootRef, this.ref);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.ref = null;\n setRef(this.props.rootRef, null);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn(['Material-UI: The RootRef component is deprecated.', 'The component relies on the ReactDOM.findDOMNode API which is deprecated in React.StrictMode.', 'Instead, you can get a reference to the underlying DOM node of the components via the `ref` prop.'].join('/n'));\n }\n }\n\n return this.props.children;\n }\n }]);\n\n return RootRef;\n}(React.Component);\n\nprocess.env.NODE_ENV !== \"production\" ? RootRef.propTypes = {\n /**\n * The wrapped element.\n */\n children: PropTypes.element.isRequired,\n\n /**\n * A ref that points to the first DOM node of the wrapped element.\n */\n rootRef: refType.isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? RootRef.propTypes = exactProp(RootRef.propTypes) : void 0;\n}\n\nexport default RootRef;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\n\nvar styles = function styles(theme) {\n return {\n thumb: {\n '&$open': {\n '& $offset': {\n transform: 'scale(1) translateY(-10px)'\n }\n }\n },\n open: {},\n offset: _extends({\n zIndex: 1\n }, theme.typography.body2, {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1.2,\n transition: theme.transitions.create(['transform'], {\n duration: theme.transitions.duration.shortest\n }),\n top: -34,\n transformOrigin: 'bottom center',\n transform: 'scale(0)',\n position: 'absolute'\n }),\n circle: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 32,\n height: 32,\n borderRadius: '50% 50% 50% 0',\n backgroundColor: 'currentColor',\n transform: 'rotate(-45deg)'\n },\n label: {\n color: theme.palette.primary.contrastText,\n transform: 'rotate(45deg)'\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction ValueLabel(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n open = props.open,\n value = props.value,\n valueLabelDisplay = props.valueLabelDisplay;\n\n if (valueLabelDisplay === 'off') {\n return children;\n }\n\n return /*#__PURE__*/React.cloneElement(children, {\n className: clsx(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.offset, className)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.circle\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, value))));\n}\n\nexport default withStyles(styles, {\n name: 'PrivateValueLabel'\n})(ValueLabel);","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\nimport { alpha, lighten, darken } from '../styles/colorManipulator';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport capitalize from '../utils/capitalize';\nimport useControlled from '../utils/useControlled';\nimport ValueLabel from './ValueLabel';\n\nfunction asc(a, b) {\n return a - b;\n}\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(min, value), max);\n}\n\nfunction findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n\n return closestIndex;\n}\n\nfunction trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n\n return false;\n }\n\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\n\nfunction valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\n\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\n\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\nfunction roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\n\nfunction setValueIndex(_ref) {\n var values = _ref.values,\n source = _ref.source,\n newValue = _ref.newValue,\n index = _ref.index;\n\n // Performance shortcut\n if (values[index] === newValue) {\n return source;\n }\n\n var output = values.slice();\n output[index] = newValue;\n return output;\n}\n\nfunction focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n\n if (!sliderRef.current.contains(document.activeElement) || Number(document.activeElement.getAttribute('data-index')) !== activeIndex) {\n sliderRef.current.querySelector(\"[role=\\\"slider\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\")).focus();\n }\n\n if (setActive) {\n setActive(activeIndex);\n }\n}\n\nvar axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\n\nvar Identity = function Identity(x) {\n return x;\n};\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 2,\n width: '100%',\n boxSizing: 'content-box',\n padding: '13px 0',\n display: 'inline-block',\n position: 'relative',\n cursor: 'pointer',\n touchAction: 'none',\n color: theme.palette.primary.main,\n WebkitTapHighlightColor: 'transparent',\n '&$disabled': {\n pointerEvents: 'none',\n cursor: 'default',\n color: theme.palette.grey[400]\n },\n '&$vertical': {\n width: 2,\n height: '100%',\n padding: '0 13px'\n },\n // The primary input mechanism of the device includes a pointing device of limited accuracy.\n '@media (pointer: coarse)': {\n // Reach 42px touch target, about ~8mm on screen.\n padding: '20px 0',\n '&$vertical': {\n padding: '0 20px'\n }\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `marks` is provided with at least one label. */\n marked: {\n marginBottom: 20,\n '&$vertical': {\n marginBottom: 'auto',\n marginRight: 20\n }\n },\n\n /* Pseudo-class applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Pseudo-class applied to the root and thumb element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the rail element. */\n rail: {\n display: 'block',\n position: 'absolute',\n width: '100%',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n opacity: 0.38,\n '$vertical &': {\n height: '100%',\n width: 2\n }\n },\n\n /* Styles applied to the track element. */\n track: {\n display: 'block',\n position: 'absolute',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n '$vertical &': {\n width: 2\n }\n },\n\n /* Styles applied to the track element if `track={false}`. */\n trackFalse: {\n '& $track': {\n display: 'none'\n }\n },\n\n /* Styles applied to the track element if `track=\"inverted\"`. */\n trackInverted: {\n '& $track': {\n backgroundColor: // Same logic as the LinearProgress track color\n theme.palette.type === 'light' ? lighten(theme.palette.primary.main, 0.62) : darken(theme.palette.primary.main, 0.5)\n },\n '& $rail': {\n opacity: 1\n }\n },\n\n /* Styles applied to the thumb element. */\n thumb: {\n position: 'absolute',\n width: 12,\n height: 12,\n marginLeft: -6,\n marginTop: -5,\n boxSizing: 'border-box',\n borderRadius: '50%',\n outline: 0,\n backgroundColor: 'currentColor',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: theme.transitions.create(['box-shadow'], {\n duration: theme.transitions.duration.shortest\n }),\n '&::after': {\n position: 'absolute',\n content: '\"\"',\n borderRadius: '50%',\n // reach 42px hit target (2 * 15 + thumb diameter)\n left: -15,\n top: -15,\n right: -15,\n bottom: -15\n },\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.primary.main, 0.16)),\n '@media (hover: none)': {\n boxShadow: 'none'\n }\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.primary.main, 0.16))\n },\n '&$disabled': {\n width: 8,\n height: 8,\n marginLeft: -4,\n marginTop: -3,\n '&:hover': {\n boxShadow: 'none'\n }\n },\n '$vertical &': {\n marginLeft: -5,\n marginBottom: -6\n },\n '$vertical &$disabled': {\n marginLeft: -3,\n marginBottom: -4\n }\n },\n\n /* Styles applied to the thumb element if `color=\"primary\"`. */\n thumbColorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the thumb element if `color=\"secondary\"`. */\n thumbColorSecondary: {\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.secondary.main, 0.16))\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.secondary.main, 0.16))\n }\n },\n\n /* Pseudo-class applied to the thumb element if it's active. */\n active: {},\n\n /* Pseudo-class applied to the thumb element if keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the thumb label element. */\n valueLabel: {\n // IE 11 centering bug, to remove from the customization demos once no longer supported\n left: 'calc(-50% - 4px)'\n },\n\n /* Styles applied to the mark element. */\n mark: {\n position: 'absolute',\n width: 2,\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the mark element if active (depending on the value). */\n markActive: {\n backgroundColor: theme.palette.background.paper,\n opacity: 0.8\n },\n\n /* Styles applied to the mark label element. */\n markLabel: _extends({}, theme.typography.body2, {\n color: theme.palette.text.secondary,\n position: 'absolute',\n top: 26,\n transform: 'translateX(-50%)',\n whiteSpace: 'nowrap',\n '$vertical &': {\n top: 'auto',\n left: 26,\n transform: 'translateY(50%)'\n },\n '@media (pointer: coarse)': {\n top: 40,\n '$vertical &': {\n left: 31\n }\n }\n }),\n\n /* Styles applied to the mark label element if active (depending on the value). */\n markLabelActive: {\n color: theme.palette.text.primary\n }\n };\n};\nvar Slider = /*#__PURE__*/React.forwardRef(function Slider(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledby = props['aria-labelledby'],\n ariaValuetext = props['aria-valuetext'],\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n defaultValue = props.defaultValue,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n getAriaLabel = props.getAriaLabel,\n getAriaValueText = props.getAriaValueText,\n _props$marks = props.marks,\n marksProp = _props$marks === void 0 ? false : _props$marks,\n _props$max = props.max,\n max = _props$max === void 0 ? 100 : _props$max,\n _props$min = props.min,\n min = _props$min === void 0 ? 0 : _props$min,\n name = props.name,\n onChange = props.onChange,\n onChangeCommitted = props.onChangeCommitted,\n onMouseDown = props.onMouseDown,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$scale = props.scale,\n scale = _props$scale === void 0 ? Identity : _props$scale,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n _props$ThumbComponent = props.ThumbComponent,\n ThumbComponent = _props$ThumbComponent === void 0 ? 'span' : _props$ThumbComponent,\n _props$track = props.track,\n track = _props$track === void 0 ? 'normal' : _props$track,\n valueProp = props.value,\n _props$ValueLabelComp = props.ValueLabelComponent,\n ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel : _props$ValueLabelComp,\n _props$valueLabelDisp = props.valueLabelDisplay,\n valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp,\n _props$valueLabelForm = props.valueLabelFormat,\n valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"aria-valuetext\", \"classes\", \"className\", \"color\", \"component\", \"defaultValue\", \"disabled\", \"getAriaLabel\", \"getAriaValueText\", \"marks\", \"max\", \"min\", \"name\", \"onChange\", \"onChangeCommitted\", \"onMouseDown\", \"orientation\", \"scale\", \"step\", \"ThumbComponent\", \"track\", \"value\", \"ValueLabelComponent\", \"valueLabelDisplay\", \"valueLabelFormat\"]);\n\n var theme = useTheme();\n var touchId = React.useRef(); // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transfered when inversing a range slider.\n\n var _React$useState = React.useState(-1),\n active = _React$useState[0],\n setActive = _React$useState[1];\n\n var _React$useState2 = React.useState(-1),\n open = _React$useState2[0],\n setOpen = _React$useState2[1];\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Slider'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n valueDerived = _useControlled2[0],\n setValueState = _useControlled2[1];\n\n var range = Array.isArray(valueDerived);\n var values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(function (value) {\n return clamp(value, min, max);\n });\n var marks = marksProp === true && step !== null ? _toConsumableArray(Array(Math.floor((max - min) / step) + 1)).map(function (_, index) {\n return {\n value: min + step * index\n };\n }) : marksProp || [];\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(-1),\n focusVisible = _React$useState3[0],\n setFocusVisible = _React$useState3[1];\n\n var sliderRef = React.useRef();\n var handleFocusRef = useForkRef(focusVisibleRef, sliderRef);\n var handleRef = useForkRef(ref, handleFocusRef);\n var handleFocus = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n\n if (isFocusVisible(event)) {\n setFocusVisible(index);\n }\n\n setOpen(index);\n });\n var handleBlur = useEventCallback(function () {\n if (focusVisible !== -1) {\n setFocusVisible(-1);\n onBlurVisible();\n }\n\n setOpen(-1);\n });\n var handleMouseOver = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n });\n var handleMouseLeave = useEventCallback(function () {\n setOpen(-1);\n });\n var isRtl = theme.direction === 'rtl';\n var handleKeyDown = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n var value = values[index];\n var tenPercents = (max - min) / 10;\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var marksIndex = marksValues.indexOf(value);\n var newValue;\n var increaseKey = isRtl ? 'ArrowLeft' : 'ArrowRight';\n var decreaseKey = isRtl ? 'ArrowRight' : 'ArrowLeft';\n\n switch (event.key) {\n case 'Home':\n newValue = min;\n break;\n\n case 'End':\n newValue = max;\n break;\n\n case 'PageUp':\n if (step) {\n newValue = value + tenPercents;\n }\n\n break;\n\n case 'PageDown':\n if (step) {\n newValue = value - tenPercents;\n }\n\n break;\n\n case increaseKey:\n case 'ArrowUp':\n if (step) {\n newValue = value + step;\n } else {\n newValue = marksValues[marksIndex + 1] || marksValues[marksValues.length - 1];\n }\n\n break;\n\n case decreaseKey:\n case 'ArrowDown':\n if (step) {\n newValue = value - step;\n } else {\n newValue = marksValues[marksIndex - 1] || marksValues[0];\n }\n\n break;\n\n default:\n return;\n } // Prevent scroll of the page\n\n\n event.preventDefault();\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n }\n\n newValue = clamp(newValue, min, max);\n\n if (range) {\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values,\n source: valueDerived,\n newValue: newValue,\n index: index\n }).sort(asc);\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: newValue.indexOf(previousValue)\n });\n }\n\n setValueState(newValue);\n setFocusVisible(index);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n });\n var previousIndex = React.useRef();\n var axis = orientation;\n\n if (isRtl && orientation !== \"vertical\") {\n axis += '-reverse';\n }\n\n var getFingerNewValue = function getFingerNewValue(_ref3) {\n var finger = _ref3.finger,\n _ref3$move = _ref3.move,\n move = _ref3$move === void 0 ? false : _ref3$move,\n values2 = _ref3.values,\n source = _ref3.source;\n var slider = sliderRef.current;\n\n var _slider$getBoundingCl = slider.getBoundingClientRect(),\n width = _slider$getBoundingCl.width,\n height = _slider$getBoundingCl.height,\n bottom = _slider$getBoundingCl.bottom,\n left = _slider$getBoundingCl.left;\n\n var percent;\n\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n\n var newValue;\n newValue = percentToValue(percent, min, max);\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n\n newValue = clamp(newValue, min, max);\n var activeIndex = 0;\n\n if (range) {\n if (!move) {\n activeIndex = findClosest(values2, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values2,\n source: source,\n newValue: newValue,\n index: activeIndex\n }).sort(asc);\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n\n return {\n newValue: newValue,\n activeIndex: activeIndex\n };\n };\n\n var handleTouchMove = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue = getFingerNewValue({\n finger: finger,\n move: true,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue.newValue,\n activeIndex = _getFingerNewValue.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n });\n var handleTouchEnd = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue2 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue2.newValue;\n\n setActive(-1);\n\n if (event.type === 'touchend') {\n setOpen(-1);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n\n touchId.current = undefined;\n var doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n });\n var handleTouchStart = useEventCallback(function (event) {\n // Workaround as Safari has partial support for touchAction: 'none'.\n event.preventDefault();\n var touch = event.changedTouches[0];\n\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue3 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue3.newValue,\n activeIndex = _getFingerNewValue3.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n React.useEffect(function () {\n var slider = sliderRef.current;\n slider.addEventListener('touchstart', handleTouchStart);\n var doc = ownerDocument(slider);\n return function () {\n slider.removeEventListener('touchstart', handleTouchStart);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n };\n }, [handleTouchEnd, handleTouchMove, handleTouchStart]);\n var handleMouseDown = useEventCallback(function (event) {\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n event.preventDefault();\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue4 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue4.newValue,\n activeIndex = _getFingerNewValue4.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove);\n doc.addEventListener('mouseup', handleTouchEnd);\n });\n var trackOffset = valueToPercent(range ? values[0] : min, min, max);\n var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n\n var trackStyle = _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: handleRef,\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, disabled && classes.disabled, marks.length > 0 && marks.some(function (mark) {\n return mark.label;\n }) && classes.marked, track === false && classes.trackFalse, orientation === 'vertical' && classes.vertical, track === 'inverted' && classes.trackInverted),\n onMouseDown: handleMouseDown\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.rail\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track,\n style: trackStyle\n }), /*#__PURE__*/React.createElement(\"input\", {\n value: values.join(','),\n name: name,\n type: \"hidden\"\n }), marks.map(function (mark, index) {\n var percent = valueToPercent(mark.value, min, max);\n var style = axisProps[axis].offset(percent);\n var markActive;\n\n if (track === false) {\n markActive = values.indexOf(mark.value) !== -1;\n } else {\n markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: mark.value\n }, /*#__PURE__*/React.createElement(\"span\", {\n style: style,\n \"data-index\": index,\n className: clsx(classes.mark, markActive && classes.markActive)\n }), mark.label != null ? /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true,\n \"data-index\": index,\n style: style,\n className: clsx(classes.markLabel, markActive && classes.markLabelActive)\n }, mark.label) : null);\n }), values.map(function (value, index) {\n var percent = valueToPercent(value, min, max);\n var style = axisProps[axis].offset(percent);\n return /*#__PURE__*/React.createElement(ValueLabelComponent, {\n key: index,\n valueLabelFormat: valueLabelFormat,\n valueLabelDisplay: valueLabelDisplay,\n className: classes.valueLabel,\n value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,\n index: index,\n open: open === index || active === index || valueLabelDisplay === 'on',\n disabled: disabled\n }, /*#__PURE__*/React.createElement(ThumbComponent, {\n className: clsx(classes.thumb, classes[\"thumbColor\".concat(capitalize(color))], active === index && classes.active, disabled && classes.disabled, focusVisible === index && classes.focusVisible),\n tabIndex: disabled ? null : 0,\n role: \"slider\",\n style: style,\n \"data-index\": index,\n \"aria-label\": getAriaLabel ? getAriaLabel(index) : ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-orientation\": orientation,\n \"aria-valuemax\": scale(max),\n \"aria-valuemin\": scale(min),\n \"aria-valuenow\": scale(value),\n \"aria-valuetext\": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n }));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Slider.propTypes = {\n /**\n * The label of the slider.\n */\n 'aria-label': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-label'] != null) {\n return new Error('Material-UI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * The id of the element containing a label for the slider.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * A string value that provides a user-friendly name for the current value of the slider.\n */\n 'aria-valuetext': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-valuetext'] != null) {\n return new Error('Material-UI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * If `true`, the slider will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.\n *\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaLabel: PropTypes.func,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.\n *\n * @param {number} value The thumb label's value to format.\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaValueText: PropTypes.func,\n\n /**\n * Marks indicate predetermined values to which the user can move the slider.\n * If `true` the marks will be spaced according the value of the `step` prop.\n * If an array, it should contain objects with `value` and an optional `label` keys.\n */\n marks: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),\n\n /**\n * The maximum allowed value of the slider.\n * Should not be equal to min.\n */\n max: PropTypes.number,\n\n /**\n * The minimum allowed value of the slider.\n * Should not be equal to max.\n */\n min: PropTypes.number,\n\n /**\n * Name attribute of the hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChange: PropTypes.func,\n\n /**\n * Callback function that is fired when the `mouseup` is triggered.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChangeCommitted: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n\n /**\n * The slider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * A transformation function, to change the scale of the slider.\n */\n scale: PropTypes.func,\n\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.)\n * The `min` prop serves as the origin for the valid values.\n * We recommend (max - min) to be evenly divisible by the step.\n *\n * When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.\n */\n step: PropTypes.number,\n\n /**\n * The component used to display the value label.\n */\n ThumbComponent: PropTypes.elementType,\n\n /**\n * The track presentation:\n *\n * - `normal` the track will render a bar representing the slider value.\n * - `inverted` the track will render a bar representing the remaining slider value.\n * - `false` the track will render without a bar.\n */\n track: PropTypes.oneOf(['normal', false, 'inverted']),\n\n /**\n * The value of the slider.\n * For ranged sliders, provide an array with two values.\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * The value label component.\n */\n ValueLabelComponent: PropTypes.elementType,\n\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n */\n valueLabelDisplay: PropTypes.oneOf(['on', 'auto', 'off']),\n\n /**\n * The format function the value label's value.\n *\n * When a function is provided, it should have the following signature:\n *\n * - {number} value The value label's value to format\n * - {number} index The value label's index to format\n */\n valueLabelFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSlider'\n})(Slider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n flex: 1,\n position: 'relative'\n },\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {}\n};\nvar Step = /*#__PURE__*/React.forwardRef(function Step(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n connectorProp = props.connector,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$expanded = props.expanded,\n expanded = _props$expanded === void 0 ? false : _props$expanded,\n index = props.index,\n last = props.last,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"connector\", \"disabled\", \"expanded\", \"index\", \"last\", \"orientation\"]);\n\n var connector = connectorProp ? /*#__PURE__*/React.cloneElement(connectorProp, {\n orientation: orientation,\n alternativeLabel: alternativeLabel,\n index: index,\n active: active,\n completed: completed,\n disabled: disabled\n }) : null;\n var newChildren = /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, completed && classes.completed),\n ref: ref\n }, other), connector && alternativeLabel && index !== 0 ? connector : null, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Step component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.cloneElement(child, _extends({\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n expanded: expanded,\n last: last,\n icon: index + 1,\n orientation: orientation\n }, child.props));\n }));\n\n if (connector && !alternativeLabel && index !== 0) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, connector, newChildren);\n }\n\n return newChildren;\n});\nprocess.env.NODE_ENV !== \"production\" ? Step.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Sets the step as active. Is passed to child components.\n */\n active: PropTypes.bool,\n\n /**\n * Should be `Step` sub-components such as `StepLabel`, `StepContent`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: PropTypes.bool,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepButton` is a child of `Step`. Is passed to child components.\n */\n disabled: PropTypes.bool,\n\n /**\n * Expand the step.\n */\n expanded: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStep'\n})(Step);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z\"\n}), 'CheckCircle');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"\n}), 'Warning');","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport CheckCircle from '../internal/svg-icons/CheckCircle';\nimport Warning from '../internal/svg-icons/Warning';\nimport withStyles from '../styles/withStyles';\nimport SvgIcon from '../SvgIcon';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n color: theme.palette.text.disabled,\n '&$completed': {\n color: theme.palette.primary.main\n },\n '&$active': {\n color: theme.palette.primary.main\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Styles applied to the SVG text element. */\n text: {\n fill: theme.palette.primary.contrastText,\n fontSize: theme.typography.caption.fontSize,\n fontFamily: theme.typography.fontFamily\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {}\n };\n};\n\nvar _ref = /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"12\"\n});\n\nvar StepIcon = /*#__PURE__*/React.forwardRef(function StepIcon(props, ref) {\n var _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n icon = props.icon,\n _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n classes = props.classes;\n\n if (typeof icon === 'number' || typeof icon === 'string') {\n var className = clsx(classes.root, active && classes.active, error && classes.error, completed && classes.completed);\n\n if (error) {\n return /*#__PURE__*/React.createElement(Warning, {\n className: className,\n ref: ref\n });\n }\n\n if (completed) {\n return /*#__PURE__*/React.createElement(CheckCircle, {\n className: className,\n ref: ref\n });\n }\n\n return /*#__PURE__*/React.createElement(SvgIcon, {\n className: className,\n ref: ref\n }, _ref, /*#__PURE__*/React.createElement(\"text\", {\n className: classes.text,\n x: \"12\",\n y: \"16\",\n textAnchor: \"middle\"\n }, icon));\n }\n\n return icon;\n});\nprocess.env.NODE_ENV !== \"production\" ? StepIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Whether this step is active.\n */\n active: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: PropTypes.bool,\n\n /**\n * Mark the step as failed.\n */\n error: PropTypes.bool,\n\n /**\n * The label displayed in the step icon.\n */\n icon: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepIcon'\n})(StepIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport StepIcon from '../StepIcon';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n '&$alternativeLabel': {\n flexDirection: 'column'\n },\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the `Typography` component which wraps `children`. */\n label: {\n color: theme.palette.text.secondary,\n '&$active': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$completed': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$alternativeLabel': {\n textAlign: 'center',\n marginTop: 16\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Pseudo-class applied to the `Typography` component if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the `Typography` component if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the `icon` container element. */\n iconContainer: {\n flexShrink: 0,\n // Fix IE 11 issue\n display: 'flex',\n paddingRight: 8,\n '&$alternativeLabel': {\n paddingRight: 0\n }\n },\n\n /* Pseudo-class applied to the root and icon container and `Typography` if `alternativeLabel={true}`. */\n alternativeLabel: {},\n\n /* Styles applied to the container element which wraps `Typography` and `optional`. */\n labelContainer: {\n width: '100%'\n }\n };\n};\nvar StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n StepIconComponentProp = props.StepIconComponent,\n StepIconProps = props.StepIconProps,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"error\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\", \"StepIconComponent\", \"StepIconProps\"]);\n\n var StepIconComponent = StepIconComponentProp;\n\n if (icon && !StepIconComponent) {\n StepIconComponent = StepIcon;\n }\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[orientation], className, disabled && classes.disabled, alternativeLabel && classes.alternativeLabel, error && classes.error),\n ref: ref\n }, other), icon || StepIconComponent ? /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.iconContainer, alternativeLabel && classes.alternativeLabel)\n }, /*#__PURE__*/React.createElement(StepIconComponent, _extends({\n completed: completed,\n active: active,\n error: error,\n icon: icon\n }, StepIconProps))) : null, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.labelContainer\n }, children ? /*#__PURE__*/React.createElement(Typography, {\n variant: \"body2\",\n component: \"span\",\n display: \"block\",\n className: clsx(classes.label, alternativeLabel && classes.alternativeLabel, completed && classes.completed, active && classes.active, error && classes.error)\n }, children) : null, optional));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * In most cases will simply be a string containing a title for the label.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepLabelButton` is a child of `StepLabel`. Is passed to child components.\n */\n disabled: PropTypes.bool,\n\n /**\n * Mark the step as failed.\n */\n error: PropTypes.bool,\n\n /**\n * Override the default label of the step icon.\n */\n icon: PropTypes.node,\n\n /**\n * The optional node to display.\n */\n optional: PropTypes.node,\n\n /**\n * The component to render in place of the [`StepIcon`](/api/step-icon/).\n */\n StepIconComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`StepIcon`](/api/step-icon/) element.\n */\n StepIconProps: PropTypes.object\n} : void 0;\nStepLabel.muiName = 'StepLabel';\nexport default withStyles(styles, {\n name: 'MuiStepLabel'\n})(StepLabel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport StepLabel from '../StepLabel';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n padding: '24px 16px',\n margin: '-24px -16px',\n boxSizing: 'content-box'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n justifyContent: 'flex-start',\n padding: '8px',\n margin: '-8px'\n },\n\n /* Styles applied to the `ButtonBase` touch-ripple. */\n touchRipple: {\n color: 'rgba(0, 0, 0, 0.3)'\n }\n};\nvar StepButton = /*#__PURE__*/React.forwardRef(function StepButton(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\"]);\n\n var childProps = {\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n icon: icon,\n optional: optional,\n orientation: orientation\n };\n var child = isMuiElement(children, ['StepLabel']) ? /*#__PURE__*/React.cloneElement(children, childProps) : /*#__PURE__*/React.createElement(StepLabel, childProps, children);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: true,\n disabled: disabled,\n TouchRippleProps: {\n className: classes.touchRipple\n },\n className: clsx(classes.root, classes[orientation], className),\n ref: ref\n }, other), child);\n});\nprocess.env.NODE_ENV !== \"production\" ? StepButton.propTypes = {\n /**\n * @ignore\n * Passed in via `Step` - passed through to `StepLabel`.\n */\n active: PropTypes.bool,\n\n /**\n * @ignore\n * Set internally by Stepper when it's supplied with the alternativeLabel property.\n */\n alternativeLabel: PropTypes.bool,\n\n /**\n * Can be a `StepLabel` or a node to place inside `StepLabel` as children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * Sets completed styling. Is passed to StepLabel.\n */\n completed: PropTypes.bool,\n\n /**\n * @ignore\n * Disables the button and sets disabled styling. Is passed to StepLabel.\n */\n disabled: PropTypes.bool,\n\n /**\n * @ignore\n * potentially passed from parent `Step`\n */\n expanded: PropTypes.bool,\n\n /**\n * The icon displayed by the step label.\n */\n icon: PropTypes.node,\n\n /**\n * @ignore\n */\n last: PropTypes.bool,\n\n /**\n * The optional node to display.\n */\n optional: PropTypes.node,\n\n /**\n * @ignore\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepButton'\n})(StepButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n marginLeft: 12,\n // half icon\n padding: '0 0 8px'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n position: 'absolute',\n top: 8 + 4,\n left: 'calc(-50% + 20px)',\n right: 'calc(50% + 20px)'\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the line element. */\n line: {\n display: 'block',\n borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n lineHorizontal: {\n borderTopStyle: 'solid',\n borderTopWidth: 1\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n lineVertical: {\n borderLeftStyle: 'solid',\n borderLeftWidth: 1,\n minHeight: 24\n }\n };\n};\nvar StepConnector = /*#__PURE__*/React.forwardRef(function StepConnector(props, ref) {\n var active = props.active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n index = props.index,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"classes\", \"className\", \"completed\", \"disabled\", \"index\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, active && classes.active, completed && classes.completed, disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.line, {\n 'horizontal': classes.lineHorizontal,\n 'vertical': classes.lineVertical\n }[orientation])\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepConnector.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepConnector'\n})(StepConnector);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Collapse from '../Collapse';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n marginTop: 8,\n marginLeft: 12,\n // half icon\n paddingLeft: 8 + 12,\n // margin + half icon\n paddingRight: 8,\n borderLeft: \"1px solid \".concat(theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])\n },\n\n /* Styles applied to the root element if `last={true}` (controlled by `Step`). */\n last: {\n borderLeft: 'none'\n },\n\n /* Styles applied to the Transition component. */\n transition: {}\n };\n};\nvar StepContent = /*#__PURE__*/React.forwardRef(function StepContent(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n expanded = props.expanded,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"expanded\", \"last\", \"optional\", \"orientation\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (orientation !== 'vertical') {\n console.error('Material-UI: is only designed for use with the vertical stepper.');\n }\n }\n\n var transitionDuration = transitionDurationProp;\n\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, last && classes.last),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: active || expanded,\n className: classes.transition,\n timeout: transitionDuration,\n unmountOnExit: true\n }, TransitionProps), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Step content.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Adjust the duration of the content expand transition.\n * Passed as a prop to the transition component.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepContent'\n})(StepContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Paper from '../Paper';\nimport StepConnector from '../StepConnector';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: 24\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n alignItems: 'flex-start'\n }\n};\nvar defaultConnector = /*#__PURE__*/React.createElement(StepConnector, null);\nvar Stepper = /*#__PURE__*/React.forwardRef(function Stepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$connector = props.connector,\n connectorProp = _props$connector === void 0 ? defaultConnector : _props$connector,\n _props$nonLinear = props.nonLinear,\n nonLinear = _props$nonLinear === void 0 ? false : _props$nonLinear,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = _objectWithoutProperties(props, [\"activeStep\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"connector\", \"nonLinear\", \"orientation\"]);\n\n var connector = /*#__PURE__*/React.isValidElement(connectorProp) ? /*#__PURE__*/React.cloneElement(connectorProp, {\n orientation: orientation\n }) : null;\n var childrenArray = React.Children.toArray(children);\n var steps = childrenArray.map(function (step, index) {\n var state = {\n index: index,\n active: false,\n completed: false,\n disabled: false\n };\n\n if (activeStep === index) {\n state.active = true;\n } else if (!nonLinear && activeStep > index) {\n state.completed = true;\n } else if (!nonLinear && activeStep < index) {\n state.disabled = true;\n }\n\n return /*#__PURE__*/React.cloneElement(step, _extends({\n alternativeLabel: alternativeLabel,\n connector: connector,\n last: index + 1 === childrenArray.length,\n orientation: orientation\n }, state, step.props));\n });\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel),\n ref: ref\n }, other), steps);\n});\nprocess.env.NODE_ENV !== \"production\" ? Stepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Set to -1 to disable all the steps.\n */\n activeStep: PropTypes.number,\n\n /**\n * If set to 'true' and orientation is horizontal,\n * then the step label will be positioned under the icon.\n */\n alternativeLabel: PropTypes.bool,\n\n /**\n * Two or more `` components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * An element to be placed between each step.\n */\n connector: PropTypes.element,\n\n /**\n * If set the `Stepper` will not assist in controlling steps for linear flow.\n */\n nonLinear: PropTypes.bool,\n\n /**\n * The stepper orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepper'\n})(Stepper);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport { isHorizontal } from '../Drawer/Drawer';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'fixed',\n top: 0,\n left: 0,\n bottom: 0,\n zIndex: theme.zIndex.drawer - 1\n },\n anchorLeft: {\n right: 'auto'\n },\n anchorRight: {\n left: 'auto',\n right: 0\n },\n anchorTop: {\n bottom: 'auto',\n right: 0\n },\n anchorBottom: {\n top: 'auto',\n bottom: 0,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwipeArea = /*#__PURE__*/React.forwardRef(function SwipeArea(props, ref) {\n var anchor = props.anchor,\n classes = props.classes,\n className = props.className,\n width = props.width,\n other = _objectWithoutProperties(props, [\"anchor\", \"classes\", \"className\", \"width\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"anchor\".concat(capitalize(anchor))], className),\n ref: ref,\n style: _defineProperty({}, isHorizontal(anchor) ? 'width' : 'height', width)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeArea.propTypes = {\n /**\n * Side on which to attach the discovery area.\n */\n anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']).isRequired,\n\n /**\n * @ignore\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n width: PropTypes.number.isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwipeArea'\n})(SwipeArea);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps } from '../transitions/utils';\nimport NoSsr from '../NoSsr';\nimport SwipeArea from './SwipeArea'; // This value is closed to what browsers are using internally to\n// trigger a native scroll.\n\nvar UNCERTAINTY_THRESHOLD = 3; // px\n// We can only have one node at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\n\nvar nodeThatClaimedTheSwipe = null; // Exported for test purposes.\n\nexport function reset() {\n nodeThatClaimedTheSwipe = null;\n}\n\nfunction calculateCurrentX(anchor, touches) {\n return anchor === 'right' ? document.body.offsetWidth - touches[0].pageX : touches[0].pageX;\n}\n\nfunction calculateCurrentY(anchor, touches) {\n return anchor === 'bottom' ? window.innerHeight - touches[0].clientY : touches[0].clientY;\n}\n\nfunction getMaxTranslate(horizontalSwipe, paperInstance) {\n return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight;\n}\n\nfunction getTranslate(currentTranslate, startLocation, open, maxTranslate) {\n return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate);\n}\n\nfunction getDomTreeShapes(element, rootNode) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129\n var domTreeShapes = [];\n\n while (element && element !== rootNode) {\n var style = window.getComputedStyle(element);\n\n if ( // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n domTreeShapes = [];\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push(element);\n }\n\n element = element.parentElement;\n }\n\n return domTreeShapes;\n}\n\nfunction findNativeHandler(_ref) {\n var domTreeShapes = _ref.domTreeShapes,\n start = _ref.start,\n current = _ref.current,\n anchor = _ref.anchor;\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175\n var axisProperties = {\n scrollPosition: {\n x: 'scrollLeft',\n y: 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n y: 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n y: 'clientHeight'\n }\n };\n return domTreeShapes.some(function (shape) {\n // Determine if we are going backward or forward.\n var goingForward = current >= start;\n\n if (anchor === 'top' || anchor === 'left') {\n goingForward = !goingForward;\n }\n\n var axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y';\n var scrollPosition = shape[axisProperties.scrollPosition[axis]];\n var areNotAtStart = scrollPosition > 0;\n var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n return shape;\n }\n\n return null;\n });\n}\n\nvar iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);\nvar transitionDurationDefault = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {\n var theme = useTheme();\n var props = getThemeProps({\n name: 'MuiSwipeableDrawer',\n props: _extends({}, inProps),\n theme: theme\n });\n var _props$anchor = props.anchor,\n anchor = _props$anchor === void 0 ? 'left' : _props$anchor,\n _props$disableBackdro = props.disableBackdropTransition,\n disableBackdropTransition = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableDiscove = props.disableDiscovery,\n disableDiscovery = _props$disableDiscove === void 0 ? false : _props$disableDiscove,\n _props$disableSwipeTo = props.disableSwipeToOpen,\n disableSwipeToOpen = _props$disableSwipeTo === void 0 ? iOS : _props$disableSwipeTo,\n hideBackdrop = props.hideBackdrop,\n _props$hysteresis = props.hysteresis,\n hysteresis = _props$hysteresis === void 0 ? 0.52 : _props$hysteresis,\n _props$minFlingVeloci = props.minFlingVelocity,\n minFlingVelocity = _props$minFlingVeloci === void 0 ? 450 : _props$minFlingVeloci,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropProps = _props$ModalProps.BackdropProps,\n ModalPropsProp = _objectWithoutProperties(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n onOpen = props.onOpen,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SwipeAreaProps = props.SwipeAreaProps,\n _props$swipeAreaWidth = props.swipeAreaWidth,\n swipeAreaWidth = _props$swipeAreaWidth === void 0 ? 20 : _props$swipeAreaWidth,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? transitionDurationDefault : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchor\", \"disableBackdropTransition\", \"disableDiscovery\", \"disableSwipeToOpen\", \"hideBackdrop\", \"hysteresis\", \"minFlingVelocity\", \"ModalProps\", \"onClose\", \"onOpen\", \"open\", \"PaperProps\", \"SwipeAreaProps\", \"swipeAreaWidth\", \"transitionDuration\", \"variant\"]);\n\n var _React$useState = React.useState(false),\n maybeSwiping = _React$useState[0],\n setMaybeSwiping = _React$useState[1];\n\n var swipeInstance = React.useRef({\n isSwiping: null\n });\n var swipeAreaRef = React.useRef();\n var backdropRef = React.useRef();\n var paperRef = React.useRef();\n var touchDetected = React.useRef(false); // Ref for transition duration based on / to match swipe speed\n\n var calculatedDurationRef = React.useRef(); // Use a ref so the open value used is always up to date inside useCallback.\n\n useEnhancedEffect(function () {\n calculatedDurationRef.current = null;\n }, [open]);\n var setPosition = React.useCallback(function (translate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$mode = options.mode,\n mode = _options$mode === void 0 ? null : _options$mode,\n _options$changeTransi = options.changeTransition,\n changeTransition = _options$changeTransi === void 0 ? true : _options$changeTransi;\n var anchorRtl = getAnchor(theme, anchor);\n var rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1;\n var horizontalSwipe = isHorizontal(anchor);\n var transform = horizontalSwipe ? \"translate(\".concat(rtlTranslateMultiplier * translate, \"px, 0)\") : \"translate(0, \".concat(rtlTranslateMultiplier * translate, \"px)\");\n var drawerStyle = paperRef.current.style;\n drawerStyle.webkitTransform = transform;\n drawerStyle.transform = transform;\n var transition = '';\n\n if (mode) {\n transition = theme.transitions.create('all', getTransitionProps({\n timeout: transitionDuration\n }, {\n mode: mode\n }));\n }\n\n if (changeTransition) {\n drawerStyle.webkitTransition = transition;\n drawerStyle.transition = transition;\n }\n\n if (!disableBackdropTransition && !hideBackdrop) {\n var backdropStyle = backdropRef.current.style;\n backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current);\n\n if (changeTransition) {\n backdropStyle.webkitTransition = transition;\n backdropStyle.transition = transition;\n }\n }\n }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);\n var handleBodyTouchEnd = useEventCallback(function (event) {\n if (!touchDetected.current) {\n return;\n }\n\n nodeThatClaimedTheSwipe = null;\n touchDetected.current = false;\n setMaybeSwiping(false); // The swipe wasn't started.\n\n if (!swipeInstance.current.isSwiping) {\n swipeInstance.current.isSwiping = null;\n return;\n }\n\n swipeInstance.current.isSwiping = null;\n var anchorRtl = getAnchor(theme, anchor);\n var horizontal = isHorizontal(anchor);\n var current;\n\n if (horizontal) {\n current = calculateCurrentX(anchorRtl, event.changedTouches);\n } else {\n current = calculateCurrentY(anchorRtl, event.changedTouches);\n }\n\n var startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY;\n var maxTranslate = getMaxTranslate(horizontal, paperRef.current);\n var currentTranslate = getTranslate(current, startLocation, open, maxTranslate);\n var translateRatio = currentTranslate / maxTranslate;\n\n if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) {\n // Calculate transition duration to match swipe speed\n calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000;\n }\n\n if (open) {\n if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) {\n onClose();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(0, {\n mode: 'exit'\n });\n }\n\n return;\n }\n\n if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) {\n onOpen();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(getMaxTranslate(horizontal, paperRef.current), {\n mode: 'enter'\n });\n }\n });\n var handleBodyTouchMove = useEventCallback(function (event) {\n // the ref may be null when a parent component updates while swiping\n if (!paperRef.current || !touchDetected.current) {\n return;\n } // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer\n\n\n if (nodeThatClaimedTheSwipe != null && nodeThatClaimedTheSwipe !== swipeInstance.current) {\n return;\n }\n\n var anchorRtl = getAnchor(theme, anchor);\n var horizontalSwipe = isHorizontal(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (open && paperRef.current.contains(event.target) && nodeThatClaimedTheSwipe == null) {\n var domTreeShapes = getDomTreeShapes(event.target, paperRef.current);\n var nativeHandler = findNativeHandler({\n domTreeShapes: domTreeShapes,\n start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY,\n current: horizontalSwipe ? currentX : currentY,\n anchor: anchor\n });\n\n if (nativeHandler) {\n nodeThatClaimedTheSwipe = nativeHandler;\n return;\n }\n\n nodeThatClaimedTheSwipe = swipeInstance.current;\n } // We don't know yet.\n\n\n if (swipeInstance.current.isSwiping == null) {\n var dx = Math.abs(currentX - swipeInstance.current.startX);\n var dy = Math.abs(currentY - swipeInstance.current.startY); // We are likely to be swiping, let's prevent the scroll event on iOS.\n\n if (dx > dy) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n\n var definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD;\n\n if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) {\n swipeInstance.current.isSwiping = definitelySwiping;\n\n if (!definitelySwiping) {\n handleBodyTouchEnd(event);\n return;\n } // Shift the starting point.\n\n\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY; // Compensate for the part of the drawer displayed on touch start.\n\n if (!disableDiscovery && !open) {\n if (horizontalSwipe) {\n swipeInstance.current.startX -= swipeAreaWidth;\n } else {\n swipeInstance.current.startY -= swipeAreaWidth;\n }\n }\n }\n }\n\n if (!swipeInstance.current.isSwiping) {\n return;\n }\n\n var maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current);\n var startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY;\n\n if (open && !swipeInstance.current.paperHit) {\n startLocation = Math.min(startLocation, maxTranslate);\n }\n\n var translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate);\n\n if (open) {\n if (!swipeInstance.current.paperHit) {\n var paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate;\n\n if (paperHit) {\n swipeInstance.current.paperHit = true;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n } else {\n return;\n }\n } else if (translate === 0) {\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n }\n }\n\n if (swipeInstance.current.lastTranslate === null) {\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now() + 1;\n }\n\n var velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3; // Low Pass filter.\n\n swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6;\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now(); // We are swiping, let's prevent the scroll event on iOS.\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n setPosition(translate);\n });\n var handleBodyTouchStart = useEventCallback(function (event) {\n // We are not supposed to handle this touch move.\n // Example of use case: ignore the event if there is a Slider.\n if (event.defaultPrevented) {\n return;\n } // We can only have one node at the time claiming ownership for handling the swipe.\n\n\n if (event.muiHandled) {\n return;\n } // At least one element clogs the drawer interaction zone.\n\n\n if (open && !backdropRef.current.contains(event.target) && !paperRef.current.contains(event.target)) {\n return;\n }\n\n var anchorRtl = getAnchor(theme, anchor);\n var horizontalSwipe = isHorizontal(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (!open) {\n if (disableSwipeToOpen || event.target !== swipeAreaRef.current) {\n return;\n }\n\n if (horizontalSwipe) {\n if (currentX > swipeAreaWidth) {\n return;\n }\n } else if (currentY > swipeAreaWidth) {\n return;\n }\n }\n\n event.muiHandled = true;\n nodeThatClaimedTheSwipe = null;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n setMaybeSwiping(true);\n\n if (!open && paperRef.current) {\n // The ref may be null when a parent component updates while swiping.\n setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 20 : -swipeAreaWidth), {\n changeTransition: false\n });\n }\n\n swipeInstance.current.velocity = 0;\n swipeInstance.current.lastTime = null;\n swipeInstance.current.lastTranslate = null;\n swipeInstance.current.paperHit = false;\n touchDetected.current = true;\n });\n React.useEffect(function () {\n if (variant === 'temporary') {\n var doc = ownerDocument(paperRef.current);\n doc.addEventListener('touchstart', handleBodyTouchStart);\n doc.addEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.addEventListener('touchend', handleBodyTouchEnd);\n return function () {\n doc.removeEventListener('touchstart', handleBodyTouchStart);\n doc.removeEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.removeEventListener('touchend', handleBodyTouchEnd);\n };\n }\n\n return undefined;\n }, [variant, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]);\n React.useEffect(function () {\n return function () {\n // We need to release the lock.\n if (nodeThatClaimedTheSwipe === swipeInstance.current) {\n nodeThatClaimedTheSwipe = null;\n }\n };\n }, []);\n React.useEffect(function () {\n if (!open) {\n setMaybeSwiping(false);\n }\n }, [open]);\n var handleBackdropRef = React.useCallback(function (instance) {\n // #StrictMode ready\n backdropRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, _extends({\n open: variant === 'temporary' && maybeSwiping ? true : open,\n variant: variant,\n ModalProps: _extends({\n BackdropProps: _extends({}, BackdropProps, {\n ref: handleBackdropRef\n })\n }, ModalPropsProp),\n PaperProps: _extends({}, PaperProps, {\n style: _extends({\n pointerEvents: variant === 'temporary' && !open ? 'none' : ''\n }, PaperProps.style),\n ref: paperRef\n }),\n anchor: anchor,\n transitionDuration: calculatedDurationRef.current || transitionDuration,\n onClose: onClose,\n ref: ref\n }, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/React.createElement(NoSsr, null, /*#__PURE__*/React.createElement(SwipeArea, _extends({\n anchor: anchor,\n ref: swipeAreaRef,\n width: swipeAreaWidth\n }, SwipeAreaProps))));\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeableDrawer.propTypes = {\n /**\n * @ignore\n */\n anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Disable the backdrop transition.\n * This can improve the FPS on low-end devices.\n */\n disableBackdropTransition: PropTypes.bool,\n\n /**\n * If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit\n * to promote accidental discovery of the swipe gesture.\n */\n disableDiscovery: PropTypes.bool,\n\n /**\n * If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers\n * navigation actions. Swipe to open is disabled on iOS browsers by default.\n */\n disableSwipeToOpen: PropTypes.bool,\n\n /**\n * @ignore\n */\n hideBackdrop: PropTypes.bool,\n\n /**\n * Affects how far the drawer must be opened/closed to change his state.\n * Specified as percent (0-1) of the width of the drawer\n */\n hysteresis: PropTypes.number,\n\n /**\n * Defines, from which (average) velocity on, the swipe is\n * defined as complete although hysteresis isn't reached.\n * Good threshold is between 250 - 1000 px/s\n */\n minFlingVelocity: PropTypes.number,\n\n /**\n * @ignore\n */\n ModalProps: PropTypes.shape({\n BackdropProps: PropTypes.shape({\n component: elementTypeAcceptingRef\n })\n }),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the component requests to be opened.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func.isRequired,\n\n /**\n * If `true`, the drawer is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: PropTypes.shape({\n component: elementTypeAcceptingRef,\n style: PropTypes.object\n }),\n\n /**\n * The element is used to intercept the touch events on the edge.\n */\n SwipeAreaProps: PropTypes.object,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n swipeAreaWidth: PropTypes.number,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * @ignore\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default SwipeableDrawer;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// @inheritedComponent IconButton\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport SwitchBase from '../internal/SwitchBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -8\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -8\n },\n\n /* Styles applied to the internal `SwitchBase` component's `root` class. */\n switchBase: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400],\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n '&$checked': {\n transform: 'translateX(20px)'\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n opacity: 0.5\n },\n '&$disabled + $track': {\n opacity: theme.palette.type === 'light' ? 0.12 : 0.1\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.primary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.secondary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n width: 40,\n height: 24,\n padding: 7,\n '& $thumb': {\n width: 16,\n height: 16\n },\n '& $switchBase': {\n padding: 4,\n '&$checked': {\n transform: 'translateX(16px)'\n }\n }\n },\n\n /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */\n checked: {},\n\n /* Pseudo-class applied to the internal SwitchBase component's disabled class. */\n disabled: {},\n\n /* Styles applied to the internal SwitchBase component's input element. */\n input: {\n left: '-100%',\n width: '300%'\n },\n\n /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */\n thumb: {\n boxShadow: theme.shadows[1],\n backgroundColor: 'currentColor',\n width: 20,\n height: 20,\n borderRadius: '50%'\n },\n\n /* Styles applied to the track element. */\n track: {\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,\n opacity: theme.palette.type === 'light' ? 0.38 : 0.3\n }\n };\n};\nvar Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"edge\", \"size\"]);\n\n var icon = /*#__PURE__*/React.createElement(\"span\", {\n className: classes.thumb\n });\n return /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.root, className, {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge], size === \"small\" && classes[\"size\".concat(capitalize(size))])\n }, /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n classes: {\n root: clsx(classes.switchBase, classes[\"color\".concat(capitalize(color))]),\n input: classes.input,\n checked: classes.checked,\n disabled: classes.disabled\n },\n ref: ref\n }, other)), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the switch.\n * `small` is equivalent to the dense switch styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSwitch'\n})(Switch);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n overflowX: 'auto'\n }\n};\nvar TableContainer = /*#__PURE__*/React.forwardRef(function TableContainer(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableContainer.propTypes = {\n /**\n * The table itself, normally `
` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nvar TableCell = /*#__PURE__*/React.forwardRef(function TableCell(props, ref) {\n var _props$align = props.align,\n align = _props$align === void 0 ? 'inherit' : _props$align,\n classes = props.classes,\n className = props.className,\n component = props.component,\n paddingProp = props.padding,\n scopeProp = props.scope,\n sizeProp = props.size,\n sortDirection = props.sortDirection,\n variantProp = props.variant,\n other = _objectWithoutProperties(props, [\"align\", \"classes\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"]);\n\n var table = React.useContext(TableContext);\n var tablelvl2 = React.useContext(Tablelvl2Context);\n var isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n var role;\n var Component;\n\n if (component) {\n Component = component;\n role = isHeadCell ? 'columnheader' : 'cell';\n } else {\n Component = isHeadCell ? 'th' : 'td';\n }\n\n var scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n var padding = paddingProp || (table && table.padding ? table.padding : 'normal');\n var size = sizeProp || (table && table.size ? table.size : 'medium');\n var variant = variantProp || tablelvl2 && tablelvl2.variant;\n var ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, classes[variant], className, align !== 'inherit' && classes[\"align\".concat(capitalize(align))], padding !== 'normal' && classes[\"padding\".concat(capitalize(padding))], size !== 'medium' && classes[\"size\".concat(capitalize(size))], variant === 'head' && table && table.stickyHeader && classes.stickyHeader),\n \"aria-sort\": ariaSort,\n role: role,\n scope: scope\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableCell.propTypes = {\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n */\n align: PropTypes.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The table cell contents.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Sets the padding applied to the cell.\n * By default, the Table parent component set the value (`normal`).\n * `default` is deprecated, use `normal` instead.\n */\n padding: chainPropTypes(PropTypes.oneOf(['normal', 'checkbox', 'none', 'default']), function (props) {\n if (props.padding === 'default') {\n return new Error('Material-UI: padding=\"default\" was renamed to padding=\"normal\" for consistency.');\n }\n\n return null;\n }),\n\n /**\n * Set scope attribute.\n */\n scope: PropTypes.string,\n\n /**\n * Specify the size of the cell.\n * By default, the Table parent component set the value (`medium`).\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: PropTypes.oneOf(['asc', 'desc', false]),\n\n /**\n * Specify the cell type.\n * By default, the TableHead, TableBody or TableFooter parent component set the value.\n */\n variant: PropTypes.oneOf(['body', 'footer', 'head'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableCell'\n})(TableCell);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-header-group'\n }\n};\nvar tablelvl2 = {\n variant: 'head'\n};\nvar defaultComponent = 'thead';\nvar TableHead = /*#__PURE__*/React.forwardRef(function TableHead(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableHead.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableHead'\n})(TableHead);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n '&$hover:hover': {\n backgroundColor: theme.palette.action.hover\n },\n '&$selected, &$selected:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity)\n }\n },\n\n /* Pseudo-class applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `hover={true}`. */\n hover: {},\n\n /* Styles applied to the root element if table variant=\"head\". */\n head: {},\n\n /* Styles applied to the root element if table variant=\"footer\". */\n footer: {}\n };\n};\nvar defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nvar TableRow = /*#__PURE__*/React.forwardRef(function TableRow(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n _props$hover = props.hover,\n hover = _props$hover === void 0 ? false : _props$hover,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"hover\", \"selected\"]);\n\n var tablelvl2 = React.useContext(Tablelvl2Context);\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className, tablelvl2 && {\n 'head': classes.head,\n 'footer': classes.footer\n }[tablelvl2.variant], hover && classes.hover, selected && classes.selected),\n role: Component === defaultComponent ? null : 'row'\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableRow.propTypes = {\n /**\n * Should be valid
`\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableContainer'\n})(TableContainer);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-footer-group'\n }\n};\nvar tablelvl2 = {\n variant: 'footer'\n};\nvar defaultComponent = 'tfoot';\nvar TableFooter = /*#__PURE__*/React.forwardRef(function TableFooter(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableFooter.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableFooter'\n})(TableFooter);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport useTheme from '../styles/useTheme';\nimport IconButton from '../IconButton';\n/**\n * @ignore - internal component.\n */\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowRight, null);\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowLeft, null);\n\nvar _ref3 = /*#__PURE__*/React.createElement(KeyboardArrowLeft, null);\n\nvar _ref4 = /*#__PURE__*/React.createElement(KeyboardArrowRight, null);\n\nvar TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {\n var backIconButtonProps = props.backIconButtonProps,\n count = props.count,\n nextIconButtonProps = props.nextIconButtonProps,\n _props$onChangePage = props.onChangePage,\n onChangePage = _props$onChangePage === void 0 ? function () {} : _props$onChangePage,\n _props$onPageChange = props.onPageChange,\n onPageChange = _props$onPageChange === void 0 ? function () {} : _props$onPageChange,\n page = props.page,\n rowsPerPage = props.rowsPerPage,\n other = _objectWithoutProperties(props, [\"backIconButtonProps\", \"count\", \"nextIconButtonProps\", \"onChangePage\", \"onPageChange\", \"page\", \"rowsPerPage\"]);\n\n var theme = useTheme();\n\n var handleBackButtonClick = function handleBackButtonClick(event) {\n onChangePage(event, page - 1);\n onPageChange(event, page - 1);\n };\n\n var handleNextButtonClick = function handleNextButtonClick(event) {\n onChangePage(event, page + 1);\n onPageChange(event, page + 1);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref\n }, other), /*#__PURE__*/React.createElement(IconButton, _extends({\n onClick: handleBackButtonClick,\n disabled: page === 0,\n color: \"inherit\"\n }, backIconButtonProps), theme.direction === 'rtl' ? _ref : _ref2), /*#__PURE__*/React.createElement(IconButton, _extends({\n onClick: handleNextButtonClick,\n disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false,\n color: \"inherit\"\n }, nextIconButtonProps), theme.direction === 'rtl' ? _ref3 : _ref4));\n});\nprocess.env.NODE_ENV !== \"production\" ? TablePaginationActions.propTypes = {\n /**\n * Props applied to the back arrow [`IconButton`](/api/icon-button/) element.\n */\n backIconButtonProps: PropTypes.object,\n\n /**\n * The total number of rows.\n */\n count: PropTypes.number.isRequired,\n\n /**\n * Props applied to the next arrow [`IconButton`](/api/icon-button/) element.\n */\n nextIconButtonProps: PropTypes.object,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onChangePage: PropTypes.func,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onPageChange: PropTypes.func,\n\n /**\n * The zero-based index of the current page.\n */\n page: PropTypes.number.isRequired,\n\n /**\n * The number of rows per page.\n */\n rowsPerPage: PropTypes.number.isRequired\n} : void 0;\nexport default TablePaginationActions;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@material-ui/utils';\nimport clsx from 'clsx';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport InputBase from '../InputBase';\nimport MenuItem from '../MenuItem';\nimport Select from '../Select';\nimport TableCell from '../TableCell';\nimport Toolbar from '../Toolbar';\nimport Typography from '../Typography';\nimport TablePaginationActions from './TablePaginationActions';\nimport useId from '../utils/unstable_useId';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.primary,\n fontSize: theme.typography.pxToRem(14),\n overflow: 'auto',\n // Increase the specificity to override TableCell.\n '&:last-child': {\n padding: 0\n }\n },\n\n /* Styles applied to the Toolbar component. */\n toolbar: {\n minHeight: 52,\n paddingRight: 2\n },\n\n /* Styles applied to the spacer element. */\n spacer: {\n flex: '1 1 100%'\n },\n\n /* Styles applied to the caption Typography components if `variant=\"caption\"`. */\n caption: {\n flexShrink: 0\n },\n // TODO v5: `.selectRoot` should be merged with `.input`\n\n /* Styles applied to the Select component root element. */\n selectRoot: {\n marginRight: 32,\n marginLeft: 8\n },\n\n /* Styles applied to the Select component `select` class. */\n select: {\n paddingLeft: 8,\n paddingRight: 24,\n textAlign: 'right',\n textAlignLast: 'right' // Align children such as `TableCell`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n */\n hover: PropTypes.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n */\n selected: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableRow'\n})(TableRow);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: 40,\n flexShrink: 0,\n opacity: 0.8,\n '&$disabled': {\n opacity: 0\n }\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n width: '100%',\n height: 40,\n '& svg': {\n transform: 'rotate(90deg)'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {}\n};\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowLeft, {\n fontSize: \"small\"\n});\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowRight, {\n fontSize: \"small\"\n});\n\nvar TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(props, ref) {\n var classes = props.classes,\n classNameProp = props.className,\n direction = props.direction,\n orientation = props.orientation,\n disabled = props.disabled,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"direction\", \"orientation\", \"disabled\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"div\",\n className: clsx(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),\n ref: ref,\n role: null,\n tabIndex: null\n }, other), direction === 'left' ? _ref : _ref2);\n});\nprocess.env.NODE_ENV !== \"production\" ? TabScrollButton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Which direction should the button indicate?\n */\n direction: PropTypes.oneOf(['left', 'right']).isRequired,\n\n /**\n * If `true`, the element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabScrollButton'\n})(TabScrollButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { deepmerge, elementAcceptingRef } from '@material-ui/utils';\nimport { alpha } from '../styles/colorManipulator';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport Grow from '../Grow';\nimport Popper from '../Popper';\nimport useForkRef from '../utils/useForkRef';\nimport useId from '../utils/unstable_useId';\nimport setRef from '../utils/setRef';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useControlled from '../utils/useControlled';\nimport useTheme from '../styles/useTheme';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nfunction arrowGenerator() {\n return {\n '&[x-placement*=\"bottom\"] $arrow': {\n top: 0,\n left: 0,\n marginTop: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n '&[x-placement*=\"top\"] $arrow': {\n bottom: 0,\n left: 0,\n marginBottom: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n '&[x-placement*=\"right\"] $arrow': {\n left: 0,\n marginLeft: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n '&[x-placement*=\"left\"] $arrow': {\n right: 0,\n marginRight: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n };\n}\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the Popper component. */\n popper: {\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none' // disable jss-rtl plugin\n\n },\n\n /* Styles applied to the Popper component if `interactive={true}`. */\n popperInteractive: {\n pointerEvents: 'auto'\n },\n\n /* Styles applied to the Popper component if `arrow={true}`. */\n popperArrow: arrowGenerator(),\n\n /* Styles applied to the tooltip (label wrapper) element. */\n tooltip: {\n backgroundColor: alpha(theme.palette.grey[700], 0.9),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(10),\n lineHeight: \"\".concat(round(14 / 10), \"em\"),\n maxWidth: 300,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */\n tooltipArrow: {\n position: 'relative',\n margin: '0'\n },\n\n /* Styles applied to the arrow element. */\n arrow: {\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n },\n\n /* Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */\n touch: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: \"\".concat(round(16 / 14), \"em\"),\n fontWeight: theme.typography.fontWeightRegular\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"left\". */\n tooltipPlacementLeft: _defineProperty({\n transformOrigin: 'right center',\n margin: '0 24px '\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"right\". */\n tooltipPlacementRight: _defineProperty({\n transformOrigin: 'left center',\n margin: '0 24px'\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"top\". */\n tooltipPlacementTop: _defineProperty({\n transformOrigin: 'center bottom',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"bottom\". */\n tooltipPlacementBottom: _defineProperty({\n transformOrigin: 'center top',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n })\n };\n};\nvar hystersisOpen = false;\nvar hystersisTimer = null;\nexport function testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\nvar Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {\n var _props$arrow = props.arrow,\n arrow = _props$arrow === void 0 ? false : _props$arrow,\n children = props.children,\n classes = props.classes,\n _props$disableFocusLi = props.disableFocusListener,\n disableFocusListener = _props$disableFocusLi === void 0 ? false : _props$disableFocusLi,\n _props$disableHoverLi = props.disableHoverListener,\n disableHoverListener = _props$disableHoverLi === void 0 ? false : _props$disableHoverLi,\n _props$disableTouchLi = props.disableTouchListener,\n disableTouchListener = _props$disableTouchLi === void 0 ? false : _props$disableTouchLi,\n _props$enterDelay = props.enterDelay,\n enterDelay = _props$enterDelay === void 0 ? 100 : _props$enterDelay,\n _props$enterNextDelay = props.enterNextDelay,\n enterNextDelay = _props$enterNextDelay === void 0 ? 0 : _props$enterNextDelay,\n _props$enterTouchDela = props.enterTouchDelay,\n enterTouchDelay = _props$enterTouchDela === void 0 ? 700 : _props$enterTouchDela,\n idProp = props.id,\n _props$interactive = props.interactive,\n interactive = _props$interactive === void 0 ? false : _props$interactive,\n _props$leaveDelay = props.leaveDelay,\n leaveDelay = _props$leaveDelay === void 0 ? 0 : _props$leaveDelay,\n _props$leaveTouchDela = props.leaveTouchDelay,\n leaveTouchDelay = _props$leaveTouchDela === void 0 ? 1500 : _props$leaveTouchDela,\n onClose = props.onClose,\n onOpen = props.onOpen,\n openProp = props.open,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'bottom' : _props$placement,\n _props$PopperComponen = props.PopperComponent,\n PopperComponent = _props$PopperComponen === void 0 ? Popper : _props$PopperComponen,\n PopperProps = props.PopperProps,\n title = props.title,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"arrow\", \"children\", \"classes\", \"disableFocusListener\", \"disableHoverListener\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"id\", \"interactive\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var theme = useTheme();\n\n var _React$useState = React.useState(),\n childNode = _React$useState[0],\n setChildNode = _React$useState[1];\n\n var _React$useState2 = React.useState(null),\n arrowRef = _React$useState2[0],\n setArrowRef = _React$useState2[1];\n\n var ignoreNonTouchEvents = React.useRef(false);\n var closeTimer = React.useRef();\n var enterTimer = React.useRef();\n var leaveTimer = React.useRef();\n var touchTimer = React.useRef();\n\n var _useControlled = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n openState = _useControlled2[0],\n setOpenState = _useControlled2[1];\n\n var open = openState;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var _React$useRef = React.useRef(openProp !== undefined),\n isControlled = _React$useRef.current; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n\n React.useEffect(function () {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n var id = useId(idProp);\n React.useEffect(function () {\n return function () {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n clearTimeout(touchTimer.current);\n };\n }, []);\n\n var handleOpen = function handleOpen(event) {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen) {\n onOpen(event);\n }\n };\n\n var handleEnter = function handleEnter() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'mouseover' && childrenProps.onMouseOver && forward) {\n childrenProps.onMouseOver(event);\n }\n\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n event.persist();\n enterTimer.current = setTimeout(function () {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n };\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(false),\n childIsFocusVisible = _React$useState3[0],\n setChildIsFocusVisible = _React$useState3[1];\n\n var handleBlur = function handleBlur() {\n if (childIsFocusVisible) {\n setChildIsFocusVisible(false);\n onBlurVisible();\n }\n };\n\n var handleFocus = function handleFocus() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n if (isFocusVisible(event)) {\n setChildIsFocusVisible(true);\n handleEnter()(event);\n }\n\n var childrenProps = children.props;\n\n if (childrenProps.onFocus && forward) {\n childrenProps.onFocus(event);\n }\n };\n };\n\n var handleClose = function handleClose(event) {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(function () {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(function () {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n };\n\n var handleLeave = function handleLeave() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'blur') {\n if (childrenProps.onBlur && forward) {\n childrenProps.onBlur(event);\n }\n\n handleBlur();\n }\n\n if (event.type === 'mouseleave' && childrenProps.onMouseLeave && event.currentTarget === childNode) {\n childrenProps.onMouseLeave(event);\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveDelay);\n };\n };\n\n var detectTouchStart = function detectTouchStart(event) {\n ignoreNonTouchEvents.current = true;\n var childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n var handleTouchStart = function handleTouchStart(event) {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n clearTimeout(touchTimer.current);\n event.persist();\n touchTimer.current = setTimeout(function () {\n handleEnter()(event);\n }, enterTouchDelay);\n };\n\n var handleTouchEnd = function handleTouchEnd(event) {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n var handleUseRef = useForkRef(setChildNode, ref);\n var handleFocusRef = useForkRef(focusVisibleRef, handleUseRef); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n setRef(handleFocusRef, ReactDOM.findDOMNode(instance));\n }, [handleFocusRef]);\n var handleRef = useForkRef(children.ref, handleOwnRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n } // For accessibility and SEO concerns, we render the title to the DOM node when\n // the tooltip is hidden. However, we have made a tradeoff when\n // `disableHoverListener` is set. This title logic is disabled.\n // It's allowing us to keep the implementation size minimal.\n // We are open to change the tradeoff.\n\n\n var shouldShowNativeTitle = !open && !disableHoverListener;\n\n var childrenProps = _extends({\n 'aria-describedby': open ? id : null,\n title: shouldShowNativeTitle && typeof title === 'string' ? title : null\n }, other, children.props, {\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n });\n\n var interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = handleEnter();\n childrenProps.onMouseLeave = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onMouseOver = handleEnter(false);\n interactiveWrapperListeners.onMouseLeave = handleLeave(false);\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = handleFocus();\n childrenProps.onBlur = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onFocus = handleFocus(false);\n interactiveWrapperListeners.onBlur = handleLeave(false);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', \"Remove this title prop `\".concat(children.props.title, \"` or the Tooltip component.\")].join('\\n'));\n }\n }\n\n var mergedPopperProps = React.useMemo(function () {\n return deepmerge({\n popperOptions: {\n modifiers: {\n arrow: {\n enabled: Boolean(arrowRef),\n element: arrowRef\n }\n }\n }\n }, PopperProps);\n }, [arrowRef, PopperProps]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/React.createElement(PopperComponent, _extends({\n className: clsx(classes.popper, interactive && classes.popperInteractive, arrow && classes.popperArrow),\n placement: placement,\n anchorEl: childNode,\n open: childNode ? open : false,\n id: childrenProps['aria-describedby'],\n transition: true\n }, interactiveWrapperListeners, mergedPopperProps), function (_ref) {\n var placementInner = _ref.placement,\n TransitionPropsInner = _ref.TransitionProps;\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.tooltip, classes[\"tooltipPlacement\".concat(capitalize(placementInner.split('-')[0]))], ignoreNonTouchEvents.current && classes.touch, arrow && classes.tooltipArrow)\n }, title, arrow ? /*#__PURE__*/React.createElement(\"span\", {\n className: classes.arrow,\n ref: setArrowRef\n }) : null));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n */\n arrow: PropTypes.bool,\n\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Do not respond to focus events.\n */\n disableFocusListener: PropTypes.bool,\n\n /**\n * Do not respond to hover events.\n */\n disableHoverListener: PropTypes.bool,\n\n /**\n * Do not respond to long press touch events.\n */\n disableTouchListener: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n */\n enterDelay: PropTypes.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n */\n enterNextDelay: PropTypes.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n */\n enterTouchDelay: PropTypes.number,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n\n /**\n * Makes a tooltip interactive, i.e. will not close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n */\n interactive: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n */\n leaveDelay: PropTypes.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n */\n leaveTouchDelay: PropTypes.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n\n /**\n * If `true`, the tooltip is shown.\n */\n open: PropTypes.bool,\n\n /**\n * Tooltip placement.\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n */\n PopperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTooltip',\n flip: false\n})(Tooltip);","// Source from https://github.com/alitaheri/normalize-scroll-left\nvar cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.\n *\n * Type | <- Most Left | Most Right -> | Initial\n * ---------------- | ------------ | ------------- | -------\n * default | 0 | 100 | 100\n * negative (spec*) | -100 | 0 | 0\n * reverse | 100 | 0 | 0\n *\n * Edge 85: default\n * Safari 14: negative\n * Chrome 85: negative\n * Firefox 81: negative\n * IE 11: reverse\n *\n * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll\n */\n\nexport function detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n\n var dummy = document.createElement('div');\n var container = document.createElement('div');\n container.style.width = '10px';\n container.style.height = '1px';\n dummy.appendChild(container);\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n\n document.body.removeChild(dummy);\n return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nexport function getNormalizedScrollLeft(element, direction) {\n var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior\n\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n var type = detectScrollType();\n\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n\n default:\n return scrollLeft;\n }\n}","function easeInOutSin(time) {\n return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};\n var _options$ease = options.ease,\n ease = _options$ease === void 0 ? easeInOutSin : _options$ease,\n _options$duration = options.duration,\n duration = _options$duration === void 0 ? 300 : _options$duration;\n var start = null;\n var from = element[property];\n var cancelled = false;\n\n var cancel = function cancel() {\n cancelled = true;\n };\n\n var step = function step(timestamp) {\n if (cancelled) {\n cb(new Error('Animation cancelled'));\n return;\n }\n\n if (start === null) {\n start = timestamp;\n }\n\n var time = Math.min(1, (timestamp - start) / duration);\n element[property] = ease(time) * (to - from) + from;\n\n if (time >= 1) {\n requestAnimationFrame(function () {\n cb(null);\n });\n return;\n }\n\n requestAnimationFrame(step);\n };\n\n if (from === to) {\n cb(new Error('Element already at target position'));\n return cancel;\n }\n\n requestAnimationFrame(step);\n return cancel;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nvar styles = {\n width: 99,\n height: 99,\n position: 'absolute',\n top: -9999,\n overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nexport default function ScrollbarSize(props) {\n var onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"onChange\"]);\n\n var scrollbarHeight = React.useRef();\n var nodeRef = React.useRef(null);\n\n var setMeasurements = function setMeasurements() {\n scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n };\n\n React.useEffect(function () {\n var handleResize = debounce(function () {\n var prevHeight = scrollbarHeight.current;\n setMeasurements();\n\n if (prevHeight !== scrollbarHeight.current) {\n onChange(scrollbarHeight.current);\n }\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [onChange]);\n React.useEffect(function () {\n setMeasurements();\n onChange(scrollbarHeight.current);\n }, [onChange]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n style: styles,\n ref: nodeRef\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? ScrollbarSize.propTypes = {\n onChange: PropTypes.func.isRequired\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'absolute',\n height: 2,\n bottom: 0,\n width: '100%',\n transition: theme.transitions.create()\n },\n colorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n vertical: {\n height: '100%',\n width: 2,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar TabIndicator = /*#__PURE__*/React.forwardRef(function TabIndicator(props, ref) {\n var classes = props.classes,\n className = props.className,\n color = props.color,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TabIndicator.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * The color of the tab indicator.\n */\n color: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateTabIndicator'\n})(TabIndicator);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport debounce from '../utils/debounce';\nimport ownerWindow from '../utils/ownerWindow';\nimport { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';\nimport animate from '../internal/animate';\nimport ScrollbarSize from './ScrollbarSize';\nimport withStyles from '../styles/withStyles';\nimport TabIndicator from './TabIndicator';\nimport TabScrollButton from '../TabScrollButton';\nimport useEventCallback from '../utils/useEventCallback';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n minHeight: 48,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n display: 'flex'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element. */\n flexContainer: {\n display: 'flex'\n },\n\n /* Styles applied to the flex container element if `orientation=\"vertical\"`. */\n flexContainerVertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element if `centered={true}` & `!variant=\"scrollable\"`. */\n centered: {\n justifyContent: 'center'\n },\n\n /* Styles applied to the tablist element. */\n scroller: {\n position: 'relative',\n display: 'inline-block',\n flex: '1 1 auto',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the tablist element if `!variant=\"scrollable\"`\b\b\b. */\n fixed: {\n overflowX: 'hidden',\n width: '100%'\n },\n\n /* Styles applied to the tablist element if `variant=\"scrollable\"`. */\n scrollable: {\n overflowX: 'scroll',\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n },\n\n /* Styles applied to the `ScrollButtonComponent` component. */\n scrollButtons: {},\n\n /* Styles applied to the `ScrollButtonComponent` component if `scrollButtons=\"auto\"` or scrollButtons=\"desktop\"`. */\n scrollButtonsDesktop: _defineProperty({}, theme.breakpoints.down('xs'), {\n display: 'none'\n }),\n\n /* Styles applied to the `TabIndicator` component. */\n indicator: {}\n };\n};\nvar Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledBy = props['aria-labelledby'],\n action = props.action,\n _props$centered = props.centered,\n centered = _props$centered === void 0 ? false : _props$centered,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$indicatorColor = props.indicatorColor,\n indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,\n onChange = props.onChange,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$ScrollButtonCo = props.ScrollButtonComponent,\n ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton : _props$ScrollButtonCo,\n _props$scrollButtons = props.scrollButtons,\n scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,\n selectionFollowsFocus = props.selectionFollowsFocus,\n _props$TabIndicatorPr = props.TabIndicatorProps,\n TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,\n TabScrollButtonProps = props.TabScrollButtonProps,\n _props$textColor = props.textColor,\n textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n value = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"classes\", \"className\", \"component\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\"]);\n\n var theme = useTheme();\n var scrollable = variant === 'scrollable';\n var isRtl = theme.direction === 'rtl';\n var vertical = orientation === 'vertical';\n var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n var start = vertical ? 'top' : 'left';\n var end = vertical ? 'bottom' : 'right';\n var clientSize = vertical ? 'clientHeight' : 'clientWidth';\n var size = vertical ? 'height' : 'width';\n\n if (process.env.NODE_ENV !== 'production') {\n if (centered && scrollable) {\n console.error('Material-UI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n }\n }\n\n var _React$useState = React.useState(false),\n mounted = _React$useState[0],\n setMounted = _React$useState[1];\n\n var _React$useState2 = React.useState({}),\n indicatorStyle = _React$useState2[0],\n setIndicatorStyle = _React$useState2[1];\n\n var _React$useState3 = React.useState({\n start: false,\n end: false\n }),\n displayScroll = _React$useState3[0],\n setDisplayScroll = _React$useState3[1];\n\n var _React$useState4 = React.useState({\n overflow: 'hidden',\n marginBottom: null\n }),\n scrollerStyle = _React$useState4[0],\n setScrollerStyle = _React$useState4[1];\n\n var valueToIndex = new Map();\n var tabsRef = React.useRef(null);\n var tabListRef = React.useRef(null);\n\n var getTabsMeta = function getTabsMeta() {\n var tabsNode = tabsRef.current;\n var tabsMeta;\n\n if (tabsNode) {\n var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n tabsMeta = {\n clientWidth: tabsNode.clientWidth,\n scrollLeft: tabsNode.scrollLeft,\n scrollTop: tabsNode.scrollTop,\n scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),\n scrollWidth: tabsNode.scrollWidth,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right\n };\n }\n\n var tabMeta;\n\n if (tabsNode && value !== false) {\n var _children = tabListRef.current.children;\n\n if (_children.length > 0) {\n var tab = _children[valueToIndex.get(value)];\n\n if (process.env.NODE_ENV !== 'production') {\n if (!tab) {\n console.error([\"Material-UI: The value provided to the Tabs component is invalid.\", \"None of the Tabs' children match with `\".concat(value, \"`.\"), valueToIndex.keys ? \"You can provide one of the following values: \".concat(Array.from(valueToIndex.keys()).join(', '), \".\") : null].join('\\n'));\n }\n }\n\n tabMeta = tab ? tab.getBoundingClientRect() : null;\n }\n }\n\n return {\n tabsMeta: tabsMeta,\n tabMeta: tabMeta\n };\n };\n\n var updateIndicatorState = useEventCallback(function () {\n var _newIndicatorStyle;\n\n var _getTabsMeta = getTabsMeta(),\n tabsMeta = _getTabsMeta.tabsMeta,\n tabMeta = _getTabsMeta.tabMeta;\n\n var startValue = 0;\n\n if (tabMeta && tabsMeta) {\n if (vertical) {\n startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n } else {\n var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n startValue = tabMeta.left - tabsMeta.left + correction;\n }\n }\n\n var newIndicatorStyle = (_newIndicatorStyle = {}, _defineProperty(_newIndicatorStyle, start, startValue), _defineProperty(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle);\n\n if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) {\n setIndicatorStyle(newIndicatorStyle);\n } else {\n var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);\n var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n if (dStart >= 1 || dSize >= 1) {\n setIndicatorStyle(newIndicatorStyle);\n }\n }\n });\n\n var scroll = function scroll(scrollValue) {\n animate(scrollStart, tabsRef.current, scrollValue);\n };\n\n var moveTabsScroll = function moveTabsScroll(delta) {\n var scrollValue = tabsRef.current[scrollStart];\n\n if (vertical) {\n scrollValue += delta;\n } else {\n scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;\n }\n\n scroll(scrollValue);\n };\n\n var handleStartScrollClick = function handleStartScrollClick() {\n moveTabsScroll(-tabsRef.current[clientSize]);\n };\n\n var handleEndScrollClick = function handleEndScrollClick() {\n moveTabsScroll(tabsRef.current[clientSize]);\n };\n\n var handleScrollbarSizeChange = React.useCallback(function (scrollbarHeight) {\n setScrollerStyle({\n overflow: null,\n marginBottom: -scrollbarHeight\n });\n }, []);\n\n var getConditionalElements = function getConditionalElements() {\n var conditionalElements = {};\n conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/React.createElement(ScrollbarSize, {\n className: classes.scrollable,\n onChange: handleScrollbarSizeChange\n }) : null;\n var scrollButtonsActive = displayScroll.start || displayScroll.end;\n var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');\n conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'right' : 'left',\n onClick: handleStartScrollClick,\n disabled: !displayScroll.start,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'left' : 'right',\n onClick: handleEndScrollClick,\n disabled: !displayScroll.end,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n return conditionalElements;\n };\n\n var scrollSelectedIntoView = useEventCallback(function () {\n var _getTabsMeta2 = getTabsMeta(),\n tabsMeta = _getTabsMeta2.tabsMeta,\n tabMeta = _getTabsMeta2.tabMeta;\n\n if (!tabMeta || !tabsMeta) {\n return;\n }\n\n if (tabMeta[start] < tabsMeta[start]) {\n // left side of button is out of view\n var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n scroll(nextScrollStart);\n } else if (tabMeta[end] > tabsMeta[end]) {\n // right side of button is out of view\n var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n\n scroll(_nextScrollStart);\n }\n });\n var updateScrollButtonState = useEventCallback(function () {\n if (scrollable && scrollButtons !== 'off') {\n var _tabsRef$current = tabsRef.current,\n scrollTop = _tabsRef$current.scrollTop,\n scrollHeight = _tabsRef$current.scrollHeight,\n clientHeight = _tabsRef$current.clientHeight,\n scrollWidth = _tabsRef$current.scrollWidth,\n clientWidth = _tabsRef$current.clientWidth;\n var showStartScroll;\n var showEndScroll;\n\n if (vertical) {\n showStartScroll = scrollTop > 1;\n showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n } else {\n var scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n }\n\n if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n setDisplayScroll({\n start: showStartScroll,\n end: showEndScroll\n });\n }\n }\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n var win = ownerWindow(tabsRef.current);\n win.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n win.removeEventListener('resize', handleResize);\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var handleTabsScroll = React.useCallback(debounce(function () {\n updateScrollButtonState();\n }));\n React.useEffect(function () {\n return function () {\n handleTabsScroll.clear();\n };\n }, [handleTabsScroll]);\n React.useEffect(function () {\n setMounted(true);\n }, []);\n React.useEffect(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n React.useEffect(function () {\n scrollSelectedIntoView();\n }, [scrollSelectedIntoView, indicatorStyle]);\n React.useImperativeHandle(action, function () {\n return {\n updateIndicator: updateIndicatorState,\n updateScrollButtons: updateScrollButtonState\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var indicator = /*#__PURE__*/React.createElement(TabIndicator, _extends({\n className: classes.indicator,\n orientation: orientation,\n color: indicatorColor\n }, TabIndicatorProps, {\n style: _extends({}, indicatorStyle, TabIndicatorProps.style)\n }));\n var childIndex = 0;\n var children = React.Children.map(childrenProp, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n valueToIndex.set(childValue, childIndex);\n var selected = childValue === value;\n childIndex += 1;\n return /*#__PURE__*/React.cloneElement(child, {\n fullWidth: variant === 'fullWidth',\n indicator: selected && !mounted && indicator,\n selected: selected,\n selectionFollowsFocus: selectionFollowsFocus,\n onChange: onChange,\n textColor: textColor,\n value: childValue\n });\n });\n\n var handleKeyDown = function handleKeyDown(event) {\n var target = event.target; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n // though we might warn in the future about nested, interactive elements\n // as a a11y violation\n\n var role = target.getAttribute('role');\n\n if (role !== 'tab') {\n return;\n }\n\n var newFocusTarget = null;\n var previousItemKey = orientation !== \"vertical\" ? 'ArrowLeft' : 'ArrowUp';\n var nextItemKey = orientation !== \"vertical\" ? 'ArrowRight' : 'ArrowDown';\n\n if (orientation !== \"vertical\" && theme.direction === 'rtl') {\n // swap previousItemKey with nextItemKey\n previousItemKey = 'ArrowRight';\n nextItemKey = 'ArrowLeft';\n }\n\n switch (event.key) {\n case previousItemKey:\n newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild;\n break;\n\n case nextItemKey:\n newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild;\n break;\n\n case 'Home':\n newFocusTarget = tabListRef.current.firstChild;\n break;\n\n case 'End':\n newFocusTarget = tabListRef.current.lastChild;\n break;\n\n default:\n break;\n }\n\n if (newFocusTarget !== null) {\n newFocusTarget.focus();\n event.preventDefault();\n }\n };\n\n var conditionalElements = getConditionalElements();\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, vertical && classes.vertical),\n ref: ref\n }, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.scroller, scrollable ? classes.scrollable : classes.fixed),\n style: scrollerStyle,\n ref: tabsRef,\n onScroll: handleTabsScroll\n }, /*#__PURE__*/React.createElement(\"div\", {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n className: clsx(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),\n onKeyDown: handleKeyDown,\n ref: tabListRef,\n role: \"tablist\"\n }, children), mounted && indicator), conditionalElements.scrollButtonEnd);\n});\nprocess.env.NODE_ENV !== \"production\" ? Tabs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Callback fired when the component mounts.\n * This is useful when you want to trigger an action programmatically.\n * It supports two actions: `updateIndicator()` and `updateScrollButtons()`\n *\n * @param {object} actions This object contains all possible actions\n * that can be triggered programmatically.\n */\n action: refType,\n\n /**\n * The label for the Tabs as a string.\n */\n 'aria-label': PropTypes.string,\n\n /**\n * An id or list of ids separated by a space that label the Tabs.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * If `true`, the tabs will be centered.\n * This property is intended for large views.\n */\n centered: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Determines the color of the indicator.\n */\n indicatorColor: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback\n * @param {any} value We default to the index of the child (number)\n */\n onChange: PropTypes.func,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The component used to render the scroll buttons.\n */\n ScrollButtonComponent: PropTypes.elementType,\n\n /**\n * Determine behavior of scroll buttons when tabs are set to scroll:\n *\n * - `auto` will only present them when not all the items are visible.\n * - `desktop` will only present them on medium and larger viewports.\n * - `on` will always present them.\n * - `off` will never present them.\n */\n scrollButtons: PropTypes.oneOf(['auto', 'desktop', 'off', 'on']),\n\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: PropTypes.bool,\n\n /**\n * Props applied to the tab indicator element.\n */\n TabIndicatorProps: PropTypes.object,\n\n /**\n * Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.\n */\n TabScrollButtonProps: PropTypes.object,\n\n /**\n * Determines the color of the `Tab`.\n */\n textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this property to `false`.\n */\n value: PropTypes.any,\n\n /**\n * Determines additional display behavior of the tabs:\n *\n * - `scrollable` will invoke scrolling properties and allow for horizontally\n * scrolling (or swiping) of the tab bar.\n * -`fullWidth` will make the tabs grow to use all the available space,\n * which should be used for small views, like on mobile.\n * - `standard` will render the default state.\n */\n variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabs'\n})(Tabs);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport CheckBoxOutlineBlankIcon from '../internal/svg-icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '../internal/svg-icons/CheckBox';\nimport { alpha } from '../styles/colorManipulator';\nimport IndeterminateCheckBoxIcon from '../internal/svg-icons/IndeterminateCheckBox';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `indeterminate={true}`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(CheckBoxIcon, null);\nvar defaultIcon = /*#__PURE__*/React.createElement(CheckBoxOutlineBlankIcon, null);\nvar defaultIndeterminateIcon = /*#__PURE__*/React.createElement(IndeterminateCheckBoxIcon, null);\nvar Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {\n var _props$checkedIcon = props.checkedIcon,\n checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$icon = props.icon,\n iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$indeterminateI = props.indeterminateIcon,\n indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI,\n inputProps = props.inputProps,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checkedIcon\", \"classes\", \"color\", \"icon\", \"indeterminate\", \"indeterminateIcon\", \"inputProps\", \"size\"]);\n\n var icon = indeterminate ? indeterminateIconProp : iconProp;\n var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))], indeterminate && classes.indeterminate),\n checked: classes.checked,\n disabled: classes.disabled\n },\n color: color,\n inputProps: _extends({\n 'data-indeterminate': indeterminate\n }, inputProps),\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize === undefined && size === \"small\" ? size : icon.props.fontSize\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize === undefined && size === \"small\" ? size : indeterminateIcon.props.fontSize\n }),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the checkbox will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the input.\n */\n indeterminate: PropTypes.bool,\n\n /**\n * The icon to display when the component is indeterminate.\n */\n indeterminateIcon: PropTypes.node,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the checkbox.\n * `small` is equivalent to the dense checkbox styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCheckbox'\n})(Checkbox);","export const SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'] as const;\nexport type SeverityLevel = typeof SeverityLevels[number];\n","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"\n}), 'ArrowDownward');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ArrowDownwardIcon from '../internal/svg-icons/ArrowDownward';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'flex-start',\n flexDirection: 'inherit',\n alignItems: 'center',\n '&:focus': {\n color: theme.palette.text.secondary\n },\n '&:hover': {\n color: theme.palette.text.secondary,\n '& $icon': {\n opacity: 0.5\n }\n },\n '&$active': {\n color: theme.palette.text.primary,\n // && instead of & is a workaround for https://github.com/cssinjs/jss/issues/1045\n '&& $icon': {\n opacity: 1,\n color: theme.palette.text.secondary\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Styles applied to the icon component. */\n icon: {\n fontSize: 18,\n marginRight: 4,\n marginLeft: 4,\n opacity: 0,\n transition: theme.transitions.create(['opacity', 'transform'], {\n duration: theme.transitions.duration.shorter\n }),\n userSelect: 'none'\n },\n\n /* Styles applied to the icon component if `direction=\"desc\"`. */\n iconDirectionDesc: {\n transform: 'rotate(0deg)'\n },\n\n /* Styles applied to the icon component if `direction=\"asc\"`. */\n iconDirectionAsc: {\n transform: 'rotate(180deg)'\n }\n };\n};\n/**\n * A button based label for placing inside `TableCell` for column sorting.\n */\n\nvar TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'asc' : _props$direction,\n _props$hideSortIcon = props.hideSortIcon,\n hideSortIcon = _props$hideSortIcon === void 0 ? false : _props$hideSortIcon,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? ArrowDownwardIcon : _props$IconComponent,\n other = _objectWithoutProperties(props, [\"active\", \"children\", \"classes\", \"className\", \"direction\", \"hideSortIcon\", \"IconComponent\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, active && classes.active),\n component: \"span\",\n disableRipple: true,\n ref: ref\n }, other), children, hideSortIcon && !active ? null : /*#__PURE__*/React.createElement(IconComponent, {\n className: clsx(classes.icon, classes[\"iconDirection\".concat(capitalize(direction))])\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableSortLabel.propTypes = {\n /**\n * If `true`, the label will have the active styling (should be true for the sorted column).\n */\n active: PropTypes.bool,\n\n /**\n * Label contents, the arrow will be appended automatically.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The current sort direction.\n */\n direction: PropTypes.oneOf(['asc', 'desc']),\n\n /**\n * Hide sort icon when active is false.\n */\n hideSortIcon: PropTypes.bool,\n\n /**\n * Sort icon to use.\n */\n IconComponent: PropTypes.elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableSortLabel'\n})(TableSortLabel);"],"sourceRoot":""} \ No newline at end of file diff --git a/admin/static/js/main.255f9c57.chunk.js b/admin/static/js/main.255f9c57.chunk.js deleted file mode 100644 index e76f3e3..0000000 --- a/admin/static/js/main.255f9c57.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{319:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},320:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},323:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},324:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},335:function(e){e.exports=JSON.parse('{"a":"1.3.9"}')},350:function(e,t,a){},416:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},417:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},418:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},419:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},420:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},421:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},422:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},423:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},424:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},425:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},427:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(15),i=a.n(s),n=a(457),l=(a(350),a(68)),r=a(42),c=a(92),d=a(337),p=a(76),u=a(45),m=a(44),h=a(5),g=a(93),b=a(464),f=a(473),S=a(465),v=a(315),x=a.n(v),j=a(220),T=a.n(j),y=a(13),O=a.n(y),P=a(336),C=a(174),A=a(462),k=a(474),R=a(448),D=a(461),w=a(460),L=a(222),I=a(341),E=a(438),W=a(463),V=a(459),B=a(173),N=a(212),z=a(319),G=a(320),M=a(7),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],c=0;c10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;iparseInt(o[1],10))return 1;if(parseInt(a[1],10)parseInt(i[1],10)?1:parseInt(s[1],10)parseInt(i[2],10)?1:parseInt(s[2],10)>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(323),Z=a(324),H=a(58),K=a(466),_=a(469),Q=a(467),X=a(470),ee=a(468),te=a(218),ae=a(475),oe=a(472),se=a(81),ie=a.n(se),ne=a(333),le=a.n(ne),re=a(334),ce=a.n(re),de=a(61),pe=a.n(de),ue=a(325),me=a.n(ue),he=a(326),ge=a.n(he),be=a(328),fe=a.n(be),Se=a(225),ve=a(330),xe=a.n(ve),je=a(331),Te=a.n(je),ye=a(295),Oe=a(296),Pe=a(297),Ce=a(298),Ae=a(299),ke=a(294),Re=a(104),De=a.n(Re),we=a(221),Le=a.n(we),Ie=a(332),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(xe.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s.endsWith("\n")?s:s+"\n"),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var c=s.options.find((function(e){return e.value===r[s.name]}));t=c?c.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),c=r[0],d=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),x=Object(H.a)(v,2),j=x[0],T=x[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(ce.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:c===t.$index,rooms:e.rooms,setEditMode:function(){return d(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:j.open,action:j.action,onClose:function(){return T({open:!1,action:null,item:null})},item:j.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),c=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==c.db&&(l=c.db<<24),n|=r.byte<<8,l|=c.byte<<8,n|=r.bit||0,l|=c.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n ({\n optionsSelect: {\n width: 280\n },\n optionsTextField: {\n width: 280\n },\n optionContainer: {\n },\n optionsContainer: {\n width: `calc(100% - ${theme.spacing(4)}px)`,\n padding: theme.spacing(2),\n marginBottom: 20,\n display: 'inline-block',\n textAlign: 'left'\n },\n optionsGrid: {\n textAlign: 'center',\n padding: theme.spacing(2),\n },\n optionsLabel: {\n fontSize: 12,\n },\n header: {\n fontSize: 24,\n },\n fileInput: {\n textAlign: 'center',\n display: 'inline-block',\n height: 80,\n width: 200,\n border: '2px dashed #777',\n borderRadius: 10,\n marginTop: 12,\n padding: 4\n }\n});\n\nlet FileInput = function (props) {\n const { enqueueSnackbar } = useSnackbar();\n const onDrop = useCallback(acceptedFiles => {\n props.onChange(acceptedFiles);\n enqueueSnackbar(I18n.t('Data updated'));\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\n\n return \n { I18n.t(props.label)}\n
\n \n {\n isDragActive ?\n

{I18n.t('Drop the file here ...')}

:\n

{I18n.t(`Drag 'n' drop file here, or click to select file`)}

\n }\n
\n
;\n};\n\nclass Options extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n };\n }\n\n getValue(name) {\n if (name === 's7logo') {\n return this.props.native.params.slot === null;\n }\n return this.props.native.params[name];\n }\n\n inputDisabled = input => {\n return false;\n }\n\n inputDisplay = input => {\n if (this.props.native.params.slot === null) {\n if (['rack', 'slot'].includes(input.name)) {\n return false;\n }\n } else {\n if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\n return false;\n }\n }\n if (input.name === 'timeOffset') {\n return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\n }\n return true;\n }\n\n getInputsBlock(inputs, title) {\n return \n {I18n.t(title)}\n \n {inputs.map(input => {\n if (!this.inputDisplay(input)) {\n return null;\n }\n if (input.type === 'checkbox') {\n return \n this.changeParam(input.name, e.target.checked)}\n />}/> {input.dimension ? I18n.t(input.dimension) : null};\n } else if (input.type === 'select') {\n return \n \n {I18n.t(input.title)}\n this.changeParam(input.name, e.target.value)}\n >\n {input.options.map(option =>\n {option.title}\n )}\n \n {input.dimension ? I18n.t(input.dimension) : null}\n ;\n } else if (input.type === 'hex') {\n let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\n let top = (value >> 8) & 0xFF;\n let bottom = value & 0xFF;\n\n return \n {I18n.t(input.title)}\n {\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\n return;\n }\n this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\n }}\n />\n {\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\n return;\n }\n this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\n }}\n />\n ;\n } else {\n return {I18n.t(input.dimension)} : null\n }}\n onChange={e => this.changeParam(input.name, e.target.value)}\n />;\n }\n })}\n \n ;\n }\n\n getImportsBlock() {\n return <>\n {I18n.t('Import')}\n \n \n \n \n ;\n }\n\n render() {\n return
\n \n \n {this.getInputsBlock(connectionInputs, 'PLC Connection')}\n {this.getImportsBlock()}\n \n {this.getInputsBlock(generalInputs, 'General')}\n \n ;\n }\n\n changeParam = (name, value) => {\n let native = JSON.parse(JSON.stringify(this.props.native));\n if (name === 's7logo') {\n if (value) {\n native.params.localTSAP = '';\n native.params.remoteTSAP = '';\n native.params.rack = null;\n native.params.slot = null;\n } else {\n native.params.localTSAP = null;\n native.params.remoteTSAP = null;\n native.params.rack = '';\n native.params.slot = '';\n }\n } else {\n native.params[name] = value;\n }\n this.props.changeNative(native);\n }\n\n loadSymbols = e => {\n let native = JSON.parse(JSON.stringify(this.props.native));\n const reader = new FileReader();\n\n reader.onload = e => {\n const localData = {\n inputs: [],\n outputs: [],\n markers: []\n// counter: [],\n// timer: [],\n// dbs: []\n };\n let text = reader.result;\n\n text = text.split('126,');\n text.forEach(line => {\n const typ = line.slice(23, 29).replace(/( )/g, '');\n\n const d = {\n Name: line.slice(0, 23).replace(/( ){2,}/g, ''),\n Address: line.slice(29, 36).replace(/( )/g, ''),\n Type: line.slice(36, 41).replace(/( )/g, ''),\n Description: line.slice(46, 126).replace(/( ){2,}/, ''),\n Unit: '',\n// Role: '',\n// Room: '',\n poll: true,\n RW: false,\n WP: false\n };\n\n// if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\n// if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\n if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\n if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\n if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\n// if (typ == 'C')data.counter.push(d);\n// if (typ == 'T')data.timer.push(d);\n// if (typ == 'DB')data.dbs.push(d);\n });\n\n ['inputs', 'outputs', 'markers'].forEach(table => {\n native[table] = localData[table];\n });\n this.props.changeNative(native);\n };\n\n reader.readAsText(e[0], 'ISO-8859-1');\n }\n\n addDb = e => {\n let native = JSON.parse(JSON.stringify(this.props.native));\n const reader = new FileReader();\n\n reader.onload = e => {\n setTimeout(function () {\n const text = reader.result;\n const changes = {\n inputs: false,\n outputs: false,\n markers: false,\n dbs: false\n };\n const newParts = {\n inputs: native.inputs || [],\n outputs: native.outputs || [],\n markers: native.markers || [],\n dbs: native.dbs || []\n };\n\n if (text.indexOf('Leseanforderung') !== -1) {\n // Graphpic format\n const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\n const mapping = {\n 'Name': {attr: 'Name'},\n 'Typ': {attr: ''},\n 'Operand': {attr: 'Address', process: f => {\n // DB 504.DBW 1462 => DB504 1462\n f = f.trim();\n const db = f.match(/^DB (\\d+)/);\n if (!db) {\n // M\n // MB\n let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\n if (m) {\n return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\n } else {\n m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\n if (m) {\n return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\n } else {\n m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\n if (m) {\n return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\n } else {\n return f;\n }\n }\n }\n }\n\n const offset = f.match(/(\\d+).?(\\d+)?$/);\n if (db && offset) {\n return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\n } else {\n return f;\n }\n }},\n 'SPS-Format': {attr: 'Type', process: function (f) {return f;} },\n 'Byteanzahl': {attr: 'Length', process: function (f) {return parseInt(f, 10);} },\n 'Zugriff': {attr: 'RW', process: function (f) {return f !== 'read';} },\n 'Leseanforderung': {attr: 'poll', process: function (f) {return f === 'zyklisch';} },\n 'AktZeit (ms)': {attr: ''},\n 'Kommentar': {attr: 'Description'},\n 'Clients (Anzahl)': {attr: ''}\n };\n // First line\n // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\n let sFields = lines[0].split(',');\n // create mapping\n const fields = [];\n for (let m = 0; m < sFields.length; m++) {\n sFields[m] = sFields[m].replace(/\"/g, '');\n fields.push(mapping[sFields[m]]);\n }\n for (let l = 1; l < lines.length; l++) {\n lines[l] = lines[l].trim();\n if (!lines[l]) continue;\n sFields = lines[l].trim().split(',');\n let obj = {\n Type: 'ARRAY',\n Unit: '',\n Role: '',\n Room: '',\n poll: true,\n RW: false,\n WP: false\n };\n for (let f = 0; f < fields.length; f++) {\n if (!fields[f].attr) {\n continue;\n }\n if (!sFields[f]) {\n console.log('error');\n break;\n }\n sFields[f] = sFields[f].replace(/\"/g, '');\n obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\n\n if (obj.Name.match(/^@/)) {\n obj = null;\n break;\n }\n }\n if (obj) {\n if (obj.Type === 'BYTE' && obj.Length !== 1) {\n obj.Type = 'ARRAY';\n }\n if (obj.Type === 'CHAR') {\n obj.Type = 'STRING';\n }\n if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\n obj.Length = '';\n }\n let _attr;\n if (obj.Address.match(/^DB/)) {\n _attr = 'dbs';\n } else if (obj.Address.match(/^IN/)) {\n obj.Address = obj.Address.replace(/^IN\\s?/, '');\n _attr = 'inputs';\n } else if (obj.Address.match(/^OUT/)) {\n _attr = 'outputs';\n obj.Address = obj.Address.replace(/^OUT\\s?/, '');\n } else if (obj.Address.match(/^M/)) {\n _attr = 'markers';\n obj.Address = obj.Address.replace(/^M\\s?/, '');\n } else {\n console.error('Unknown TYPE: ' + obj.Address);\n continue;\n }\n // try to find same address\n for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\n if (newParts[_attr][aaa].Address === obj.Address) {\n newParts[_attr][aaa] = obj;\n changes[_attr] = true;\n obj = null;\n break;\n }\n }\n if (obj) {\n changes[_attr] = true;\n newParts[_attr].push(obj);\n }\n }\n }\n } else {\n const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\n const db = mm ? mm[0].replace(' - ', '') : '';\n const vv = text.split('STRUCT');\n\n const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\n\n struck.forEach((item) => {\n if (item.length > 10) {\n const x = item.split(/\\s+/g);\n x.shift();\n\n let obj = {\n Address: db + ' ' + x.shift(),\n Name: x.shift(),\n Type: x.shift(),\n dec: x.shift(),\n Description: x.join(' '),\n Unit: '',\n Role: '',\n Room: '',\n poll: true,\n RW: false,\n WP: false\n };\n\n // try to find same address\n for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\n if (newParts.dbs[aaa].Address === obj.Address) {\n newParts.dbs[aaa] = obj;\n changes.dbs = true;\n obj = null;\n break;\n }\n }\n if (obj) {\n changes.dbs = true;\n newParts.dbs.push(obj);\n }\n }\n });\n }\n for (const attr in newParts) {\n if (!newParts.hasOwnProperty(attr)) {\n continue;\n }\n newParts[attr].sort((a, b) => {\n const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\n const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\n if (!aDB) return -1;\n if (!bDB) return 1;\n if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\n if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\n const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\n const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\n if (!aOffset) return -1;\n if (!bOffset) return 1;\n if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\n if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\n if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\n if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\n if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\n if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\n if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\n return 0;\n });\n }\n if (changes.dbs) {\n native.dbs = newParts.dbs;\n }\n if (changes.inputs) {\n native.inputs = newParts.inputs;\n }\n if (changes.outputs) {\n native.outputs = newParts.outputs;\n }\n if (changes.markers) {\n native.markers = newParts.markers;\n }\n console.log(native);\n //this.props.changeNative(native);\n }, 200);\n };\n\n reader.readAsText(e[0], 'ISO-8859-1');\n }\n}\n\nOptions.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default withStyles(styles)(Options);\n","import { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport {withStyles} from '@material-ui/core/styles';\n\nimport { tsv2json, json2tsv } from 'tsv-json';\nimport { useSnackbar } from 'notistack';\nimport AceEditor from \"react-ace\";\nimport copy from 'copy-to-clipboard';\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Button from '@material-ui/core/Button';\n\nimport ClearIcon from '@material-ui/icons/Clear';\nimport SaveIcon from '@material-ui/icons/Save';\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\n\nconst styles = theme => ({\n tsvEditor: {\n width: '100%',\n height: 400\n },\n tsvEditorTextarea: {\n fontFamily: 'monospace'\n }\n});\n\nconst TsvDialog = props => {\n const [tsv, setTsv] = useState('');\n useEffect(() => {\n let tsvResult = [];\n tsvResult.push(props.fields.map(field => field.name));\n props.data.forEach(item =>\n tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\n );\n setTsv(json2tsv(tsvResult));\n }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\n const { enqueueSnackbar } = useSnackbar();\n\n if (!props.open) {\n return null;\n }\n\n const saveTsv = () => {\n let data = tsv2json(tsv.endsWith('\\n') ? tsv : tsv + '\\n');\n let fields = data.shift();\n let success = true;\n let errors = [];\n for (let index in props.fields) {\n if (props.fields[index].name !== fields[index]) {\n errors.push(<>No field {props.fields[index].name} in position {parseInt(index) + 1}!);\n success = false;\n }\n }\n\n data = data.map((itemValues, itemIndex) => {\n let item = {};\n for (let index in props.fields) {\n if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\n errors.push(<>Value {itemValues[index]} is wrong for field {props.fields[index].name} in position {parseInt(itemIndex) + 1}!);\n success = false;\n }\n if (props.fields[index].type === 'checkbox') {\n itemValues[index] = itemValues[index] === 'true';\n }\n item[props.fields[index].name] = itemValues[index];\n }\n return item;\n });\n\n if (!success) {\n enqueueSnackbar(
{errors.map((error, index) =>
{error}
)}
, { variant: 'error' });\n return;\n }\n props.save(data);\n props.onClose();\n };\n\n return \n {I18n.t('Edit data as TSV')}\n \n {I18n.t('You can copy, paste and edit data as TSV.')}\n
\n setTsv(e)}\n height=\"400px\"\n showPrintMargin={false}\n value={tsv}\n className={props.classes.tsvEditor}\n width=\"100%\"\n setOptions={{firstLineNumber: 0}}\n mode={null}\n />\n
\n
\n \n \n \n \n \n \n};\n\nTsvDialog.propTypes = {\n open: PropTypes.bool,\n onClose: PropTypes.func,\n classes: PropTypes.object,\n save: PropTypes.func,\n fields: PropTypes.array,\n data: PropTypes.array\n};\n\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\n\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Button from '@material-ui/core/Button';\n\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport ClearIcon from '@material-ui/icons/Clear';\n\nconst DeleteAllDialog = (props) => {\n return props.open ? \n {I18n.t('Delete all items')}\n \n {I18n.t('Are you sure to delete all items?')}\n \n \n \n \n \n : null;\n}\n\nDeleteAllDialog.propTypes = {\n open: PropTypes.bool,\n action: PropTypes.func,\n onClose: PropTypes.func,\n classes: PropTypes.object,\n}\n\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Button from '@material-ui/core/Button';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\n\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport ClearIcon from '@material-ui/icons/Clear';\n\nconst DeleteDialog = (props) => {\n const [disableWarnings, setDisableWarnings] = useState(false);\n useEffect(() => {\n setDisableWarnings(false);\n }, [props.open]);\n\n return props.open ? \n {I18n.t('Delete item')}\n \n {I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}\n setDisableWarnings(e.target.checked)}\n />}/>\n \n \n \n \n \n : null;\n}\n\nDeleteDialog.propTypes = {\n open: PropTypes.bool,\n onClose: PropTypes.func,\n classes: PropTypes.object,\n action: PropTypes.func,\n item: PropTypes.object,\n}\n\nexport default DeleteDialog;","import { useState, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport {withStyles} from '@material-ui/core/styles';\n\nimport Table from '@material-ui/core/Table';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableCell from '@material-ui/core/TableCell';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport TextField from '@material-ui/core/TextField';\nimport IconButton from '@material-ui/core/IconButton';\nimport Select from '@material-ui/core/Select';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\nimport Tooltip from '@material-ui/core/Tooltip';\n\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport AddIcon from '@material-ui/icons/Add';\nimport ImportExport from '@material-ui/icons/ImportExport';\n\nimport I18n from '@iobroker/adapter-react/i18n';\nimport Utils from '@iobroker/adapter-react/Components/Utils';\n\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\n\nimport TsvDialog from './TsvDialog';\nimport DeleteAllDialog from './DeleteAllDialog';\nimport DeleteDialog from './DeleteDialog';\n\nconst styles = theme => ({\n tableHeader: {\n whiteSpace: 'nowrap',\n fontWeight: 'bold',\n fontSize: '80%',\n padding: '0px 8px'\n },\n tableHeaderExtended: {\n color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\n },\n tableCell: {\n whiteSpace: 'nowrap',\n fontSize: '80%',\n padding: '0px 8px'\n },\n tableContainer: {\n overflow: 'auto',\n maxHeight: 'calc(100vh - 180px)'\n },\n tableTextField: {\n fontSize: '80%'\n },\n tableSelect: {\n fontSize: '80%'\n },\n tableTextFieldContainer: {\n width: '100%'\n },\n tableSelectContainer: {\n width: '100%'\n },\n nonEditMode: {\n cursor: 'pointer'\n }\n});\n\nconst DataCell = props => {\n const sortedItem = props.sortedItem;\n const field = props.field;\n const editMode = props.editMode;\n const setEditMode = props.setEditMode;\n\n const ref = useRef();\n /*useEffect(() => {\n if (props.editMode) {\n // ref.current && ref.current.focus()\n //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\n }\n }, [props.editMode])*/\n\n let item = sortedItem.item;\n let result;\n if (field.type === 'checkbox') {\n result = \n props.changeParam(sortedItem.$index, field.name, e.target.checked)}\n />\n ;\n } else if (field.type === 'rooms') {\n if (!editMode) {\n result = ;\n } else {\n result = props.changeParam(sortedItem.$index, field.name, value)}\n className={props.classes.tableSelectContainer}\n />;\n }\n } else if (field.type === 'select') {\n if (!editMode) {\n let option = field.options.find(option => option.value === item[field.name]);\n result = option ? option.title : '';\n } else {\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\n className={props.classes.tableSelectContainer}\n >\n {field.options.map(option =>\n {option.title ? option.title : {I18n.t('Nothing')}}\n )}\n ;\n }\n } else {\n if (!editMode) {\n result = item[field.name] ? item[field.name] : null;\n } else {\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\n disabled={props.getDisable(sortedItem.$index, field.name)}\n />;\n }\n }\n\n return {\n setEditMode(true);\n window.localStorage.setItem('Modbus.editMode', 'true');\n window.setTimeout(() => ref.current && ref.current.focus(), 100);\n }}\n >\n {result}\n ;\n}\n\nconst RegisterTable = props => {\n const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\n const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\n const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\n const [deleteAllDialog, setDeleteAllDialog] = useState({\n open: false,\n action: null,\n });\n const [deleteDialog, setDeleteDialog] = useState({\n open: false,\n item: null,\n action: null,\n });\n\n let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\n\n return
\n
\n \n props.addItem()}>\n \n \n \n \n setTsvDialogOpen(true)}>\n \n \n \n \n {\n window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\n setExtendedMode(!extendedMode);\n }}>\n \n \n \n
\n
\n
` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nvar TableCell = /*#__PURE__*/React.forwardRef(function TableCell(props, ref) {\n var _props$align = props.align,\n align = _props$align === void 0 ? 'inherit' : _props$align,\n classes = props.classes,\n className = props.className,\n component = props.component,\n paddingProp = props.padding,\n scopeProp = props.scope,\n sizeProp = props.size,\n sortDirection = props.sortDirection,\n variantProp = props.variant,\n other = _objectWithoutProperties(props, [\"align\", \"classes\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"]);\n\n var table = React.useContext(TableContext);\n var tablelvl2 = React.useContext(Tablelvl2Context);\n var isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n var role;\n var Component;\n\n if (component) {\n Component = component;\n role = isHeadCell ? 'columnheader' : 'cell';\n } else {\n Component = isHeadCell ? 'th' : 'td';\n }\n\n var scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n var padding = paddingProp || (table && table.padding ? table.padding : 'normal');\n var size = sizeProp || (table && table.size ? table.size : 'medium');\n var variant = variantProp || tablelvl2 && tablelvl2.variant;\n var ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, classes[variant], className, align !== 'inherit' && classes[\"align\".concat(capitalize(align))], padding !== 'normal' && classes[\"padding\".concat(capitalize(padding))], size !== 'medium' && classes[\"size\".concat(capitalize(size))], variant === 'head' && table && table.stickyHeader && classes.stickyHeader),\n \"aria-sort\": ariaSort,\n role: role,\n scope: scope\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableCell.propTypes = {\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n */\n align: PropTypes.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The table cell contents.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Sets the padding applied to the cell.\n * By default, the Table parent component set the value (`normal`).\n * `default` is deprecated, use `normal` instead.\n */\n padding: chainPropTypes(PropTypes.oneOf(['normal', 'checkbox', 'none', 'default']), function (props) {\n if (props.padding === 'default') {\n return new Error('Material-UI: padding=\"default\" was renamed to padding=\"normal\" for consistency.');\n }\n\n return null;\n }),\n\n /**\n * Set scope attribute.\n */\n scope: PropTypes.string,\n\n /**\n * Specify the size of the cell.\n * By default, the Table parent component set the value (`medium`).\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: PropTypes.oneOf(['asc', 'desc', false]),\n\n /**\n * Specify the cell type.\n * By default, the TableHead, TableBody or TableFooter parent component set the value.\n */\n variant: PropTypes.oneOf(['body', 'footer', 'head'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableCell'\n})(TableCell);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-header-group'\n }\n};\nvar tablelvl2 = {\n variant: 'head'\n};\nvar defaultComponent = 'thead';\nvar TableHead = /*#__PURE__*/React.forwardRef(function TableHead(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableHead.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableHead'\n})(TableHead);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n '&$hover:hover': {\n backgroundColor: theme.palette.action.hover\n },\n '&$selected, &$selected:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity)\n }\n },\n\n /* Pseudo-class applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `hover={true}`. */\n hover: {},\n\n /* Styles applied to the root element if table variant=\"head\". */\n head: {},\n\n /* Styles applied to the root element if table variant=\"footer\". */\n footer: {}\n };\n};\nvar defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nvar TableRow = /*#__PURE__*/React.forwardRef(function TableRow(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n _props$hover = props.hover,\n hover = _props$hover === void 0 ? false : _props$hover,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"hover\", \"selected\"]);\n\n var tablelvl2 = React.useContext(Tablelvl2Context);\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className, tablelvl2 && {\n 'head': classes.head,\n 'footer': classes.footer\n }[tablelvl2.variant], hover && classes.hover, selected && classes.selected),\n role: Component === defaultComponent ? null : 'row'\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableRow.propTypes = {\n /**\n * Should be valid
\n \n \n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\n let isChecked = false;\n let indeterminate = false;\n let trueFound = false;\n let falseFound = false;\n for (let k in props.data) {\n if (props.data[k][field.name]) {\n isChecked = true;\n trueFound = true;\n } else {\n isChecked = false;\n falseFound = true;\n }\n\n if (trueFound && falseFound) {\n indeterminate = true;\n isChecked = false;\n break;\n }\n }\n\n return \n {field.type === 'checkbox' ?\n \n {\n let newData = JSON.parse(JSON.stringify(props.data));\n newData.forEach(item =>\n item[field.name] = e.target.checked);\n props.changeData(newData);\n }}\n />\n \n : null}\n {field.sorted ? {\n const isAsc = props.orderBy === field.name && props.order === 'asc';\n props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\n }}\n >{I18n.t(field.title)} : I18n.t(field.title)}\n \n })}\n \n \n
\n setDeleteAllDialog({\n open: true,\n action: () => props.changeData([]),\n })}\n disabled={!props.data.length}\n >\n \n \n
\n
\n
\n
\n
\n \n {\n sortedData.map(sortedItem =>\n \n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\n setEditMode(sortedItem.$index)}\n {...props}\n />\n )}\n \n \n
\n {\n let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\n if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\n props.deleteItem(sortedItem.$index);\n return;\n }\n setDeleteDialog({\n open: true,\n action: disableDialogs => {\n if (disableDialogs) {\n window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\n }\n props.deleteItem(sortedItem.$index);\n },\n item: sortedItem.item\n })\n }}>\n \n \n
\n
\n
\n
\n )\n }\n
\n
\n
\n {tsvDialogOpen ?\n {\n if (props.prefix) {\n data.forEach(line => {\n line.Address = (line.Address || '').toUpperCase();\n if (line.Address && !line.Address.startsWith(props.prefix)) {\n line.Address = props.prefix + line.Address;\n }\n });\n }\n props.changeData(data);\n }}\n onClose={() => setTsvDialogOpen(false)}\n data={props.data}\n fields={props.fields}\n /> : null\n }\n setDeleteAllDialog({\n open: false,\n action: null,\n })}\n />\n setDeleteDialog({\n open: false,\n action: null,\n item: null\n })}\n item={deleteDialog.item}\n />\n
;\n}\n\nRegisterTable.propTypes = {\n data: PropTypes.array,\n fields: PropTypes.array,\n classes: PropTypes.object,\n addItem: PropTypes.func,\n changeData: PropTypes.func,\n deleteItem: PropTypes.func,\n rooms: PropTypes.object,\n formulaDisabled: PropTypes.bool,\n getSortedData: PropTypes.func,\n themeType: PropTypes.string,\n prefix: PropTypes.string,\n};\n\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\nimport PropTypes from 'prop-types';\n\nimport Paper from '@material-ui/core/Paper';\n\nimport roles from '../data/roles';\nimport types from '../data/types';\n\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport RegisterTable from '../Components/RegisterTable';\n\nclass BaseRegisters extends Component {\n constructor(props) {\n super(props);\n this.nativeField = '';\n this.state = {\n order: window.localStorage.getItem('Modbus.order') || 'asc',\n orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\n };\n }\n\n getRooms() {\n const lang = I18n.getLanguage();\n return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\n value: room._id,\n title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\n })) : [];\n }\n\n getFields() {\n let rooms = this.getRooms();\n rooms.unshift({value: '', title: ''});\n\n let result = [\n {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\n {name: 'Name', title: 'Name', type: 'text', sorted: true},\n {name: 'Description', title: 'Description', type: 'text', sorted: true},\n {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\n {name: 'Length', title: 'Length', type: 'text', width: 20},\n {name: 'Unit', title: 'Unit', type: 'text', width: 30},\n {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\n {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\n {name: 'poll', title: 'Poll', type: 'checkbox'},\n {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\n {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\n ]\n\n if (this.props.native.params.multiDeviceId) {\n result.splice(1, 0,\n {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\n );\n }\n\n return result;\n }\n\n address2struct(address) {\n if (this.nativeField === 'dbs') {\n const parts = address.split(' ');\n const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\n if (parts[1] && parts[1].includes('.')) {\n const a = parseFloat(parts[1]);\n return {db, byte: Math.floor(a), bit: (a * 10) % 10};\n } else {\n return {db, byte: parseInt(parts[1], 10)};\n }\n } else {\n if (address.includes('.')) {\n const a = parseFloat(address);\n return {byte: Math.floor(a), bit: (a * 10) % 10};\n } else {\n return {byte: parseInt(address, 10)};\n }\n }\n }\n\n struct2address(struct) {\n if (struct.db !== undefined) {\n if (struct.bit !== undefined) {\n return `DB${struct.db} ${struct.byte}.${struct.bit}`;\n } else {\n return `DB${struct.db} ${struct.byte}`;\n }\n } else if (struct.bit !== undefined) {\n return struct.byte + '.' + struct.bit;\n } else {\n return struct.byte;\n }\n }\n\n changeParam = (index, name, value) => {\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\n data[index][name] = value;\n if (name === 'Type') {\n if (['BOOL'].includes(value)) {\n data[index].Length = 0.1;\n } else\n if (['', 'BYTE'].includes(value)) {\n data[index].Length = 1;\n } else\n if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\n data[index].Length = 2;\n } else\n if (['DWORD', 'DINT', 'REAL'].includes(value)) {\n data[index].Length = 4;\n } else\n if (['S7TIME'].includes(value)) {\n data[index].Length = 8;\n } else\n if (['S7STRING', 'ARRAY'].includes(value)) {\n data[index].Length = 32;\n }\n\n if (value === 'BOOL') {\n const struct = this.address2struct(data[index].Address);\n if (struct.bit === undefined) {\n struct.bit = 0;\n data[index].Address = this.struct2address(struct);\n }\n } else {\n const struct = this.address2struct(data[index].Address);\n if (struct.bit !== undefined) {\n if (struct.bit > 0) {\n struct.byte++;\n }\n delete struct.bit;\n\n data[index].Address = this.struct2address(struct);\n }\n }\n }\n this.props.onChange(this.nativeField, data);\n }\n\n addItem = () => {\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\n let newItem = {}\n\n this.getFields().forEach(field => newItem[field.name] = '');\n\n if (data.length) {\n let sortedData = JSON.parse(JSON.stringify(data));\n sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\n let lastItem = sortedData[sortedData.length - 1];\n const struct = this.address2struct(lastItem.Address);\n if (lastItem.Type === 'BOOL') {\n struct.bit = struct.bit || 0;\n struct.bit++;\n if (struct.bit >= 8) {\n struct.bit = struct.bit % 8;\n struct.byte++;\n }\n } else {\n delete struct.bit;\n struct.byte += lastItem.Length;\n }\n\n if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\n struct.db++;\n struct.byte = 0;\n if (lastItem.Type === 'BOOL') {\n struct.bit = 0;\n }\n }\n\n newItem.Address = this.struct2address(struct);\n newItem.Type = lastItem.Type;\n newItem.Length = lastItem.Length;\n newItem.Unit = lastItem.Unit;\n newItem.Role = lastItem.Role;\n newItem.Room = lastItem.Room;\n newItem.poll = lastItem.poll;\n newItem.RW = lastItem.RW;\n newItem.WP = lastItem.WP;\n } else {\n newItem.role = 'level';\n newItem.Type = 'BOOL';\n newItem.Length = '0.1';\n newItem.poll = true;\n if (this.nativeField === 'dbs') {\n newItem.Address = 'DB1 0.0';\n } else {\n newItem.Address = '0.0';\n }\n }\n data.push(newItem);\n this.props.onChange(this.nativeField, data);\n }\n\n deleteItem = (index) => {\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\n data.splice(index, 1);\n this.props.onChange(this.nativeField, data);\n }\n\n changeData = (data) => {\n this.props.onChange(this.nativeField, data);\n }\n\n getDisable = (index, name) => {\n return name === 'Length' &&\n !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\n }\n\n getSortedData = (data, orderBy, order) => {\n this.fields = this.fields || this.getFields();\n\n data = data || this.props.native[this.nativeField];\n orderBy = orderBy || this.state.orderBy;\n order = order || this.state.order;\n let sortedData = [];\n data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\n const field = this.fields.find(item => item.name === orderBy);\n\n sortedData.sort((sortedItem1, sortedItem2) => {\n let sort1;\n let sort2;\n if (orderBy === 'Address') {\n const a1 = this.address2struct(sortedItem1.item.Address);\n const a2 = this.address2struct(sortedItem2.item.Address);\n\n sort1 = 0;\n if (a1.db !== undefined) {\n sort1 = a1.db << 24;\n }\n if (a2.db !== undefined) {\n sort2 = a2.db << 24;\n }\n sort1 |= a1.byte << 8;\n sort2 |= a2.byte << 8;\n sort1 |= a1.bit || 0;\n sort2 |= a2.bit || 0;\n } else if (orderBy === '$index') {\n sort1 = sortedItem1[orderBy];\n sort2 = sortedItem2[orderBy];\n } else if (field && field.type === 'number') {\n sort1 = parseInt(sortedItem1.item[orderBy], 10);\n sort2 = parseInt(sortedItem2.item[orderBy], 10);\n } else {\n sort1 = sortedItem1.item[orderBy];\n sort2 = sortedItem2.item[orderBy];\n }\n return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\n });\n\n return sortedData;\n }\n\n render() {\n this.fields = this.fields || this.getFields();\n\n return \n {\n this.setState({orderBy, order});\n window.localStorage.setItem('Modbus.orderBy', orderBy);\n window.localStorage.setItem('Modbus.order', order);\n }}\n />\n \n }\n}\n\nBaseRegisters.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n};\n\nexport default BaseRegisters;\n","import PropTypes from 'prop-types';\n\nimport BaseRegisters from './BaseRegisters';\n\nclass Inputs extends BaseRegisters {\n nativeField = 'inputs'\n}\n\nInputs.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default Inputs;\n","import PropTypes from 'prop-types';\n\nimport BaseRegisters from './BaseRegisters';\n\nclass Outputs extends BaseRegisters {\n nativeField = 'outputs'\n}\n\nOutputs.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default Outputs;\n","import PropTypes from 'prop-types';\n\nimport BaseRegisters from './BaseRegisters';\n\nclass Marker extends BaseRegisters {\n nativeField = 'markers'\n}\n\nMarker.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default Marker;\n","import PropTypes from 'prop-types';\n\nimport BaseRegisters from './BaseRegisters';\n\nclass Dbs extends BaseRegisters {\n nativeField = 'dbs';\n}\n\nDbs.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default Dbs;\n","import React from 'react';\nimport {withStyles} from '@material-ui/core/styles';\nimport { MuiThemeProvider } from '@material-ui/core/styles';\nimport { SnackbarProvider } from 'notistack';\n\nimport AppBar from '@material-ui/core/AppBar';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\n\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\nimport Loader from '@iobroker/adapter-react/Components/Loader'\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport TabOptions from './Tabs/Options';\nimport TabInputs from './Tabs/Inputs';\nimport TabOutputs from './Tabs/Outputs';\nimport TabMarker from './Tabs/Marker';\nimport TabDbs from './Tabs/DBs';\n\nconst styles = theme => ({\n root: {},\n tabContent: {\n padding: 10,\n height: 'calc(100% - 64px - 48px - 20px)',\n overflow: 'auto',\n },\n tabContentIFrame: {\n padding: 10,\n height: 'calc(100% - 64px - 48px - 20px - 38px)',\n overflow: 'auto'\n },\n tab: {\n width: '100%',\n minHeight: '100%'\n }\n});\n\nconst tabs = [\n {\n name: 'general',\n title: 'General',\n component: TabOptions,\n },\n {\n name: 'inputs',\n title: 'Inputs',\n component: TabInputs,\n },\n {\n name: 'outputs',\n title: 'Outputs',\n component: TabOutputs,\n },\n {\n name: 'marker',\n title: 'Marker',\n component: TabMarker,\n },\n {\n name: 'dbs',\n title: 'DBs',\n component: TabDbs,\n },\n]\n\nclass App extends GenericApp {\n constructor(props) {\n const extendedProps = {...props};\n extendedProps.encryptedFields = ['pass'];\n\n extendedProps.translations = {\n 'en': require('./i18n/en'),\n 'de': require('./i18n/de'),\n 'ru': require('./i18n/ru'),\n 'pt': require('./i18n/pt'),\n 'nl': require('./i18n/nl'),\n 'fr': require('./i18n/fr'),\n 'it': require('./i18n/it'),\n 'es': require('./i18n/es'),\n 'pl': require('./i18n/pl'),\n 'zh-cn': require('./i18n/zh-cn'),\n };\n\n super(props, extendedProps);\n this.state.moreLoaded = false;\n this.state.rooms = null;\n }\n\n onConnectionReady() {\n super.onConnectionReady()\n this.socket.getForeignObjects('enum.rooms.*', 'enum')\n .then(rooms =>\n this.setState({moreLoaded: true, rooms}));\n }\n\n getSelectedTab() {\n const selectedTab = this.state.selectedTab;\n if (!selectedTab) {\n return 0;\n } else {\n return tabs.findIndex(tab => tab.name === selectedTab);\n }\n }\n\n render() {\n if (!this.state.loaded || !this.state.moreLoaded) {\n return \n \n ;\n }\n\n return \n \n
\n \n this.selectTab(tabs[index].name, index)}\n variant=\"scrollable\" scrollButtons=\"auto\">\n {tabs.map(tab => {tab.icon}{I18n.t(tab.title)} : I18n.t(tab.title)}\n data-name={tab.name}\n key={tab.name}\n title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\n />)}\n \n \n
\n {tabs.map((tab, index) => {\n const TabComponent = tab.component;\n if (this.state.selectedTab) {\n if (this.state.selectedTab !== tab.name) {\n return null;\n }\n } else {\n if (index !== 0) {\n return null;\n }\n }\n return this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\n onLoad={native => this.onLoadConfig(native)}\n instance={this.instance}\n adapterName={this.adapterName}\n changed={this.state.changed}\n onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\n changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\n rooms={this.state.rooms}\n />\n })}\n {/*
{JSON.stringify(this.state.native, null, 2)}
*/}\n
\n {this.renderError()}\n {this.renderSaveCloseButtons()}\n
\n
\n
;\n }\n}\n\nexport default withStyles(styles)(App);\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport * as Sentry from '@sentry/browser';\nimport * as SentryIntegrations from '@sentry/integrations';\nimport { MuiThemeProvider} from '@material-ui/core/styles';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\nimport {version} from '../package.json';\nimport theme from '@iobroker/adapter-react/Theme';\nimport Utils from '@iobroker/adapter-react/Components/Utils';\n\nwindow.adapterName = 's7';\nlet themeName = Utils.getThemeName();\n\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\n\nfunction build() {\n return ReactDOM.render(\n \n {\n themeName = _theme;\n build();\n }}\n />\n ,\n document.getElementById('root')\n );\n}\n\nif (false && window.location.host !== 'localhost:3000') {\n Sentry.init({\n dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\n release: `iobroker.${window.adapterName}@${version}`,\n integrations: [\n new SentryIntegrations.Dedupe()\n ]\n });\n}\n\nbuild();\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/admin/static/js/main.ef8e32e0.chunk.js b/admin/static/js/main.ef8e32e0.chunk.js new file mode 100644 index 0000000..1544722 --- /dev/null +++ b/admin/static/js/main.ef8e32e0.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{316:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},317:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},321:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},322:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},333:function(e){e.exports=JSON.parse('{"a":"1.3.10"}')},348:function(e,t,a){},415:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},417:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},418:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},419:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},420:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},421:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},422:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},423:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},424:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},426:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(16),i=a.n(s),n=a(456),l=(a(348),a(68)),r=a(28),c=a(25),d=a(335),p=a(58),u=a(38),m=a(46),h=a(5),g=a(91),b=a(463),f=a(472),S=a(464),v=a(313),j=a.n(v),x=a(218),T=a.n(x),y=a(13),O=a.n(y),P=a(334),C=a(173),A=a(461),k=a(473),R=a(447),D=a(460),w=a(459),L=a(220),I=a(339),E=a(437),W=a(462),V=a(458),B=a(172),N=a(211),z=a(316),G=a(317),M=a(7),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],c=0;c10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;iparseInt(o[1],10))return 1;if(parseInt(a[1],10)parseInt(i[1],10)?1:parseInt(s[1],10)parseInt(i[2],10)?1:parseInt(s[2],10)>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(321),Z=a(322),H=a(18),K=a(465),_=a(468),Q=a(466),X=a(469),ee=a(467),te=a(216),ae=a(475),oe=a(471),se=a(80),ie=a.n(se),ne=a(331),le=a.n(ne),re=a(332),ce=a.n(re),de=a(61),pe=a.n(de),ue=a(323),me=a.n(ue),he=a(324),ge=a.n(he),be=a(326),fe=a.n(be),Se=a(223),ve=a(328),je=a.n(ve),xe=a(329),Te=a.n(xe),ye=a(293),Oe=a(294),Pe=a(295),Ce=a(296),Ae=a(297),ke=a(292),Re=a(101),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(330),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(je.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s.endsWith("\n")?s:s+"\n"),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var c=s.options.find((function(e){return e.value===r[s.name]}));t=c?c.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),c=r[0],d=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),j=Object(H.a)(v,2),x=j[0],T=j[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(ce.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:c===t.$index,rooms:e.rooms,setEditMode:function(){return d(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:x.open,action:x.action,onClose:function(){return T({open:!1,action:null,item:null})},item:x.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),c=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==c.db&&(l=c.db<<24),n|=r.byte<<8,l|=c.byte<<8,n|=r.bit||0,l|=c.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n ({\r\n optionsSelect: {\r\n width: 280\r\n },\r\n optionsTextField: {\r\n width: 280\r\n },\r\n optionContainer: {\r\n },\r\n optionsContainer: {\r\n width: `calc(100% - ${theme.spacing(4)}px)`,\r\n padding: theme.spacing(2),\r\n marginBottom: 20,\r\n display: 'inline-block',\r\n textAlign: 'left'\r\n },\r\n optionsGrid: {\r\n textAlign: 'center',\r\n padding: theme.spacing(2),\r\n },\r\n optionsLabel: {\r\n fontSize: 12,\r\n },\r\n header: {\r\n fontSize: 24,\r\n },\r\n fileInput: {\r\n textAlign: 'center',\r\n display: 'inline-block',\r\n height: 80,\r\n width: 200,\r\n border: '2px dashed #777',\r\n borderRadius: 10,\r\n marginTop: 12,\r\n padding: 4\r\n }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const onDrop = useCallback(acceptedFiles => {\r\n props.onChange(acceptedFiles);\r\n enqueueSnackbar(I18n.t('Data updated'));\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n return \r\n { I18n.t(props.label)}\r\n
\r\n \r\n {\r\n isDragActive ?\r\n

{I18n.t('Drop the file here ...')}

:\r\n

{I18n.t(`Drag 'n' drop file here, or click to select file`)}

\r\n }\r\n
\r\n
;\r\n};\r\n\r\nclass Options extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n };\r\n }\r\n\r\n getValue(name) {\r\n if (name === 's7logo') {\r\n return this.props.native.params.slot === null;\r\n }\r\n return this.props.native.params[name];\r\n }\r\n\r\n inputDisabled = input => {\r\n return false;\r\n }\r\n\r\n inputDisplay = input => {\r\n if (this.props.native.params.slot === null) {\r\n if (['rack', 'slot'].includes(input.name)) {\r\n return false;\r\n }\r\n } else {\r\n if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n return false;\r\n }\r\n }\r\n if (input.name === 'timeOffset') {\r\n return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n }\r\n return true;\r\n }\r\n\r\n getInputsBlock(inputs, title) {\r\n return \r\n {I18n.t(title)}\r\n \r\n {inputs.map(input => {\r\n if (!this.inputDisplay(input)) {\r\n return null;\r\n }\r\n if (input.type === 'checkbox') {\r\n return \r\n this.changeParam(input.name, e.target.checked)}\r\n />}/> {input.dimension ? I18n.t(input.dimension) : null};\r\n } else if (input.type === 'select') {\r\n return \r\n \r\n {I18n.t(input.title)}\r\n this.changeParam(input.name, e.target.value)}\r\n >\r\n {input.options.map(option =>\r\n {option.title}\r\n )}\r\n \r\n {input.dimension ? I18n.t(input.dimension) : null}\r\n ;\r\n } else if (input.type === 'hex') {\r\n let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n let top = (value >> 8) & 0xFF;\r\n let bottom = value & 0xFF;\r\n\r\n return \r\n {I18n.t(input.title)}\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n }}\r\n />\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n }}\r\n />\r\n ;\r\n } else {\r\n return {I18n.t(input.dimension)} : null\r\n }}\r\n onChange={e => this.changeParam(input.name, e.target.value)}\r\n />;\r\n }\r\n })}\r\n \r\n ;\r\n }\r\n\r\n getImportsBlock() {\r\n return <>\r\n {I18n.t('Import')}\r\n \r\n \r\n \r\n \r\n ;\r\n }\r\n\r\n render() {\r\n return
\r\n \r\n \r\n {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n {this.getImportsBlock()}\r\n \r\n {this.getInputsBlock(generalInputs, 'General')}\r\n \r\n
;\r\n }\r\n\r\n changeParam = (name, value) => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n if (name === 's7logo') {\r\n if (value) {\r\n native.params.localTSAP = '';\r\n native.params.remoteTSAP = '';\r\n native.params.rack = null;\r\n native.params.slot = null;\r\n } else {\r\n native.params.localTSAP = null;\r\n native.params.remoteTSAP = null;\r\n native.params.rack = '';\r\n native.params.slot = '';\r\n }\r\n } else {\r\n native.params[name] = value;\r\n }\r\n this.props.changeNative(native);\r\n }\r\n\r\n loadSymbols = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n const localData = {\r\n inputs: [],\r\n outputs: [],\r\n markers: []\r\n// counter: [],\r\n// timer: [],\r\n// dbs: []\r\n };\r\n let text = reader.result;\r\n\r\n text = text.split('126,');\r\n text.forEach(line => {\r\n const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n const d = {\r\n Name: line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n Address: line.slice(29, 36).replace(/( )/g, ''),\r\n Type: line.slice(36, 41).replace(/( )/g, ''),\r\n Description: line.slice(46, 126).replace(/( ){2,}/, ''),\r\n Unit: '',\r\n// Role: '',\r\n// Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n// if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n// if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n// if (typ == 'C')data.counter.push(d);\r\n// if (typ == 'T')data.timer.push(d);\r\n// if (typ == 'DB')data.dbs.push(d);\r\n });\r\n\r\n ['inputs', 'outputs', 'markers'].forEach(table => {\r\n native[table] = localData[table];\r\n });\r\n this.props.changeNative(native);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n\r\n addDb = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n setTimeout(function () {\r\n const text = reader.result;\r\n const changes = {\r\n inputs: false,\r\n outputs: false,\r\n markers: false,\r\n dbs: false\r\n };\r\n const newParts = {\r\n inputs: native.inputs || [],\r\n outputs: native.outputs || [],\r\n markers: native.markers || [],\r\n dbs: native.dbs || []\r\n };\r\n\r\n if (text.indexOf('Leseanforderung') !== -1) {\r\n // Graphpic format\r\n const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n const mapping = {\r\n 'Name': {attr: 'Name'},\r\n 'Typ': {attr: ''},\r\n 'Operand': {attr: 'Address', process: f => {\r\n // DB 504.DBW 1462 => DB504 1462\r\n f = f.trim();\r\n const db = f.match(/^DB (\\d+)/);\r\n if (!db) {\r\n // M\r\n // MB\r\n let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n\r\n const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n if (db && offset) {\r\n return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n } else {\r\n return f;\r\n }\r\n }},\r\n 'SPS-Format': {attr: 'Type', process: function (f) {return f;} },\r\n 'Byteanzahl': {attr: 'Length', process: function (f) {return parseInt(f, 10);} },\r\n 'Zugriff': {attr: 'RW', process: function (f) {return f !== 'read';} },\r\n 'Leseanforderung': {attr: 'poll', process: function (f) {return f === 'zyklisch';} },\r\n 'AktZeit (ms)': {attr: ''},\r\n 'Kommentar': {attr: 'Description'},\r\n 'Clients (Anzahl)': {attr: ''}\r\n };\r\n // First line\r\n // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n let sFields = lines[0].split(',');\r\n // create mapping\r\n const fields = [];\r\n for (let m = 0; m < sFields.length; m++) {\r\n sFields[m] = sFields[m].replace(/\"/g, '');\r\n fields.push(mapping[sFields[m]]);\r\n }\r\n for (let l = 1; l < lines.length; l++) {\r\n lines[l] = lines[l].trim();\r\n if (!lines[l]) continue;\r\n sFields = lines[l].trim().split(',');\r\n let obj = {\r\n Type: 'ARRAY',\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n for (let f = 0; f < fields.length; f++) {\r\n if (!fields[f].attr) {\r\n continue;\r\n }\r\n if (!sFields[f]) {\r\n console.log('error');\r\n break;\r\n }\r\n sFields[f] = sFields[f].replace(/\"/g, '');\r\n obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n if (obj.Name.match(/^@/)) {\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n obj.Type = 'ARRAY';\r\n }\r\n if (obj.Type === 'CHAR') {\r\n obj.Type = 'STRING';\r\n }\r\n if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n obj.Length = '';\r\n }\r\n let _attr;\r\n if (obj.Address.match(/^DB/)) {\r\n _attr = 'dbs';\r\n } else if (obj.Address.match(/^IN/)) {\r\n obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n _attr = 'inputs';\r\n } else if (obj.Address.match(/^OUT/)) {\r\n _attr = 'outputs';\r\n obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n } else if (obj.Address.match(/^M/)) {\r\n _attr = 'markers';\r\n obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n } else {\r\n console.error('Unknown TYPE: ' + obj.Address);\r\n continue;\r\n }\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n if (newParts[_attr][aaa].Address === obj.Address) {\r\n newParts[_attr][aaa] = obj;\r\n changes[_attr] = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes[_attr] = true;\r\n newParts[_attr].push(obj);\r\n }\r\n }\r\n }\r\n } else {\r\n const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n const db = mm ? mm[0].replace(' - ', '') : '';\r\n const vv = text.split('STRUCT');\r\n\r\n const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n struck.forEach((item) => {\r\n if (item.length > 10) {\r\n const x = item.split(/\\s+/g);\r\n x.shift();\r\n\r\n let obj = {\r\n Address: db + ' ' + x.shift(),\r\n Name: x.shift(),\r\n Type: x.shift(),\r\n dec: x.shift(),\r\n Description: x.join(' '),\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n if (newParts.dbs[aaa].Address === obj.Address) {\r\n newParts.dbs[aaa] = obj;\r\n changes.dbs = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes.dbs = true;\r\n newParts.dbs.push(obj);\r\n }\r\n }\r\n });\r\n }\r\n for (const attr in newParts) {\r\n if (!newParts.hasOwnProperty(attr)) {\r\n continue;\r\n }\r\n newParts[attr].sort((a, b) => {\r\n const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n if (!aDB) return -1;\r\n if (!bDB) return 1;\r\n if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n if (!aOffset) return -1;\r\n if (!bOffset) return 1;\r\n if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n return 0;\r\n });\r\n }\r\n if (changes.dbs) {\r\n native.dbs = newParts.dbs;\r\n }\r\n if (changes.inputs) {\r\n native.inputs = newParts.inputs;\r\n }\r\n if (changes.outputs) {\r\n native.outputs = newParts.outputs;\r\n }\r\n if (changes.markers) {\r\n native.markers = newParts.markers;\r\n }\r\n console.log(native);\r\n //this.props.changeNative(native);\r\n }, 200);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n}\r\n\r\nOptions.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n tsvEditor: {\r\n width: '100%',\r\n height: 400\r\n },\r\n tsvEditorTextarea: {\r\n fontFamily: 'monospace'\r\n }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n const [tsv, setTsv] = useState('');\r\n useEffect(() => {\r\n let tsvResult = [];\r\n tsvResult.push(props.fields.map(field => field.name));\r\n props.data.forEach(item =>\r\n tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n );\r\n setTsv(json2tsv(tsvResult));\r\n }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n if (!props.open) {\r\n return null;\r\n }\r\n\r\n const saveTsv = () => {\r\n let data = tsv2json(tsv.endsWith('\\n') ? tsv : tsv + '\\n');\r\n let fields = data.shift();\r\n let success = true;\r\n let errors = [];\r\n for (let index in props.fields) {\r\n if (props.fields[index].name !== fields[index]) {\r\n errors.push(<>No field {props.fields[index].name} in position {parseInt(index) + 1}!);\r\n success = false;\r\n }\r\n }\r\n\r\n data = data.map((itemValues, itemIndex) => {\r\n let item = {};\r\n for (let index in props.fields) {\r\n if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n errors.push(<>Value {itemValues[index]} is wrong for field {props.fields[index].name} in position {parseInt(itemIndex) + 1}!);\r\n success = false;\r\n }\r\n if (props.fields[index].type === 'checkbox') {\r\n itemValues[index] = itemValues[index] === 'true';\r\n }\r\n item[props.fields[index].name] = itemValues[index];\r\n }\r\n return item;\r\n });\r\n\r\n if (!success) {\r\n enqueueSnackbar(
{errors.map((error, index) =>
{error}
)}
, { variant: 'error' });\r\n return;\r\n }\r\n props.save(data);\r\n props.onClose();\r\n };\r\n\r\n return \r\n {I18n.t('Edit data as TSV')}\r\n \r\n {I18n.t('You can copy, paste and edit data as TSV.')}\r\n
\r\n setTsv(e)}\r\n height=\"400px\"\r\n showPrintMargin={false}\r\n value={tsv}\r\n className={props.classes.tsvEditor}\r\n width=\"100%\"\r\n setOptions={{firstLineNumber: 0}}\r\n mode={null}\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n};\r\n\r\nTsvDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n save: PropTypes.func,\r\n fields: PropTypes.array,\r\n data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n return props.open ? \r\n {I18n.t('Delete all items')}\r\n \r\n {I18n.t('Are you sure to delete all items?')}\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n open: PropTypes.bool,\r\n action: PropTypes.func,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n const [disableWarnings, setDisableWarnings] = useState(false);\r\n useEffect(() => {\r\n setDisableWarnings(false);\r\n }, [props.open]);\r\n\r\n return props.open ? \r\n {I18n.t('Delete item')}\r\n \r\n {I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}\r\n setDisableWarnings(e.target.checked)}\r\n />}/>\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n action: PropTypes.func,\r\n item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n tableHeader: {\r\n whiteSpace: 'nowrap',\r\n fontWeight: 'bold',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableHeaderExtended: {\r\n color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n },\r\n tableCell: {\r\n whiteSpace: 'nowrap',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableContainer: {\r\n overflow: 'auto',\r\n maxHeight: 'calc(100vh - 180px)'\r\n },\r\n tableTextField: {\r\n fontSize: '80%'\r\n },\r\n tableSelect: {\r\n fontSize: '80%'\r\n },\r\n tableTextFieldContainer: {\r\n width: '100%'\r\n },\r\n tableSelectContainer: {\r\n width: '100%'\r\n },\r\n nonEditMode: {\r\n cursor: 'pointer'\r\n }\r\n});\r\n\r\nconst DataCell = props => {\r\n const sortedItem = props.sortedItem;\r\n const field = props.field;\r\n const editMode = props.editMode;\r\n const setEditMode = props.setEditMode;\r\n\r\n const ref = useRef();\r\n /*useEffect(() => {\r\n if (props.editMode) {\r\n // ref.current && ref.current.focus()\r\n //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n }\r\n }, [props.editMode])*/\r\n\r\n let item = sortedItem.item;\r\n let result;\r\n if (field.type === 'checkbox') {\r\n result = \r\n props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n />\r\n ;\r\n } else if (field.type === 'rooms') {\r\n if (!editMode) {\r\n result = ;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, value)}\r\n className={props.classes.tableSelectContainer}\r\n />;\r\n }\r\n } else if (field.type === 'select') {\r\n if (!editMode) {\r\n let option = field.options.find(option => option.value === item[field.name]);\r\n result = option ? option.title : '';\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n className={props.classes.tableSelectContainer}\r\n >\r\n {field.options.map(option =>\r\n {option.title ? option.title : {I18n.t('Nothing')}}\r\n )}\r\n ;\r\n }\r\n } else {\r\n if (!editMode) {\r\n result = item[field.name] ? item[field.name] : null;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n disabled={props.getDisable(sortedItem.$index, field.name)}\r\n />;\r\n }\r\n }\r\n\r\n return {\r\n setEditMode(true);\r\n window.localStorage.setItem('Modbus.editMode', 'true');\r\n window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n }}\r\n >\r\n {result}\r\n ;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n open: false,\r\n action: null,\r\n });\r\n const [deleteDialog, setDeleteDialog] = useState({\r\n open: false,\r\n item: null,\r\n action: null,\r\n });\r\n\r\n let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n return
\r\n
\r\n \r\n props.addItem()}>\r\n \r\n \r\n \r\n \r\n setTsvDialogOpen(true)}>\r\n \r\n \r\n \r\n \r\n {\r\n window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n setExtendedMode(!extendedMode);\r\n }}>\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n let isChecked = false;\r\n let indeterminate = false;\r\n let trueFound = false;\r\n let falseFound = false;\r\n for (let k in props.data) {\r\n if (props.data[k][field.name]) {\r\n isChecked = true;\r\n trueFound = true;\r\n } else {\r\n isChecked = false;\r\n falseFound = true;\r\n }\r\n\r\n if (trueFound && falseFound) {\r\n indeterminate = true;\r\n isChecked = false;\r\n break;\r\n }\r\n }\r\n\r\n return \r\n {field.type === 'checkbox' ?\r\n \r\n {\r\n let newData = JSON.parse(JSON.stringify(props.data));\r\n newData.forEach(item =>\r\n item[field.name] = e.target.checked);\r\n props.changeData(newData);\r\n }}\r\n />\r\n \r\n : null}\r\n {field.sorted ? {\r\n const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n }}\r\n >{I18n.t(field.title)} : I18n.t(field.title)}\r\n \r\n })}\r\n \r\n \r\n
\r\n setDeleteAllDialog({\r\n open: true,\r\n action: () => props.changeData([]),\r\n })}\r\n disabled={!props.data.length}\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n sortedData.map(sortedItem =>\r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n setEditMode(sortedItem.$index)}\r\n {...props}\r\n />\r\n )}\r\n \r\n \r\n
\r\n {\r\n let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n props.deleteItem(sortedItem.$index);\r\n return;\r\n }\r\n setDeleteDialog({\r\n open: true,\r\n action: disableDialogs => {\r\n if (disableDialogs) {\r\n window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n }\r\n props.deleteItem(sortedItem.$index);\r\n },\r\n item: sortedItem.item\r\n })\r\n }}>\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n {tsvDialogOpen ?\r\n {\r\n if (props.prefix) {\r\n data.forEach(line => {\r\n line.Address = (line.Address || '').toUpperCase();\r\n if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n line.Address = props.prefix + line.Address;\r\n }\r\n });\r\n }\r\n props.changeData(data);\r\n }}\r\n onClose={() => setTsvDialogOpen(false)}\r\n data={props.data}\r\n fields={props.fields}\r\n /> : null\r\n }\r\n setDeleteAllDialog({\r\n open: false,\r\n action: null,\r\n })}\r\n />\r\n setDeleteDialog({\r\n open: false,\r\n action: null,\r\n item: null\r\n })}\r\n item={deleteDialog.item}\r\n />\r\n
;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n data: PropTypes.array,\r\n fields: PropTypes.array,\r\n classes: PropTypes.object,\r\n addItem: PropTypes.func,\r\n changeData: PropTypes.func,\r\n deleteItem: PropTypes.func,\r\n rooms: PropTypes.object,\r\n formulaDisabled: PropTypes.bool,\r\n getSortedData: PropTypes.func,\r\n themeType: PropTypes.string,\r\n prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.nativeField = '';\r\n this.state = {\r\n order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n };\r\n }\r\n\r\n getRooms() {\r\n const lang = I18n.getLanguage();\r\n return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n value: room._id,\r\n title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n })) : [];\r\n }\r\n\r\n getFields() {\r\n let rooms = this.getRooms();\r\n rooms.unshift({value: '', title: ''});\r\n\r\n let result = [\r\n {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n ]\r\n\r\n if (this.props.native.params.multiDeviceId) {\r\n result.splice(1, 0,\r\n {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n address2struct(address) {\r\n if (this.nativeField === 'dbs') {\r\n const parts = address.split(' ');\r\n const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n if (parts[1] && parts[1].includes('.')) {\r\n const a = parseFloat(parts[1]);\r\n return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {db, byte: parseInt(parts[1], 10)};\r\n }\r\n } else {\r\n if (address.includes('.')) {\r\n const a = parseFloat(address);\r\n return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {byte: parseInt(address, 10)};\r\n }\r\n }\r\n }\r\n\r\n struct2address(struct) {\r\n if (struct.db !== undefined) {\r\n if (struct.bit !== undefined) {\r\n return `DB${struct.db} ${struct.byte}.${struct.bit}`;\r\n } else {\r\n return `DB${struct.db} ${struct.byte}`;\r\n }\r\n } else if (struct.bit !== undefined) {\r\n return struct.byte + '.' + struct.bit;\r\n } else {\r\n return struct.byte;\r\n }\r\n }\r\n\r\n changeParam = (index, name, value) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data[index][name] = value;\r\n if (name === 'Type') {\r\n if (['BOOL'].includes(value)) {\r\n data[index].Length = 0.1;\r\n } else\r\n if (['', 'BYTE'].includes(value)) {\r\n data[index].Length = 1;\r\n } else\r\n if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n data[index].Length = 2;\r\n } else\r\n if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n data[index].Length = 4;\r\n } else\r\n if (['S7TIME'].includes(value)) {\r\n data[index].Length = 8;\r\n } else\r\n if (['S7STRING', 'ARRAY'].includes(value)) {\r\n data[index].Length = 32;\r\n }\r\n\r\n if (value === 'BOOL') {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit === undefined) {\r\n struct.bit = 0;\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n } else {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit !== undefined) {\r\n if (struct.bit > 0) {\r\n struct.byte++;\r\n }\r\n delete struct.bit;\r\n\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n }\r\n }\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n addItem = () => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n let newItem = {}\r\n\r\n this.getFields().forEach(field => newItem[field.name] = '');\r\n\r\n if (data.length) {\r\n let sortedData = JSON.parse(JSON.stringify(data));\r\n sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n let lastItem = sortedData[sortedData.length - 1];\r\n const struct = this.address2struct(lastItem.Address);\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = struct.bit || 0;\r\n struct.bit++;\r\n if (struct.bit >= 8) {\r\n struct.bit = struct.bit % 8;\r\n struct.byte++;\r\n }\r\n } else {\r\n delete struct.bit;\r\n struct.byte += lastItem.Length;\r\n }\r\n\r\n if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n struct.db++;\r\n struct.byte = 0;\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = 0;\r\n }\r\n }\r\n\r\n newItem.Address = this.struct2address(struct);\r\n newItem.Type = lastItem.Type;\r\n newItem.Length = lastItem.Length;\r\n newItem.Unit = lastItem.Unit;\r\n newItem.Role = lastItem.Role;\r\n newItem.Room = lastItem.Room;\r\n newItem.poll = lastItem.poll;\r\n newItem.RW = lastItem.RW;\r\n newItem.WP = lastItem.WP;\r\n } else {\r\n newItem.role = 'level';\r\n newItem.Type = 'BOOL';\r\n newItem.Length = '0.1';\r\n newItem.poll = true;\r\n if (this.nativeField === 'dbs') {\r\n newItem.Address = 'DB1 0.0';\r\n } else {\r\n newItem.Address = '0.0';\r\n }\r\n }\r\n data.push(newItem);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n deleteItem = (index) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data.splice(index, 1);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n changeData = (data) => {\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n getDisable = (index, name) => {\r\n return name === 'Length' &&\r\n !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n }\r\n\r\n getSortedData = (data, orderBy, order) => {\r\n this.fields = this.fields || this.getFields();\r\n\r\n data = data || this.props.native[this.nativeField];\r\n orderBy = orderBy || this.state.orderBy;\r\n order = order || this.state.order;\r\n let sortedData = [];\r\n data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n const field = this.fields.find(item => item.name === orderBy);\r\n\r\n sortedData.sort((sortedItem1, sortedItem2) => {\r\n let sort1;\r\n let sort2;\r\n if (orderBy === 'Address') {\r\n const a1 = this.address2struct(sortedItem1.item.Address);\r\n const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n sort1 = 0;\r\n if (a1.db !== undefined) {\r\n sort1 = a1.db << 24;\r\n }\r\n if (a2.db !== undefined) {\r\n sort2 = a2.db << 24;\r\n }\r\n sort1 |= a1.byte << 8;\r\n sort2 |= a2.byte << 8;\r\n sort1 |= a1.bit || 0;\r\n sort2 |= a2.bit || 0;\r\n } else if (orderBy === '$index') {\r\n sort1 = sortedItem1[orderBy];\r\n sort2 = sortedItem2[orderBy];\r\n } else if (field && field.type === 'number') {\r\n sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n } else {\r\n sort1 = sortedItem1.item[orderBy];\r\n sort2 = sortedItem2.item[orderBy];\r\n }\r\n return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n });\r\n\r\n return sortedData;\r\n }\r\n\r\n render() {\r\n this.fields = this.fields || this.getFields();\r\n\r\n return \r\n {\r\n this.setState({orderBy, order});\r\n window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n window.localStorage.setItem('Modbus.order', order);\r\n }}\r\n />\r\n \r\n }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n root: {},\r\n tabContent: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px)',\r\n overflow: 'auto',\r\n },\r\n tabContentIFrame: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n overflow: 'auto'\r\n },\r\n tab: {\r\n width: '100%',\r\n minHeight: '100%'\r\n }\r\n});\r\n\r\nconst tabs = [\r\n {\r\n name: 'general',\r\n title: 'General',\r\n component: TabOptions,\r\n },\r\n {\r\n name: 'inputs',\r\n title: 'Inputs',\r\n component: TabInputs,\r\n },\r\n {\r\n name: 'outputs',\r\n title: 'Outputs',\r\n component: TabOutputs,\r\n },\r\n {\r\n name: 'marker',\r\n title: 'Marker',\r\n component: TabMarker,\r\n },\r\n {\r\n name: 'dbs',\r\n title: 'DBs',\r\n component: TabDbs,\r\n },\r\n]\r\n\r\nclass App extends GenericApp {\r\n constructor(props) {\r\n const extendedProps = {...props};\r\n extendedProps.encryptedFields = ['pass'];\r\n\r\n extendedProps.translations = {\r\n 'en': require('./i18n/en'),\r\n 'de': require('./i18n/de'),\r\n 'ru': require('./i18n/ru'),\r\n 'pt': require('./i18n/pt'),\r\n 'nl': require('./i18n/nl'),\r\n 'fr': require('./i18n/fr'),\r\n 'it': require('./i18n/it'),\r\n 'es': require('./i18n/es'),\r\n 'pl': require('./i18n/pl'),\r\n 'zh-cn': require('./i18n/zh-cn'),\r\n };\r\n\r\n super(props, extendedProps);\r\n this.state.moreLoaded = false;\r\n this.state.rooms = null;\r\n }\r\n\r\n onConnectionReady() {\r\n super.onConnectionReady()\r\n this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n .then(rooms =>\r\n this.setState({moreLoaded: true, rooms}));\r\n }\r\n\r\n getSelectedTab() {\r\n const selectedTab = this.state.selectedTab;\r\n if (!selectedTab) {\r\n return 0;\r\n } else {\r\n return tabs.findIndex(tab => tab.name === selectedTab);\r\n }\r\n }\r\n\r\n render() {\r\n if (!this.state.loaded || !this.state.moreLoaded) {\r\n return \r\n \r\n ;\r\n }\r\n\r\n return \r\n \r\n
\r\n \r\n this.selectTab(tabs[index].name, index)}\r\n variant=\"scrollable\" scrollButtons=\"auto\">\r\n {tabs.map(tab => {tab.icon}{I18n.t(tab.title)} : I18n.t(tab.title)}\r\n data-name={tab.name}\r\n key={tab.name}\r\n title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n />)}\r\n \r\n \r\n
\r\n {tabs.map((tab, index) => {\r\n const TabComponent = tab.component;\r\n if (this.state.selectedTab) {\r\n if (this.state.selectedTab !== tab.name) {\r\n return null;\r\n }\r\n } else {\r\n if (index !== 0) {\r\n return null;\r\n }\r\n }\r\n return this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n onLoad={native => this.onLoadConfig(native)}\r\n instance={this.instance}\r\n adapterName={this.adapterName}\r\n changed={this.state.changed}\r\n onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n rooms={this.state.rooms}\r\n />\r\n })}\r\n {/*
{JSON.stringify(this.state.native, null, 2)}
*/}\r\n
\r\n {this.renderError()}\r\n {this.renderSaveCloseButtons()}\r\n
\r\n
\r\n
;\r\n }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n return ReactDOM.render(\r\n \r\n {\r\n themeName = _theme;\r\n build();\r\n }}\r\n />\r\n ,\r\n document.getElementById('root')\r\n );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n Sentry.init({\r\n dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n release: `iobroker.${window.adapterName}@${version}`,\r\n integrations: [\r\n new SentryIntegrations.Dedupe()\r\n ]\r\n });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/admin/static/js/runtime-main.0b37ba43.js.map b/admin/static/js/runtime-main.0b37ba43.js.map deleted file mode 100644 index af680ff..0000000 --- a/admin/static/js/runtime-main.0b37ba43.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU8B,QAGnC,IAAIC,EAASH,EAAiB5B,GAAY,CACzCK,EAAGL,EACHgC,GAAG,EACHF,QAAS,IAUV,OANAhB,EAAQd,GAAUW,KAAKoB,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAG/DK,EAAOC,GAAI,EAGJD,EAAOD,QAKfJ,EAAoBO,EAAInB,EAGxBY,EAAoBQ,EAAIN,EAGxBF,EAAoBS,EAAI,SAASL,EAASM,EAAMC,GAC3CX,EAAoBY,EAAER,EAASM,IAClC5B,OAAO+B,eAAeT,EAASM,EAAM,CAAEI,YAAY,EAAMC,IAAKJ,KAKhEX,EAAoBgB,EAAI,SAASZ,GACX,qBAAXa,QAA0BA,OAAOC,aAC1CpC,OAAO+B,eAAeT,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DrC,OAAO+B,eAAeT,EAAS,aAAc,CAAEe,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKzC,OAAO0C,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBzC,OAAO+B,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBS,EAAEc,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAAStB,GAChC,IAAIM,EAASN,GAAUA,EAAOiB,WAC7B,WAAwB,OAAOjB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,EAAoBY,EAAI,SAASgB,EAAQC,GAAY,OAAO/C,OAAOC,UAAUC,eAAeC,KAAK2C,EAAQC,IAGzG7B,EAAoB8B,EAAI,KAExB,IAAIC,EAAaC,KAAK,6BAA+BA,KAAK,8BAAgC,GACtFC,EAAmBF,EAAW5C,KAAKuC,KAAKK,GAC5CA,EAAW5C,KAAOf,EAClB2D,EAAaA,EAAWG,QACxB,IAAI,IAAIvD,EAAI,EAAGA,EAAIoD,EAAWlD,OAAQF,IAAKP,EAAqB2D,EAAWpD,IAC3E,IAAIU,EAAsB4C,EAI1BxC,I","file":"static/js/runtime-main.0b37ba43.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \tvar jsonpArray = this[\"webpackJsonpmodebus-admin\"] = this[\"webpackJsonpmodebus-admin\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/admin/static/js/runtime-main.0b37ba43.js b/admin/static/js/runtime-main.1532eaf1.js similarity index 96% rename from admin/static/js/runtime-main.0b37ba43.js rename to admin/static/js/runtime-main.1532eaf1.js index b3bf229..6afc011 100644 --- a/admin/static/js/runtime-main.0b37ba43.js +++ b/admin/static/js/runtime-main.1532eaf1.js @@ -1,2 +1,2 @@ !function(e){function r(r){for(var n,i,l=r[0],a=r[1],f=r[2],c=0,s=[];cs7
\ No newline at end of file +s7
\ No newline at end of file diff --git a/src/build/static/css/2.67ef5efb.chunk.css b/src/build/static/css/2.faf2f676.chunk.css similarity index 99% rename from src/build/static/css/2.67ef5efb.chunk.css rename to src/build/static/css/2.faf2f676.chunk.css index b61802d..ba84db3 100644 --- a/src/build/static/css/2.67ef5efb.chunk.css +++ b/src/build/static/css/2.faf2f676.chunk.css @@ -1,2 +1,2 @@ .logo-background-colored,.logo-background-light{background:#fff}.logo-background-blue,.logo-background-dark{background:#000}.logo-div{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);overflow:hidden;z-index:2}.logo-border,.logo-div{position:absolute;border-radius:50%}.logo-border{border-color:#39c #164477 #164477;border-style:solid;box-sizing:border-box;width:100%;height:100%}.logo-top{position:absolute;width:4.5%;height:16%;top:0;z-index:2}.logo-i{height:60%;top:20%}.logo-i,.logo-i-top{position:absolute;width:14.5%;left:42%;background:#39c}.logo-i-top{height:4%;border-radius:100%}.logo-back{width:100%;height:100%;z-index:0;overflow:hidden}@-webkit-keyframes logo-grow{0%{width:230px;height:230px;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);opacity:1}99%{width:230px;height:230px;-webkit-transform:translate(-50%,-50%) scale(10);transform:translate(-50%,-50%) scale(10);opacity:0}to{width:0;height:0;opacity:0}}@keyframes logo-grow{0%{width:230px;height:230px;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);opacity:1}99%{width:230px;height:230px;-webkit-transform:translate(-50%,-50%) scale(10);transform:translate(-50%,-50%) scale(10);opacity:0}to{width:0;height:0;opacity:0}}@-webkit-keyframes logo-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes logo-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes logo-color-inside-light{0%{background:#fefefe}to{background:#39c}}@keyframes logo-color-inside-light{0%{background:#fefefe}to{background:#39c}}@-webkit-keyframes logo-color-inside-dark{0%{background:#030303}to{background:#39c}}@keyframes logo-color-inside-dark{0%{background:#030303}to{background:#39c}}@-webkit-keyframes logo-color-inside-colored{0%{background:#fefefe}to{background:#39c}}@keyframes logo-color-inside-colored{0%{background:#fefefe}to{background:#39c}}@-webkit-keyframes logo-color-inside-blue{0%{background:#030303}to{background:#39c}}@keyframes logo-color-inside-blue{0%{background:#030303}to{background:#39c}}@-webkit-keyframes logo-color-outside-light{0%{border-color:#fefefe}to{border-color:#39c #164477 #164477}}@keyframes logo-color-outside-light{0%{border-color:#fefefe}to{border-color:#39c #164477 #164477}}@-webkit-keyframes logo-color-outside-dark{0%{border-color:#040404}to{border-color:#39c #164477 #164477}}@keyframes logo-color-outside-dark{0%{border-color:#040404}to{border-color:#39c #164477 #164477}}@-webkit-keyframes logo-color-outside-colored{0%{border-color:#fefefe}to{border-color:#39c #164477 #164477}}@keyframes logo-color-outside-colored{0%{border-color:#fefefe}to{border-color:#39c #164477 #164477}}@-webkit-keyframes logo-color-outside-blue{0%{border-color:#040404}to{border-color:#39c #164477 #164477}}@keyframes logo-color-outside-blue{0%{border-color:#040404}to{border-color:#39c #164477 #164477}}.logo-animate-wait{-webkit-animation:logo-color-outside 1.5s,logo-spin 1.5s linear infinite;animation:logo-color-outside 1.5s,logo-spin 1.5s linear infinite}.logo-animate-grow-light{background:#ddd}.logo-animate-grow-dark{background:#1d1d1d}.logo-animate-grow-colored{background:#ddd}.logo-animate-grow-blue{background:#1d1d1d}.logo-animate-grow{display:inline-block;text-align:center;z-index:1;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:245px;height:245px;border-radius:50%;position:absolute;-webkit-animation:logo-grow 1s ease 1 forwards;animation:logo-grow 1s ease 1 forwards}.logo-animate-color-inside-light{-webkit-animation:logo-color-inside-light 2.5s;animation:logo-color-inside-light 2.5s}.logo-animate-color-inside-dark{-webkit-animation:logo-color-inside-dark 2.5s;animation:logo-color-inside-dark 2.5s}.logo-animate-color-inside-colored{-webkit-animation:logo-color-inside-colored 2.5s;animation:logo-color-inside-colored 2.5s}.logo-animate-color-inside-blue{-webkit-animation:logo-color-inside-blue 2.5s;animation:logo-color-inside-blue 2.5s}.logo-animate-color-outside-light{-webkit-animation:logo-color-outside-light 1.5s;animation:logo-color-outside-light 1.5s}.logo-animate-color-outside-dark{-webkit-animation:logo-color-outside-dark 1.5s;animation:logo-color-outside-dark 1.5s}.logo-animate-color-outside-colored{-webkit-animation:logo-color-outside-colored 1.5s;animation:logo-color-outside-colored 1.5s}.logo-animate-color-outside-blue{-webkit-animation:logo-color-outside-blue 1.5s;animation:logo-color-outside-blue 1.5s}body,html{height:100%}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:100%;overflow:hidden}::-webkit-scrollbar-track{background-color:#ccc;border-radius:5px}::-webkit-scrollbar{width:5px;height:5px;background-color:#ccc}::-webkit-scrollbar-thumb{background-color:#575757;border-radius:5px}#root,.App{height:100%}@-webkit-keyframes glow{0%{background-color:initial}to{background-color:#58c458}}@keyframes glow{0%{background-color:initial}to{background-color:#58c458}} -/*# sourceMappingURL=2.67ef5efb.chunk.css.map */ \ No newline at end of file +/*# sourceMappingURL=2.faf2f676.chunk.css.map */ \ No newline at end of file diff --git a/admin/static/css/2.67ef5efb.chunk.css.map b/src/build/static/css/2.faf2f676.chunk.css.map similarity index 99% rename from admin/static/css/2.67ef5efb.chunk.css.map rename to src/build/static/css/2.faf2f676.chunk.css.map index 2284901..cd4d30d 100644 --- a/admin/static/css/2.67ef5efb.chunk.css.map +++ b/src/build/static/css/2.faf2f676.chunk.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://node_modules/@iobroker/adapter-react/Components/loader.css","webpack://node_modules/@iobroker/adapter-react/index.css"],"names":[],"mappings":"AAOA,gDACI,eACJ,CACA,4CACI,eACJ,CACA,UAEI,OAAQ,CACR,QAAS,CAET,sCAAuC,CACvC,8BAA+B,CAC/B,eAAgB,CAEhB,SACJ,CACA,uBAVI,iBAAkB,CAOlB,iBAeJ,CAZA,aAKI,iCAA2B,CAE3B,kBAAmB,CACnB,qBAAsB,CACtB,UAAW,CACX,WAEJ,CACA,UACI,iBAAkB,CAClB,UAAW,CACX,UAAW,CACX,KAAM,CACN,SACJ,CACA,QAGI,UAAW,CACX,OAGJ,CACA,oBAPI,iBAAkB,CAClB,WAAY,CAGZ,QAAS,CACT,eASJ,CAPA,YAGI,SAAU,CAGV,kBACJ,CACA,WACI,UAAW,CACX,WAAY,CACZ,SAAU,CACV,eACJ,CACA,6BACI,GACI,WAAY,CACZ,YAAa,CACb,+CAAwC,CAAxC,uCAAwC,CACxC,SACJ,CACA,IACI,WAAY,CACZ,YAAa,CACb,gDAAyC,CAAzC,wCAAyC,CACzC,SACJ,CACA,GACI,OAAQ,CACR,QAAS,CACT,SACJ,CACJ,CAlBA,qBACI,GACI,WAAY,CACZ,YAAa,CACb,+CAAwC,CAAxC,uCAAwC,CACxC,SACJ,CACA,IACI,WAAY,CACZ,YAAa,CACb,gDAAyC,CAAzC,wCAAyC,CACzC,SACJ,CACA,GACI,OAAQ,CACR,QAAS,CACT,SACJ,CACJ,CACA,6BAAuB,GAAO,+BAAiC,CAAE,uBAA2B,CAAE,CAA9F,qBAAuB,GAAO,+BAAiC,CAAE,uBAA2B,CAAE,CAC9F,2CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,mCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,0CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,kCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,6CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,qCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,0CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,kCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAEA,4CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,oCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,2CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,mCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,8CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,sCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,2CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,mCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAEA,mBACI,wEAAkE,CAAlE,gEACJ,CAEA,yBACI,eACJ,CACA,wBACI,kBACJ,CACA,2BACI,eACJ,CACA,wBACI,kBACJ,CAEA,mBACI,oBAAqB,CACrB,iBAAkB,CAClB,SAAU,CACV,OAAQ,CACR,QAAS,CAET,sCAAuC,CACvC,8BAA+B,CAC/B,WAAY,CACZ,YAAa,CACb,iBAAkB,CAClB,iBAAkB,CAClB,8CAAuC,CAAvC,sCACJ,CAEA,iCACI,8CAAuC,CAAvC,sCACJ,CACA,gCACI,6CAAsC,CAAtC,qCACJ,CACA,mCACI,gDAAyC,CAAzC,wCACJ,CACA,gCACI,6CAAsC,CAAtC,qCACJ,CAEA,kCACI,+CAAwC,CAAxC,uCACJ,CACA,iCACI,8CAAuC,CAAvC,sCACJ,CACA,oCACI,iDAA0C,CAA1C,yCACJ,CACA,iCACI,8CAAuC,CAAvC,sCACJ,CClNA,UAHI,WAYJ,CATA,KACI,QAAS,CACT,SAAU,CACV,mJAA8J,CAC9J,kCAAmC,CACnC,iCAAkC,CAClC,UAAW,CAEX,eACJ,CAGA,0BACI,qBAAsB,CACtB,iBACJ,CAEA,oBACI,SAAU,CACV,UAAW,CACX,qBACJ,CAEA,0BACI,wBAAyB,CACzB,iBACJ,CAMA,WACI,WACJ,CAEA,wBACI,GACI,wBACJ,CACA,GACI,wBACJ,CACJ,CAPA,gBACI,GACI,wBACJ,CACA,GACI,wBACJ,CACJ","file":"2.67ef5efb.chunk.css","sourcesContent":["/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\n\n.logo-background-light, .logo-background-colored {\n background: white;\n}\n.logo-background-dark, .logo-background-blue {\n background: black;\n}\n.logo-div {\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n overflow: hidden;\n border-radius: 50%;\n z-index: 2;\n}\n.logo-border {\n /*border-color: #164477;*/\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n border-radius: 50%;\n border-style: solid;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.logo-top {\n position: absolute;\n width: 4.5%;\n height: 16%;\n top: 0;\n z-index: 2;\n}\n.logo-i {\n position: absolute;\n width: 14.5%;\n height: 60%;\n top: 20%;\n left: 42%;\n background: #3399CC;\n}\n.logo-i-top {\n position: absolute;\n width: 14.5%;\n height: 4%;\n left: 42%;\n background: #3399CC;\n border-radius: 100%;\n}\n.logo-back {\n width: 100%;\n height: 100%;\n z-index: 0;\n overflow: hidden;\n}\n@keyframes logo-grow {\n 0% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(1);\n opacity: 1\n }\n 99% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(10);\n opacity: 0;\n }\n 100% {\n width: 0;\n height: 0;\n opacity: 0;\n }\n}\n@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }\n@keyframes logo-color-inside-light {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-dark {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-colored {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-blue {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n\n@keyframes logo-color-outside-light {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-dark {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-colored {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-blue {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n\n.logo-animate-wait {\n animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;\n}\n\n.logo-animate-grow-light {\n background: #DDD;\n}\n.logo-animate-grow-dark {\n background: #1d1d1d;\n}\n.logo-animate-grow-colored {\n background: #DDD;\n}\n.logo-animate-grow-blue {\n background: #1d1d1d;\n}\n\n.logo-animate-grow {\n display: inline-block;\n text-align: center;\n z-index: 1;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: 245px;\n height: 245px;\n border-radius: 50%;\n position: absolute;\n animation: logo-grow 1s 1 ease forwards;\n}\n\n.logo-animate-color-inside-light {\n animation: logo-color-inside-light 2.5s;\n}\n.logo-animate-color-inside-dark {\n animation: logo-color-inside-dark 2.5s;\n}\n.logo-animate-color-inside-colored {\n animation: logo-color-inside-colored 2.5s;\n}\n.logo-animate-color-inside-blue {\n animation: logo-color-inside-blue 2.5s;\n}\n\n.logo-animate-color-outside-light {\n animation: logo-color-outside-light 1.5s;\n}\n.logo-animate-color-outside-dark {\n animation: logo-color-outside-dark 1.5s;\n}\n.logo-animate-color-outside-colored {\n animation: logo-color-outside-colored 1.5s;\n}\n.logo-animate-color-outside-blue {\n animation: logo-color-outside-blue 1.5s;\n}","/**\n * Copyright 2018-2020 bluefox \n *\n * MIT License\n *\n **/\n\nhtml {\n height: 100%;\n}\n\nbody {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n/* scrollbar */\n::-webkit-scrollbar-track {\n background-color: #ccc;\n border-radius: 5px;\n}\n\n::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n background-color: #ccc;\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #575757;\n border-radius: 5px;\n}\n\n#root {\n height: 100%;\n}\n\n.App {\n height: 100%;\n}\n\n@keyframes glow {\n from {\n background-color: initial;\n }\n to {\n background-color: #58c458;\n }\n}"]} \ No newline at end of file +{"version":3,"sources":["webpack://node_modules/@iobroker/adapter-react/Components/loader.css","webpack://node_modules/@iobroker/adapter-react/index.css"],"names":[],"mappings":"AAOA,gDACI,eACJ,CACA,4CACI,eACJ,CACA,UAEI,OAAQ,CACR,QAAS,CAET,sCAAuC,CACvC,8BAA+B,CAC/B,eAAgB,CAEhB,SACJ,CACA,uBAVI,iBAAkB,CAOlB,iBAeJ,CAZA,aAKI,iCAA2B,CAE3B,kBAAmB,CACnB,qBAAsB,CACtB,UAAW,CACX,WAEJ,CACA,UACI,iBAAkB,CAClB,UAAW,CACX,UAAW,CACX,KAAM,CACN,SACJ,CACA,QAGI,UAAW,CACX,OAGJ,CACA,oBAPI,iBAAkB,CAClB,WAAY,CAGZ,QAAS,CACT,eASJ,CAPA,YAGI,SAAU,CAGV,kBACJ,CACA,WACI,UAAW,CACX,WAAY,CACZ,SAAU,CACV,eACJ,CACA,6BACI,GACI,WAAY,CACZ,YAAa,CACb,+CAAwC,CAAxC,uCAAwC,CACxC,SACJ,CACA,IACI,WAAY,CACZ,YAAa,CACb,gDAAyC,CAAzC,wCAAyC,CACzC,SACJ,CACA,GACI,OAAQ,CACR,QAAS,CACT,SACJ,CACJ,CAlBA,qBACI,GACI,WAAY,CACZ,YAAa,CACb,+CAAwC,CAAxC,uCAAwC,CACxC,SACJ,CACA,IACI,WAAY,CACZ,YAAa,CACb,gDAAyC,CAAzC,wCAAyC,CACzC,SACJ,CACA,GACI,OAAQ,CACR,QAAS,CACT,SACJ,CACJ,CACA,6BAAuB,GAAO,+BAAiC,CAAE,uBAA2B,CAAE,CAA9F,qBAAuB,GAAO,+BAAiC,CAAE,uBAA2B,CAAE,CAC9F,2CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,mCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,0CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,kCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,6CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,qCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CACA,0CACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAPA,kCACI,GACI,kBACJ,CACA,GACI,eACJ,CACJ,CAEA,4CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,oCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,2CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,mCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,8CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,sCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CACA,2CACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAVA,mCACI,GACI,oBACJ,CACA,GAII,iCACJ,CACJ,CAEA,mBACI,wEAAkE,CAAlE,gEACJ,CAEA,yBACI,eACJ,CACA,wBACI,kBACJ,CACA,2BACI,eACJ,CACA,wBACI,kBACJ,CAEA,mBACI,oBAAqB,CACrB,iBAAkB,CAClB,SAAU,CACV,OAAQ,CACR,QAAS,CAET,sCAAuC,CACvC,8BAA+B,CAC/B,WAAY,CACZ,YAAa,CACb,iBAAkB,CAClB,iBAAkB,CAClB,8CAAuC,CAAvC,sCACJ,CAEA,iCACI,8CAAuC,CAAvC,sCACJ,CACA,gCACI,6CAAsC,CAAtC,qCACJ,CACA,mCACI,gDAAyC,CAAzC,wCACJ,CACA,gCACI,6CAAsC,CAAtC,qCACJ,CAEA,kCACI,+CAAwC,CAAxC,uCACJ,CACA,iCACI,8CAAuC,CAAvC,sCACJ,CACA,oCACI,iDAA0C,CAA1C,yCACJ,CACA,iCACI,8CAAuC,CAAvC,sCACJ,CClNA,UAHI,WAYJ,CATA,KACI,QAAS,CACT,SAAU,CACV,mJAA8J,CAC9J,kCAAmC,CACnC,iCAAkC,CAClC,UAAW,CAEX,eACJ,CAGA,0BACI,qBAAsB,CACtB,iBACJ,CAEA,oBACI,SAAU,CACV,UAAW,CACX,qBACJ,CAEA,0BACI,wBAAyB,CACzB,iBACJ,CAMA,WACI,WACJ,CAEA,wBACI,GACI,wBACJ,CACA,GACI,wBACJ,CACJ,CAPA,gBACI,GACI,wBACJ,CACA,GACI,wBACJ,CACJ","file":"2.faf2f676.chunk.css","sourcesContent":["/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\n\n.logo-background-light, .logo-background-colored {\n background: white;\n}\n.logo-background-dark, .logo-background-blue {\n background: black;\n}\n.logo-div {\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n overflow: hidden;\n border-radius: 50%;\n z-index: 2;\n}\n.logo-border {\n /*border-color: #164477;*/\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n border-radius: 50%;\n border-style: solid;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.logo-top {\n position: absolute;\n width: 4.5%;\n height: 16%;\n top: 0;\n z-index: 2;\n}\n.logo-i {\n position: absolute;\n width: 14.5%;\n height: 60%;\n top: 20%;\n left: 42%;\n background: #3399CC;\n}\n.logo-i-top {\n position: absolute;\n width: 14.5%;\n height: 4%;\n left: 42%;\n background: #3399CC;\n border-radius: 100%;\n}\n.logo-back {\n width: 100%;\n height: 100%;\n z-index: 0;\n overflow: hidden;\n}\n@keyframes logo-grow {\n 0% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(1);\n opacity: 1\n }\n 99% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(10);\n opacity: 0;\n }\n 100% {\n width: 0;\n height: 0;\n opacity: 0;\n }\n}\n@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }\n@keyframes logo-color-inside-light {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-dark {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-colored {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-blue {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n\n@keyframes logo-color-outside-light {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-dark {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-colored {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-blue {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n\n.logo-animate-wait {\n animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;\n}\n\n.logo-animate-grow-light {\n background: #DDD;\n}\n.logo-animate-grow-dark {\n background: #1d1d1d;\n}\n.logo-animate-grow-colored {\n background: #DDD;\n}\n.logo-animate-grow-blue {\n background: #1d1d1d;\n}\n\n.logo-animate-grow {\n display: inline-block;\n text-align: center;\n z-index: 1;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: 245px;\n height: 245px;\n border-radius: 50%;\n position: absolute;\n animation: logo-grow 1s 1 ease forwards;\n}\n\n.logo-animate-color-inside-light {\n animation: logo-color-inside-light 2.5s;\n}\n.logo-animate-color-inside-dark {\n animation: logo-color-inside-dark 2.5s;\n}\n.logo-animate-color-inside-colored {\n animation: logo-color-inside-colored 2.5s;\n}\n.logo-animate-color-inside-blue {\n animation: logo-color-inside-blue 2.5s;\n}\n\n.logo-animate-color-outside-light {\n animation: logo-color-outside-light 1.5s;\n}\n.logo-animate-color-outside-dark {\n animation: logo-color-outside-dark 1.5s;\n}\n.logo-animate-color-outside-colored {\n animation: logo-color-outside-colored 1.5s;\n}\n.logo-animate-color-outside-blue {\n animation: logo-color-outside-blue 1.5s;\n}","/**\n * Copyright 2018-2020 bluefox \n *\n * MIT License\n *\n **/\n\nhtml {\n height: 100%;\n}\n\nbody {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n/* scrollbar */\n::-webkit-scrollbar-track {\n background-color: #ccc;\n border-radius: 5px;\n}\n\n::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n background-color: #ccc;\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #575757;\n border-radius: 5px;\n}\n\n#root {\n height: 100%;\n}\n\n.App {\n height: 100%;\n}\n\n@keyframes glow {\n from {\n background-color: initial;\n }\n to {\n background-color: #58c458;\n }\n}"]} \ No newline at end of file diff --git a/admin/static/css/main.e2d673ee.chunk.css b/src/build/static/css/main.c9480e85.chunk.css similarity index 90% rename from admin/static/css/main.e2d673ee.chunk.css rename to src/build/static/css/main.c9480e85.chunk.css index eada367..a12dbff 100644 --- a/admin/static/css/main.e2d673ee.chunk.css +++ b/src/build/static/css/main.c9480e85.chunk.css @@ -1,2 +1,2 @@ body,html{height:100%}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:100%;overflow:hidden}::-webkit-scrollbar,::-webkit-scrollbar-track{background-color:#ccc}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background-color:#575757}#root,.App{height:100%} -/*# sourceMappingURL=main.e2d673ee.chunk.css.map */ \ No newline at end of file +/*# sourceMappingURL=main.c9480e85.chunk.css.map */ \ No newline at end of file diff --git a/src/build/static/css/main.c9480e85.chunk.css.map b/src/build/static/css/main.c9480e85.chunk.css.map new file mode 100644 index 0000000..70116f3 --- /dev/null +++ b/src/build/static/css/main.c9480e85.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://src/index.css"],"names":[],"mappings":"AAGA,UAFE,WAWF,CATA,KACE,QAAS,CACT,SAAU,CACV,mJAA8J,CAC9J,kCAAmC,CACnC,iCAAkC,CAClC,UAAW,CAEX,eACF,CAKA,8CAFE,qBAKF,CAHA,oBACE,SAEF,CACA,0BACE,wBACF,CAMA,WACE,WACF","file":"main.c9480e85.chunk.css","sourcesContent":["html {\r\n height: 100%;\r\n}\r\nbody {\r\n margin: 0;\r\n padding: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\n/* scrollbar */\r\n*::-webkit-scrollbar-track {\r\n background-color: #ccc;\r\n}\r\n*::-webkit-scrollbar {\r\n width: 6px;\r\n background-color: #ccc;\r\n}\r\n*::-webkit-scrollbar-thumb {\r\n background-color: #575757;\r\n}\r\n\r\n\r\n#root {\r\n height: 100%;\r\n}\r\n.App {\r\n height: 100%;\r\n}"]} \ No newline at end of file diff --git a/src/build/static/css/main.e2d673ee.chunk.css.map b/src/build/static/css/main.e2d673ee.chunk.css.map deleted file mode 100644 index c3890f9..0000000 --- a/src/build/static/css/main.e2d673ee.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://src/index.css"],"names":[],"mappings":"AAGA,UAFE,WAWF,CATA,KACE,QAAS,CACT,SAAU,CACV,mJAA8J,CAC9J,kCAAmC,CACnC,iCAAkC,CAClC,UAAW,CAEX,eACF,CAKA,8CAFE,qBAKF,CAHA,oBACE,SAEF,CACA,0BACE,wBACF,CAMA,WACE,WACF","file":"main.e2d673ee.chunk.css","sourcesContent":["html {\n height: 100%;\n}\nbody {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n/* scrollbar */\n*::-webkit-scrollbar-track {\n background-color: #ccc;\n}\n*::-webkit-scrollbar {\n width: 6px;\n background-color: #ccc;\n}\n*::-webkit-scrollbar-thumb {\n background-color: #575757;\n}\n\n\n#root {\n height: 100%;\n}\n.App {\n height: 100%;\n}"]} \ No newline at end of file diff --git a/src/build/static/js/2.c2f27cb2.chunk.js b/src/build/static/js/2.c2f27cb2.chunk.js deleted file mode 100644 index f741d69..0000000 --- a/src/build/static/js/2.c2f27cb2.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 2.c2f27cb2.chunk.js.LICENSE.txt */ -(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(346)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){e.exports=n(353)()},function(e,t,n){"use strict";var r=n(1),o=n(431),i=n(54);t.a=function(e,t){return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"g",(function(){return d}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function d(){for(var e=[],t=0;t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){if(0===e.indexOf("#"))return e;var t=c(e).values;return"#".concat(t.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))}function s(e){var t=(e=c(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),l({type:s,values:u})}function c(e){if(e.type)return e;if("#"===e.charAt(0))return c(i(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var o=e.substring(t+1,e.length-1).split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)}))}}function l(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function u(e,t){var n=d(e),r=d(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function d(e){var t="hsl"===(e=c(e)).type?c(s(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return d(e)>.5?m(e,t):g(e,t)}function h(e,t){return p(e,t)}function p(e,t){return e=c(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,l(e)}function m(e,t){if(e=c(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function g(e,t){if(e=c(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return l(e)}},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.r(t),n.d(t,"chainPropTypes",(function(){return r})),n.d(t,"deepmerge",(function(){return o.a})),n.d(t,"elementAcceptingRef",(function(){return c})),n.d(t,"elementTypeAcceptingRef",(function(){return l})),n.d(t,"exactProp",(function(){return u})),n.d(t,"formatMuiErrorMessage",(function(){return d.a})),n.d(t,"getDisplayName",(function(){return b})),n.d(t,"HTMLElementType",(function(){return y})),n.d(t,"ponyfillGlobal",(function(){return _})),n.d(t,"refType",(function(){return w}));var o=n(160),i=n(4),a=n.n(i);var s=(a.a.element,function(){return null});s.isRequired=(a.a.element.isRequired,function(){return null});var c=s;var l=(i.elementType,function(){return null});n(12),n(1);function u(e){return e}var d=n(131),f=n(62),h=n(37),p=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function m(e){var t="".concat(e).match(p);return t&&t[1]||""}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||m(e)||t}function v(e,t,n){var r=g(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function b(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return g(e,"Component");if("object"===Object(f.a)(e))switch(e.$$typeof){case h.ForwardRef:return v(e,e.render,"ForwardRef");case h.Memo:return v(e,e.type,"memo");default:return}}}function y(e,t,n,r,o){return null}var _="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w=a.a.oneOfType([a.a.func,a.a.object])},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(c.a)(t,["attached"]),o=p(r).linebreak,i="",a=0;a0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=ce(),n=0;nn?n:t},he=function(){function e(e){this.getPropertyValue=oe,this.setProperty=ie,this.removeProperty=ae,this.setSelector=se,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=ue();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=le(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.breakpoints,r=void 0===n?["sm","md","lg"]:n,o=t.disableAlign,i=void 0!==o&&o,a=t.factor,s=void 0===a?2:a,c=t.variants,d=void 0===c?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:c,h=Object(l.a)({},e);h.typography=Object(l.a)({},h.typography);var b=h.typography,y=p(b.htmlFontSize),_=r.map((function(e){return h.breakpoints.values[e]}));return d.forEach((function(e){var t=b[e],n=parseFloat(y(t.fontSize,"rem"));if(!(n<=1)){var r=n,o=1+(r-1)/s,a=t.lineHeight;if(!f(a)&&!i)throw new Error(Object(u.a)(6));f(a)||(a=parseFloat(y(a,"rem"))/parseFloat(n));var c=null;i||(c=function(e){return m({size:e,grid:g({pixels:4,lineHeight:a,htmlFontSize:b.htmlFontSize})})}),b[e]=Object(l.a)({},t,v({cssProperty:"fontSize",min:o,max:r,unit:"rem",breakpoints:_,transform:c}))}})),h}var y=n(157),_=n(21),w=n(17),S=n(5),k=n(151),x=n(54),O=Object(k.b)({defaultTheme:x.a}),C=n(338),E=n(343),j=n(456),R=n(119),T=n(457)},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=r.createContext({});t.a=o},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(1),o=n(3),i=["xs","sm","md","lg","xl"];function a(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,a=e.unit,s=void 0===a?"px":a,c=e.step,l=void 0===c?5:c,u=Object(o.a)(e,["values","unit","step"]);function d(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function f(e,t){var r=i.indexOf(t);return r===i.length-1?d(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[i[r+1]]?n[i[r+1]]:t)-l/100).concat(s,")")}return Object(r.a)({keys:i,values:n,up:d,down:function(e){var t=i.indexOf(e)+1,r=n[i[t]];return t===i.length?d("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-l/100).concat(s,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},u)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),o=n(15),i=!0,a=!1,s=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!c[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function h(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function p(){return{isFocusVisible:f,onBlurVisible:h,ref:r.useCallback((function(e){var t,n=o.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[])}}},function(e,t,n){"use strict";var r=n(351),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;ge.length)&&(t=e.length);for(var n=0,r=new Array(t);n"}try{s.currentTarget=Object(i.c)(a.currentTarget)?Object(o.b)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(l){s.currentTarget=""}for(var c in"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(s.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c]);return s}return e}function f(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}function h(e,t,n){void 0===t&&(t=3),void 0===n&&(n=102400);var r=g(e,t);return f(r)>n?h(e,t-1,n):r}function p(t,n){return"domain"===n&&t&&"object"===typeof t&&t._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!==typeof e&&t===e?"[Global]":"undefined"!==typeof window&&t===window?"[Window]":"undefined"!==typeof document&&t===document?"[Document]":Object(i.l)(t)?"[SyntheticEvent]":"number"===typeof t&&t!==t?"[NaN]":void 0===t?"[undefined]":"function"===typeof t?"[Function: "+Object(s.a)(t)+"]":"symbol"===typeof t?"["+String(t)+"]":"bigint"===typeof t?"[BigInt: "+String(t)+"]":t}function m(e,t,n,r){if(void 0===n&&(n=1/0),void 0===r&&(r=new a.a),0===n)return function(e){var t=Object.prototype.toString.call(e);if("string"===typeof e)return e;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=p(e);return Object(i.i)(n)?n:t}(t);if(null!==t&&void 0!==t&&"function"===typeof t.toJSON)return t.toJSON();var o=p(t,e);if(Object(i.i)(o))return o;var s=d(t),c=Array.isArray(t)?[]:{};if(r.memoize(t))return"[Circular ~]";for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(c[l]=m(l,s[l],n-1,r));return r.unmemoize(t),c}function g(e,t){try{return JSON.parse(JSON.stringify(e,(function(e,n){return m(e,n,t)})))}catch(n){return"**non-serializable**"}}function v(e,t){void 0===t&&(t=40);var n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(c.d)(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:Object(c.d)(o,t)}return""}function b(e){var t,n;if(Object(i.h)(e)){var o=e,a={};try{for(var s=Object(r.h)(Object.keys(o)),c=s.next();!c.done;c=s.next()){var l=c.value;"undefined"!==typeof o[l]&&(a[l]=b(o[l]))}}catch(u){t={error:u}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}return Array.isArray(e)?e.map(b):e}}).call(this,n(69))},function(e,t,n){"use strict";n.r(t);var r=n(218);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(13));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&e<11.25?"N":e>=11.25&&e<33.75?"NNE":e>=33.75&&e<56.25?"NE":e>=56.25&&e<78.75?"ENE":e>=78.75&&e<101.25?"E":e>=101.25&&e<123.75?"ESE":e>=123.75&&e<146.25?"SE":e>=146.25&&e<168.75?"SSE":e>=168.75&&e<191.25?"S":e>=191.25&&e<213.75?"SSW":e>=213.75&&e<236.25?"SW":e>=236.25&&e<258.75?"WSW":e>=258.75&&e<281.25?"W":e>=281.25&&e<303.75?"WNW":e>=303.75&&e<326.25?"NW":e>=326.25&&e<348.75?"NNW":e>=348.75?"N":void 0}},{key:"padding",value:function(e){return"string"===typeof e?e.length<2?"0"+e:e:e<10?"0"+e:e}},{key:"setDataFormat",value:function(t){t&&(e.dateFormat=t.toUpperCase().split(/[.-/]/),e.dateFormat.splice(e.dateFormat.indexOf("YYYY"),1))}},{key:"date2string",value:function(t){if("string"===typeof t){if(!(t=t.trim()))return"";if(t.match(/^[\w\s]+$/))return t;var n=t.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);if(n){var r=[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)],i=r.find((function(e){return e>31}));r.splice(r.indexOf(i),1);var a=r.find((function(e){return e>12}));a?(r.splice(r.indexOf(a),1),t=new Date(i,r[0]-1,a)):"M"===e.dateFormat[0][0]&&"D"===e.dateFormat[1][0]?(t=new Date(i,r[0]-1,r[1]),Math.abs(t.getTime-Date.now())>864e6&&(t=new Date(i,r[1]-1,r[0]))):"D"===e.dateFormat[0][0]&&"M"===e.dateFormat[1][0]?(t=new Date(i,r[1]-1,r[0]),Math.abs(t.getTime-Date.now())>864e6&&(t=new Date(i,r[0]-1,r[1]))):t=new Date(t)}else t=new Date(t)}else t=new Date(t);var s=o.default.t("ra_dow_"+f[t.getDay()]).replace("ra_dow_","");return s+=". "+t.getDate()+" "+o.default.t("ra_month_"+h[t.getMonth()]).replace("ra_month_","")}},{key:"renderTextWithA",value:function(e){var t=e.match(/
|/);if(t){var n=[],o=1;do{var i=e.split(t[0]);if(i[0]&&n.push(r.default.createElement("span",{key:"a"+o++},i[0])),t[0].startsWith("([^<]*)|/))||i[1]&&n.push(r.default.createElement("span",{key:"a"+o++},i[1]))}while(t);return n}return e}},{key:"getSmartName",value:function(e,t,n,r){return t?r?e[t]&&e[t].common&&e[t].common.custom&&e[t].common.custom[n]&&e[t].common.custom[n].smartName||null:e[t].common.smartName:r?e&&!e.common?e.smartName:e&&e.common&&e.common.custom&&e.common.custom[n]?e.common.custom[n].smartName:void 0:e.common?e&&!e.common?e.smartName:e.common.smartName:e.smartName}},{key:"getSmartNameFromObj",value:function(e,t,n){return n?e&&!e.common?e.smartName:e&&e.common&&e.common.custom&&e.common.custom[t]?e.common.custom[t].smartName:void 0:e.common?e&&!e.common?e.smartName:e.common.smartName:e.smartName}},{key:"enableSmartName",value:function(e,t,n){n?(e.common.custom=e.common.custom||{},e.common.custom[t]=e.common.custom[t]||{},e.common.custom[t].smartName={}):e.common.smartName={}}},{key:"removeSmartName",value:function(e,t,n){n?e.common&&e.common.custom&&e.common.custom[t]&&(e.common.custom[t]=null):e.common.smartName=null}},{key:"updateSmartName",value:function(e,t,n,r,i,a){var s,l=o.default.getLanguage();if("string"===typeof e.common.smartName){var u=e.common.smartName;e.common.smartName={},e.common.smartName[l]=u}if(e.native&&e.native.byON){delete e.native.byON;var d=e.common.smartName;d&&"object"===c(d)||((d={en:d})[l]=d.en),e.common.smartName=d}if(void 0!==r&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},r?e.common.custom[i].smartName.smartType=r:delete e.common.custom[i].smartName.smartType):(e.common.smartName=e.common.smartName||{},r?e.common.smartName.smartType=r:delete e.common.smartName.smartType)),void 0!==n&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},e.common.custom[i].smartName.byON=n):(e.common.smartName=e.common.smartName||{},e.common.smartName.byON=n)),void 0!==t&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},s=e.common.custom[i].smartName):(e.common.smartName=e.common.smartName||{},s=e.common.smartName),s[l]=t,s&&(!s[l]||s[l]===e.common.name&&(!e.common.role||e.common.role.indexOf("button")>=0)))){delete s[l];var f=!0;for(var h in s)if(s.hasOwnProperty(h)){f=!1;break}f&&(a?void 0===e.common.custom[i].smartName.byON?delete e.common.custom[i]:(delete e.common.custom[i].en,delete e.common.custom[i].de,delete e.common.custom[i].ru,delete e.common.custom[i].nl,delete e.common.custom[i].pl,delete e.common.custom[i].it,delete e.common.custom[i].fr,delete e.common.custom[i].pt,delete e.common.custom[i].es,delete e.common.custom[i]["zh-cn"]):void 0!==e.common.smartName.byON?(delete e.common.smartName.en,delete e.common.smartName.de,delete e.common.smartName.ru,delete e.common.smartName.nl,delete e.common.smartName.pl,delete e.common.smartName.it,delete e.common.smartName.fr,delete e.common.smartName.pt,delete e.common.smartName.es,delete e.common.smartName["zh-cn"]):e.common.smartName=null)}}},{key:"disableSmartName",value:function(e,t,n){n?(e.common.custom=e.common.custom||{},e.common.custom[t]=e.common.custom[t]||{},e.common.custom[t].smartName=!1):e.common.smartName=!1}},{key:"copyToClipboard",value:function(e,t){var n=window.document.createElement("textarea");n.value=e,window.document.body.appendChild(n),n.select(),window.document.execCommand("copy"),window.document.body.removeChild(n),console.log(e),t&&t.stopPropagation(),t&&t.preventDefault()}},{key:"getFileExtension",value:function(e){var t=(e||"").lastIndexOf(".");return-1!==t?e.substring(t+1).toLowerCase():null}},{key:"formatBytes",value:function(e){if(Math.abs(e)<1024)return e+" B";var t=["KB","MB","GB"],n=-1;do{e/=1024,++n}while(Math.abs(e)>=1024&&n186?"#000000":"#FFFFFF":(o=(255-o).toString(16),i=(255-i).toString(16),a=(255-a).toString(16),"#"+o.padStart(2,"0")+i.padStart(2,"0")+a.padStart(2,"0"))}},{key:"_toVal",value:function(t){var n,r,o="";if("string"===typeof t||"number"===typeof t)o+=t;else if("object"===c(t))if(Array.isArray(t))for(n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?window.vendorPrefix:e||(window.localStorage&&window.localStorage.getItem("App.themeName")?window.localStorage.getItem("App.themeName"):window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"colored")}},{key:"getThemeType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?"light":"dark"===(e=e||window.localStorage&&window.localStorage.getItem("App.themeName"))||"blue"===e?"dark":"light"}},{key:"setThemeName",value:function(e){window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix||(window.localStorage.setItem("App.themeName",e),window.localStorage.setItem("App.theme","dark"===e||"blue"===e?"dark":"light"))}},{key:"toggleTheme",value:function(t){if(window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix)return window.vendorPrefix;t=t||window.localStorage&&window.localStorage.getItem("App.themeName");var n,r=e.getThemeNames(),o=r.indexOf(t);return n=-1!==o?r[(o+1)%r.length]:r[0],e.setThemeName(n),n}},{key:"getThemeNames",value:function(){return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?[window.vendorPrefix]:["light","dark","blue","colored"]}},{key:"parseQuery",value:function(e){e=(e||"").toString().replace(/^\?/,"");var t={};return e.split("&").forEach((function(e){if(e=e.trim()){var n=e.split("="),r=decodeURIComponent(n[0]).trim();if(n.length>1)if(t[r]=decodeURIComponent(n[1]),"true"===t[r])t[r]=!0;else if("false"===t[r])t[r]=!1;else{var o=parseFloat(t[r]);o.toString()===t[r]&&(t[r]=o)}else t[r]=!0}})),t}},{key:"getParentId",value:function(e){var t=(e||"").toString().split(".");return t.length>1?(t.pop(),t.join(".")):null}},{key:"formatDate",value:function(e,t){if(!e)return"";var n,r=e.getMonth()+1;r<10&&(r="0"+r);var o=e.getDate();o<10&&(o="0"+o),n="MM/DD/YYYY"===t?r+"/"+o+"/"+e.getFullYear():e.getFullYear()+"-"+r+"-"+o;var i=e.getHours();return n+=i<10?" 0"+i:" "+i,n+=(i=e.getMinutes())<10?":0"+i:":"+i,n+=(i=e.getSeconds())<10?":0"+i:":"+i,n+=(i=e.getMilliseconds())<10?".00"+i:i<100?".0"+i:"."+i}},{key:"formatTime",value:function(e){if(e){e=Math.round(e);var t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60;return t?"".concat(t,".").concat(n.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):n?"".concat(n,":").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):"0:".concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))}return"0:00:00"}},{key:"MDtext2link",value:function(e){var t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Z\u0430-\u044f\u0410-\u042f0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}},{key:"openLink",value:function(e,t){"this"===t?window.location=e:window.open(e,t||"_blank")}},{key:"MDgetTitle",value:function(t){var n=e.extractHeader(t),r=n.body,o=n.header;if(o.title)return o.title;for(var i=(r=(r=r.replace(/{[^}]*}/g,"")).trim()).replace(/\r/g,"").split("\n"),a=0;a>16).toString(16).toUpperCase()),t}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"getStates",value:function(e){var t,n=null===e||void 0===e||null===(t=e.common)||void 0===t?void 0:t.states;if(n)if("string"===typeof n&&"{"===n[0])try{n=JSON.parse(n)}catch(s){console.error("Cannot parse states: ".concat(n)),n=null}else if("string"===typeof n){var r=n.split(";");n={};for(var o=0;o=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),Object(s.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(s.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(o={minHeight:56},Object(r.a)(o,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(o,e.up("sm"),{minHeight:64}),o)},n)}var l=n(131),u=n(78),d=n(94),f=n(95),h=n(96),p=n(97),m=n(98),g=n(99),v=n(100),b=n(10),y={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.a.white,default:d.a[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:u.a.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d.a[800],default:"#303030"},action:{active:u.a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(b.j)(e.main,o):"dark"===t&&(e.dark=Object(b.b)(e.main,i)))}function S(e){var t=e.primary,n=void 0===t?{light:f.a[300],main:f.a[500],dark:f.a[700]}:t,r=e.secondary,a=void 0===r?{light:h.a.A200,main:h.a.A400,dark:h.a.A700}:r,c=e.error,S=void 0===c?{light:p.a[300],main:p.a[500],dark:p.a[700]}:c,k=e.warning,x=void 0===k?{light:m.a[300],main:m.a[500],dark:m.a[700]}:k,O=e.info,C=void 0===O?{light:g.a[300],main:g.a[500],dark:g.a[700]}:O,E=e.success,j=void 0===E?{light:v.a[300],main:v.a[500],dark:v.a[700]}:E,R=e.type,T=void 0===R?"light":R,A=e.contrastThreshold,L=void 0===A?3:A,M=e.tonalOffset,$=void 0===M?.2:M,D=Object(o.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function N(e){return Object(b.f)(e,_.text.primary)>=L?_.text.primary:y.text.primary}var P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(s.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(l.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(l.a)(5,JSON.stringify(e.main)));return w(e,"light",n,$),w(e,"dark",r,$),e.contrastText||(e.contrastText=N(e.main)),e},I={dark:_,light:y};return Object(i.a)(Object(s.a)({common:u.a,type:T,primary:P(n),secondary:P(a,"A400","A200","A700"),error:P(S),warning:P(x),info:P(C),success:P(j),grey:d.a,contrastThreshold:L,getContrastText:N,augmentColor:P,tonalOffset:$},I[T]),D)}function k(e){return Math.round(1e5*e)/1e5}function x(e){return k(e)}var O={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function E(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,a=void 0===r?C:r,c=n.fontSize,l=void 0===c?14:c,u=n.fontWeightLight,d=void 0===u?300:u,f=n.fontWeightRegular,h=void 0===f?400:f,p=n.fontWeightMedium,m=void 0===p?500:p,g=n.fontWeightBold,v=void 0===g?700:g,b=n.htmlFontSize,y=void 0===b?16:b,_=n.allVariants,w=n.pxToRem,S=Object(o.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=l/14,j=w||function(e){return"".concat(e/y*E,"rem")},R=function(e,t,n,r,o){return Object(s.a)({fontFamily:a,fontWeight:e,fontSize:j(t),lineHeight:n},a===C?{letterSpacing:"".concat(k(r/t),"em")}:{},o,_)},T={h1:R(d,96,1.167,-1.5),h2:R(d,60,1.2,-.5),h3:R(h,48,1.167,0),h4:R(h,34,1.235,.25),h5:R(h,24,1.334,0),h6:R(m,20,1.6,.15),subtitle1:R(h,16,1.75,.15),subtitle2:R(m,14,1.57,.1),body1:R(h,16,1.5,.15),body2:R(h,14,1.43,.15),button:R(m,14,1.75,.4,O),caption:R(h,12,1.66,.4),overline:R(h,12,2.66,1,O)};return Object(i.a)(Object(s.a)({htmlFontSize:y,pxToRem:j,round:x,fontFamily:a,fontSize:l,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:m,fontWeightBold:v},T),S,{clone:!1})}function j(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var R=["none",j(0,2,1,-1,0,1,1,0,0,1,3,0),j(0,3,1,-2,0,2,2,0,0,1,5,0),j(0,3,3,-2,0,3,4,0,0,1,8,0),j(0,2,4,-1,0,4,5,0,0,1,10,0),j(0,3,5,-1,0,5,8,0,0,1,14,0),j(0,3,5,-1,0,6,10,0,0,1,18,0),j(0,4,5,-2,0,7,10,1,0,2,16,1),j(0,5,5,-3,0,8,10,1,0,3,14,2),j(0,5,6,-3,0,9,12,1,0,3,16,2),j(0,6,6,-3,0,10,14,1,0,4,18,3),j(0,6,7,-4,0,11,15,1,0,4,20,3),j(0,7,8,-4,0,12,17,2,0,5,22,4),j(0,7,8,-4,0,13,19,2,0,5,24,4),j(0,7,9,-4,0,14,21,2,0,5,26,4),j(0,8,9,-5,0,15,22,2,0,6,28,5),j(0,8,10,-5,0,16,24,2,0,6,30,5),j(0,8,11,-5,0,17,26,2,0,6,32,5),j(0,9,11,-5,0,18,28,2,0,7,34,6),j(0,9,12,-6,0,19,29,2,0,7,36,6),j(0,10,13,-6,0,20,31,3,0,8,38,7),j(0,10,13,-6,0,21,33,3,0,8,40,7),j(0,10,14,-6,0,22,35,3,0,8,42,7),j(0,11,14,-7,0,23,36,3,0,9,44,8),j(0,11,15,-7,0,24,38,3,0,9,46,8)],T={borderRadius:4},A=n(128);function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(A.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,s=void 0===r?{}:r,l=e.palette,u=void 0===l?{}:l,d=e.spacing,f=e.typography,h=void 0===f?{}:f,p=Object(o.a)(e,["breakpoints","mixins","palette","spacing","typography"]),m=S(u),g=Object(a.a)(n),v=L(d),b=Object(i.a)({breakpoints:g,direction:"ltr",mixins:c(g,v,s),overrides:{},palette:m,props:{},shadows:R,typography:E(m,h),spacing:v,shape:T,transitions:M.a,zIndex:$.a},p),y=arguments.length,_=new Array(y>1?y-1:0),w=1;w1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.default=a},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o="object"===("undefined"===typeof window?"undefined":r(window))&&"object"===("undefined"===typeof document?"undefined":r(document))&&9===document.nodeType;t.a=o},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(25);function o(e,t){return void 0===t&&(t=0),"string"!==typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i=0||(o[n]=e[n]);return o}var b=o.a.createContext(),y={root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},_={containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}},w={default:20,dense:4},S={default:6,dense:2},k={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:s.a,transitionDuration:{enter:225,exit:195}},x=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},O=function(e){return Object.keys(e).filter((function(e){return!_[e]})).reduce((function(t,n){var r;return g({},t,((r={})[n]=e[n],r))}),{})},C={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},E=function(e){return"containerAnchorOrigin"+e},j=function(e){var t=e.vertical,n=e.horizontal;return"anchorOrigin"+x(t)+x(n)},R=function(e){return"variant"+x(e)},T=function(e){return!!e||0===e},A=function(e){return"number"===typeof e||null===e};function L(e,t,n){return void 0===e&&(e={}),void 0===t&&(t={}),void 0===n&&(n={}),g({},n,{},t,{},e)}var M=function(e){var t;return Object(c.a)({root:(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[e.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t)})},$=Object(r.forwardRef)((function(e,t){var n=e.classes,r=e.className,i=v(e,["classes","className"]);return o.a.createElement("div",Object.assign({ref:t,className:Object(a.a)(n.root,r)},i))})),D=Object(l.a)(M)($),N={right:"left",left:"right",bottom:"up",top:"down"},P=function(e){return"center"!==e.horizontal?N[e.horizontal]:N[e.vertical]},I=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},F=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},z=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},W=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},B={fontSize:20,marginInlineEnd:8},H={default:void 0,success:o.a.createElement(I,{style:B}),warning:o.a.createElement(F,{style:B}),error:o.a.createElement(z,{style:B}),info:o.a.createElement(W,{style:B})};function U(e,t){return e.reduce((function(e,n){return null==n?e:function(){for(var r=arguments.length,o=new Array(r),i=0;i .MuiCollapse-container, & > .MuiCollapse-root",Q="& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper",Z=Object(d.a)((function(e){var t,n,r,o,i;return{root:(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:e.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[X]={pointerEvents:"all"},t[Q]={padding:S.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+2*w.default+"px)",t[e.breakpoints.down("xs")]={width:"100%",maxWidth:"calc(100% - 32px)"},t),rootDense:(n={},n[Q]={padding:S.dense+"px 0px"},n),top:{top:w.default-S.default,flexDirection:"column"},bottom:{bottom:w.default-S.default,flexDirection:"column-reverse"},left:(r={left:w.default},r[e.breakpoints.up("sm")]={alignItems:"flex-start"},r[e.breakpoints.down("xs")]={left:"16px"},r),right:(o={right:w.default},o[e.breakpoints.up("sm")]={alignItems:"flex-end"},o[e.breakpoints.down("xs")]={right:"16px"},o),center:(i={left:"50%",transform:"translateX(-50%)"},i[e.breakpoints.up("sm")]={alignItems:"center"},i)}})),ee=function(e){var t=Z(),n=e.className,r=e.anchorOrigin,i=e.dense,s=v(e,["className","anchorOrigin","dense"]),c=Object(a.a)(t[r.vertical],t[r.horizontal],t.root,n,i&&t.rootDense);return o.a.createElement("div",Object.assign({className:c},s))},te=o.a.memo(ee),ne=function(e){var t,n,r,s,c;function l(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){void 0===t&&(t={});var r=t,o=r.key,i=r.preventDuplicate,a=v(r,["key","preventDuplicate"]),s=T(o),c=s?o:(new Date).getTime()+Math.random(),l=function(e,t,n){return function(r){return"autoHideDuration"===r?A(e.autoHideDuration)?e.autoHideDuration:A(t.autoHideDuration)?t.autoHideDuration:k.autoHideDuration:e[r]||t[r]||n[r]}}(a,n.props,k),u=g({key:c},a,{message:e,open:!0,entered:!1,requestClose:!1,variant:l("variant"),anchorOrigin:l("anchorOrigin"),autoHideDuration:l("autoHideDuration")});return a.persist&&(u.autoHideDuration=void 0),n.setState((function(t){if(void 0===i&&n.props.preventDuplicate||i){var r=function(t){return s?t.key===o:t.message===e},a=t.queue.findIndex(r)>-1,c=t.snacks.findIndex(r)>-1;if(a||c)return t}return n.handleDisplaySnack(g({},t,{queue:[].concat(t.queue,[u])}))})),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?g({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var t=!1,r=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return t||e.persist&&!r?g({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,C.MAXSNACK,e.key),n.props.onClose&&n.props.onClose(null,C.MAXSNACK,e.key),g({},e,{open:!1})):g({},e,{requestClose:!0}))}));return g({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!T(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.key===r?g({},e,{entered:!0}):g({},e)}))}}))},n.handleCloseSnack=function(e,t,r){if(n.props.onClose&&n.props.onClose(e,t,r),t!==C.CLICKAWAY){var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.key===r?e.entered?g({},e,{open:!1}):g({},e,{requestClose:!0}):g({},e)})),queue:n.filter((function(e){return e.key!==r}))}}))}},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.key===e}));T(e)&&t&&t.onClose&&t.onClose(null,C.INSTRUCTED,e),n.handleCloseSnack(null,C.INSTRUCTED,e)},n.handleExitedSnack=function(e,t,r){var o=t||r;if(!T(o))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var t=n.processQueue(g({},e,{snacks:e.snacks.filter((function(e){return e.key!==o}))}));return 0===t.queue.length?t:n.handleDismissOldest(t)}))},n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar,closeSnackbar:n.closeSnackbar}},n}return n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,l.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.iconVariant,s=n.dense,c=void 0===s?k.dense:s,l=n.hideIconVariant,u=void 0===l?k.hideIconVariant:l,d=n.domRoot,f=n.children,h=n.classes,p=void 0===h?{}:h,m=v(n,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),y=this.state.snacks.reduce((function(e,t){var n,r,o=(r=t.anchorOrigin,""+x(r.vertical)+x(r.horizontal)),i=e[o]||[];return g({},e,((n={})[o]=[].concat(i,[t]),n))}),{}),_=Object.keys(y).map((function(t){var n=y[t];return o.a.createElement(te,{key:t,dense:c,anchorOrigin:n[0].anchorOrigin,className:Object(a.a)(p.containerRoot,p[E(t)])},n.map((function(t){return o.a.createElement(J,Object.assign({},m,{key:t.key,snack:t,dense:c,iconVariant:r,hideIconVariant:u,classes:O(p),onClose:e.handleCloseSnack,onExited:U([e.handleExitedSnack,e.props.onExited]),onEntered:U([e.handleEnteredSnack,e.props.onEntered])}))})))}));return o.a.createElement(b.Provider,{value:t},f,d?Object(i.createPortal)(_,d):_)},r=l,(s=[{key:"maxSnack",get:function(){return this.props.maxSnack||k.maxSnack}}])&&m(r.prototype,s),c&&m(r,c),l}(r.Component),re=function(){return Object(r.useContext)(b)}},function(e,t,n){"use strict";t.a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"}},function(e,t,n){"use strict";t.a={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"}},function(e,t,n){"use strict";t.a={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"}},function(e,t,n){"use strict";t.a={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},function(e,t,n){"use strict";t.a={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},function(e,t,n){"use strict";t.a={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},function(e,t,n){"use strict";t.a={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(132);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(1),o=n(23),i=n(3),a=n(0),s=(n(4),n(2)),c=n(35),l=n(38),u=n(5),d=n(218),f=a.forwardRef((function(e,t){var n=e.autoFocus,u=e.checked,f=e.checkedIcon,h=e.classes,p=e.className,m=e.defaultChecked,g=e.disabled,v=e.icon,b=e.id,y=e.inputProps,_=e.inputRef,w=e.name,S=e.onBlur,k=e.onChange,x=e.onFocus,O=e.readOnly,C=e.required,E=e.tabIndex,j=e.type,R=e.value,T=Object(i.a)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),A=Object(c.a)({controlled:u,default:Boolean(m),name:"SwitchBase",state:"checked"}),L=Object(o.a)(A,2),M=L[0],$=L[1],D=Object(l.a)(),N=g;D&&"undefined"===typeof N&&(N=D.disabled);var P="checkbox"===j||"radio"===j;return a.createElement(d.a,Object(r.a)({component:"span",className:Object(s.a)(h.root,p,M&&h.checked,N&&h.disabled),disabled:N,tabIndex:null,role:void 0,onFocus:function(e){x&&x(e),D&&D.onFocus&&D.onFocus(e)},onBlur:function(e){S&&S(e),D&&D.onBlur&&D.onBlur(e)},ref:t},T),a.createElement("input",Object(r.a)({autoFocus:n,checked:u,defaultChecked:m,className:h.input,disabled:N,id:P&&b,name:w,onChange:function(e){var t=e.target.checked;$(t),k&&k(e,t)},readOnly:O,ref:_,required:C,tabIndex:E,type:j,value:R},y)),M?f:v)}));t.a=Object(u.a)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(f)},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");t.default=a},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=o.a.createContext(null)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=n(8),l=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.color,d=void 0===u?"inherit":u,f=e.component,h=void 0===f?"svg":f,p=e.fontSize,m=void 0===p?"medium":p,g=e.htmlColor,v=e.titleAccess,b=e.viewBox,y=void 0===b?"0 0 24 24":b,_=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(h,Object(r.a)({className:Object(a.a)(s.root,l,"inherit"!==d&&s["color".concat(Object(c.a)(d))],"default"!==m&&"medium"!==m&&s["fontSize".concat(Object(c.a)(m))]),focusable:"false",viewBox:y,color:g,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},_),n,v?i.createElement("title",null,v):null)}));l.muiName="SvgIcon",t.a=Object(s.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n.n(i),s=(n(4),n(15)),c=n(2),l=n(14),u=n(18),d=n(5),f=n(52),h=n(22),p=n(67),m=n(79),g=n(77),v=n(105);function b(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(i.isValidElement)(e)?t(e):e}(e)})),n}function y(e,t,n){return null!=n[t]?n[t]:e.props[t]}function _(e,t,n){var r=b(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var c in t){if(o[c])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,s=void 0===i?a||t.pulsate:i,c=t.fakeElement,l=void 0!==c&&c;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var u,d,f,h=l?null:_.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(p.width/2),d=Math.round(p.height/2);else{var m=e.touches?e.touches[0]:e,g=m.clientX,S=m.clientY;u=Math.round(g-p.left),d=Math.round(S-p.top)}if(s)(f=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(f+=1);else{var k=2*Math.max(Math.abs((h?h.clientWidth:0)-u),u)+2,x=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(k,2)+Math.pow(x,2))}e.touches?null===y.current&&(y.current=function(){w({pulsate:o,rippleX:u,rippleY:d,rippleSize:f,cb:n})},b.current=setTimeout((function(){y.current&&(y.current(),y.current=null)}),80)):w({pulsate:o,rippleX:u,rippleY:d,rippleSize:f,cb:n})}}),[a,w]),x=i.useCallback((function(){S({},{pulsate:!0})}),[S]),C=i.useCallback((function(e,t){if(clearTimeout(b.current),"touchend"===e.type&&y.current)return e.persist(),y.current(),y.current=null,void(b.current=setTimeout((function(){C(e,t)})));y.current=null,p((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:x,start:S,stop:C}}),[x,S,C]),i.createElement("span",Object(r.a)({className:Object(c.a)(s.root,l),ref:_},u),i.createElement(k,{component:null,exit:!0},f))})),E=Object(d.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(C)),j=i.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,d=e.centerRipple,h=void 0!==d&&d,p=e.children,m=e.classes,g=e.className,v=e.component,b=void 0===v?"button":v,y=e.disabled,_=void 0!==y&&y,w=e.disableRipple,S=void 0!==w&&w,k=e.disableTouchRipple,x=void 0!==k&&k,O=e.focusRipple,C=void 0!==O&&O,j=e.focusVisibleClassName,R=e.onBlur,T=e.onClick,A=e.onFocus,L=e.onFocusVisible,M=e.onKeyDown,$=e.onKeyUp,D=e.onMouseDown,N=e.onMouseLeave,P=e.onMouseUp,I=e.onTouchEnd,F=e.onTouchMove,z=e.onTouchStart,W=e.onDragLeave,B=e.tabIndex,H=void 0===B?0:B,U=e.TouchRippleProps,V=e.type,G=void 0===V?"button":V,K=Object(o.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),q=i.useRef(null);var Y=i.useRef(null),J=i.useState(!1),X=J[0],Q=J[1];_&&X&&Q(!1);var Z=Object(f.a)(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;return Object(u.a)((function(r){return t&&t(r),!n&&Y.current&&Y.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){Q(!0),q.current.focus()}}}),[]),i.useEffect((function(){X&&C&&!S&&Y.current.pulsate()}),[S,C,X]);var oe=re("start",D),ie=re("stop",W),ae=re("stop",P),se=re("stop",(function(e){X&&e.preventDefault(),N&&N(e)})),ce=re("start",z),le=re("stop",I),ue=re("stop",F),de=re("stop",(function(e){X&&(te(e),Q(!1)),R&&R(e)}),!1),fe=Object(u.a)((function(e){q.current||(q.current=e.currentTarget),ee(e)&&(Q(!0),L&&L(e)),A&&A(e)})),he=function(){var e=s.findDOMNode(q.current);return b&&"button"!==b&&!("A"===e.tagName&&e.href)},pe=i.useRef(!1),me=Object(u.a)((function(e){C&&!pe.current&&X&&Y.current&&" "===e.key&&(pe.current=!0,e.persist(),Y.current.stop(e,(function(){Y.current.start(e)}))),e.target===e.currentTarget&&he()&&" "===e.key&&e.preventDefault(),M&&M(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&!_&&(e.preventDefault(),T&&T(e))})),ge=Object(u.a)((function(e){C&&" "===e.key&&Y.current&&X&&!e.defaultPrevented&&(pe.current=!1,e.persist(),Y.current.stop(e,(function(){Y.current.pulsate(e)}))),$&&$(e),T&&e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&T(e)})),ve=b;"button"===ve&&K.href&&(ve="a");var be={};"button"===ve?(be.type=G,be.disabled=_):("a"===ve&&K.href||(be.role="button"),be["aria-disabled"]=_);var ye=Object(l.a)(a,t),_e=Object(l.a)(ne,q),we=Object(l.a)(ye,_e),Se=i.useState(!1),ke=Se[0],xe=Se[1];i.useEffect((function(){xe(!0)}),[]);var Oe=ke&&!S&&!_;return i.createElement(ve,Object(r.a)({className:Object(c.a)(m.root,g,X&&[m.focusVisible,j],_&&m.disabled),onBlur:de,onClick:T,onFocus:fe,onKeyDown:me,onKeyUp:ge,onMouseDown:oe,onMouseLeave:se,onMouseUp:ae,onDragLeave:ie,onTouchEnd:le,onTouchMove:ue,onTouchStart:ce,ref:we,tabIndex:_?-1:H},be,K),p,Oe?i.createElement(E,Object(r.a)({ref:Y,center:h},U)):null)}));t.a=Object(d.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(j)},,,,,,,function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e,t,n,r,o){return null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(303);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var r,o=n(1),i=n(3),a=n(0),s=n.n(a),c=(n(4),n(338)),l=n(29),u=n(343),d=Object(l.c)(Object(u.a)()),f=Object(c.a)(),h=new Map,p={disableGeneration:!1,generateClassName:f,jss:d,sheetsCache:null,sheetsManager:h,sheetsRegistry:null},m=s.a.createContext(p);function g(e){var t=e.children,n=e.injectFirst,a=void 0!==n&&n,c=e.disableGeneration,d=void 0!==c&&c,f=Object(i.a)(e,["children","injectFirst","disableGeneration"]),h=s.a.useContext(m),p=Object(o.a)({},h,{disableGeneration:d},f);if(!p.jss.options.insertionPoint&&a&&"undefined"!==typeof window){if(!r){var g=document.head;r=document.createComment("mui-inject-first"),g.insertBefore(r,g.firstChild)}p.jss=Object(l.c)({plugins:Object(u.a)().plugins,insertionPoint:r})}return s.a.createElement(m.Provider,{value:p},t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return f}));var r=n(9),o=n(27);function i(e){return"number"!==typeof e?e:"".concat(e,"px solid")}var a=Object(r.a)({prop:"border",themeKey:"borders",transform:i}),s=Object(r.a)({prop:"borderTop",themeKey:"borders",transform:i}),c=Object(r.a)({prop:"borderRight",themeKey:"borders",transform:i}),l=Object(r.a)({prop:"borderBottom",themeKey:"borders",transform:i}),u=Object(r.a)({prop:"borderLeft",themeKey:"borders",transform:i}),d=Object(r.a)({prop:"borderColor",themeKey:"palette"}),f=Object(r.a)({prop:"borderRadius",themeKey:"shape"}),h=Object(o.a)(a,s,c,l,u,d,f);t.h=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(22),o=n(1),i=(n(4),n(64));function a(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function s(e){var t=function(t){var n=e(t);return t.css?Object(o.a)({},Object(i.a)(n,e(Object(o.a)({theme:t.theme},t.css))),a(t.css,[e.filterProps])):t.sx?Object(o.a)({},Object(i.a)(n,e(Object(o.a)({theme:t.theme},t.sx))),a(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat(Object(r.a)(e.filterProps)),t}function c(e){return s(e)}t.b=s},function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"k",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"n",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return v}));var r=n(9),o=n(27),i=Object(r.a)({prop:"flexBasis"}),a=Object(r.a)({prop:"flexDirection"}),s=Object(r.a)({prop:"flexWrap"}),c=Object(r.a)({prop:"justifyContent"}),l=Object(r.a)({prop:"alignItems"}),u=Object(r.a)({prop:"alignContent"}),d=Object(r.a)({prop:"order"}),f=Object(r.a)({prop:"flex"}),h=Object(r.a)({prop:"flexGrow"}),p=Object(r.a)({prop:"flexShrink"}),m=Object(r.a)({prop:"alignSelf"}),g=Object(r.a)({prop:"justifyItems"}),v=Object(r.a)({prop:"justifySelf"}),b=Object(o.a)(i,a,s,c,l,u,d,f,h,p,m,g,v);t.d=b},function(e,t,n){"use strict";n.d(t,"h",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return p})),n.d(t,"k",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n(9),o=n(27),i=Object(r.a)({prop:"gridGap"}),a=Object(r.a)({prop:"gridColumnGap"}),s=Object(r.a)({prop:"gridRowGap"}),c=Object(r.a)({prop:"gridColumn"}),l=Object(r.a)({prop:"gridRow"}),u=Object(r.a)({prop:"gridAutoFlow"}),d=Object(r.a)({prop:"gridAutoColumns"}),f=Object(r.a)({prop:"gridAutoRows"}),h=Object(r.a)({prop:"gridTemplateColumns"}),p=Object(r.a)({prop:"gridTemplateRows"}),m=Object(r.a)({prop:"gridTemplateAreas"}),g=Object(r.a)({prop:"gridArea"}),v=Object(o.a)(i,a,s,c,l,u,d,f,h,p,m,g);t.a=v},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(9),o=n(27),i=Object(r.a)({prop:"color",themeKey:"palette"}),a=Object(r.a)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),s=Object(o.a)(i,a);t.c=s},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return u}));var r=n(9),o=n(27),i=Object(r.a)({prop:"position"}),a=Object(r.a)({prop:"zIndex",themeKey:"zIndex"}),s=Object(r.a)({prop:"top"}),c=Object(r.a)({prop:"right"}),l=Object(r.a)({prop:"bottom"}),u=Object(r.a)({prop:"left"});t.b=Object(o.a)(i,a,s,c,l,u)},function(e,t,n){"use strict";n.d(t,"j",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(9),o=n(27);function i(e){return e<=1?"".concat(100*e,"%"):e}var a=Object(r.a)({prop:"width",transform:i}),s=Object(r.a)({prop:"maxWidth",transform:i}),c=Object(r.a)({prop:"minWidth",transform:i}),l=Object(r.a)({prop:"height",transform:i}),u=Object(r.a)({prop:"maxHeight",transform:i}),d=Object(r.a)({prop:"minHeight",transform:i}),f=Object(r.a)({prop:"size",cssProperty:"width",transform:i}),h=Object(r.a)({prop:"size",cssProperty:"height",transform:i}),p=Object(r.a)({prop:"boxSizing"}),m=Object(o.a)(a,s,c,l,u,d,p);t.b=m},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return d}));var r=n(9),o=n(27),i=Object(r.a)({prop:"fontFamily",themeKey:"typography"}),a=Object(r.a)({prop:"fontSize",themeKey:"typography"}),s=Object(r.a)({prop:"fontStyle",themeKey:"typography"}),c=Object(r.a)({prop:"fontWeight",themeKey:"typography"}),l=Object(r.a)({prop:"letterSpacing"}),u=Object(r.a)({prop:"lineHeight"}),d=Object(r.a)({prop:"textAlign"}),f=Object(o.a)(i,a,s,c,l,u,d);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(23),o=n(91),i=n(64);var a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},l=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!c[e])return[e];e=c[e]}var t=e.split(""),n=Object(r.a)(t,2),o=n[0],i=n[1],l=a[o],u=s[i]||"";return Array.isArray(u)?u.map((function(e){return l+e})):[l+u]})),u=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function d(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function f(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function h(e){var t=d(e.theme);return Object.keys(e).map((function(n){if(-1===u.indexOf(n))return null;var r=f(l(n),t),i=e[n];return Object(o.b)(e,i,r)})).reduce(i.a,{})}h.propTypes={},h.filterProps=u;t.b=h},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p}));var r=n(102),o=n(56),i=n(22),a=n(168),s=n(20),c=n(66);function l(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function u(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function d(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(i.a)(r)),s=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===s.indexOf(e.tagName)&&l(e,o)}))}function f(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function h(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(s.a)(e);return t.body===e?Object(c.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var l=Object(a.a)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(u(i)+l,"px"),n=Object(s.a)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(u(e)+l,"px")}))}var d=i.parentElement,f="HTML"===d.nodeName&&"scroll"===window.getComputedStyle(d)["overflow-y"]?d:i;r.push({value:f.style.overflow,key:"overflow",el:f}),f.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var p=function(){function e(){Object(r.a)(this,e),this.modals=[],this.containers=[]}return Object(o.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&l(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);d(t,e.mountNode,e.modalRef,r,!0);var o=f(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=f(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=h(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=f(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&l(e.modalRef,!0),d(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&l(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}()},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=function(e){var n=a.a.forwardRef((function(n,i){var s=n.innerRef,c=Object(o.a)(n,["innerRef"]),u=Object(l.a)()||t;return a.a.createElement(e,Object(r.a)({theme:u,ref:s||i},c))}));return c()(n,e),n};return n}var d=u();t.a=d},function(e,t,n){"use strict";n.r(t);var r=n(8);n.d(t,"capitalize",(function(){return r.a}));var o=n(39);n.d(t,"createChainedFunction",(function(){return o.a}));var i=n(19);n.d(t,"createSvgIcon",(function(){return i.a}));var a=n(30);n.d(t,"debounce",(function(){return a.a}));var s=n(36);n.d(t,"deprecatedPropType",(function(){return s.a}));var c=n(43);n.d(t,"isMuiElement",(function(){return c.a}));var l=n(20);n.d(t,"ownerDocument",(function(){return l.a}));var u=n(66);n.d(t,"ownerWindow",(function(){return u.a}));var d=n(211);n.d(t,"requirePropFactory",(function(){return d.a}));var f=n(28);n.d(t,"setRef",(function(){return f.a}));var h=n(117);n.d(t,"unsupportedProp",(function(){return h.a}));var p=n(35);n.d(t,"useControlled",(function(){return p.a}));var m=n(18);n.d(t,"useEventCallback",(function(){return m.a}));var g=n(14);n.d(t,"useForkRef",(function(){return g.a}));var v=n(63);n.d(t,"unstable_useId",(function(){return v.a}));var b=n(52);n.d(t,"useIsFocusVisible",(function(){return b.a}))},function(e,t,n){"use strict";n.r(t);var r=n(300);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(302);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(212);n.d(t,"a",(function(){return r.b}))},function(e,t,n){(function(e){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,r){"string"===typeof t?(2==arguments.length&&(r=n),e.modules[t]||(e.payloads[t]=r,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var o=i(e,t);if(void 0!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,c=t.length;s=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=i.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(i.split(" Edge/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isAndroid=i.indexOf("Android")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(i)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r,o=e("./useragent");t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var i=[],a=0;a=1.5,o.isChromeOS&&(t.HI_DPI=!1),"undefined"!==typeof document){var c=document.createElement("div");t.HI_DPI&&void 0!==c.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||"undefined"===typeof c.style.animationName||(t.HAS_CSS_ANIMATION=!0),c=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./oop"),o=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,o),t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r,o=e("./keys"),i=e("./useragent"),a=null,s=0;function c(){return void 0==r&&function(){r=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){r={passive:!1}}})}catch(e){}}(),r}function l(e,t,n){this.elem=e,this.type=t,this.callback=n}l.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,r){e.addEventListener(t,n,c()),r&&r.$toDestroy.push(new l(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,c())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function o(e){t&&t(e),n&&n(e),d(r,"mousemove",t),d(r,"mouseup",o),d(r,"dragstart",o)}return u(r,"mousemove",t),u(r,"mouseup",o),u(r,"dragstart",o),o},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?u(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?u(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):u(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,r,o,a){var s,c,l,d=0,f={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,i.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-c)>5;l&&!a||(d=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[d-1]||600),1==d&&(s=e.clientX,c=e.clientY)}if(e._clicks=d,r[o]("mousedown",e),d>4)d=0;else if(d>1)return r[o](f[d],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",h,a)}))};var f=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function h(e,t,n){var r=f(t);if(!i.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var c="location"in t?t.location:t.keyLocation;if(17===n&&1===c)1==a[n]&&(s=t.timeStamp);else if(18===n&&3===r&&2===c){t.timeStamp-s<50&&(a.altGr=!0)}}}if((n in o.MODIFIER_KEYS&&(n=-1),!r&&13===n)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,r,-n),t.defaultPrevented)))return;if(i.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}function p(){a=Object.create(null)}if(t.getModifierString=function(e){return o.KEY_MODS[f(e)]},t.addCommandKeyListener=function(e,n,r){if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var o=null;u(e,"keydown",(function(e){o=e.keyCode}),r),u(e,"keypress",(function(e){return h(n,e,o)}),r)}else{var s=null;u(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=h(n,e,e.keyCode);return s=e.defaultPrevented,t}),r),u(e,"keypress",(function(e){s&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),s=null)}),r),u(e,"keyup",(function(e){a[e.keyCode]=null}),r),a||(p(),u(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!i.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++;u(n,"message",(function o(i){i.data==r&&(t.stopPropagation(i),d(n,"message",o),e())})),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var o={row:t+1,column:0};else if(this.start.row0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;nDate.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=e("../lib/dom"),a=e("../lib/lang"),s=e("../clipboard"),c=o.isChrome<18,l=o.isIE,u=o.isChrome>63,d=400,f=e("../lib/keys"),h=f.KEY_MODS,p=o.isIOS,m=p?/\s/:/\n/,g=o.isMobile;t.TextInput=function(e,t){var n=i.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,b=!1,y=!1,_=!1,w="";g||(n.style.fontSize="1px");var S=!1,k=!1,x="",O=0,C=0,E=0;try{var j=document.activeElement===n}catch(G){}r.addListener(n,"blur",(function(e){k||(t.onBlur(e),j=!1)}),t),r.addListener(n,"focus",(function(e){if(!k){if(j=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(R):R()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(G){return}var r=[];if(t)for(var o=n.parentElement;o&&1==o.nodeType;)r.push(o),o.setAttribute("ace_nocontext",!0),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;n.focus({preventScroll:!0}),t&&r.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return j},t.on("beforeEndOperation",(function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var o=r&&(e.docChanged||e.selectionChanged);y&&o&&(x=n.value="",z()),R()}}));var R=p?function(e){if(j&&(!v||e)&&!_){e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=x=r);var o=4+(e.length||(t.selection.isEmpty()?0:1));4==O&&C==o||n.setSelectionRange(4,o),O=4,C=o}}:function(){if(!y&&!_&&(j||A)){y=!0;var e=0,r=0,o="";if(t.session){var i=t.selection,a=i.getRange(),s=i.cursor.row;if(e=a.start.column,r=a.end.column,o=t.session.getLine(s),a.start.row!=s){var c=t.session.getLine(s-1);e=a.start.rows+1?l.length:r,r+=o.length+1,o=o+"\n"+l}else g&&s>0&&(o="\n"+o,r+=1,e+=1);o.length>d&&(e0&&x[f]==e[f];)f++,s--;for(l=l.slice(f),f=1;c>0&&x.length-f>O-1&&x[x.length-f]==e[e.length-f];)f++,c--;u-=f-1,d-=f-1;var h=l.length-f+1;if(h<0&&(s=-h,h=0),l=l.slice(0,h),!r&&!l&&!u&&!s&&!c&&!d)return"";_=!0;var p=!1;return o.isAndroid&&". "==l&&(l=" ",p=!0),l&&!s&&!c&&!u&&!d||S?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:c,restoreStart:u,restoreEnd:d}),_=!1,x=e,O=i,C=a,E=d,p?"\n":l},M=function(e){if(y)return F();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var r=n.value,o=L(r,!0);(r.length>500||m.test(o)||g&&O<1&&O==C)&&R()},$=function e(t,n,r){var o=t.clipboardData||window.clipboardData;if(o&&!c){var i=l||r?"Text":"text/plain";try{return n?!1!==o.setData(i,n):o.getData(i)}catch(t){if(!r)return e(t,n,!0)}}},D=function(e,o){var i=t.getCopyText();if(!i)return r.preventDefault(e);$(e,i)?(p&&(R(i),v=i,setTimeout((function(){v=!1}),10)),o?t.onCut():t.onCopy(),r.preventDefault(e)):(v=!0,n.value=i,n.select(),setTimeout((function(){v=!1,R(),o?t.onCut():t.onCopy()})))},N=function(e){D(e,!0)},P=function(e){D(e,!1)},I=function(e){var i=$(e);s.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),o.isIE&&setTimeout(R),r.preventDefault(e)):(n.value="",b=!0))};r.addCommandKeyListener(n,t.onCommandKey.bind(t),t),r.addListener(n,"select",(function(e){y||(v?v=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=x.length&&e.value===x&&x&&e.selectionEnd!==C}(n)?g&&n.selectionStart!=O&&R():(t.selectAll(),R()))}),t),r.addListener(n,"input",M,t),r.addListener(n,"cut",N,t),r.addListener(n,"copy",P,t),r.addListener(n,"paste",I,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:P(e);break;case 86:I(e);break;case 88:N(e)}}),t);var F=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){if(S)return W();if(y.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;L(e),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+C-y.selectionStart+E)}}},z=function(e){t.onCompositionEnd&&!t.$readOnly&&(y=!1,t.onCompositionEnd(),t.off("mousedown",W),e&&M())};function W(){k=!0,n.blur(),n.focus(),k=!1}var B,H=a.delayedCall(F,50).schedule.bind(null,null);function U(){clearTimeout(B),B=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",(function(e){if(!y&&t.onCompositionStart&&!t.$readOnly&&(y={},!S)){e.data&&(y.useTextareaForIME=!1),setTimeout(F,0),t._signal("compositionStart"),t.on("mousedown",W);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,y.markerRange=r,y.selectionStart=O,t.onCompositionStart(y),y.useTextareaForIME?(x=n.value="",O=0,C=0):(n.msGetInputContext&&(y.context=n.msGetInputContext()),n.getInputContext&&(y.context=n.getInputContext()))}}),t),r.addListener(n,"compositionupdate",F,t),r.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthC&&"\n"==x[i]?a=f.end:rC&&x.slice(0,i).split("\n").length>2?a=f.down:i>C&&" "==x[i-1]?(a=f.right,s=h.option):(i>C||i==C&&C!=O&&r==i)&&(a=f.right),r!==i&&(s|=h.shift),a){if(!t.onCommandKey({},s,a)&&t.commands){a=f.keyCodeToString(a);var c=t.commands.findKeyCommand(s,a);c&&t.execCommand(c)}O=r,C=i,R("")}}};document.addEventListener("selectionchange",i),t.on("destroy",(function(){document.removeEventListener("selectionchange",i)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/useragent");function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function i(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,i=e.getButton();return 0!==i?((o.getSelectionRange().isEmpty()||1==i)&&o.selection.moveToPosition(n),void(2==i&&(o.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==a&&s<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==s&&a>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==a&&1==s)r=o.end,t=o.start;else{var c=i(this.$clickSelection,r);r=c.cursor,t=c.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,r,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),i=Date.now();(o>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,o=r-n.t,i=o?e.wheelX/o:n.vx,a=o?e.wheelY/o:n.vy;o<550&&(i=(i+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(i/a),c=!1;if(s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)n.allowed=r;else if(r-n.allowed<550){Math.abs(i)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(c=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=i,n.vy=a,c?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(o.prototype),t.DefaultHandlers=o})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/oop"),i=e("../lib/event"),a=e("../tooltip").Tooltip;function s(e){a.call(this,e)}o.inherits(s,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),i=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+i>r&&(t-=20+i),a.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=function(e){var t,n,o,a=e.editor,c=a.renderer.$gutterLayer,l=new s(a.container);function u(){t&&(t=clearTimeout(t)),o&&(l.hide(),o=null,a._signal("hideGutterTooltip",l),a.off("mousewheel",u))}function d(e){l.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=c.getRegion(t)){var n=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(i){var s=i.domEvent.target||i.domEvent.srcElement;if(r.hasCssClass(s,"ace_fold-widget"))return u();o&&e.$tooltipFollowsMouse&&d(i),n=i,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=c.$annotations[t];if(!r)return u();if(t==a.session.getLength()){var i=a.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(i>a.session.documentToScreenRow(s.row,s.column))return u()}if(o!=r)if(o=r.text.join("
"),l.setHtml(o),l.show(),a._signal("showGutterTooltip",l),a.on("mousewheel",u),e.$tooltipFollowsMouse)d(n);else{var f=n.domEvent.target.getBoundingClientRect(),h=l.getElement().style;h.left=f.right+"px",h.top=f.bottom+"px"}}():u()}),50))})),i.addListener(a.renderer.$gutter,"mouseout",(function(e){n=null,o&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),a),a.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(i.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/event"),i=e("../lib/useragent");function a(e){var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var a,c,l,u,d,f,h,p,m,g,v,b=t.container,y=0;function _(){var e=f;(function(e,n){var r=Date.now(),o=!n||e.row!=n.row,i=!n||e.column!=n.column;!g||o||i?(t.moveCursorToPosition(e),g=r,v={x:c,y:l}):s(v.x,v.y,c,l)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(f=t.renderer.screenToTextCoordinates(c,l),e),function(e,n){var r=Date.now(),o=t.renderer.layerConfig.lineHeight,i=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:c-a.left,right:a.right-c},y:{top:l-a.top,bottom:a.bottom-l}},u=Math.min(s.x.left,s.x.right),d=Math.min(s.y.top,s.y.bottom),f={row:e.row,column:e.column};u/i<=2&&(f.column+=s.x.left=200&&t.renderer.scrollCursorIntoView(f):m=r:m=null}(f,e)}function w(){d=t.selection.toOrientedRange(),a=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),_(),u=setInterval(_,20),y=0,o.addListener(document,"mousemove",x)}function S(){clearInterval(u),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(d),t.isFocused()&&!p&&t.$resetCursorStyle(),d=null,f=null,y=0,m=null,g=null,o.removeListener(document,"mousemove",x)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),o.setDragImage&&o.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),o.clearData(),o.setData("Text",t.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,p=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&O(e.dataTransfer))return c=e.clientX,l=e.clientY,a||w(),y++,e.dataTransfer.dropEffect=h=C(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&O(e.dataTransfer))return c=e.clientX,l=e.clientY,a||(w(),y++),null!==k&&(k=null),e.dataTransfer.dropEffect=h=C(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&a)return S(),h=null,o.preventDefault(e)},this.onDrop=function(e){if(f){var n=e.dataTransfer;if(p)switch(h){case"move":d=d.contains(f.row,f.column)?{start:f,end:f}:t.moveText(d,f);break;case"copy":d=t.moveText(d,f,!0)}else{var r=n.getData("Text");d={start:f,end:t.session.insert(f,r)},t.focus(),h=null}return S(),o.preventDefault(e)}},o.addListener(b,"dragstart",this.onDragStart.bind(e),t),o.addListener(b,"dragend",this.onDragEnd.bind(e),t),o.addListener(b,"dragenter",this.onDragEnter.bind(e),t),o.addListener(b,"dragover",this.onDragOver.bind(e),t),o.addListener(b,"dragleave",this.onDragLeave.bind(e),t),o.addListener(b,"drop",this.onDrop.bind(e),t);var k=null;function x(){null==k&&(k=setTimeout((function(){null!=k&&a&&S()}),20))}function O(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function C(e){var t=["copy","copymove","all","uninitialized"],n=i.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(r)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?o="move":t.indexOf(r)>=0&&(o="copy"),o}}function s(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=i.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;i.isIE&&"dragReady"==this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(i.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,o=e("../lib/event"),i=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,c,l,u,d,f,h,p="scroll",m=0,g=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(r){var o=r.target.getAttribute("action");if("more"==o||!n)return n=!n,function(){var r=t.getCopyText(),o=t.session.getUndoManager().hasUndo();h.replaceChild(i.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),h.firstChild)}();"paste"==o?e.readText().then((function(e){t.execCommand(o,e)})):o&&("cut"!=o&&"copy"!=o||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),h.firstChild.style.display="none",n=!1,"openCommandPallete"!=o&&t.focus()};h=i.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){p="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),r(e)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function _(){h||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,i=t.container.getBoundingClientRect();h.style.top=n.pageY-i.top-3+"px",n.pageX-i.left1)return clearTimeout(l),l=null,s=-1,void(p="zoom");f=t.$mouseHandler.isMousePressed=!0;var i=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,h=e.timeStamp;c=h;var y=o[0],_=y.clientX,w=y.clientY;Math.abs(n-_)+Math.abs(a-w)>i&&(s=-1),n=e.clientX=_,a=e.clientY=w,v=b=0;var k=new r(e,t);if(d=k.getDocumentPosition(),h-s<500&&1==o.length&&!m)g++,e.preventDefault(),e.button=0,function(){l=null,clearTimeout(l),t.selection.moveToPosition(d);var e=g>=2?t.selection.getLineRange(d.row):t.session.getBracketRange(d);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),p="wait"}();else{g=0;var x=t.selection.cursor,O=t.selection.isEmpty()?x:t.selection.anchor,C=t.renderer.$cursorLayer.getPixelPosition(x,!0),E=t.renderer.$cursorLayer.getPixelPosition(O,!0),j=t.renderer.scroller.getBoundingClientRect(),R=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,A=function(e,t){return(e/=u)*e+(t=t/i-.75)*t};if(e.clientXM?"cursor":"anchor"),p=M<3.5?"anchor":L<3.5?"cursor":"scroll",l=setTimeout(S,450)}s=h}),t),o.addListener(e,"touchend",(function(e){f=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",m=0):l?(t.selection.moveToPosition(d),m=0,_()):"scroll"==p?(m+=60,u=setInterval((function(){m--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),m<20&&(v*=.9),m<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(m=0)}),10),w()):_(),clearTimeout(l),l=null}),t),o.addListener(e,"touchmove",(function(e){l&&(clearTimeout(l),l=null);var o=e.touches;if(!(o.length>1||"zoom"==p)){var i=o[0],s=n-i.clientX,u=a-i.clientY;if("wait"==p){if(!(s*s+u*u>4))return e.preventDefault();p="cursor"}n=i.clientX,a=i.clientY,e.clientX=i.clientX,e.clientY=i.clientY;var d=e.timeStamp,f=d-c;if(c=d,"scroll"==p){var h=new r(e,t);h.speed=1,h.wheelX=s,h.wheelY=u,10*Math.abs(s)1&&(o=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+o+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var o,a;Array.isArray(n)&&(a=n[0],n=n[1]);try{o=e(n)}catch(c){}if(o&&!t.$loading[n])return r&&r(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var s=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return s();i.loadScript(t.moduleUrl(n,a),s),u()}};var u=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};function d(o){if(c&&c.document){l.packaged=o||e.packaged||r.packaged||c.define&&n(309).packaged;for(var i,a={},s="",u=document.currentScript||document._currentScript,d=(u&&u.ownerDocument||document).getElementsByTagName("script"),f=0;f=e){for(i=d+1;i=e;)i++;for(s=d,c=i-1;s=t.length||2!=(c=n[o-1])&&3!=c||2!=(l=t[o+1])&&3!=l?4:(i&&(l=3),l==c?l:4);case 10:return 2==(c=o>0?n[o-1]:5)&&o+10&&2==n[o-1])return 2;if(i)return 4;for(h=o+1,f=t.length;h=1425&&m<=2303||64286==m;if(c=t[h],g&&(1==c||7==c))return 1}return o<1||5==(c=t[o-1])?4:n[o-1];case 5:return i=!1,a=!0,r;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:i=!1;case d:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:f[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var f=e.split(""),h=new Array(f.length),v=new Array(f.length),b=[];r=u?1:0,function(e,t,n,u){var d=r?l:c,f=null,h=null,p=null,v=0,b=null,y=-1,_=null,w=null,S=[];if(!u)for(_=0,u=[];_0)if(16==b){for(_=y;_-1){for(_=y;_=0&&8==u[k];k--)t[k]=r}}(f,b,f.length,n);for(var y=0;y7&&n[y]<13||4===n[y]||n[y]===d)?b[y]=t.ON_R:y>0&&"\u0644"===f[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(f[y])&&(b[y-1]=b[y]=t.R_H,y++);f[f.length-1]===t.DOT&&(b[f.length-1]=t.B),"\u202b"===f[0]&&(b[0]=t.RLE);for(y=0;y=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,o=r.getVisualFromLogicalIdx(n,this.bidiMap),i=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&i[o]%2!==0&&o++;for(var s=0;st&&i[o]%2===0&&(a+=this.charWidths[i[o]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},this.getSelections=function(e,t){var n,r=this.bidiMap,o=r.bidiLevels,i=[],a=0,s=Math.min(e,t)-this.wrapIndent,c=Math.max(e,t)-this.wrapIndent,l=!1,u=!1,d=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var f,h=0;h=s&&fn+i/2;){if(n+=i,r===o.length-1){i=0;break}i=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!==0&&o[r]%2===0?(e0&&o[r-1]%2===0&&o[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===i&&o[r-1]%2===0||!this.isRtlDir&&0===r&&o[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!==0&&0!==i&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/lang"),i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){r.implement(this,i),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(!this.$silent){var o=this.$isEmpty,i=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||i)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(r);return o?(r=o.start.row,n=o.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,o=e.column+t;return n<0&&(r=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var i=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var i=o.stringReverse(r),a=this.$shortWordEndIndex(i);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var i=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&i.row===this.lead.row&&(i.column,this.lead.column),this.moveCursorTo(i.row,i.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(r){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var r=e("./config"),o=2e3,i=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],o=0,i=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],c=0;c1?this.$applyToken:l.token),d>1&&(/\\\d/.test(l.regex)?u=l.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(d=1,u=this.removeCapturingGroups(l.regex)),l.splitRegex||"string"==typeof l.token||s.push(l)),i[o]=c,o+=d,r.push(u),l.onMatch||(l.onMatch=null)}}r.length||(i[0]=0,r.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var r=[],o=0,i=n.length;ou){var v=e.substring(u,g-m.length);f.type==h?f.value+=v:(f.type&&l.push(f),f={type:h,value:v})}for(var b=0;bo){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:l,state:n.length?n:r}},this.reportError=r.reportError}).call(i.prototype),t.Tokenizer=i})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(o.prototype),t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},f=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},h=function(e,t,n,r){var o=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}},p=function e(t){this.add("braces","insertion",(function(n,o,i,a,c){var l=i.getCursorPosition(),u=a.doc.getLine(l.row);if("{"==c){f(i);var d=i.getSelectionRange(),p=a.doc.getTextRange(d);if(""!==p&&"{"!==p&&i.getWrapBehavioursEnabled())return h(d,p,"{","}");if(e.isSaneInsertion(i,a))return/[\]\}\)]/.test(u[l.column])||i.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(i,a,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(i,a,"{"),{text:"{",selection:[1,1]})}else if("}"==c){if(f(i),"}"==u.substring(l.column,l.column+1))if(null!==a.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,u,c))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==c||"\r\n"==c){f(i);var m="";if(e.isMaybeInsertedClosing(l,u)&&(m=s.stringRepeat("}",r.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(l.column,l.column+1)){var g=a.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!g)return null;var v=this.$getIndent(a.getLine(g.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+a.getTabString();return{text:"\n"+b+"\n"+v+m,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){if(f(n),"}"==o.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,r,o,i){if("("==i){f(r);var a=r.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"(",")");if(e.isSaneInsertion(r,o))return e.recordAutoInsert(r,o,")"),{text:"()",selection:[1,1]}}else if(")"==i){f(r);var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if(")"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket(")",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,l,i))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i&&(f(n),")"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(t,n,r,o,i){if("["==i){f(r);var a=r.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"[","]");if(e.isSaneInsertion(r,o))return e.recordAutoInsert(r,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){f(r);var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if("]"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket("]",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,l,i))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i&&(f(n),"]"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,r,o){var i=r.$mode.$quotes||d;if(1==o.length&&i[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;f(n);var a=o,s=n.getSelectionRange(),c=r.doc.getTextRange(s);if(!(""===c||1==c.length&&i[c])&&n.getWrapBehavioursEnabled())return h(s,c,a,a);if(!c){var l=n.getCursorPosition(),u=r.doc.getLine(l.row),p=u.substring(l.column-1,l.column),m=u.substring(l.column,l.column+1),g=r.getTokenAt(l.row,l.column),v=r.getTokenAt(l.row,l.column+1);if("\\"==p&&g&&/escape/.test(g.type))return null;var b,y=g&&/string|escape/.test(g.type),_=!v||/string|escape/.test(v.type);if(m==a)(b=y!==_)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!_)return null;if(y&&_)return null;var w=r.$mode.tokenRe;w.lastIndex=0;var S=w.test(p);w.lastIndex=0;var k=w.test(p);if(S||k)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var x=u[l.column-2];if(p==a&&(x==a||w.test(x)))return null;b=!0}return{text:b?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,o){var i=r.$mode.$quotes||d,a=r.doc.getTextRange(o);if(!o.isMultiLine()&&i.hasOwnProperty(a)&&(f(n),r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==a))return o.end.column++,o}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(p,i),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,i=[],a=0;a2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,p=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(h)+")"),g=new RegExp("(?:"+c.escapeRegExp(p)+")\\s*$"),v=function(e,t){y(e,t)||i&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},p),o.insertInLine({row:t,column:s},h))},b=function(e,t){var n;(n=e.match(g))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&o.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var r=t.getTokens(n),o=0;oe.length&&(w=e.length)})),s==1/0&&(s=w,i=!1,a=!1),u&&s%l!=0&&(s=Math.floor(s/l)*l),_(a?b:v)},this.toggleBlockComment=function(e,t,n,r){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var i,a,s=(m=new l(t,r.row,r.column)).getCurrentToken(),c=(t.selection,t.selection.toOrientedRange());if(s&&/comment/.test(s.type)){for(var d,f;s&&/comment/.test(s.type);){if(-1!=(g=s.value.indexOf(o.start))){var h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;d=new u(h,p,h,p+o.start.length);break}s=m.stepBackward()}var m;for(s=(m=new l(t,r.row,r.column)).getCurrentToken();s&&/comment/.test(s.type);){var g;if(-1!=(g=s.value.indexOf(o.end))){h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;f=new u(h,p,h,p+o.end.length);break}s=m.stepForward()}f&&t.remove(f),d&&(t.remove(d),i=d.start.row,a=-o.start.length)}else a=o.start.length,i=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);c.start.row==i&&(c.start.column+=a),c.end.row==i&&(c.end.column+=a),t.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],o=n.prototype.$id,i=r.$modes[o];i||(r.$modes[o]=i=new n),r.$modes[t]||(r.$modes[t]=i),this.$embeds.push(t),this.$modes[t]=i}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,r){var o="insert"==t.action,i=(o?1:-1)*(t.end.row-t.start.row),a=(o?1:-1)*(t.end.column-t.start.column),s=t.start,c=o?s:t.end;if(e(n,s,r))return{row:n.row,column:n.column};if(e(c,n,!r))return{row:n.row+i,column:n.column+(n.row==c.row?a:0)};return{row:s.row,column:s.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var o={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:o,value:r})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(i.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,c=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),i<=r&&n.fireUpdateEvent(i,r)}}};(function(){r.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(i.prototype),t.BackgroundTokenizer=i})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),i=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,i){if(this.regExp)for(var a=i.firstRow,s=i.lastRow,c=a;c<=s;c++){var l=this.cache[c];null==l&&((l=r.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map((function(e){return new o(c,e.offset,c,e.offset+e.length)})),this.cache[c]=l.length?l:"");for(var u=l.length;u--;)t.drawSingleLineMarker(e,l[u].toScreenRange(n),this.clazz,i)}}}).call(i.prototype),t.SearchHighlight=i})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,o,i=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var c=0;c0)){var c=r(e,a.start);return 0===s?t&&0!==c?-i-2:i:c>0||0===c&&!t?i:-i-1}}return-i-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],i=1;i=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=r)break}if("insert"==e.action)for(var c=o-r,l=-t.column+n.column;ar)break;if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=l,u.start.row+=c)),u.end.row==r&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&l>0&&au.start.column&&u.end.column==i[a+1].start.column&&(u.end.column-=l),u.end.column+=l,u.end.row+=c}}else for(c=r-o,l=t.column-n.column;ao)break;u.end.rowt.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=l,u.end.row+=c):u.end.row>o&&(u.end.row+=c),u.start.rowt.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=l,u.start.row+=c):u.start.row>o&&(u.start.row+=c)}if(0!=c&&a=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,o=0;o=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof i?n=e:(n=new i(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,c=n.start.column,l=n.end.row,u=n.end.column,d=this.getFoldAt(s,c,1),f=this.getFoldAt(l,u,-1);if(d&&f==d)return d.addSubFold(n);d&&!d.range.isStart(s,c)&&this.removeFold(d),f&&!f.range.isEnd(l,u)&&this.removeFold(f);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach((function(e){n.addSubFold(e)})));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e)n=new r(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach((function(e){o=o.concat(this.unfold(e))}),this),o;n=e}for(var i=o=this.getFoldsInRangeList(n);1==o.length&&r.comparePoints(o[0].start,n.start)<0&&r.comparePoints(o[0].end,n.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(o):this.expandFolds(o),i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,o){null==r&&(r=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var i=this.doc,a="";return e.walk((function(e,t,n,s){if(!(tu)break}while(i&&c.test(i.type));i=o.stepBackward()}else i=o.getCurrentToken();return l.end.row=o.getCurrentTokenRow(),l.end.column=o.getCurrentTokenColumn()+i.value.length-2,l}},this.foldAll=function(e,t,n,r){void 0==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var i=e=e||0;i=e&&(i=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),r=0;r=0;){var i=n[o];if(null==i&&(i=n[o]=this.getFoldWidget(o)),"start"==i){var a=this.getFoldWidgetRange(o);if(r||(r=a),a&&a.end.row>=e)break}o--}return{range:-1!==o&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),o="end"===n?-1:1,i=this.getFoldAt(e,-1===o?0:r.length,o);if(i)return t.children||t.all?this.removeFold(i):this.expandFold(i),i;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(i=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(i.range))return this.removeFold(i),i;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var c=s.range.start.row+1,l=s.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=a?a.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,i=n.charAt(e.column-1),a=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(a||(i=n.charAt(e.column),e={row:e.row,column:e.column+1},a=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=o.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=o.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(r||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!r)return null;var i=new o(e.row,e.column-1,e.row,e.column),a=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);return a?[i,new o(a.row,a.column,a.row,a.column+1)]:[i]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn()-2,l=s.value;;){for(;c>=0;){var u=l.charAt(c);if(u==o){if(0==(i-=1))return{row:a.getCurrentTokenRow(),column:c+a.getCurrentTokenColumn()}}else u==e&&(i+=1);c-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;c=(l=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn();;){for(var l=s.value,u=l.length;cn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var o=n+r>>1,i=e[o];if(t>i)n=o+1;else{if(!(t=t);i++);return(n=r[i])?(n.index=i,n.start=o-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var i=t;if(i>0){do{i--}while(i>=0&&n.charAt(i).match(o));i++}for(var a=t;ae&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,o=0,i=this.$foldData[o],a=i?i.start.row:1/0,s=t.length,c=0;ca){if((c=i.end.row+1)>=s)break;a=(i=this.$foldData[o++])?i.start.row:1/0}null==n[c]&&(n[c]=this.$getStringScreenWidth(t[c])[0]),n[c]>r&&(r=n[c])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(i.start.column+=l),i.end.row==e.end.row&&i.end.column>e.end.column&&(i.end.column+=l)),a&&i.start.row>=e.end.row&&(i.start.row+=a,i.end.row+=a)}if(i.end=this.insert(i.start,r),o.length){var s=e.start,c=i.start,l=(a=c.row-s.row,c.column-s.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=l),e.end.row==s.row&&(e.end.column+=l),e.start.row+=a,e.end.row+=a,e})))}return i},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var i=this.getLine(o);n.start.row=o,n.end.row=o;for(var a=0;a0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=o-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var i=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(i).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,o=e.end,i=r.row,a=o.row,s=a-i,c=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(i,s);var l=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var u=0;if(m=this.getFoldLine(o.row)){m.addRemoveChars(o.row,o.column,r.column-o.column),m.shiftRow(-s);var d=this.getFoldLine(i);d&&d!==m&&(d.merge(m),m=d),u=l.indexOf(m)+1}for(;u=o.row&&m.shiftRow(-s)}a=i}else{var f=Array(s);f.unshift(i,0);var h=t?this.$wrapData:this.$rowLengthCache;h.splice.apply(h,f);l=this.$foldData,u=0;if(m=this.getFoldLine(i)){var p=m.range.compareInside(r.row,r.column);0==p?(m=m.split(r.row,r.column))&&(m.shiftRow(s),m.addRemoveChars(a,0,o.column-r.column)):-1==p&&(m.addRemoveChars(i,0,o.column-r.column),m.shiftRow(s)),u=l.indexOf(m)+1}for(;u=i&&m.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(c=this.getFoldsInRange(e),this.removeFolds(c),s=-s),(m=this.getFoldLine(i))&&m.addRemoveChars(i,r.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(i,a):this.$updateRowLengthCache(i,a),c},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,r){var o,i,a=this.doc.getAllLines(),s=this.getTabSize(),c=this.$wrapData,l=this.$wrapLimit,u=n;for(r=Math.min(r,a.length-1);u<=r;)(i=this.getFoldLine(u,i))?(o=[],i.walk(function(n,r,i,s){var c;if(null!=n){(c=this.$getDisplayTokens(n,o.length))[0]=e;for(var l=1;l=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,r,o){if(0==n.length)return[];var i=[],a=n.length,s=0,c=0,l=this.$wrapAsCode,u=this.$indentedSoftWrap,d=r<=Math.max(2*o,8)||!1===u?0:Math.floor(r/2);function f(e){for(var t=e-s,r=s;rr-h;){var p=s+r-h;if(n[p-1]>=10&&n[p]>=10)f(p);else if(n[p]!=e&&n[p]!=t){for(var m=Math.max(p-(r-(r>>2)),s-1);p>m&&n[p]m&&n[p]m&&9==n[p];)p--}else for(;p>m&&n[p]<10;)p--;p>m?f(++p):(2==n[p=s+r]&&p--,f(p-h))}else{for(;p!=s-1&&n[p]!=e;p--);if(p>s){f(p);continue}for(p=s+r;p39&&a<48||a>57&&a<64?o.push(9):a>=4352&&n(a)?o.push(1,2):o.push(1)}return o},this.$getStringScreenWidth=function(e,t,r){if(0==t)return[0,0];var o,i;for(null==t&&(t=1/0),r=r||0,i=0;i=4352&&n(o)?r+=2:r+=1,!(r>t));i++);return[r,i]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){s=l[u],i=this.$docRowCache[u];var f=e>l[d-1]}else f=!d;for(var h=this.getLength()-1,p=this.getNextFoldLine(i),m=p?p.start.row:1/0;s<=e&&!(s+(c=this.getRowLength(i))>e||i>=h);)s+=c,++i>m&&(i=p.end.row+1,m=(p=this.getNextFoldLine(i,p))?p.start.row:1/0),f&&(this.$docRowCache.push(i),this.$screenRowCache.push(s));if(p&&p.start.row<=i)r=this.getFoldDisplayLine(p),i=p.start.row;else{if(s+c<=e||i>h)return{row:h,column:this.getLine(h).length};r=this.getLine(i),p=null}var g=0,v=Math.floor(e-s);if(this.$useWrapMode){var b=this.$wrapData[i];b&&(o=b[v],v>0&&b.length&&(g=b.indent,a=b[v-1]||b[b.length-1],r=r.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+v,i,v)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=o&&(a=o-1),p?p.idxToPosition(a):{row:i,column:a}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,o=0,i=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var a,s=0,c=this.$docRowCache,l=this.$getRowCacheIndex(c,e),u=c.length;if(u&&l>=0){s=c[l],o=this.$screenRowCache[l];var d=e>c[u-1]}else d=!u;for(var f=this.getNextFoldLine(s),h=f?f.start.row:1/0;s=h){if((a=f.end.row+1)>e)break;h=(f=this.getNextFoldLine(a,f))?f.start.row:1/0}else a=s+1;o+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(o))}var p="";f&&s>=h?(p=this.getFoldDisplayLine(f,e,t),i=f.start.row):(p=this.getLine(e).substring(0,t),i=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[i];if(g){for(var v=0;p.length>=g[v];)o++,v++;p=p.substring(g[v-1]||0,p.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(o+=this.lineWidgets[s].rowsAbove),{row:o,column:m+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,o=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);ro&&(r=t.end.row+1,o=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sn);i++);return[r,i]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=n}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),a.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),o=e("./lib/oop"),i=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach((function(e,n,o,a){return r=new i(e,n,o,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var c,l=s.length,u=o.length-l;e:for(var d=s.offset||0;d<=u;d++){for(var f=0;fm||(a.push(c=new i(d,m,d+l-1,g)),l>2&&(d=d+l-2))}}else for(var v=0;vw&&a[f].end.row==n.end.row;)f--;for(a=a.slice(v,f+1),v=0,f=a.length;v=s;n--)if(d(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=c,s=a.row;n>=s;n--)if(d(n,Number.MAX_VALUE,e))return}};else l=function(e){var n=a.row;if(!d(n,a.column,e)){for(n+=1;n<=c;n++)if(d(n,0,e))return;if(0!=t.wrap)for(n=s,c=a.row;n<=c;n++)if(d(n,0,e))return}};if(t.$isMultiLine)var u=n.length,d=function(t,o,i){var a=r?t-u+1:t;if(!(a<0||a+u>e.getLength())){var s=e.getLine(a),c=s.search(n[0]);if(!(!r&&co))return!!i(a,c,a+u-1,d)||void 0}}};else if(r)d=function(t,r,o){var i,a=e.getLine(t),s=[],c=0;for(n.lastIndex=0;i=n.exec(a);){var l=i[0].length;if(c=i.index,!l){if(c>=a.length)break;n.lastIndex=c+=1}if(i.index+l>r)break;s.push(i.index,l)}for(var u=s.length-1;u>=0;u-=2){var d=s[u-1];if(o(t,d,t,d+(l=s[u])))return!0}};else d=function(t,r,o){var i,a,s=e.getLine(t);for(n.lastIndex=r;a=n.exec(s);){var c=a[0].length;if(o(t,i=a.index,t,i+c))return!0;if(!c&&(n.lastIndex=i+=1,i>=s.length))return!1}};return{forEach:l}}}).call(a.prototype),t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/keys"),o=e("../lib/useragent"),i=r.KEY_MODS;function a(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){a.call(this,e,t),this.$singleCommand=!1}s.prototype=a.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var o in r){var i=r[o];if(i==e)delete r[o];else if(Array.isArray(i)){var a=i.indexOf(e);-1!=a&&(i.splice(a,1),1==i.length&&(r[o]=i[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var r="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=i[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var a=this.parseKeys(e),s=i[a.hashId]+a.key;this._addCommandToBinding(r+s,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var o,i=this.commandKeyBinding;if(n)if(!i[t]||this.$singleCommand)i[t]=n;else{Array.isArray(i[t])?-1!=(o=i[t].indexOf(n))&&i[t].splice(o,1):i[t]=[i[t]],"number"!=typeof r&&(r=e(n));var a=i[t];for(o=0;or)break}a.splice(o,0,n)}else delete i[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),o=r[n];if(r.FUNCTION_KEYS[o])n=r.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,a=t.length;a--;){var s=r.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;i|=s}return{key:n,hashId:i}},this.findKeyCommand=function(e,t){var n=i[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var o=i[t]+n,a=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,a=this.commandKeyBinding[e.$keyChain]||a),!a||"chainKeys"!=a&&"chainKeys"!=a[a.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:a}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=s})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,a=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};r.inherits(a,o),function(){r.implement(this,i),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(a.prototype),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var r=e("../lib/lang"),o=e("../config"),i=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,c=e.session.doc.getLine(n.row),l=n.row+1;l<=o.row+1;l++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));0!==u.length&&(u=" "+u),c+=u}o.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,o=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a=o.lastRow||r.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var i=this.selection.toJSON();this.curOp.selectionAfter=i,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(i),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var r="ace_bracket";Array.isArray(n)?1==n.length&&(r="ace_error_bracket"):n=[n],2==n.length&&(0==h.comparePoints(n[0].end,n[1].start)?n=[h.fromPoints(n[0].start,n[1].end)]:0==h.comparePoints(n[0].start,n[1].end)&&(n=[h.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,r,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new b(e.session,n.row,n.column),o=r.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===o.type.indexOf("tag-open")||(o=r.stepForward())){var i=o.value,a=o.value,s=0,c=r.stepBackward();if("<"===c.value)do{c=o,(o=r.stepForward())&&(-1!==o.type.indexOf("tag-name")?i===(a=o.value)&&("<"===c.value?s++:""===o.value&&s--)}while(o&&s>=0);else{do{if(o=c,c=r.stepBackward(),o)if(-1!==o.type.indexOf("tag-name"))i===o.value&&("<"===c.value?s++:""===o.value){for(var l=0,u=c;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===i){s--;break}if("<"===u.value)break;u=r.stepBackward(),l++}for(var d=0;d1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new h(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,o=e.getLine(t.start.row),i=o.substring(n,r);if(!(i.length>5e3)&&/[\w\d]/.test(i)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:i}),s=o.substring(n-1,r+1);if(a.test(s))return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),o=0;os.search(/\S|$/)){var c=s.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+c)}}this.clearSelection();var l=o.column,u=n.getState(o.row),d=(s=n.getLine(o.row),r.checkOutdent(u,s,e));if(n.insert(o,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new h(o.row,l+i.selection[0],o.row,l+i.selection[1])):this.selection.setSelectionRange(new h(o.row+i.selection[0],i.selection[1],o.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(u,s.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},f)}d&&r.autoOutdent(u,n,o.row)}},this.autoIndent=function(){var e,t,n=this.session,r=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var o=this.getSelectionRange();e=o.start.row,t=o.end.row}for(var i,a,s,c="",l="",u="",d=n.getTabString(),f=e;f<=t;f++)f>0&&(c=n.getState(f-1),l=n.getLine(f-1),u=r.getNextLineIndent(c,l,d)),i=n.getLine(f),u!==(a=r.$getIndent(i))&&(a.length>0&&(s=new h(f,0,f,a.length),n.remove(s)),u.length>0&&n.insert({row:f,column:0},u)),r.autoOutdent(c,n,f)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),o=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var i=n.getTextRange(t);if("\n"==i[i.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,o=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var o=new h(0,0,0,0);for(r=e.first;r<=e.last;r++){var i=t.getLine(r);o.start.row=r,o.end.row=r,o.end.column=i.length,t.replace(o,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),o=this.session.getTextRange(r);if(!isNaN(parseFloat(o))&&isFinite(o)){var i=this.getNumberAt(t,n);if(i){var a=i.value.indexOf(".")>=0?i.start+i.value.indexOf(".")+1:i.end,s=i.start+i.value.length-a,c=parseFloat(i.value);c*=Math.pow(10,s),a!==i.end&&n=s&&a<=c&&(n=t,l.selection.clearSelection(),l.moveCursorTo(e,s+r),l.selection.selectTo(e,c+r)),s=c}));for(var u,d=this.$toggleWordPairs,f=0;fh+1)break;h=p.last}for(u--,s=this.session.$moveLines(f,h,t?0:e),t&&-1==e&&(d=u+1);d<=u;)a[d].moveBy(s,0),d++;t||(s=0),c+=s}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,o=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var i=n.scrollTop;n.scrollBy(0,o*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(i)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new b(this.session,n.row,n.column),o=r.getCurrentToken(),i=o||r.stepForward();if(i){var a,s,c=!1,l={},u=n.column-i.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(i.value.match(/[{}()\[\]]/g)){for(;u=0;--i)this.$tryReplace(n[i],e)&&r++;return this.selection.setSelectionRange(o),r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var i=this.$search.find(this.session);return t.preventScroll?i:i?(this.revealRange(i,n),i):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var i=this.on("changeSelection",(function(){r=!0})),a=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,i=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=i.top-a.offset;null!=(r=i.top>=0&&s+t.top<0||!(i.topwindow.innerHeight)&&null)&&(o.style.top=s+"px",o.style.left=i.left+"px",o.style.height=a.lineHeight+"px",o.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",i),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var r=this;v.loadModule("./ext/prompt",(function(o){o.prompt(r,e,t,n)}))}}.call(_.prototype),v.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?w.attach(this):w.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var w={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=_})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var o=n[r][0];if(o.id<=e)break;o.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?s(e):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)}}).call(r.prototype);var o=e("./range").Range,i=o.comparePoints;o.comparePoints;function a(e){return{row:e.row,column:e.column}}function s(e){if(e=e||this,Array.isArray(e))return e.map(s).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(c).join("\n"):c(e.value)),e.start&&(t+=c(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function c(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function l(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)if(i(t.start,e.end)>=0)f(t,e,-1);else{if(!(i(t.start,e.start)<=0))return null;f(e,t,1)}else if(n&&!r)if(i(t.start,e.end)>=0)f(t,e,-1);else{if(!(i(t.end,e.start)<=0))return null;f(e,t,-1)}else if(!n&&r)if(i(t.start,e.start)>=0)f(t,e,1);else{if(!(i(t.start,e.start)<=0))return null;f(e,t,1)}else if(!n&&!r)if(i(t.start,e.start)>=0)f(t,e,1);else{if(!(i(t.end,e.start)<=0))return null;f(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var r=0;r=0?f(e,t,-1):(i(e.start,t.start)<=0||f(e,o.fromPoints(t.start,e.start),-1),f(t,e,1));else if(!n&&r)i(t.start,e.end)>=0?f(t,e,-1):(i(t.start,e.start)<=0||f(t,o.fromPoints(e.start,t.start),-1),f(e,t,1));else if(!n&&!r)if(i(t.start,e.end)>=0)f(t,e,-1);else{var a,s;if(!(i(t.end,e.start)<=0))return i(e.start,t.start)<0&&(a=e,e=p(e,t.start)),i(e.end,t.end)>0&&(s=p(e,t.end)),h(t.end,e.start,e.end,-1),s&&!a&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,a,s].filter(Boolean);f(e,t,-1)}return[t,e]}function f(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function p(e,t){var n=e.lines,r=e.end;e.end=a(t);var o=e.end.row-e.start.row,i=n.splice(o,n.length),s=o?t.column:t.column-e.start.column;return n.push(i[0].substring(0,s)),i[0]=i[0].substr(s),{start:a(t),end:r,lines:i,action:e.action}}function m(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var r=e[n],o=0;oi&&(c=o.end.row+1,i=(o=t.getNextFoldLine(c,o))?o.start.row:1/0),c>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}(a=this.$lines.get(++s))?a.row=c:(a=this.$lines.createCell(c,e,this.session,l),this.$lines.push(a)),this.$renderCell(a,e,o,c),c++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+r-1);var i=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(i+=a.left+a.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(r.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r0;o--)this.$lines.shift();if(r>n)for(o=this.session.getFoldedRowCount(n+1,r);o>0;o--)this.$lines.pop();e.firstRowr&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var r=[],o=t,i=this.session.getNextFoldLine(o),a=i?i.start.row:1/0;o>a&&(o=i.end.row+1,a=(i=this.session.getNextFoldLine(o,i))?i.start.row:1/0),!(o>n);){var s=this.$lines.createCell(o,e,this.session,l);this.$renderCell(s,e,i,o),r.push(s),o++}return r},this.$renderCell=function(e,t,n,o){var i=e.element,a=this.session,s=i.childNodes[0],c=i.childNodes[1],l=a.$firstLineNumber,u=a.$breakpoints,d=a.$decorations,f=a.gutterRenderer||this.$renderer,h=this.$showFoldWidgets&&a.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o=p&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[o]&&(m+=u[o]),d[o]&&(m+=d[o]),this.$annotations[o]&&(m+=this.$annotations[o].className),i.className!=m&&(i.className=m),h){var g=h[o];null==g&&(g=h[o]=a.getFoldWidget(o))}if(g){m="ace_fold-widget ace_"+g;"start"==g&&o==p&&on.right-t.right?"foldWidgets":void 0}}).call(c.prototype),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../range").Range,o=e("../lib/dom"),i=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var o=r.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),r.renderer){var i=this.$getTop(o.start.row,e),a=this.$padding+o.start.column*e.characterWidth;r.renderer(t,o,a,i,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,o,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,o,r.clazz,e):o.isMultiLine()?"text"==r.type?this.drawTextMarker(t,o,r.clazz,e):this.drawMultiLineMarker(t,o,r.clazz,e):this.drawSingleLineMarker(t,o,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.if?4:0)|(l==c?8:0)),o,l==c?0:1,i)},this.drawMultiLineMarker=function(e,t,n,r,o){var i=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),c=i+t.start.column*r.characterWidth;(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((l=t.clone()).end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,n+" ace_br1 ace_start",r,null,o)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+s+"px;left:"+c+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l;(l=t.clone()).start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,n+" ace_br12",r,null,o)}else{s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+u+"px;top:"+s+"px;left:"+i+"px;"+(o||""))}if(!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+a+"px;right:0;top:"+s+"px;left:"+i+"px;"+(o||""))}},this.drawSingleLineMarker=function(e,t,n,r,o,i){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,o,i);var a=r.lineHeight,s=(t.end.column+(o||0)-t.start.column)*r.characterWidth,c=this.$getTop(t.start.row,r),l=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+c+"px;left:"+l+"px;"+(i||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,o,i){var a=r.lineHeight,s=this.$getTop(t.start.row,r),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+e.width+(o||0)+"px;top:"+s+"px;left:"+(c+e.left)+"px;"+(i||""))}),this)},this.drawFullLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-i),this.elt(n,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(o||""))},this.drawScreenLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),a=r.lineHeight;this.elt(n,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(o||""))}}).call(i.prototype),t.Marker=i})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,c=function(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)};(function(){r.implement(this,s),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nu&&(s=c.end.row+1,u=(c=this.session.getNextFoldLine(s,c))?c.start.row:1/0),!(s>o);){var d=i[a++];if(d){this.dom.removeChildren(d),this.$renderLine(d,s,s==u&&c),l&&(d.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var f=e.lineHeight*this.session.getRowLength(s)+"px";d.style.height!=f&&(l=!0,d.style.height=f)}s++}if(l)for(;a0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var r=[],i=t,a=this.session.getNextFoldLine(i),s=a?a.start.row:1/0;i>s&&(i=a.end.row+1,s=(a=this.session.getNextFoldLine(i,a))?a.start.row:1/0),!(i>n);){var c=this.$lines.createCell(i,e,this.session),l=c.element;this.dom.removeChildren(l),o.setStyle(l.style,"height",this.$lines.computeLineHeight(i,e,this.session)+"px"),o.setStyle(l.style,"top",this.$lines.computeLineTop(i,e,this.session)+"px"),this.$renderLine(l,i,i==s&&a),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",r.push(c),i++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){for(var o,a=this,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,c=this.dom.createFragment(this.element),l=0;o=s.exec(r);){var u=o[1],d=o[2],f=o[3],h=o[4],p=o[5];if(a.showSpaces||!d){var m=l!=o.index?r.slice(l,o.index):"";if(l=o.index+o[0].length,m&&c.appendChild(this.dom.createTextNode(m,this.element)),u){var g=a.session.getScreenTabSize(t+o.index);c.appendChild(a.$tabStrings[g].cloneNode(!0)),t+=g-1}else if(d){if(a.showSpaces)(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",b.textContent=i.stringRepeat(a.SPACE_CHAR,d.length),c.appendChild(b);else c.appendChild(this.com.createTextNode(d,this.element))}else if(f){(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",b.textContent=i.stringRepeat(a.SPACE_CHAR,f.length),c.appendChild(b)}else if(h){t+=1,(b=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",b.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=a.showSpaces?a.SPACE_CHAR:h,c.appendChild(b)}else if(p){t+=1,(b=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",b.className="ace_cjk",b.textContent=p,c.appendChild(b)}}}if(c.appendChild(this.dom.createTextNode(l?r.slice(l):r,this.element)),this.$textToken[n.type])e.appendChild(c);else{var v="ace_"+n.type.replace(/\./g," ace_"),b=this.dom.createElement("span");"fold"==n.type&&(b.style.width=n.value.length*this.config.characterWidth+"px"),b.className=v,b.appendChild(c),e.appendChild(b)}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var o=(r-=r%this.tabSize)/this.tabSize,i=0;i=a;)s=this.$renderToken(c,s,u,d.substring(0,a-r)),d=d.substring(a-r),r=a,c=this.$createLineElement(),e.appendChild(c),c.appendChild(this.dom.createTextNode(i.stringRepeat("\xa0",n.indent),this.element)),s=0,a=n[++o]||Number.MAX_VALUE;0!=d.length&&(r+=d.length,s=this.$renderToken(c,s,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(c,s,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],o=r.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(n=this.$renderToken(e,n,r,o));for(var i=1;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,o);n=this.$renderToken(e,n,r,o)}},this.$renderOverflowMessage=function(e,t,n,r,o){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var i=this.dom.createElement("span");i.className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=o?"":"",e.appendChild(i)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var o=e;if(r.length){var i=this.session.getRowSplitData(t);if(i&&i.length){this.$renderWrappedLine(e,r,i);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,r)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(a)}},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var o=n.getTokens(e);return t.walk((function(e,t,i,a,s){null!=e?r.push({type:"fold",value:e}):(s&&(o=n.getTokens(t)),o.length&&function(e,t,n){for(var o=0,i=0;i+e[o].value.lengthn-t&&(a=a.substring(0,n-t)),r.push({type:e[o].type,value:a}),i=t+a.length,o+=1);in?r.push({type:e[o].type,value:a.substring(0,n-i)}):r.push(e[o]),i+=a.length,o+=1}}(o,a,i))}),t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(c.prototype),t.Text=c})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[o++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(r.setStyle(c,"display","block"),r.translate(s,a.left,a.top),r.setStyle(c,"width",Math.round(e.characterWidth)+"px"),r.setStyle(c,"height",e.lineHeight+"px")):r.setStyle(c,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=32768,c=function(e){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addListener(this.element,"scroll",this.onScroll.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)};(function(){r.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(c.prototype);var l=function(e,t){c.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=o.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(l,c),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>s?(this.coeff=s/e,e=s):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var u=function(e,t){c.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(u,c),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var r=e("./lib/event"),o=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(o.prototype),t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),c=e("../lib/event_emitter").EventEmitter,l=256,u="function"==typeof ResizeObserver,d=200,f=t.FontMetrics=function(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=i.stringRepeat("X",l),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){r.implement(this,c),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=i.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(d,0),e(0,d),e(d,d)],this.el)},this.transformCoordinates=function(e,t){e&&(e=i(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function i(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),c=a(this.els[1]),l=a(this.els[2]),u=a(this.els[3]),f=n(r(u,c),r(u,l),r(o(c,l),o(u,s))),h=i(1+f[0],r(c,s)),p=i(1+f[1],r(l,s));if(t){var m=t,g=f[0]*m[0]/d+f[1]*m[1]/d+1,v=o(i(m[0],h),i(m[1],p));return o(i(1/g/d,v),s)}var b=r(e,s),y=n(r(h,i(f[0],b)),r(p,i(f[1],b)),b);return i(d,y)}}).call(f.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./config"),a=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,c=e("./layer/text").Text,l=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,f=e("./renderloop").RenderLoop,h=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',g=e("./lib/useragent"),v=g.isIE;o.importCssString(m,"ace_editor.css",!1);var b=function(e,t){var n=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==i.get("useStrictCSP")&&i.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new s(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),i.resetOptions(this),i._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;r||(r=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var i=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(i|this.$changes,!0):this.$loop.schedule(i|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(r&&(e||a.height!=r)&&(a.height=r,i|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){i|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var c=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",c),o.setStyle(this.scroller.style,"right",c),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)}return a.$dirty=!n||!r,i&&this._signal("resize",s),i},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,i=n.top,a=n.left;i-=r.offset;var s=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(i<0||i>r.height-s)o.translate(this.textarea,0,0);else{var c=1,l=this.$size.height-s;if(t)if(t.useTextareaForIME){var u=this.textarea.value;c=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else i+=this.lineHeight+2;else i+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-c&&(a=this.$size.scrollerWidth-c),a+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",s+"px"),o.setStyle(e,"width",c+"px"),o.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-c),Math.min(i,l))}}}else o.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},this.setMargin=function(e,t,n,r){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var i=n.width+2*this.$padding+"px",a=n.minHeight+"px";o.setStyle(this.content.style,"width",i),o.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),i=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==i;a&&(this.$horizScroll=i,this.scrollBarH.setVisible(i));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=t.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=l;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+l<0||this.scrollTop>u.top),f=s!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var h,p,m=this.scrollTop%this.lineHeight,g=Math.ceil(c/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=v+g,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var _=e.getFoldLine(v);_&&(v=_.start.row),h=e.documentToScreenRow(v,0),p=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(b)*y+p,m=this.scrollTop-h*y;var w=0;return(this.layerConfig.width!=o||a)&&(w=this.CHANGE_H_SCROLL),(a||f)&&(w|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:h,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),w},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),o=r.left,i=r.top,a=n&&n.top||0,s=n&&n.bottom||0,c=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;c+a>i?(t&&c+a>i+this.lineHeight&&(i-=t*this.$size.scrollerHeight),0===i&&(i=-this.scrollMargin.top),this.session.setScrollTop(i)):c+this.$size.scrollerHeight-so?(o=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(i):Math.round(i);return{row:a,column:s,side:i-s>0?1:-1,offsetX:o}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,a=this.$blockCursor?Math.floor(i):Math.round(i),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),o)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),i=r.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+i-this.scrollTop}},this.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,r){var o=this.session;o.bgTokenizer.lines[n]=null;var i={type:t,value:e},a=o.getTokens(n);if(null==r)a.push(i);else for(var s=0,c=0;c50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);t.UIWorkerClient=function(e,t,n){var r=null,o=!1,s=Object.create(i),l=[],u=new c({messageBuffer:l,terminate:function(){},postMessage:function(e){l.push(e),r&&(o?setTimeout(d):d())}});u.setEmitSync=function(e){o=e};var d=function(){var e=l.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){u.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(r=new e[n](s);l.length;)d()})),u},t.WorkerClient=c,t.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),a=function(e,t,n,r,o,i){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){i.implement(this,o),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new r(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,i=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(c=this.others[a]).row,column:c.column+i};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var c;s={row:(c=this.others[a]).row,column:c.column+i};this.doc.remove(new r(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var r=e("./range_list").RangeList,o=e("./range").Range,i=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),c=e("./lib/lang"),l=e("./commands/multi_select_commands");t.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=new(0,e("./search").Search);var d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],i=e.column0;)b--;if(b>0)for(var y=0;r[y].isEmpty();)y++;for(var _=b;_>=y;_--)r[_].isEmpty()&&r.splice(_,1)}return r}}.call(i.prototype);var f=e("./editor").Editor;function h(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(l.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}s.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),s.addListener(t,"keyup",r,e),s.addListener(t,"blur",r,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var o=t.indexOf(r);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,o=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,c=this.selection,l=c.rangeList,u=(o?c:l).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=c._eventRegistry;c._eventRegistry={};var f=new i(s);this.inVirtualSelectionMode=!0;for(var h=u.length;h--;){if(a)for(;h>0&&u[h].start.row==u[h-1].end.row;)h--;f.fromOrientedRange(u[h]),f.index=h,this.selection=s.selection=f;var p=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===p||(r=p),f.toOrientedRange(u[h])}f.detach(),this.selection=s.selection=c,this.inVirtualSelectionMode=!1,c._eventRegistry=d,c.mergeOverlappingRanges(),c.ranges[0]&&c.fromOrientedRange(c.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ra&&(a=n.column),ru?e.insert(r,c.stringRepeat(" ",i-u)):e.remove(new o(r.row,r.column,r.row,r.column-i+u)),t.start.column=t.end.column=a,t.start.row=t.end.row=r.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,f=u.end.row,h=d==f;if(h){var p,m=this.session.getLength();do{p=this.session.getLine(f)}while(/[=:]/.test(p)&&++f0);d<0&&(d=0),f>=m&&(f=m-1)}var g=this.session.removeFullLines(d,f);g=this.$reAlignText(g,h),this.session.insert({row:d,column:0},g.join("\n")+"\n"),h||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,o,i=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,o=t[3].length,t):(n+r+o!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(i=!1),n>t[1].length&&(n=t[1].length),rt[3].length&&(o=t[3].length),t):[e]})).map(t?l:i?a?function(e){return e[2]?s(n+r-e[2].length)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:l:function(e){return e[2]?s(n)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return c.stringRepeat(" ",e)}function l(e){return e[2]?s(n)+e[2]+s(r-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(f.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=h,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(e){h(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,i=e.getLine(t),a=i.search(o);if(-1!=a){for(var s=n||i.length,c=e.getLength(),l=t,u=t;++tl){var h=e.getLine(u).length;return new r(l,s,u,h)}}},this.openingBracketBlock=function(e,t,n,o,i){var a={row:n,column:o+1},s=e.$findClosingBracket(t,a,i);if(s){var c=e.foldWidgets[s.row];return null==c&&(c=e.getFoldWidget(s.row)),"start"==c&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,o,i){var a={row:n,column:o},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(o.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./lib/dom");function o(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,o=r.start.row,i=r.end.row,a="add"==e.action,s=o+1;st[n].column&&n++,i.unshift(n,0),t.splice.apply(t,i),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var o=1/0,i=0;i0&&!r[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=o;a<=i;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var c=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(c+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=c-n.offset+"px";var l=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(l-=t.scrollLeft),s.el.style.left=l+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(o.prototype),t.LineWidgets=o})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,o=e("../lib/dom"),i=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,c=n.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];c?c.destroy():s-=t;var l,u=function(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(r.length){var o=function(e,t,n){for(var r=0,o=e.length-1;r<=o;){var i=r+o>>1,a=n(t,e[i]);if(a>0)r=i+1;else{if(!(a<0))return i;o=i-1}}return-(r+1)}(r,{row:t,column:-1},i.comparePoints);o<0&&(o=-o-1),o>=r.length?o=n>0?0:r.length-1:0===o&&n<0&&(o=r.length-1);var a=r[o];if(a&&n){if(a.row===t){do{a=r[o+=n]}while(a&&a.row===t);if(!a)return r.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=r[o+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,l=e.renderer.$gutterLayer.$annotations[a.row]}else{if(c)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var f={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},h=f.el.appendChild(o.createElement("div")),p=f.el.appendChild(o.createElement("div"));p.className="error_widget_arrow "+l.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;p.style.left=m+e.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",h.className="error_widget "+l.className,h.innerHTML=l.text.join("
"),h.appendChild(o.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(f),e.off("changeSelection",f.destroy),e.off("changeSession",f.destroy),e.off("mouseup",f.destroy),e.off("change",f.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",f.destroy),e.on("changeSession",f.destroy),e.on("mouseup",f.destroy),e.on("change",f.destroy),e.session.widgetManager.addLineWidget(f),f.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},o.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),i=e("./lib/event"),a=e("./range").Range,s=e("./editor").Editor,c=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n(309),t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var c=e;a=c.value,e=o.createElement("pre"),c.parentNode.replaceChild(e,c)}else e&&(a=e.textContent,e.innerHTML="");var l=t.createEditSession(a),d=new s(new u(e),l,n),f={document:l,editor:d,onResize:d.resize.bind(d,null)};return c&&(f.textarea=c),i.addListener(window,"resize",f.onResize),d.on("destroy",(function(){i.removeListener(window,"resize",f.onResize),f.editor.container.env=null})),d.container.env=d.env=f,d},t.createEditSession=function(e,t){var n=new c(e,t);return n.setUndoManager(new l),n},t.Range=a,t.Editor=s,t.EditSession=c,t.UndoManager=l,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}).call(this,n(213)(e))},function(e,t,n){"use strict";var r=n(1),o=n(434),i=n(54);t.a=function(e){var t=Object(o.a)(e);return function(e,n){return t(e,Object(r.a)({defaultTheme:i.a},n))}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=n.n(r).a.createContext(null);t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n(62);function i(e){return e&&"object"===Object(o.a)(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},o=n.clone?Object(r.a)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e?o[r]=a(e[r],t[r],n):o[r]=t[r])})),o}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(430);function o(e){return Object(r.a)(e)}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r="";function o(e){try{return e&&"function"===typeof e&&e.name||r}catch(t){return r}}},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=n(19);t.a=Object(o.a)(r.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(8),c=i.forwardRef((function(e,t){var n=e.classes,c=e.className,l=e.disabled,u=e.IconComponent,d=e.inputRef,f=e.variant,h=void 0===f?"standard":f,p=Object(o.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return i.createElement(i.Fragment,null,i.createElement("select",Object(r.a)({className:Object(a.a)(n.root,n.select,n[h],c,l&&n.disabled),disabled:l,ref:d||t},p)),e.multiple?null:i.createElement(u,{className:Object(a.a)(n.icon,n["icon".concat(Object(s.a)(h))],l&&n.disabled)}))}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=r.createContext();t.a=o},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(15),s=(n(4),n(137)),c=n(432),l=n(20),u=n(435),d=n(39),f=n(14),h=n(18),p=n(164),m=n(130),g=n(458),v={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},b=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,c=Object(r.a)(e,["invisible","open"]);return s?i.createElement("div",Object(o.a)({"aria-hidden":!0,ref:t},c,{style:Object(o.a)({},v.root,a?v.invisible:{},c.style)})):null}));var y=new m.b,_=i.forwardRef((function(e,t){var n=Object(s.a)(),v=Object(c.a)({name:"MuiModal",props:Object(o.a)({},e),theme:n}),_=v.BackdropComponent,w=void 0===_?b:_,S=v.BackdropProps,k=v.children,x=v.closeAfterTransition,O=void 0!==x&&x,C=v.container,E=v.disableAutoFocus,j=void 0!==E&&E,R=v.disableBackdropClick,T=void 0!==R&&R,A=v.disableEnforceFocus,L=void 0!==A&&A,M=v.disableEscapeKeyDown,$=void 0!==M&&M,D=v.disablePortal,N=void 0!==D&&D,P=v.disableRestoreFocus,I=void 0!==P&&P,F=v.disableScrollLock,z=void 0!==F&&F,W=v.hideBackdrop,B=void 0!==W&&W,H=v.keepMounted,U=void 0!==H&&H,V=v.manager,G=void 0===V?y:V,K=v.onBackdropClick,q=v.onClose,Y=v.onEscapeKeyDown,J=v.onRendered,X=v.open,Q=Object(r.a)(v,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Z=i.useState(!0),ee=Z[0],te=Z[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=Object(f.a)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(v),se=function(){return Object(l.a)(re.current)},ce=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},le=function(){G.mount(ce(),{disableScrollLock:z}),oe.current.scrollTop=0},ue=Object(h.a)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(C)||se().body;G.add(ce(),e),oe.current&&le()})),de=i.useCallback((function(){return G.isTopModal(ce())}),[G]),fe=Object(h.a)((function(e){re.current=e,e&&(J&&J(),X&&de()?le():Object(m.a)(oe.current,!0))})),he=i.useCallback((function(){G.remove(ce())}),[G]);if(i.useEffect((function(){return function(){he()}}),[he]),i.useEffect((function(){X?ue():ae&&O||he()}),[X,he,ae,O,ue]),!U&&!X&&(!ae||ee))return null;var pe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:p.a}),me={};return void 0===k.props.tabIndex&&(me.tabIndex=k.props.tabIndex||"-1"),ae&&(me.onEnter=Object(d.a)((function(){te(!1)}),k.props.onEnter),me.onExited=Object(d.a)((function(){te(!0),O&&he()}),k.props.onExited)),i.createElement(u.a,{ref:fe,container:C,disablePortal:N},i.createElement("div",Object(o.a)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&de()&&(Y&&Y(e),$||(e.stopPropagation(),q&&q(e,"escapeKeyDown")))},role:"presentation"},Q,{style:Object(o.a)({},pe.root,!X&&ee?pe.hidden:{},Q.style)}),B?null:i.createElement(w,Object(o.a)({open:X,onClick:function(e){e.target===e.currentTarget&&(K&&K(e),!T&&q&&q(e,"backdropClick"))}},S)),i.createElement(g.a,{disableEnforceFocus:L,disableAutoFocus:j,disableRestoreFocus:I,getDoc:se,isEnabled:de,open:X},i.cloneElement(k,me))))}));t.a=_},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(2)),s=n(5),c=i.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.component,l=void 0===c?"div":c,u=e.square,d=void 0!==u&&u,f=e.elevation,h=void 0===f?1:f,p=e.variant,m=void 0===p?"elevation":p,g=Object(r.a)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(l,Object(o.a)({className:Object(a.a)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(h)],!d&&n.rounded),ref:t},g))}));t.a=Object(s.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(o.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=n(8),l={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=i.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,f=e.color,h=void 0===f?"initial":f,p=e.component,m=e.display,g=void 0===m?"initial":m,v=e.gutterBottom,b=void 0!==v&&v,y=e.noWrap,_=void 0!==y&&y,w=e.paragraph,S=void 0!==w&&w,k=e.variant,x=void 0===k?"body1":k,O=e.variantMapping,C=void 0===O?l:O,E=Object(o.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),j=p||(S?"p":C[x]||l[x])||"span";return i.createElement(j,Object(r.a)({className:Object(a.a)(u.root,d,"inherit"!==x&&u[x],"initial"!==h&&u["color".concat(Object(c.a)(h))],_&&u.noWrap,b&&u.gutterBottom,S&&u.paragraph,"inherit"!==s&&u["align".concat(Object(c.a)(s))],"initial"!==g&&u["display".concat(Object(c.a)(g))]),ref:t},E))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},function(e,t,n){"use strict";var r=n(67),o=n(77),i=(n(4),n(0)),a=n.n(i),s=n(15),c=n.n(s),l=!1,u=n(105),d="unmounted",f="exited",h="entering",p="entered",m="exiting",g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=f,r.appearStatus=h):o=p:o=t.unmountOnExit||t.mountOnEnter?d:f,r.state={status:o},r.nextCallback=null,r}Object(o.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===d?{status:f}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==p&&(t=h):n!==h&&n!==p||(t=m)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===h?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===f&&this.setState({status:d})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[c.a.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||l?this.safeSetState({status:p},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:h},(function(){t.props.onEntering(i,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:p},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:c.a.findDOMNode(this);t&&!l?(this.props.onExit(r),this.safeSetState({status:m},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:f},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:f},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:c.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===d)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(u.a.Provider,{value:null},"function"===typeof n?n(e,o):a.a.cloneElement(a.a.Children.only(n),o))},t}(a.a.Component);function v(){}g.contextType=u.a,g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v,onEntering:v,onEntered:v,onExit:v,onExiting:v,onExited:v},g.UNMOUNTED=d,g.EXITED=f,g.ENTERING=h,g.ENTERED=p,g.EXITING=m;t.a=g},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),l=1;l1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";var r=n(9),o=n(27),i=Object(r.a)({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),a=Object(r.a)({prop:"display"}),s=Object(r.a)({prop:"overflow"}),c=Object(r.a)({prop:"textOverflow"}),l=Object(r.a)({prop:"visibility"}),u=Object(r.a)({prop:"whiteSpace"});t.a=Object(o.a)(i,a,s,c,l,u)},function(e,t,n){"use strict";var r=n(9),o=Object(r.a)({prop:"boxShadow",themeKey:"shadows"});t.a=o},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=n(10),l=n(107),u=n(8),d=i.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,c=e.children,d=e.classes,f=e.className,h=e.color,p=void 0===h?"default":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.size,_=void 0===y?"medium":y,w=Object(o.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(l.a,Object(r.a)({className:Object(a.a)(d.root,f,"default"!==p&&d["color".concat(Object(u.a)(p))],g&&d.disabled,"small"===_&&d["size".concat(Object(u.a)(_))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!b,disabled:g,ref:t},w),i.createElement("span",{className:d.label},c))}));t.a=Object(s.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(c.a)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=n(48),i=(r=n(293))&&r.__esModule?r:{default:r};var a=11/23/100;function s(e){var t={r:0,g:0,b:0};if(7===e.length)t.r=parseInt(e.substr(1,2),16),t.g=parseInt(e.substr(3,2),16),t.b=parseInt(e.substr(5,2),16);else if(4===e.length){var n=e.substr(1,1),r=e.substr(2,1),o=e.substr(3,1);t.r=parseInt(n+n,16),t.g=parseInt(r+r,16),t.b=parseInt(o+o,16)}return t}function c(e,t,n){var r,o=s(e),i=s(t);return o.r+=i.r*(.05+a*(n-1)),o.g+=i.g*(.05+a*(n-1)),o.b+=i.b*(.05+a*(n-1)),r=o,"#"+Math.round(r.r).toString(16)+Math.round(r.g).toString(16)+Math.round(r.b).toString(16)}function l(e,t){for(var n={},r=1;r<=24;r++)n["elevation"+r]={backgroundColor:c(e,t,r)};return n}var u=function(e){var t;return(t="dark"===e?{name:e,palette:{type:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[200],"&:hover":{color:i.default[100]}}},MuiPaper:l("#121212","#fff")}}:"blue"===e?{name:e,palette:{type:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[200],"&:hover":{color:i.default[100]}}},MuiPaper:l("#151d21","#fff")}}:"colored"===e?{name:e,palette:{type:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:"PT"===e?{name:e,palette:{type:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:"DX"===e?{name:e,palette:{type:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:{name:e,palette:{type:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#14bb00"},overrides:{MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}).toolbar={height:48},t.saveToolbar={background:t.palette.primary.main,button:{borderRadius:3,height:32}},(0,o.createTheme)(t)};t.default=u},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),i=s(n(4)),a=s(n(209));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n ".length,c=void 0;n&&o++<5&&!("html"===(c=a(n,t))||o>1&&i+r.length*s+c.length>=80);)r.push(c),i+=c.length,n=n.parentNode;return r.reverse().join(" > ")}catch(l){return""}}function a(e,t){var n,r,i,a,s,c,l,u=e,d=[];if(!u||!u.tagName)return"";d.push(u.tagName.toLowerCase());var f=(null===(n=t)||void 0===n?void 0:n.length)?t.filter((function(e){return u.getAttribute(e)})).map((function(e){return[e,u.getAttribute(e)]})):null;if(null===(r=f)||void 0===r?void 0:r.length)f.forEach((function(e){d.push("["+e[0]+'="'+e[1]+'"]')}));else if(u.id&&d.push("#"+u.id),(i=u.className)&&Object(o.k)(i))for(a=i.split(/\s+/),l=0;l1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,s=t.Component,c=t.defaultTheme,l=void 0===c?g:c,f=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),p=m(e),S=n||i||"makeStyles";p.options={index:h(),name:n,meta:S,classNamePrefix:S};var k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(u.a)()||l,r=Object(o.a)({},a.a.useContext(d.a),f),i=a.a.useRef(),c=a.a.useRef();w((function(){var o={name:n,state:{},stylesCreator:p,stylesOptions:r,theme:t};return b(o,e),c.current=!1,i.current=o,function(){_(o)}}),[t,p]),a.a.useEffect((function(){c.current&&y(i.current,e),c.current=!0}));var h=v(i.current,e.classes,s);return h};return k}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};t.default=r},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(2)),s=n(5),c=n(10),l=n(107),u=n(8),d=i.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,d=e.color,f=void 0===d?"default":d,h=e.component,p=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,v=e.disableElevation,b=void 0!==v&&v,y=e.disableFocusRipple,_=void 0!==y&&y,w=e.endIcon,S=e.focusVisibleClassName,k=e.fullWidth,x=void 0!==k&&k,O=e.size,C=void 0===O?"medium":O,E=e.startIcon,j=e.type,R=void 0===j?"button":j,T=e.variant,A=void 0===T?"text":T,L=Object(r.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),M=E&&i.createElement("span",{className:Object(a.a)(s.startIcon,s["iconSize".concat(Object(u.a)(C))])},E),$=w&&i.createElement("span",{className:Object(a.a)(s.endIcon,s["iconSize".concat(Object(u.a)(C))])},w);return i.createElement(l.a,Object(o.a)({className:Object(a.a)(s.root,s[A],c,"inherit"===f?s.colorInherit:"default"!==f&&s["".concat(A).concat(Object(u.a)(f))],"medium"!==C&&[s["".concat(A,"Size").concat(Object(u.a)(C))],s["size".concat(Object(u.a)(C))]],b&&s.disableElevation,g&&s.disabled,x&&s.fullWidth),component:p,disabled:g,focusRipple:!_,focusVisibleClassName:Object(a.a)(s.focusVisible,S),ref:t,type:R},L),i.createElement("span",{className:s.label},M,n,$))}));t.a=Object(s.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(c.a)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(c.a)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(c.a)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(12),a=n(0),s=(n(4),n(2)),c=n(5),l=n(8),u=n(172),d=n(436),f=n(340),h=n(21),p=n(173),m={enter:h.b.enteringScreen,exit:h.b.leavingScreen},g=a.forwardRef((function(e,t){var n=e.BackdropProps,i=e.children,c=e.classes,h=e.className,g=e.disableBackdropClick,v=void 0!==g&&g,b=e.disableEscapeKeyDown,y=void 0!==b&&b,_=e.fullScreen,w=void 0!==_&&_,S=e.fullWidth,k=void 0!==S&&S,x=e.maxWidth,O=void 0===x?"sm":x,C=e.onBackdropClick,E=e.onClose,j=e.onEnter,R=e.onEntered,T=e.onEntering,A=e.onEscapeKeyDown,L=e.onExit,M=e.onExited,$=e.onExiting,D=e.open,N=e.PaperComponent,P=void 0===N?p.a:N,I=e.PaperProps,F=void 0===I?{}:I,z=e.scroll,W=void 0===z?"paper":z,B=e.TransitionComponent,H=void 0===B?f.a:B,U=e.transitionDuration,V=void 0===U?m:U,G=e.TransitionProps,K=e["aria-describedby"],q=e["aria-labelledby"],Y=Object(o.a)(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),J=a.useRef();return a.createElement(u.a,Object(r.a)({className:Object(s.a)(c.root,h),BackdropComponent:d.a,BackdropProps:Object(r.a)({transitionDuration:V},n),closeAfterTransition:!0},v?{disableBackdropClick:v}:{},{disableEscapeKeyDown:y,onEscapeKeyDown:A,onClose:E,open:D,ref:t},Y),a.createElement(H,Object(r.a)({appear:!0,in:D,timeout:V,onEnter:j,onEntering:T,onEntered:R,onExit:L,onExiting:$,onExited:M,role:"none presentation"},G),a.createElement("div",{className:Object(s.a)(c.container,c["scroll".concat(Object(l.a)(W))]),onMouseUp:function(e){e.target===e.currentTarget&&e.target===J.current&&(J.current=null,C&&C(e),!v&&E&&E(e,"backdropClick"))},onMouseDown:function(e){J.current=e.target}},a.createElement(P,Object(r.a)({elevation:24,role:"dialog","aria-describedby":K,"aria-labelledby":q},F,{className:Object(s.a)(c.paper,c["paperScroll".concat(Object(l.a)(W))],c["paperWidth".concat(Object(l.a)(String(O)))],F.className,w&&c.paperFullScreen,k&&c.paperFullWidth)}),i))))}));t.a=Object(c.a)((function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}}),{name:"MuiDialog"})(g)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=i.forwardRef((function(e,t){var n=e.disableSpacing,s=void 0!==n&&n,c=e.classes,l=e.className,u=Object(o.a)(e,["disableSpacing","classes","className"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(c.root,l,!s&&c.spacing),ref:t},u))}));t.a=Object(s.a)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=i.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.dividers,l=void 0!==c&&c,u=Object(o.a)(e,["classes","className","dividers"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(n.root,s,l&&n.dividers),ref:t},u))}));t.a=Object(s.a)((function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}}),{name:"MuiDialogContent"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(0),i=(n(4),n(5)),a=n(174),s=o.forwardRef((function(e,t){return o.createElement(a.a,Object(r.a)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));t.a=Object(i.a)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(s)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(5),c=n(174),l=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.disableTypography,d=void 0!==u&&u,f=Object(o.a)(e,["children","classes","className","disableTypography"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(s.root,l),ref:t},f),d?n:i.createElement(c.a,{component:"h2",variant:"h6"},n))}));t.a=Object(s.a)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(l)},function(e,t,n){"use strict";var r=n(3),o=n(12),i=n(1),a=n(0),s=(n(4),n(2)),c=n(5),l=n(21),u=n(339),d=n(18),f=n(8),h=n(39),p=n(226),m=n(437),g=a.forwardRef((function(e,t){var n=e.action,o=e.anchorOrigin,c=(o=void 0===o?{vertical:"bottom",horizontal:"center"}:o).vertical,g=o.horizontal,v=e.autoHideDuration,b=void 0===v?null:v,y=e.children,_=e.classes,w=e.className,S=e.ClickAwayListenerProps,k=e.ContentProps,x=e.disableWindowBlurListener,O=void 0!==x&&x,C=e.message,E=e.onClose,j=e.onEnter,R=e.onEntered,T=e.onEntering,A=e.onExit,L=e.onExited,M=e.onExiting,$=e.onMouseEnter,D=e.onMouseLeave,N=e.open,P=e.resumeHideDuration,I=e.TransitionComponent,F=void 0===I?p.a:I,z=e.transitionDuration,W=void 0===z?{enter:l.b.enteringScreen,exit:l.b.leavingScreen}:z,B=e.TransitionProps,H=Object(r.a)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),U=a.useRef(),V=a.useState(!0),G=V[0],K=V[1],q=Object(d.a)((function(){E&&E.apply(void 0,arguments)})),Y=Object(d.a)((function(e){E&&null!=e&&(clearTimeout(U.current),U.current=setTimeout((function(){q(null,"timeout")}),e))}));a.useEffect((function(){return N&&Y(b),function(){clearTimeout(U.current)}}),[N,b,Y]);var J=function(){clearTimeout(U.current)},X=a.useCallback((function(){null!=b&&Y(null!=P?P:.5*b)}),[b,P,Y]);return a.useEffect((function(){if(!O&&N)return window.addEventListener("focus",X),window.addEventListener("blur",J),function(){window.removeEventListener("focus",X),window.removeEventListener("blur",J)}}),[O,X,N]),!N&&G?null:a.createElement(u.a,Object(i.a)({onClickAway:function(e){E&&E(e,"clickaway")}},S),a.createElement("div",Object(i.a)({className:Object(s.a)(_.root,_["anchorOrigin".concat(Object(f.a)(c)).concat(Object(f.a)(g))],w),onMouseEnter:function(e){$&&$(e),J()},onMouseLeave:function(e){D&&D(e),X()},ref:t},H),a.createElement(F,Object(i.a)({appear:!0,in:N,onEnter:Object(h.a)((function(){K(!1)}),j),onEntered:R,onEntering:T,onExit:A,onExited:Object(h.a)((function(){K(!0)}),L),onExiting:M,timeout:W,direction:"top"===c?"down":"up"},B),y||a.createElement(m.a,Object(i.a)({message:C,action:n},k)))))}));t.a=Object(c.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},a={justifyContent:"flex-start"},s={top:24},c={bottom:24},l={right:24},u={left:24},d={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Object(i.a)({},t,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({},s,d))),anchorOriginBottomCenter:Object(i.a)({},n,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({},c,d))),anchorOriginTopRight:Object(i.a)({},t,r,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({left:"auto"},s,l))),anchorOriginBottomRight:Object(i.a)({},n,r,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({left:"auto"},c,l))),anchorOriginTopLeft:Object(i.a)({},t,a,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({right:"auto"},s,u))),anchorOriginBottomLeft:Object(i.a)({},n,a,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({right:"auto"},c,u)))}}),{flip:!1,name:"MuiSnackbar"})(g)},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.default=a},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(2)),s=n(5),c=n(107),l=n(8),u=i.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,d=e.color,f=void 0===d?"default":d,h=e.component,p=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.focusVisibleClassName,_=e.size,w=void 0===_?"large":_,S=e.variant,k=void 0===S?"circular":S,x=Object(r.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return i.createElement(c.a,Object(o.a)({className:Object(a.a)(s.root,u,"large"!==w&&s["size".concat(Object(l.a)(w))],g&&s.disabled,"extended"===k&&s.extended,{primary:s.primary,secondary:s.secondary,inherit:s.colorInherit}[f]),component:p,disabled:g,focusRipple:!b,focusVisibleClassName:Object(a.a)(s.focusVisible,y),ref:t},x),i.createElement("span",{className:s.label},n))}));t.a=Object(s.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(u)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(12),a=n(0),s=(n(4),n(2)),c=n(5),l=a.forwardRef((function(e,t){var n=e.classes,i=e.className,c=e.component,l=void 0===c?"div":c,u=e.disableGutters,d=void 0!==u&&u,f=e.variant,h=void 0===f?"regular":f,p=Object(o.a)(e,["classes","className","component","disableGutters","variant"]);return a.createElement(l,Object(r.a)({className:Object(s.a)(n.root,n[h],i,!d&&n.gutters),ref:t},p))}));t.a=Object(c.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(i.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(l)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getSelectIdIcon=function(e,t){t=t||".";var n="",r=null===e||void 0===e?void 0:e.common;if(r){var o=r.icon;if(o)if(o.startsWith("data:image/"))n=o;else{if(!o.includes("."))return null;var i;"instance"===e.type||"adapter"===e.type?n=t+"/adapter/"+r.name+"/"+o:e._id&&e._id.startsWith("system.adapter.")?(i=e._id.split(".",3),"/"===o[0]?i[2]+=o:i[2]+="/"+o,n=t+"/adapter/"+i[2]):(i=e._id.split(".",2),"/"===o[0]?i[0]+=o:i[0]+="/"+o,n=t+"/adapter/"+i[0])}}return n||null},t.getSystemIcon=function(e){var t,n=null===e||void 0===e?void 0:e._id;if(!n)return null;n.startsWith("_design/")||"system"===n?t=o.default.createElement(s.default,{className:"iconOwn"}):"0_userdata"===n||"0_userdata.0"===n?t=o.default.createElement(c.default,{className:"iconOwn"}):"alias"===n||"alias.0"===n?t=o.default.createElement(m.default,{className:"iconOwn"}):"system.adapter"===n?t=o.default.createElement(s.default,{className:"iconOwn"}):"system.group"===n?t=o.default.createElement(l.default,{className:"iconOwn"}):"system.user"===n?t=o.default.createElement(u.default,{className:"iconOwn"}):"system.host"===n?t=o.default.createElement(d.default,{className:"iconOwn"}):n.endsWith(".connection")||n.endsWith(".connected")?t=o.default.createElement(f.default,{className:"iconOwn"}):n.endsWith(".info")?t=o.default.createElement(h.default,{className:"iconOwn"}):"meta"===(null===e||void 0===e?void 0:e.type)&&(t=o.default.createElement(p.default,{className:"iconOwn"}));return t||null};var o=v(n(0)),i=v(n(4)),a=v(n(428)),s=v(n(396)),c=v(n(397)),l=v(n(398)),u=v(n(399)),d=v(n(400)),f=v(n(401)),h=v(n(402)),p=v(n(403)),m=v(n(404)),g=v(n(61));function v(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;){var a=o(t),s=a.cell,c=a.lineIsOver;i.push(s),c&&(n.push(i),i=[])}return n}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){(function(e,n){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",c="[object Date]",l="[object Error]",u="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",S=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[i]=x[a]=x[_]=x[s]=x[w]=x[c]=x[l]=x[u]=x[d]=x[f]=x[h]=x[m]=x[g]=x[v]=x[y]=!1;var O="object"==typeof e&&e&&e.Object===Object&&e,C="object"==typeof self&&self&&self.Object===Object&&self,E=O||C||Function("return this")(),j=t&&!t.nodeType&&t,R=j&&"object"==typeof n&&n&&!n.nodeType&&n,T=R&&R.exports===j,A=T&&O.process,L=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),M=L&&L.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++ns))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var u=-1,d=!0,f=2&n?new ye:void 0;for(i.set(e,t),i.set(t,e);++u-1},ve.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||ve),string:new ge}},be.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return Te(this,e).get(e)},be.prototype.has=function(e){return Te(this,e).has(e)},be.prototype.set=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,r),this},ye.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new ve,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new be(r)}return n.set(e,t),this.size=n.size,this};var Le=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}function Be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var Ue=M?function(e){return function(t){return e(t)}}(M):function(e){return He(e)&&We(e.length)&&!!x[ke(e)]};function Ve(e){return null!=(t=e)&&We(t.length)&&!ze(t)?we(e):Ee(e);var t}n.exports=function(e,t){return Oe(e,t)}}).call(this,n(69),n(213)(e))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0;t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var t;return"undefined"===typeof window?(e.window={},t=n(156),delete e.window):window.ace?(t=window.ace).acequire=window.ace.require||window.ace.acequire:t=n(156),t};t.debounce=function(e,t){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,o)}),t)}}}).call(this,n(69))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&e.handleMarkers(w,t);for(r=0;r=200&&t<300?e.Success:429===t?e.RateLimit:t>=400&&t<500?e.Invalid:t>=500?e.Failed:e.Unknown}}(a||(a={}));var l,u=n(25),d=n(454);!function(e){e.PENDING="PENDING",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(l||(l={}));var f,h,p=function(){function e(e){var t=this;this._state=l.PENDING,this._handlers=[],this._resolve=function(e){t._setResult(l.RESOLVED,e)},this._reject=function(e){t._setResult(l.REJECTED,e)},this._setResult=function(e,n){t._state===l.PENDING&&(Object(u.m)(n)?n.then(t._resolve,t._reject):(t._state=e,t._value=n,t._executeHandlers()))},this._attachHandler=function(e){t._handlers=t._handlers.concat(e),t._executeHandlers()},this._executeHandlers=function(){if(t._state!==l.PENDING){var e=t._handlers.slice();t._handlers=[],e.forEach((function(e){e.done||(t._state===l.RESOLVED&&e.onfulfilled&&e.onfulfilled(t._value),t._state===l.REJECTED&&e.onrejected&&e.onrejected(t._value),e.done=!0)}))}};try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}return e.resolve=function(t){return new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(n,r){if(Array.isArray(t))if(0!==t.length){var o=t.length,i=[];t.forEach((function(t,a){e.resolve(t).then((function(e){i[a]=e,0===(o-=1)&&n(i)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},e.prototype.then=function(t,n){var r=this;return new e((function(e,o){r._attachHandler({done:!1,onfulfilled:function(n){if(t)try{return void e(t(n))}catch(r){return void o(r)}else e(n)},onrejected:function(t){if(n)try{return void e(n(t))}catch(r){return void o(r)}else o(t)}})}))},e.prototype.catch=function(e){return this.then((function(e){return e}),e)},e.prototype.finally=function(t){var n=this;return new e((function(e,r){var o,i;return n.then((function(e){i=!1,o=e,t&&t()}),(function(e){i=!0,o=e,t&&t()})).then((function(){i?r(o):e(o)}))}))},e.prototype.toString=function(){return"[object SyncPromise]"},e}(),m=n(31),g=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return e.clone=function(t){var n=new e;return t&&(n._breadcrumbs=Object(s.g)(t._breadcrumbs),n._tags=Object(s.a)({},t._tags),n._extra=Object(s.a)({},t._extra),n._contexts=Object(s.a)({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=Object(s.g)(t._eventProcessors),n._requestSession=t._requestSession),n},e.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},e.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},e.prototype.setUser=function(e){return this._user=e||{},this._session&&this._session.update({user:e}),this._notifyScopeListeners(),this},e.prototype.getUser=function(){return this._user},e.prototype.getRequestSession=function(){return this._requestSession},e.prototype.setRequestSession=function(e){return this._requestSession=e,this},e.prototype.setTags=function(e){return this._tags=Object(s.a)(Object(s.a)({},this._tags),e),this._notifyScopeListeners(),this},e.prototype.setTag=function(e,t){var n;return this._tags=Object(s.a)(Object(s.a)({},this._tags),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(e){return this._extra=Object(s.a)(Object(s.a)({},this._extra),e),this._notifyScopeListeners(),this},e.prototype.setExtra=function(e,t){var n;return this._extra=Object(s.a)(Object(s.a)({},this._extra),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(e){return this._fingerprint=e,this._notifyScopeListeners(),this},e.prototype.setLevel=function(e){return this._level=e,this._notifyScopeListeners(),this},e.prototype.setTransactionName=function(e){return this._transactionName=e,this._notifyScopeListeners(),this},e.prototype.setTransaction=function(e){return this.setTransactionName(e)},e.prototype.setContext=function(e,t){var n;return null===t?delete this._contexts[e]:this._contexts=Object(s.a)(Object(s.a)({},this._contexts),((n={})[e]=t,n)),this._notifyScopeListeners(),this},e.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},e.prototype.getSpan=function(){return this._span},e.prototype.getTransaction=function(){var e,t,n,r,o=this.getSpan();return(null===(e=o)||void 0===e?void 0:e.transaction)?null===(t=o)||void 0===t?void 0:t.transaction:(null===(r=null===(n=o)||void 0===n?void 0:n.spanRecorder)||void 0===r?void 0:r.spans[0])?o.spanRecorder.spans[0]:void 0},e.prototype.setSession=function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this},e.prototype.getSession=function(){return this._session},e.prototype.update=function(t){if(!t)return this;if("function"===typeof t){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=Object(s.a)(Object(s.a)({},this._tags),t._tags),this._extra=Object(s.a)(Object(s.a)({},this._extra),t._extra),this._contexts=Object(s.a)(Object(s.a)({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):Object(u.h)(t)&&(t=t,this._tags=Object(s.a)(Object(s.a)({},this._tags),t.tags),this._extra=Object(s.a)(Object(s.a)({},this._extra),t.extra),this._contexts=Object(s.a)(Object(s.a)({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(e,t){var n="number"===typeof t?Math.min(t,100):100;if(n<=0)return this;var r=Object(s.a)({timestamp:Object(d.a)()},e);return this._breadcrumbs=Object(s.g)(this._breadcrumbs,[r]).slice(-n),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype.applyToEvent=function(e,t){var n;if(this._extra&&Object.keys(this._extra).length&&(e.extra=Object(s.a)(Object(s.a)({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=Object(s.a)(Object(s.a)({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=Object(s.a)(Object(s.a)({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=Object(s.a)(Object(s.a)({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=Object(s.a)({trace:this._span.getTraceContext()},e.contexts);var r=null===(n=this._span.transaction)||void 0===n?void 0:n.name;r&&(e.tags=Object(s.a)({transaction:r},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=Object(s.g)(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(Object(s.g)(v(),this._eventProcessors),e,t)},e.prototype._notifyEventProcessors=function(e,t,n,r){var o=this;return void 0===r&&(r=0),new p((function(i,a){var c=e[r];if(null===t||"function"!==typeof c)i(t);else{var l=c(Object(s.a)({},t),n);Object(u.m)(l)?l.then((function(t){return o._notifyEventProcessors(e,t,n,r+1).then(i)})).then(null,a):o._notifyEventProcessors(e,l,n,r+1).then(i).then(null,a)}}))},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e}();function v(){var e=Object(m.a)();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function b(e){v().push(e)}!function(e){e.Ok="ok",e.Exited="exited",e.Crashed="crashed",e.Abnormal="abnormal"}(f||(f={})),function(e){e.Ok="ok",e.Errored="errored",e.Crashed="crashed"}(h||(h={}));var y=n(455),_=n(134),w=n(133),S=n(59),k=function(){function e(e){this.errors=0,this.sid=Object(y.g)(),this.duration=0,this.status=f.Ok,this.init=!0,this.ignoreDuration=!1;var t=Object(d.b)();this.timestamp=t,this.started=t,e&&this.update(e)}return e.prototype.update=function(e){if(void 0===e&&(e={}),e.user&&(!this.ipAddress&&e.user.ip_address&&(this.ipAddress=e.user.ip_address),this.did||e.did||(this.did=e.user.id||e.user.email||e.user.username)),this.timestamp=e.timestamp||Object(d.b)(),e.ignoreDuration&&(this.ignoreDuration=e.ignoreDuration),e.sid&&(this.sid=32===e.sid.length?e.sid:Object(y.g)()),void 0!==e.init&&(this.init=e.init),!this.did&&e.did&&(this.did=""+e.did),"number"===typeof e.started&&(this.started=e.started),this.ignoreDuration)this.duration=void 0;else if("number"===typeof e.duration)this.duration=e.duration;else{var t=this.timestamp-this.started;this.duration=t>=0?t:0}e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),!this.ipAddress&&e.ipAddress&&(this.ipAddress=e.ipAddress),!this.userAgent&&e.userAgent&&(this.userAgent=e.userAgent),"number"===typeof e.errors&&(this.errors=e.errors),e.status&&(this.status=e.status)},e.prototype.close=function(e){e?this.update({status:e}):this.status===f.Ok?this.update({status:f.Exited}):this.update()},e.prototype.toJSON=function(){return Object(S.a)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"===typeof this.did||"string"===typeof this.did?""+this.did:void 0,duration:this.duration,attrs:Object(S.a)({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},e}(),x=function(){function e(e,t,n){void 0===t&&(t=new g),void 0===n&&(n=4),this._version=n,this._stack=[{}],this.getStackTop().scope=t,e&&this.bindClient(e)}return e.prototype.isOlderThan=function(e){return this._version1&&(d=h.slice(0,-1).join("/"),f=h.pop()),f){var p=f.match(/^\d+/);p&&(f=p[0])}this._fromComponents({host:c,pass:a,path:d,projectId:f,port:u,protocol:r,publicKey:o})},e.prototype._fromComponents=function(e){"user"in e&&!("publicKey"in e)&&(e.publicKey=e.user),this.user=e.publicKey||"",this.protocol=e.protocol,this.publicKey=e.publicKey||"",this.pass=e.pass||"",this.host=e.host,this.port=e.port||"",this.path=e.path||"",this.projectId=e.projectId},e.prototype._validate=function(){var e=this;if(["protocol","publicKey","host","projectId"].forEach((function(t){if(!e[t])throw new q("Invalid Dsn: "+t+" missing")})),!this.projectId.match(/^\d+$/))throw new q("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new q("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new q("Invalid Dsn: Invalid port "+this.port)},e}(),Q=n(83),Z=[];function ee(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function te(e){var t={};return function(e){var t=e.defaultIntegrations&&Object(s.g)(e.defaultIntegrations)||[],n=e.integrations,r=Object(s.g)(ee(t));Array.isArray(n)?r=Object(s.g)(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))})),ee(n)):"function"===typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o=r.map((function(e){return e.name})),i="Debug";return-1!==o.indexOf(i)&&r.push.apply(r,Object(s.g)(r.splice(o.indexOf(i),1))),r}(e).forEach((function(e){t[e.name]=e,function(e){-1===Z.indexOf(e.name)&&(e.setupOnce(b,E),Z.push(e.name),_.b.log("Integration installed: "+e.name))}(e)})),Object.defineProperty(t,"initialized",{value:!0}),t}var ne="Not capturing exception because it's already been captured.",re=function(){function e(e,t){this._integrations={},this._numProcessing=0,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=new X(t.dsn))}return e.prototype.captureException=function(e,t,n){var r=this;if(!Object(y.c)(e)){var o=t&&t.event_id;return this._process(this._getBackend().eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}_.b.log(ne)},e.prototype.captureMessage=function(e,t,n,r){var o=this,i=n&&n.event_id,a=Object(u.i)(e)?this._getBackend().eventFromMessage(String(e),t,n):this._getBackend().eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i},e.prototype.captureEvent=function(e,t,n){var r;if(!(null===(r=t)||void 0===r?void 0:r.originalException)||!Object(y.c)(t.originalException)){var o=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){o=e}))),o}_.b.log(ne)},e.prototype.captureSession=function(e){this._isEnabled()?"string"!==typeof e.release?_.b.warn("Discarded session because of missing or non-string release"):(this._sendSession(e),e.update({init:!1})):_.b.warn("SDK not enabled, will not capture session.")},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.getTransport=function(){return this._getBackend().getTransport()},e.prototype.flush=function(e){var t=this;return this._isClientDoneProcessing(e).then((function(n){return t.getTransport().close(e).then((function(e){return n&&e}))}))},e.prototype.close=function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))},e.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=te(this._options))},e.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){return _.b.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._updateSessionFromEvent=function(e,t){var n,r,o=!1,i=!1,a=t.exception&&t.exception.values;if(a){i=!0;try{for(var c=Object(s.h)(a),l=c.next();!l.done;l=c.next()){var u=l.value.mechanism;if(u&&!1===u.handled){o=!0;break}}}catch(h){n={error:h}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}var d=e.status===f.Ok;(d&&0===e.errors||d&&o)&&(e.update(Object(s.a)(Object(s.a)({},o&&{status:f.Crashed}),{errors:e.errors||Number(i||o)})),this.captureSession(e))},e.prototype._sendSession=function(e){this._getBackend().sendSession(e)},e.prototype._isClientDoneProcessing=function(e){var t=this;return new p((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},e.prototype._prepareEvent=function(e,t,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,a=Object(s.a)(Object(s.a)({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:Object(y.g)()),timestamp:e.timestamp||Object(d.a)()});this._applyClientOptions(a),this._applyIntegrationsMetadata(a);var c=t;n&&n.captureContext&&(c=g.clone(c).update(n.captureContext));var l=p.resolve(a);return c&&(l=c.applyToEvent(a,n)),l.then((function(e){return"number"===typeof i&&i>0?r._normalizeEvent(e,i):e}))},e.prototype._normalizeEvent=function(e,t){if(!e)return null;var n=Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return Object(s.a)(Object(s.a)({},e),e.data&&{data:Object(S.d)(e.data,t)})}))}),e.user&&{user:Object(S.d)(e.user,t)}),e.contexts&&{contexts:Object(S.d)(e.contexts,t)}),e.extra&&{extra:Object(S.d)(e.extra,t)});e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace);var r=this.getOptions()._experiments;return(void 0===r?{}:r).ensureNoCircularStructures?Object(S.d)(n):n},e.prototype._applyClientOptions=function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Object(Q.d)(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(Q.d)(s.value,a));var c=e.request;c&&c.url&&(c.url=Object(Q.d)(c.url,a))},e.prototype._applyIntegrationsMetadata=function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=Object(s.g)(e.sdk.integrations||[],t))},e.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},e.prototype._captureEvent=function(e,t,n){return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){_.b.error(e)}))},e.prototype._processEvent=function(e,t,n){var r,o,i=this,a=this.getOptions(),s=a.beforeSend,c=a.sampleRate,l=this.getTransport();if(!this._isEnabled())return p.reject(new q("SDK not enabled, will not capture event."));var u="transaction"===e.type;return!u&&"number"===typeof c&&Math.random()>c?(null===(o=(r=l).recordLostEvent)||void 0===o||o.call(r,V.SampleRate,"event"),p.reject(new q("Discarding event because it's not included in the random sample (sampling rate = "+c+")"))):this._prepareEvent(e,n,t).then((function(n){var r,o;if(null===n)throw null===(o=(r=l).recordLostEvent)||void 0===o||o.call(r,V.EventProcessor,e.type||"event"),new q("An event processor returned null, will not send event.");if(t&&t.data&&!0===t.data.__sentry__||u||!s)return n;var a=s(n,t);return i._ensureBeforeSendRv(a)})).then((function(t){var r,o;if(null===t)throw null===(o=(r=l).recordLostEvent)||void 0===o||o.call(r,V.BeforeSend,e.type||"event"),new q("`beforeSend` returned `null`, will not send event.");var a=n&&n.getSession&&n.getSession();return!u&&a&&i._updateSessionFromEvent(a,t),i._sendEvent(t),t})).then(null,(function(e){if(e instanceof q)throw e;throw i.captureException(e,{data:{__sentry__:!0},originalException:e}),new q("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)}))},e.prototype._process=function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))},e.prototype._ensureBeforeSendRv=function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Object(u.m)(e))return e.then((function(e){if(!Object(u.h)(e)&&null!==e)throw new q(t);return e}),(function(e){throw new q("beforeSend rejected with "+e)}));if(!Object(u.h)(e)&&null!==e)throw new q(t);return e},e}(),oe=function(){function e(){}return e.prototype.sendEvent=function(e){return p.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:a.Skipped})},e.prototype.close=function(e){return p.resolve(!0)},e}(),ie=function(){function e(e){this._options=e,this._options.dsn||_.b.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype.eventFromException=function(e,t){throw new q("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(e,t,n){throw new q("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,(function(e){_.b.error("Error while sending event: "+e)}))},e.prototype.sendSession=function(e){this._transport.sendSession?this._transport.sendSession(e).then(null,(function(e){_.b.error("Error while sending session: "+e)})):_.b.warn("Dropping session because custom transport doesn't implement sendSession")},e.prototype.getTransport=function(){return this._transport},e.prototype._setupTransport=function(){return new oe},e}(),ae=n(224),se="?",ce=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,le=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ue=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,de=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,fe=/\((\S*)(?::(\d+))(?::(\d+))\)/,he=/Minified React error #\d+;/i;function pe(e){var t=null,n=0;e&&("number"===typeof e.framesToPop?n=e.framesToPop:he.test(e.message)&&(n=1));try{if(t=function(e){if(!e||!e.stacktrace)return null;for(var t,n=e.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),a=[],s=0;s eval")>-1&&(r=de.exec(o[3]))?(o[1]=o[1]||"eval",o[3]=r[1],o[4]=r[2],o[5]=""):0!==l||o[5]||void 0===e.columnNumber||(a[0].column=e.columnNumber+1);d=o[3],f=o[1]||se;f=(n=Object(s.e)(me(f,d),2))[0],i={url:d=n[1],func:f,args:o[2]?o[2].split(","):[],line:o[4]?+o[4]:null,column:o[5]?+o[5]:null}}!i.func&&i.line&&(i.func=se),a.push(i)}if(!a.length)return null;return{message:ve(e),name:e.name,stack:a}}(e))return ge(t,n)}catch(r){}return{message:ve(e),name:e&&e.name,stack:[],failed:!0}}var me=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:se,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]};function ge(e,t){try{return Object(s.a)(Object(s.a)({},e),{stack:e.stack.slice(t)})}catch(n){return e}}function ve(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function be(e){var t=_e(e.stack),n={type:e.name,value:e.message};return t&&t.length&&(n.stacktrace={frames:t}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function ye(e){return{exception:{values:[be(e)]}}}function _e(e){if(!e||!e.length)return[];var t=e,n=t[0].func||"",r=t[t.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return{colno:null===e.column?void 0:e.column,filename:e.url||t[0].url,function:e.func||"?",in_app:!0,lineno:null===e.line?void 0:e.line}})).reverse()}function we(e,t,n){var r=ke(t,n&&n.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return Object(y.a)(r),r.level=c.a.Error,n&&n.event_id&&(r.event_id=n.event_id),p.resolve(r)}function Se(e,t,n,r){void 0===n&&(n=c.a.Info);var o=xe(t,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),p.resolve(o)}function ke(e,t,n){var r;if(void 0===n&&(n={}),Object(u.e)(e)&&e.error)return r=ye(pe(e=e.error));if(Object(u.a)(e)||Object(u.b)(e)){var o=e,i=o.name||(Object(u.a)(o)?"DOMError":"DOMException"),a=o.message?i+": "+o.message:i;return r=xe(a,t,n),Object(y.b)(r,a),"code"in o&&(r.tags=Object(s.a)(Object(s.a)({},r.tags),{"DOMException.code":""+o.code})),r}return Object(u.d)(e)?r=ye(pe(e)):Object(u.h)(e)||Object(u.f)(e)?(r=function(e,t,n){var r={exception:{values:[{type:Object(u.f)(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(S.b)(e)}]},extra:{__serialized__:Object(S.e)(e)}};if(t){var o=_e(pe(t).stack);r.stacktrace={frames:o}}return r}(e,t,n.rejection),Object(y.a)(r,{synthetic:!0}),r):(r=xe(e,t,n),Object(y.b)(r,""+e,void 0),Object(y.a)(r,{synthetic:!0}),r)}function xe(e,t,n){void 0===n&&(n={});var r={message:e};if(n.attachStacktrace&&t){var o=_e(pe(t).stack);r.stacktrace={frames:o}}return r}function Oe(e){if(e.metadata&&e.metadata.sdk){var t=e.metadata.sdk;return{name:t.name,version:t.version}}}function Ce(e,t){return t?(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=Object(s.g)(e.sdk.integrations||[],t.integrations||[]),e.sdk.packages=Object(s.g)(e.sdk.packages||[],t.packages||[]),e):e}function Ee(e,t){var n=Oe(t),r="aggregates"in e?"sessions":"session";return{body:JSON.stringify(Object(s.a)(Object(s.a)({sent_at:(new Date).toISOString()},n&&{sdk:n}),t.forceEnvelope()&&{dsn:t.getDsn().toString()}))+"\n"+JSON.stringify({type:r})+"\n"+JSON.stringify(e),type:r,url:t.getEnvelopeEndpointWithUrlEncodedAuth()}}function je(e,t){var n=Oe(t),r=e.type||"event",o="transaction"===r||t.forceEnvelope(),i=e.debug_meta||{},a=i.transactionSampling,c=Object(s.f)(i,["transactionSampling"]),l=a||{},u=l.method,d=l.rate;0===Object.keys(c).length?delete e.debug_meta:e.debug_meta=c;var f={body:JSON.stringify(n?Ce(e,t.metadata.sdk):e),type:r,url:o?t.getEnvelopeEndpointWithUrlEncodedAuth():t.getStoreEndpointWithUrlEncodedAuth()};if(o){var h=JSON.stringify(Object(s.a)(Object(s.a)({event_id:e.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),t.forceEnvelope()&&{dsn:t.getDsn().toString()}))+"\n"+JSON.stringify({type:r,sample_rates:[{id:u,rate:d}]})+"\n"+f.body;f.body=h}return f}var Re=function(){function e(e,t,n){void 0===t&&(t={}),this.dsn=e,this._dsnObject=new X(e),this.metadata=t,this._tunnel=n}return e.prototype.getDsn=function(){return this._dsnObject},e.prototype.forceEnvelope=function(){return!!this._tunnel},e.prototype.getBaseApiEndpoint=function(){var e=this.getDsn(),t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"},e.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},e.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},e.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this.forceEnvelope()?this._tunnel:this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},e.prototype.getStoreEndpointPath=function(){var e=this.getDsn();return(e.path?"/"+e.path:"")+"/api/"+e.projectId+"/store/"},e.prototype.getRequestHeaders=function(e,t){var n=this.getDsn(),r=["Sentry sentry_version=7"];return r.push("sentry_client="+e+"/"+t),r.push("sentry_key="+n.publicKey),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},e.prototype.getReportDialogEndpoint=function(e){void 0===e&&(e={});var t=this.getDsn(),n=this.getBaseApiEndpoint()+"embed/error-page/",r=[];for(var o in r.push("dsn="+t.toString()),e)if("dsn"!==o)if("user"===o){if(!e.user)continue;e.user.name&&r.push("name="+encodeURIComponent(e.user.name)),e.user.email&&r.push("email="+encodeURIComponent(e.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return r.length?n+"?"+r.join("&"):n},e.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},e.prototype._getIngestEndpoint=function(e){return this._tunnel?this._tunnel:""+this.getBaseApiEndpoint()+this.getDsn().projectId+"/"+e+"/"},e.prototype._encodedAuth=function(){var e={sentry_key:this.getDsn().publicKey,sentry_version:"7"};return Object(S.f)(e)},e}(),Te=function(){function e(e){this._limit=e,this._buffer=[]}return e.prototype.isReady=function(){return void 0===this._limit||this.length()0&&n(!1)}),e);p.all(t._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},e}();var Ae,Le=Object(m.a)();function Me(){var e,t;if(Ae)return Ae;if(Object(ae.a)(Le.fetch))return Ae=Le.fetch.bind(Le);var n=Le.document,r=Le.fetch;if("function"===typeof(null===(e=n)||void 0===e?void 0:e.createElement))try{var o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o),(null===(t=o.contentWindow)||void 0===t?void 0:t.fetch)&&(r=o.contentWindow.fetch),n.head.removeChild(o)}catch(i){_.b.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return Ae=r.bind(Le)}function $e(e,t){if("[object Navigator]"===Object.prototype.toString.call(Le&&Le.navigator)&&"function"===typeof Le.navigator.sendBeacon)return Le.navigator.sendBeacon.bind(Le.navigator)(e,t);if(Object(ae.b)()){var n=Me();n(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){console.error(e)}))}else;}var De={event:"error",transaction:"transaction",session:"session",attachment:"attachment"},Ne=Object(m.a)(),Pe=function(){function e(e){var t=this;this.options=e,this._buffer=new Te(30),this._rateLimits={},this._outcomes={},this._api=new Re(e.dsn,e._metadata,e.tunnel),this.url=this._api.getStoreEndpointWithUrlEncodedAuth(),this.options.sendClientReports&&Ne.document&&Ne.document.addEventListener("visibilitychange",(function(){"hidden"===Ne.document.visibilityState&&t._flushOutcomes()}))}return e.prototype.sendEvent=function(e){throw new q("Transport Class has to implement `sendEvent` method")},e.prototype.close=function(e){return this._buffer.drain(e)},e.prototype.recordLostEvent=function(e,t){var n;if(this.options.sendClientReports){var r=De[t]+":"+e;_.b.log("Adding outcome: "+r),this._outcomes[r]=(null!==(n=this._outcomes[r])&&void 0!==n?n:0)+1}},e.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var e=this._outcomes;if(this._outcomes={},Object.keys(e).length){_.b.log("Flushing outcomes:\n"+JSON.stringify(e,null,2));var t=this._api.getEnvelopeEndpointWithUrlEncodedAuth(),n=JSON.stringify(Object(s.a)({},this.options.tunnel&&{dsn:this._api.getDsn().toString()}))+"\n"+JSON.stringify({type:"client_report"})+"\n"+JSON.stringify({timestamp:Object(d.a)(),discarded_events:Object.keys(e).map((function(t){var n=Object(s.e)(t.split(":"),2),r=n[0];return{reason:n[1],category:r,quantity:e[t]}}))});try{$e(t,n)}catch(r){_.b.error(r)}}else _.b.log("No outcomes to flush")}},e.prototype._handleResponse=function(e){var t=e.requestType,n=e.response,r=e.headers,o=e.resolve,i=e.reject,s=a.fromHttpCode(n.status);this._handleRateLimit(r)&&_.b.warn("Too many "+t+" requests, backing off until: "+this._disabledUntil(t)),s!==a.Success?i(n):o({status:s})},e.prototype._disabledUntil=function(e){var t=De[e];return this._rateLimits[t]||this._rateLimits.all},e.prototype._isRateLimited=function(e){return this._disabledUntil(e)>new Date(Date.now())},e.prototype._handleRateLimit=function(e){var t,n,r,o,i=Date.now(),a=e["x-sentry-rate-limits"],c=e["retry-after"];if(a){try{for(var l=Object(s.h)(a.trim().split(",")),u=l.next();!u.done;u=l.next()){var d=u.value.split(":",2),f=parseInt(d[0],10),h=1e3*(isNaN(f)?60:f);try{for(var p=(r=void 0,Object(s.h)(d[1].split(";"))),m=p.next();!m.done;m=p.next()){var g=m.value;this._rateLimits[g||"all"]=new Date(i+h)}}catch(v){r={error:v}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(b){t={error:b}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return!0}return!!c&&(this._rateLimits.all=new Date(i+Object(y.e)(i,c)),!0)},e}(),Ie=function(e){function t(t,n){void 0===n&&(n=Me());var r=e.call(this,t)||this;return r._fetch=n,r}return Object(s.c)(t,e),t.prototype.sendEvent=function(e){return this._sendRequest(je(e,this._api),e)},t.prototype.sendSession=function(e){return this._sendRequest(Ee(e,this._api),e)},t.prototype._sendRequest=function(e,t){var n=this;if(this._isRateLimited(e.type))return this.recordLostEvent(V.RateLimitBackoff,e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429});var r={body:e.body,method:"POST",referrerPolicy:Object(ae.e)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new p((function(t,o){n._fetch(e.url,r).then((function(r){var i={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};n._handleResponse({requestType:e.type,response:r,headers:i,resolve:t,reject:o})})).catch(o)}))})).then(void 0,(function(t){throw t instanceof q?n.recordLostEvent(V.QueueOverflow,e.type):n.recordLostEvent(V.NetworkError,e.type),t}))},t}(Pe),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(s.c)(t,e),t.prototype.sendEvent=function(e){return this._sendRequest(je(e,this._api),e)},t.prototype.sendSession=function(e){return this._sendRequest(Ee(e,this._api),e)},t.prototype._sendRequest=function(e,t){var n=this;return this._isRateLimited(e.type)?(this.recordLostEvent(V.RateLimitBackoff,e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new p((function(t,r){var o=new XMLHttpRequest;for(var i in o.onreadystatechange=function(){if(4===o.readyState){var i={"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")};n._handleResponse({requestType:e.type,response:o,headers:i,resolve:t,reject:r})}},o.open("POST",e.url),n.options.headers)Object.prototype.hasOwnProperty.call(n.options.headers,i)&&o.setRequestHeader(i,n.options.headers[i]);o.send(e.body)}))})).then(void 0,(function(t){throw t instanceof q?n.recordLostEvent(V.QueueOverflow,e.type):n.recordLostEvent(V.NetworkError,e.type),t}))},t}(Pe),ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(s.c)(t,e),t.prototype.eventFromException=function(e,t){return we(this._options,e,t)},t.prototype.eventFromMessage=function(e,t,n){return void 0===t&&(t=c.a.Info),Se(this._options,e,t,n)},t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var t=Object(s.a)(Object(s.a)({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(t):Object(ae.b)()?new Ie(t):new Fe(t)},t}(ie),We=Object(m.a)(),Be=0;function He(){return Be>0}function Ue(){Be+=1,setTimeout((function(){Be-=1}))}function Ve(e,t,n){if(void 0===t&&(t={}),"function"!==typeof e)return e;try{if(e.__sentry__)return e;if(e.__sentry_wrapped__)return e.__sentry_wrapped__}catch(i){return e}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var o=r.map((function(e){return Ve(e,t)}));return e.handleEvent?e.handleEvent.apply(this,o):e.apply(this,o)}catch(i){throw Ue(),H((function(e){e.addEventProcessor((function(e){var n=Object(s.a)({},e);return t.mechanism&&(Object(y.b)(n,void 0,void 0),Object(y.a)(n,t.mechanism)),n.extra=Object(s.a)(Object(s.a)({},n.extra),{arguments:r}),n})),L(i)})),i}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch(a){}e.prototype=e.prototype||{},r.prototype=e.prototype,Object.defineProperty(e,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:e}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return e.name}})}catch(a){}return r}function Ge(e){if(void 0===e&&(e={}),We.document)if(e.eventId)if(e.dsn){var t=We.document.createElement("script");t.async=!0,t.src=new Re(e.dsn).getReportDialogEndpoint(e),e.onLoad&&(t.onload=e.onLoad);var n=We.document.head||We.document.body;n&&n.appendChild(t)}else _.b.error("Missing dsn option in showReportDialog call");else _.b.error("Missing eventId option in showReportDialog call")}var Ke,qe=n(167),Ye=Object(m.a)(),Je={},Xe={};function Qe(e){if(!Xe[e])switch(Xe[e]=!0,e){case"console":!function(){if(!("console"in Ye))return;["debug","info","warn","error","log","assert"].forEach((function(e){e in Ye.console&&Object(S.c)(Ye.console,e,(function(t){return function(){for(var n=[],r=0;r2?t[2]:void 0;if(r){var o=Ke,i=String(r);Ke=i,et("history",{from:o,to:i})}return e.apply(this,t)}}Ye.onpopstate=function(){for(var t=[],n=0;n"}0!==t.length&&E().addBreadcrumb({category:"ui."+e.name,message:t},{event:e.event,name:e.name,global:e.global})},e.prototype._xhrBreadcrumb=function(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;E().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;},e.prototype._fetchBreadcrumb=function(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?E().addBreadcrumb({category:"fetch",data:e.fetchData,level:c.a.Error,type:"http"},{data:e.error,input:e.args}):E().addBreadcrumb({category:"fetch",data:Object(s.a)(Object(s.a)({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))},e.prototype._historyBreadcrumb=function(e){var t=Object(m.a)(),n=e.from,r=e.to,o=Object(y.f)(t.location.href),i=Object(y.f)(n),a=Object(y.f)(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),E().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},e.id="Breadcrumbs",e}(),dt=function(e){function t(t){void 0===t&&(t={});return t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:G}],version:G},e.call(this,ze,t)||this}return Object(s.c)(t,e),t.prototype.showReportDialog=function(e){void 0===e&&(e={}),Object(m.a)().document&&(this._isEnabled()?Ge(Object(s.a)(Object(s.a)({},e),{dsn:e.dsn||this.getDsn()})):_.b.error("Trying to call showReportDialog with Sentry Client disabled"))},t.prototype._prepareEvent=function(t,n,r){return t.platform=t.platform||"javascript",e.prototype._prepareEvent.call(this,t,n,r)},t.prototype._sendEvent=function(t){var n=this.getIntegration(ut);n&&n.addSentryBreadcrumb(t),e.prototype._sendEvent.call(this,t)},t}(re),ft=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){ct=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t=0;r--){var o=e[r];if(""!==(null===(t=o)||void 0===t?void 0:t.filename)&&"[native code]"!==(null===(n=o)||void 0===n?void 0:n.filename))return o.filename||null}return null},e.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var t=e.stacktrace.frames;return this._getLastValidUrl(t)}if(e.exception){var n=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return this._getLastValidUrl(n)}return null}catch(r){return _.b.error("Cannot extract url for event "+Object(y.d)(e)),null}},e.id="InboundFilters",e}();var mt=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],gt=function(){function e(t){this.name=e.id,this._options=Object(s.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return e.prototype.setupOnce=function(){var e=Object(m.a)();(this._options.setTimeout&&Object(S.c)(e,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&Object(S.c)(e,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&Object(S.c)(e,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Object(S.c)(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget)&&(Array.isArray(this._options.eventTarget)?this._options.eventTarget:mt).forEach(this._wrapEventTarget.bind(this))},e.prototype._wrapTimeFunction=function(e){return function(){for(var t=[],n=0;n0?t:Object(lt.a)();return 0===e.exception.values[0].stacktrace.frames.length&&e.exception.values[0].stacktrace.frames.push({colno:o,filename:a,function:"?",in_app:!0,lineno:i}),e},e.id="GlobalHandlers",e}(),bt=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this._key=t.key||"cause",this._limit=t.limit||5}return e.prototype.setupOnce=function(){b((function(t,n){var r=E().getIntegration(e);if(r){var o=r._handler&&r._handler.bind(r);return"function"===typeof o?o(t,n):t}return t}))},e.prototype._handler=function(e,t){if(!e.exception||!e.exception.values||!t||!Object(u.g)(t.originalException,Error))return e;var n=this._walkErrorTree(t.originalException,this._key);return e.exception.values=Object(s.g)(n,e.exception.values),e},e.prototype._walkErrorTree=function(e,t,n){if(void 0===n&&(n=[]),!Object(u.g)(e[t],Error)||n.length+1>=this._limit)return n;var r=be(pe(e[t]));return this._walkErrorTree(e[t],t,Object(s.g)([r],n))},e.id="LinkedErrors",e}(),yt=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,n){t((function(t){var r=n().getIntegration(e);if(r){try{if(r._shouldDropEvent(t,r._previousEvent))return _.b.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){return r._previousEvent=t}return r._previousEvent=t}return t}))},e.prototype._shouldDropEvent=function(e,t){return!!t&&(!!this._isSameMessageEvent(e,t)||!!this._isSameExceptionEvent(e,t))},e.prototype._isSameMessageEvent=function(e,t){var n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!this._isSameFingerprint(e,t)&&!!this._isSameStacktrace(e,t))))},e.prototype._getFramesFromEvent=function(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}else if(e.stacktrace)return e.stacktrace.frames},e.prototype._isSameStacktrace=function(e,t){var n=this._getFramesFromEvent(e),r=this._getFramesFromEvent(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,(r=r).length!==n.length)return!1;for(var o=0;o=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var C=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function E(e){var t=C.exec(e);return t?t.slice(1):[]}function j(){for(var e=[],t=0;t=-1&&!r;o--){var i=o>=0?e[o]:"/";i&&(n=i+"/"+n,r="/"===i.charAt(0))}return(r?"/":"")+(n=O(n.split("/").filter((function(e){return!!e})),!r).join("/"))||"."}function R(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function T(e,t){var n=E(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n}var A=function(){function e(t){var n=this;void 0===t&&(t={}),this.name=e.id,this._prefix="app:///",this._iteratee=function(e){if(!e.filename)return e;var t=/^[A-Z]:\\/.test(e.filename),r=/^\//.test(e.filename);if(t||r){var o=t?e.filename.replace(/^[A-Z]:/,"").replace(/\\/g,"/"):e.filename,i=n._root?function(e,t){e=j(e).substr(1),t=j(t).substr(1);for(var n=R(e.split("/")),r=R(t.split("/")),o=Math.min(n.length,r.length),i=o,a=0;a=0;n--){var r=t[n];if(!0===r.in_app){e.transaction=this._getTransaction(r);break}}return e},e.prototype._getFramesFromEvent=function(e){var t=e.exception&&e.exception.values&&e.exception.values[0];return t&&t.stacktrace&&t.stacktrace.frames||[]},e.prototype._getTransaction=function(e){return e.module||e.function?(e.module||"?")+"/"+(e.function||"?"):""},e.id="Transaction",e}(),$=n(454),D={id:"Tracing"},N={id:"BrowserTracing"},P={activate:["activated","deactivated"],create:["beforeCreate","created"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]},I=/(?:^|[-_/])(\w)/g,F="root",z="anonymous component",W=function(){function e(t){var n=this;this.name=e.id,this._componentsCache={},this._applyTracingHooks=function(e,t){if(!e.$options.$_sentryPerfHook){e.$options.$_sentryPerfHook=!0;var r=n._getComponentName(e),a=r===F,s={},c=function(r){var o=Object($.c)();n._rootSpan?n._finishRootSpan(o,t):e.$once("hook:"+r,(function(){var e=t().getIntegration(D);if(e){n._tracingActivity=e.constructor.pushActivity("Vue Application Render");var r=e.constructor.getTransaction();r&&(n._rootSpan=r.startChild({description:"Application Render",op:"vue"}))}else{var o=function(e){if(e&&e.getScope){var t=e.getScope();if(t)return t.getTransaction()}return}(t());o&&(n._rootSpan=o.startChild({description:"Application Render",op:"vue"}))}}))},l=function(o,i){var a=Array.isArray(n._options.tracingOptions.trackComponents)?n._options.tracingOptions.trackComponents.indexOf(r)>-1:n._options.tracingOptions.trackComponents;if(n._rootSpan&&a){var c=Object($.c)(),l=s[i];l?(l.finish(),n._finishRootSpan(c,t)):e.$once("hook:"+o,(function(){n._rootSpan&&(s[i]=n._rootSpan.startChild({description:"Vue <"+r+">",op:i}))}))}};n._options.tracingOptions.hooks.forEach((function(t){var r=P[t];r?r.forEach((function(r){var i=a?c.bind(n,r):l.bind(n,r,t),s=e.$options[r];Array.isArray(s)?e.$options[r]=Object(o.g)([i],s):e.$options[r]="function"===typeof s?[i,s]:[i]})):i.b.warn("Unknown hook: "+t)}))}},i.b.log("You are still using the Vue.js integration, consider moving to @sentry/vue"),this._options=Object(o.a)(Object(o.a)({Vue:Object(a.a)().Vue,attachProps:!0,logErrors:!1,tracing:!1},t),{tracingOptions:Object(o.a)({hooks:["mount","update"],timeout:2e3,trackComponents:!1},t.tracingOptions)})}return e.prototype.setupOnce=function(e,t){this._options.Vue?(this._attachErrorHandler(t),this._options.tracing&&this._startTracing(t)):i.b.error("Vue integration is missing a Vue instance")},e.prototype._getComponentName=function(e){if(!e)return z;if(e.$root===e)return F;if(!e.$options)return z;if(e.$options.name)return e.$options.name;if(e.$options._componentTag)return e.$options._componentTag;if(e.$options.__file){var t=T(e.$options.__file.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"),".vue");return this._componentsCache[t]||(this._componentsCache[t]=t.replace(I,(function(e,t){return t?t.toUpperCase():""})))}return z},e.prototype._finishRootSpan=function(e,t){var n=this;this._rootSpanTimer&&clearTimeout(this._rootSpanTimer),this._rootSpanTimer=setTimeout((function(){if(n._tracingActivity){var r=t().getIntegration(D);r&&r.constructor.popActivity(n._tracingActivity)}n._rootSpan&&n._rootSpan.finish(e)}),this._options.tracingOptions.timeout)},e.prototype._startTracing=function(e){var t=this._applyTracingHooks;this._options.Vue.mixin({beforeCreate:function(){e().getIntegration(D)||e().getIntegration(N)?t(this,e):i.b.error("Vue integration has tracing enabled, but Tracing integration is not configured")}})},e.prototype._attachErrorHandler=function(t){var n=this,r=this._options.Vue.config.errorHandler;this._options.Vue.config.errorHandler=function(o,a,s){var c={};if(a)try{c.componentName=n._getComponentName(a),n._options.attachProps&&(c.propsData=a.$options.propsData)}catch(l){i.b.warn("Unable to extract metadata from Vue component.")}s&&(c.lifecycleHook=s),t().getIntegration(e)&&setTimeout((function(){t().withScope((function(e){e.setContext("vue",c),t().captureException(o)}))})),"function"===typeof r&&r.call(n._options.Vue,o,a,s),n._options.logErrors&&(n._options.Vue.util&&n._options.Vue.util.warn("Error in "+s+': "'+(o&&o.toString())+'"',a),console.error(o))}},e.id="Vue",e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=w(n(0)),o=_(n(355)),i=w(n(4)),a=_(n(313)),s=_(n(314)),c=w(n(357)),l=w(n(153)),u=w(n(60)),d=w(n(301)),f=w(n(380)),h=w(n(219)),p=w(n(220)),m=w(n(382)),g=w(n(61)),v=w(n(383)),b=w(n(13));function y(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==S(e)&&"function"!==typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}function S(e){return(S="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t=e[n]}))||"xs"}},{key:"onClose",value:function(){if("undefined"!==typeof window.parent&&window.parent)try{window.parent.$iframeDialog&&"function"===typeof window.parent.$iframeDialog.close?window.parent.$iframeDialog.close():window.parent.postMessage("close","*")}catch(e){window.parent.postMessage("close","*")}}}],(i=[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onResize,!0),window.addEventListener("message",this.onReceiveMessage,!1),C(A(w.prototype),"componentDidMount",this).call(this)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onResize,!0),window.removeEventListener("message",this.onReceiveMessage,!1),C(A(w.prototype),"componentWillUnmount",this).call(this)}},{key:"createTheme",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,h.default)(g.default.getThemeName(e))}},{key:"getThemeName",value:function(e){return e.name}},{key:"getThemeType",value:function(e){return e.palette.type}},{key:"toggleTheme",value:function(){var e=this.state.themeName,t="dark"===e?"blue":"blue"===e?"colored":"colored"===e?"light":"dark";g.default.setThemeName(t);var n=this.createTheme(t);this.setState({theme:n,themeName:this.getThemeName(n),themeType:this.getThemeType(n)})}},{key:"getSystemConfig",value:function(){return this.socket.getSystemConfig()}},{key:"getExpertMode",value:function(){return"true"===window.sessionStorage.getItem("App.expertMode")||!!this._systemConfig.expertMode}},{key:"onConnectionReady",value:function(){}},{key:"encrypt",value:function(e){for(var t="",n=0;n=43)}})).catch((function(){return!1}))}function S(e){return"boolean"===typeof m?l.resolve(m):w(e).then((function(e){return m=e}))}function k(e){var t=g[e.name],n={};n.promise=new l((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function x(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function O(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function C(e,t){return new l((function(n,r){if(g[e.name]=g[e.name]||N(),e.db){if(!t)return n(e.db);k(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=a.open.apply(a,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(p)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),x(e)}}))}function E(e){return C(e,!1)}function j(e){return C(e,!0)}function R(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function T(e){return new l((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}function A(e){return c([_(atob(e.data))],{type:e.type})}function L(e){return e&&e.__local_forage_encoded_blob}function M(e){var t=this,n=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return d(n,e,e),n}function $(e){k(e);for(var t=g[e.name],n=t.forages,r=0;r0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return l.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),j(e)})).then((function(){return $(e).then((function(){D(e,t,n,r-1)}))})).catch(n);n(i)}}function N(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function P(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=g[n.name];o||(o=N(),g[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=M);var i=[];function a(){return l.resolve()}for(var s=0;s>4,u[c++]=(15&r)<<4|o>>2,u[c++]=(3&o)<<6|63&i;return l}function pe(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=Y[(3&n[t])<<4|n[t+1]>>4],r+=Y[(15&n[t+1])<<2|n[t+2]>>6],r+=Y[63&n[t+2]];return n.length%3===2?r=r.substring(0,r.length-1)+"=":n.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}function me(e,t){var n="";if(e&&(n=fe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===fe.call(e.buffer))){var r,o=Q;e instanceof ArrayBuffer?(r=e,o+=ee):(r=e.buffer,"[object Int8Array]"===n?o+=ne:"[object Uint8Array]"===n?o+=re:"[object Uint8ClampedArray]"===n?o+=oe:"[object Int16Array]"===n?o+=ie:"[object Uint16Array]"===n?o+=se:"[object Int32Array]"===n?o+=ae:"[object Uint32Array]"===n?o+=ce:"[object Float32Array]"===n?o+=le:"[object Float64Array]"===n?o+=ue:t(new Error("Failed to get type for BinaryArray"))),t(o+pe(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=J+e.type+"~"+pe(this.result);t(Q+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function ge(e){if(e.substring(0,Z)!==Q)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(Z,de);if(r===te&&X.test(n)){var o=n.match(X);t=o[1],n=n.substring(o[0].length)}var i=he(n);switch(r){case ee:return i;case te:return c([i],{type:t});case ne:return new Int8Array(i);case re:return new Uint8Array(i);case oe:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case se:return new Uint16Array(i);case ae:return new Int32Array(i);case ce:return new Uint32Array(i);case le:return new Float32Array(i);case ue:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}}var ve={serialize:me,deserialize:ge,stringToBuffer:he,bufferToString:pe};function be(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function ye(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!==typeof e[r]?e[r].toString():e[r];var o=new l((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(o){return r(o)}n.db.transaction((function(o){be(o,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=ve,o}function _e(e,t,n,r,o,i){e.executeSql(n,r,o,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?i(e,a):be(e,t,(function(){e.executeSql(n,r,o,i)}),i)}),i):i(e,a)}),i)}function we(e,t){var n=this;e=f(e);var r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Se(e,t){var n=this,r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName,[],(function(n,r){for(var i=r.rows,a=i.length,s=0;s0)return void i(ke.apply(o,[e,s,n,r-1]));a(t)}}))}))})).catch(a)}));return u(i,n),i}function xe(e,t,n){return ke.apply(this,[e,t,n,1])}function Oe(e,t){var n=this;e=f(e);var r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Ce(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function Ee(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function je(e,t){var n=this,r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Re(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],o=0;o '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var o=[],i=0;i0}function Pe(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=$e(e,t._defaultConfig),Ne()?(t._dbInfo=n,n.serializer=ve,l.resolve()):l.reject()}function Ie(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return u(n,e),n}function Fe(e,t){var n=this;e=f(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return u(r,t),r}function ze(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):l.reject("Invalid arguments"),t),r}var Ke={_driver:"localStorageWrapper",_initStorage:Pe,_support:Me(),iterate:ze,getItem:Fe,setItem:Ve,removeItem:Ue,clear:Ie,length:He,key:We,keys:Be,dropInstance:Ge},qe=function(e,t){return e===t||"number"===typeof e&&"number"===typeof t&&isNaN(e)&&isNaN(t)},Ye=function(e,t){for(var n=e.length,r=0;r=0)return 1;return 0}();var o=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function i(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:c(s(e))}function l(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),d=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?u:10===e?d:u||d}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function m(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||h(e.firstElementChild)===e)}(a)?a:h(a);var s=p(e);return s.host?m(s.host,t):m(e,p(t).host)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(t,"top"),o=g(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function b(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,r=f(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},S=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=f(10),o="HTML"===t.nodeName,i=C(e),s=C(t),l=c(e),u=a(t),d=parseFloat(u.borderTopWidth),h=parseFloat(u.borderLeftWidth);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=O({top:i.top-s.top-d,left:i.left-s.left-h,width:i.width,height:i.height});if(p.marginTop=0,p.marginLeft=0,!r&&o){var m=parseFloat(u.marginTop),g=parseFloat(u.marginLeft);p.top-=d-m,p.bottom-=d-m,p.left-=h-g,p.right-=h-g,p.marginTop=m,p.marginLeft=g}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(p=v(p,t)),p}function j(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=E(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:g(n),s=t?0:g(n,"left"),c={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return O(c)}function R(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&R(n)}function T(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?T(e):m(e,l(t));if("viewport"===r)i=j(a,o);else{var u=void 0;"scrollParent"===r?"BODY"===(u=c(s(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===r?e.ownerDocument.documentElement:r;var d=E(u,a,o);if("HTML"!==u.nodeName||R(a))i=d;else{var f=_(e.ownerDocument),h=f.height,p=f.width;i.top+=d.top-d.marginTop,i.bottom=h+d.top,i.left+=d.left-d.marginLeft,i.right=p+d.left}}var g="number"===typeof(n=n||0);return i.left+=g?n:n.left||0,i.top+=g?n:n.top||0,i.right-=g?n:n.right||0,i.bottom-=g?n:n.bottom||0,i}function L(e){return e.width*e.height}function M(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=A(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(s).map((function(e){return x({key:e},s[e],{area:L(s[e])})})).sort((function(e,t){return t.area-e.area})),l=c.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=l.length>0?l[0].key:c[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function $(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?T(t):m(t,l(n));return E(n,o,r)}function D(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function N(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function P(e,t,n){n=n.split("-")[0];var r=D(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",c=i?"height":"width",l=i?"width":"height";return o[a]=t[a]+t[c]/2-r[c]/2,o[s]=n===s?t[s]-r[l]:t[N(s)],o}function I(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function F(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=I(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offsets.reference),t=n(t,e))})),t}function z(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=$(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=M(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=P(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=F(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function B(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=ee.indexOf(e),r=ee.slice(n+1).concat(ee.slice(0,n));return t?r.reverse():r}var ne="flip",re="clockwise",oe="counterclockwise";function ie(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(I(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return(l=l.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return O(s)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){Y(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var ae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",l=s?"width":"height",u={start:k({},c,i[c]),end:k({},c,i[c]+i[l]-a[l])};e.offsets.popper=x({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],c=void 0;return c=Y(+n)?[+n,0]:ie(n,i,a,s),"left"===s?(i.top+=c[0],i.left-=c[1]):"right"===s?(i.top+=c[0],i.left+=c[1]):"top"===s?(i.left+=c[0],i.top-=c[1]):"bottom"===s&&(i.left+=c[0],i.top+=c[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var r=B("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var c=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=c;var l=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]c[e]&&!t.escapeWithReference&&(r=Math.min(u[n],c[e]-("right"===e?u.width:u.height))),k({},n,r)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=x({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",c=a?"left":"top",l=a?"width":"height";return n[s]i(r[s])&&(e.offsets.popper[c]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,s=i.popper,c=i.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",d=l?"Top":"Left",f=d.toLowerCase(),h=l?"left":"top",p=l?"bottom":"right",m=D(r)[u];c[p]-ms[p]&&(e.offsets.popper[f]+=c[f]+m-s[p]),e.offsets.popper=O(e.offsets.popper);var g=c[f]+c[u]/2-m/2,v=a(e.instance.popper),b=parseFloat(v["margin"+d]),y=parseFloat(v["border"+d+"Width"]),_=g-e.offsets.popper[f]-b-y;return _=Math.max(Math.min(s[u]-m,_),0),e.arrowElement=r,e.offsets.arrow=(k(n={},f,Math.round(_)),k(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=N(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ne:a=[r,o];break;case re:a=te(r);break;case oe:a=te(r,!0);break;default:a=t.behavior}return a.forEach((function(s,c){if(r!==s||a.length===c+1)return e;r=e.placement.split("-")[0],o=N(r);var l=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="left"===r&&d(l.right)>d(u.left)||"right"===r&&d(l.left)d(u.top)||"bottom"===r&&d(l.top)d(n.right),m=d(l.top)d(n.bottom),v="left"===r&&h||"right"===r&&p||"top"===r&&m||"bottom"===r&&g,b=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(b&&"start"===i&&h||b&&"end"===i&&p||!b&&"start"===i&&m||!b&&"end"===i&&g),_=!!t.flipVariationsByContent&&(b&&"start"===i&&p||b&&"end"===i&&h||!b&&"start"===i&&g||!b&&"end"===i&&m),w=y||_;(f||v||w)&&(e.flipped=!0,(f||v)&&(r=a[c+1]),w&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=x({},e.offsets.popper,P(e.instance.popper,e.offsets.reference,e.placement)),e=F(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=N(t),e.offsets.popper=O(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=I(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=o(this.update.bind(this)),this.options=x({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(x({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){r.options.modifiers[t]=x({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return x({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&i(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return S(e,[{key:"update",value:function(){return z.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return K.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),e}();se.Utils=("undefined"!==typeof window?window:e).PopperUtils,se.placements=Z,se.Defaults=ae,t.a=se}).call(this,n(69))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diff=t.split=void 0;var r=n(410),o=n(411);t.diff=o.default;var i=n(312);t.split=i.default,t.default=r.default},function(e,t,n){"use strict";var r=n(415),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,c,l,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),c=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),c.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),l&&document.body.removeChild(l),a()}return u}},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}),"FileCopy");t.default=a},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.default=a},function(e,t,n){"use strict";var r=n(24),o=n(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(34)).default)(i.createElement("path",{d:"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"}),"ImportExport");t.default=a},,function(e,t,n){"use strict";n.d(t,"a",(function(){return se}));var r=n(0),o=n.n(r),i=n(4),a=n.n(i);function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;var u=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function d(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=u.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"===typeof t?t:"string"===typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var f=[".DS_Store","Thumbs.db"];function h(e){return(null!==e.target&&e.target.files?g(e.target.files):[]).map((function(e){return d(e)}))}function p(e,t){return s(this,void 0,void 0,(function(){var n;return c(this,(function(r){switch(r.label){case 0:return e.items?(n=g(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(v))]):[3,2];case 1:return[2,m(b(r.sent()))];case 2:return[2,m(g(e.files).map((function(e){return d(e)})))]}}))}))}function m(e){return e.filter((function(e){return-1===f.indexOf(e.name)}))}function g(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,L(n)];if(e.sizen)return[!1,L(n)]}return[!0,null]}function P(e){return void 0!==e&&null!==e}function I(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=O(D(e,n),1)[0],i=O(N(e,r,o),1)[0];return t&&i}))}function F(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function z(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function W(e){e.preventDefault()}function B(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function H(e){return-1!==e.indexOf("Edge/")}function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return B(e)||H(e)}function V(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var oe=Object(r.forwardRef)((function(e,t){var n=e.children,i=se(re(e,G)),a=i.open,s=re(i,K);return Object(r.useImperativeHandle)(t,(function(){return{open:a}}),[a]),o.a.createElement(r.Fragment,null,n(te(te({},s),{},{open:a})))}));oe.displayName="Dropzone";var ie={disabled:!1,getFilesFromEvent:function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?p(e.dataTransfer,e.type):h(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null};oe.defaultProps=ie,oe.propTypes={children:a.a.func,accept:a.a.oneOfType([a.a.string,a.a.arrayOf(a.a.string)]),multiple:a.a.bool,preventDropOnDocument:a.a.bool,noClick:a.a.bool,noKeyboard:a.a.bool,noDrag:a.a.bool,noDragEventsBubbling:a.a.bool,minSize:a.a.number,maxSize:a.a.number,maxFiles:a.a.number,disabled:a.a.bool,getFilesFromEvent:a.a.func,onFileDialogCancel:a.a.func,onDragEnter:a.a.func,onDragLeave:a.a.func,onDragOver:a.a.func,onDrop:a.a.func,onDropAccepted:a.a.func,onDropRejected:a.a.func,validator:a.a.func};var ae={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=te(te({},ie),e),n=t.accept,o=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,c=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,h=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,v=t.preventDropOnDocument,b=t.noClick,y=t.noKeyboard,_=t.noDrag,w=t.noDragEventsBubbling,S=t.validator,k=Object(r.useRef)(null),x=Object(r.useRef)(null),O=Object(r.useReducer)(ce,ae),C=X(O,2),E=C[0],j=C[1],R=E.isFocused,T=E.isFileDialogActive,A=E.draggedFiles,L=Object(r.useCallback)((function(){x.current&&(j({type:"openDialog"}),x.current.value=null,x.current.click())}),[j]),M=function(){T&&setTimeout((function(){x.current&&(x.current.files.length||(j({type:"closeDialog"}),"function"===typeof g&&g()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",M,!1),function(){window.removeEventListener("focus",M,!1)}}),[x,T,g]);var P=Object(r.useCallback)((function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),L()))}),[k,x]),B=Object(r.useCallback)((function(){j({type:"focus"})}),[]),H=Object(r.useCallback)((function(){j({type:"blur"})}),[]),G=Object(r.useCallback)((function(){b||(U()?setTimeout(L,0):L())}),[x,b]),K=Object(r.useRef)([]),Q=function(e){k.current&&k.current.contains(e.target)||(e.preventDefault(),K.current=[])};Object(r.useEffect)((function(){return v&&(document.addEventListener("dragover",W,!1),document.addEventListener("drop",Q,!1)),function(){v&&(document.removeEventListener("dragover",W),document.removeEventListener("drop",Q))}}),[k,v]);var Z=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),fe(e),K.current=[].concat(J(K.current),[e.target]),z(e)&&Promise.resolve(i(e)).then((function(t){F(e)&&!w||(j({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e))}))}),[i,u,w]),ee=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),fe(e);var t=z(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&f&&f(e),!1}),[f,w]),oe=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),fe(e);var t=K.current.filter((function(e){return k.current&&k.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),K.current=t,t.length>0||(j({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),z(e)&&d&&d(e))}),[k,d,w]),se=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),fe(e),K.current=[],z(e)&&Promise.resolve(i(e)).then((function(t){if(!F(e)||w){var r=[],o=[];t.forEach((function(e){var t=X(D(e,n),2),i=t[0],c=t[1],l=X(N(e,s,a),2),u=l[0],d=l[1],f=S?S(e):null;if(i&&u&&!f)r.push(e);else{var h=[c,d];f&&(h=h.concat(f)),o.push({file:e,errors:h.filter((function(e){return e}))})}})),(!c&&r.length>1||c&&l>=1&&r.length>l)&&(r.forEach((function(e){o.push({file:e,errors:[$]})})),r.splice(0)),j({acceptedFiles:r,fileRejections:o,type:"setFiles"}),h&&h(r,o,e),o.length>0&&m&&m(o,e),r.length>0&&p&&p(r,e)}})),j({type:"reset"})}),[c,n,s,a,l,i,h,p,m,w,S]),le=function(e){return o?null:e},ue=function(e){return y?null:le(e)},de=function(e){return _?null:le(e)},fe=function(e){w&&e.stopPropagation()},he=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onKeyDown,i=e.onFocus,a=e.onBlur,s=e.onClick,c=e.onDragEnter,l=e.onDragOver,u=e.onDragLeave,d=e.onDrop,f=re(e,q);return te(te(ne({onKeyDown:ue(V(r,P)),onFocus:ue(V(i,B)),onBlur:ue(V(a,H)),onClick:le(V(s,G)),onDragEnter:de(V(c,Z)),onDragOver:de(V(l,ee)),onDragLeave:de(V(u,oe)),onDrop:de(V(d,se))},n,k),o||y?{}:{tabIndex:0}),f)}}),[k,P,B,H,G,Z,ee,oe,se,y,_,o]),pe=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),me=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,i=e.onClick,a=re(e,Y),s=ne({accept:n,multiple:c,type:"file",style:{display:"none"},onChange:le(V(o,se)),onClick:le(V(i,pe)),autoComplete:"off",tabIndex:-1},r,x);return te(te({},s),a)}}),[x,n,c,se,o]),ge=A.length,ve=ge>0&&I({files:A,accept:n,minSize:s,maxSize:a,multiple:c,maxFiles:l}),be=ge>0&&!ve;return te(te({},E),{},{isDragAccept:ve,isDragReject:be,isFocused:R&&!o,getRootProps:he,getInputProps:me,rootRef:k,inputRef:x,open:le(L)})}function ce(e,t){switch(t.type){case"focus":return te(te({},e),{},{isFocused:!0});case"blur":return te(te({},e),{},{isFocused:!1});case"openDialog":return te(te({},e),{},{isFileDialogActive:!0});case"closeDialog":return te(te({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return te(te({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return te(te({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return te({},ae);default:return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(76);function o(e,t,n){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(166),o=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,i=e.productionPrefix,a=void 0===i?"jss":i,s=e.seed,c=void 0===s?"":s,l=""===c?"":"".concat(c,"-"),u=0,d=function(){return u+=1};return function(e,t){var i=t.options.name;if(i&&0===i.indexOf("Mui")&&!t.options.link&&!n){if(-1!==o.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(l).concat(i,"-").concat(e.key);return t.options.theme[r.a]&&""===c?"".concat(s,"-").concat(d()):s}return"".concat(l).concat(a).concat(d())}}},function(e,t,n){"use strict";var r=n(0),o=n(15),i=(n(4),n(20)),a=n(14),s=n(18);function c(e){return e.substring(2).toLowerCase()}t.a=function(e){var t=e.children,n=e.disableReactTree,l=void 0!==n&&n,u=e.mouseEvent,d=void 0===u?"onClick":u,f=e.onClickAway,h=e.touchEvent,p=void 0===h?"onTouchEnd":h,m=r.useRef(!1),g=r.useRef(null),v=r.useRef(!1),b=r.useRef(!1);r.useEffect((function(){return setTimeout((function(){v.current=!0}),0),function(){v.current=!1}}),[]);var y=r.useCallback((function(e){g.current=o.findDOMNode(e)}),[]),_=Object(a.a)(t.ref,y),w=Object(s.a)((function(e){var t=b.current;if(b.current=!1,v.current&&g.current&&!function(e){return document.documentElement.clientWidth-1;else n=!Object(i.a)(g.current).documentElement.contains(e.target)||g.current.contains(e.target);n||!l&&t||f(e)}})),S=function(e){return function(n){b.current=!0;var r=t.props[e];r&&r(n)}},k={ref:_};return!1!==p&&(k[p]=S(p)),r.useEffect((function(){if(!1!==p){var e=c(p),t=Object(i.a)(g.current),n=function(){m.current=!0};return t.addEventListener(e,w),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,w),t.removeEventListener("touchmove",n)}}}),[w,p]),!1!==d&&(k[d]=S(d)),r.useEffect((function(){if(!1!==d){var e=c(d),t=Object(i.a)(g.current);return t.addEventListener(e,w),function(){t.removeEventListener(e,w)}}}),[w,d]),r.createElement(r.Fragment,null,r.cloneElement(t,k))}},function(e,t,n){"use strict";var r=n(1),o=n(23),i=n(3),a=n(0),s=(n(4),n(175)),c=n(21),l=n(17),u=n(26),d=n(14),f={entering:{opacity:1},entered:{opacity:1}},h={enter:c.b.enteringScreen,exit:c.b.leavingScreen},p=a.forwardRef((function(e,t){var n=e.children,c=e.disableStrictModeCompat,p=void 0!==c&&c,m=e.in,g=e.onEnter,v=e.onEntered,b=e.onEntering,y=e.onExit,_=e.onExited,w=e.onExiting,S=e.style,k=e.TransitionComponent,x=void 0===k?s.a:k,O=e.timeout,C=void 0===O?h:O,E=Object(i.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),j=Object(l.a)(),R=j.unstable_strictMode&&!p,T=a.useRef(null),A=Object(d.a)(n.ref,t),L=Object(d.a)(R?T:void 0,A),M=function(e){return function(t,n){if(e){var r=R?[T.current,t]:[t,n],i=Object(o.a)(r,2),a=i[0],s=i[1];void 0===s?e(a):e(a,s)}}},$=M(b),D=M((function(e,t){Object(u.b)(e);var n=Object(u.a)({style:S,timeout:C},{mode:"enter"});e.style.webkitTransition=j.transitions.create("opacity",n),e.style.transition=j.transitions.create("opacity",n),g&&g(e,t)})),N=M(v),P=M(w),I=M((function(e){var t=Object(u.a)({style:S,timeout:C},{mode:"exit"});e.style.webkitTransition=j.transitions.create("opacity",t),e.style.transition=j.transitions.create("opacity",t),y&&y(e)})),F=M(_);return a.createElement(x,Object(r.a)({appear:!0,in:m,nodeRef:R?T:void 0,onEnter:D,onEntered:N,onEntering:$,onExit:I,onExited:F,onExiting:P,timeout:C},E),(function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,visibility:"exited"!==e||m?void 0:"hidden"},f[e],S,n.props.style),ref:L},t))}))}));t.a=p},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(2)),s=n(342),c=n(5),l=i.forwardRef((function(e,t){var n=e.disableUnderline,c=e.classes,l=e.fullWidth,u=void 0!==l&&l,d=e.inputComponent,f=void 0===d?"input":d,h=e.multiline,p=void 0!==h&&h,m=e.type,g=void 0===m?"text":m,v=Object(o.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return i.createElement(s.a,Object(r.a)({classes:Object(r.a)({},c,{root:Object(a.a)(c.root,!n&&c.underline),underline:null}),fullWidth:u,inputComponent:f,multiline:p,ref:t,type:g},v))}));l.muiName="Input",t.a=Object(c.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(l)},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(131),a=n(0),s=(n(4),n(2)),c=n(49),l=n(57),u=n(5),d=n(8),f=n(14),h=n(440),p=n(80),m="undefined"===typeof window?a.useEffect:a.useLayoutEffect,g=a.forwardRef((function(e,t){var n=e["aria-describedby"],u=e.autoComplete,g=e.autoFocus,v=e.classes,b=e.className,y=(e.color,e.defaultValue),_=e.disabled,w=e.endAdornment,S=(e.error,e.fullWidth),k=void 0!==S&&S,x=e.id,O=e.inputComponent,C=void 0===O?"input":O,E=e.inputProps,j=void 0===E?{}:E,R=e.inputRef,T=(e.margin,e.multiline),A=void 0!==T&&T,L=e.name,M=e.onBlur,$=e.onChange,D=e.onClick,N=e.onFocus,P=e.onKeyDown,I=e.onKeyUp,F=e.placeholder,z=e.readOnly,W=e.renderSuffix,B=e.rows,H=e.rowsMax,U=e.rowsMin,V=e.maxRows,G=e.minRows,K=e.startAdornment,q=e.type,Y=void 0===q?"text":q,J=e.value,X=Object(r.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),Q=null!=j.value?j.value:J,Z=a.useRef(null!=Q).current,ee=a.useRef(),te=a.useCallback((function(e){0}),[]),ne=Object(f.a)(j.ref,te),re=Object(f.a)(R,ne),oe=Object(f.a)(ee,re),ie=a.useState(!1),ae=ie[0],se=ie[1],ce=Object(l.b)();var le=Object(c.a)({props:e,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});le.focused=ce?ce.focused:ae,a.useEffect((function(){!ce&&_&&ae&&(se(!1),M&&M())}),[ce,_,ae,M]);var ue=ce&&ce.onFilled,de=ce&&ce.onEmpty,fe=a.useCallback((function(e){Object(p.b)(e)?ue&&ue():de&&de()}),[ue,de]);m((function(){Z&&fe({value:Q})}),[Q,fe,Z]);a.useEffect((function(){fe(ee.current)}),[]);var he=C,pe=Object(o.a)({},j,{ref:oe});"string"!==typeof he?pe=Object(o.a)({inputRef:oe,type:Y},pe,{ref:null}):A?!B||V||G||H||U?(pe=Object(o.a)({minRows:B||G,rowsMax:H,maxRows:V},pe),he=h.a):he="textarea":pe=Object(o.a)({type:Y},pe);return a.useEffect((function(){ce&&ce.setAdornedStart(Boolean(K))}),[ce,K]),a.createElement("div",Object(o.a)({className:Object(s.a)(v.root,v["color".concat(Object(d.a)(le.color||"primary"))],b,le.disabled&&v.disabled,le.error&&v.error,k&&v.fullWidth,le.focused&&v.focused,ce&&v.formControl,A&&v.multiline,K&&v.adornedStart,w&&v.adornedEnd,"dense"===le.margin&&v.marginDense),onClick:function(e){ee.current&&e.currentTarget===e.target&&ee.current.focus(),D&&D(e)},ref:t},X),K,a.createElement(l.a.Provider,{value:null},a.createElement(he,Object(o.a)({"aria-invalid":le.error,"aria-describedby":n,autoComplete:u,autoFocus:g,defaultValue:y,disabled:le.disabled,id:x,onAnimationStart:function(e){fe("mui-auto-fill-cancel"===e.animationName?ee.current:{value:"x"})},name:L,placeholder:F,readOnly:z,required:le.required,rows:B,value:Q,onKeyDown:P,onKeyUp:I},pe,{className:Object(s.a)(v.input,j.className,le.disabled&&v.disabled,A&&v.inputMultiline,le.hiddenLabel&&v.inputHiddenLabel,K&&v.inputAdornedStart,w&&v.inputAdornedEnd,"search"===Y&&v.inputTypeSearch,"dense"===le.margin&&v.inputMarginDense),onBlur:function(e){M&&M(e),j.onBlur&&j.onBlur(e),ce&&ce.onBlur?ce.onBlur(e):se(!1)},onChange:function(e){if(!Z){var t=e.target||ee.current;if(null==t)throw new Error(Object(i.a)(1));fe({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o-1){var o=ge[e];if(!Array.isArray(o))return U+ee(o)in t&&V+o;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i
|/);\r\n if (m) {\r\n const result = [];\r\n let key = 1;\r\n do {\r\n const p = text.split(m[0]);\r\n p[0] && result.push({p[0]});\r\n\r\n if (m[0].startsWith(');\r\n } else {\r\n let href = m[0].match(/href=\"([^\"]+)\"/) || m[0].match(/href='([^']+)'/);\r\n let target = m[0].match(/target=\"([^\"]+)\"/) || m[0].match(/target='([^']+)'/);\r\n let rel = m[0].match(/rel=\"([^\"]+)\"/) || m[0].match(/rel='([^']+)'/);\r\n const title = m[0].match(/>([^<]*){title ? title[1] : ''});\r\n }\r\n\r\n text = p[1];\r\n\r\n m = text && text.match(/|/);\r\n if (!m) {\r\n p[1] && result.push({p[1]});\r\n }\r\n } while (m);\r\n\r\n return result;\r\n } else {\r\n return text;\r\n }\r\n }\r\n\r\n /**\r\n * Get the smart name of the given state.\r\n * @param {Record | ioBroker.StateObject} states\r\n * @param {string} id\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static getSmartName(states, id, instanceId, noCommon) {\r\n if (!id) {\r\n if (!noCommon) {\r\n if (!states.common) {\r\n return states.smartName;\r\n } else {\r\n if (states && !states.common) {\r\n return states.smartName;\r\n } else {\r\n return states.common.smartName;\r\n }\r\n }\r\n } else {\r\n if (states && !states.common) {\r\n return states.smartName;\r\n } else {\r\n return (states &&\r\n states.common &&\r\n states.common.custom &&\r\n states.common.custom[instanceId]) ?\r\n states.common.custom[instanceId].smartName : undefined;\r\n }\r\n }\r\n } else\r\n if (!noCommon) {\r\n return states[id].common.smartName;\r\n } else {\r\n return (states[id] &&\r\n states[id].common &&\r\n states[id].common.custom &&\r\n states[id].common.custom[instanceId]) ?\r\n states[id].common.custom[instanceId].smartName || null : null;\r\n }\r\n }\r\n\r\n /**\r\n * Get the smart name from a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static getSmartNameFromObj(obj, instanceId, noCommon) {\r\n if (!noCommon) {\r\n if (!obj.common) {\r\n return obj.smartName;\r\n } else {\r\n if (obj && !obj.common) {\r\n return obj.smartName;\r\n } else {\r\n return obj.common.smartName;\r\n }\r\n }\r\n } else {\r\n if (obj && !obj.common) {\r\n return obj.smartName;\r\n } else {\r\n return (obj &&\r\n obj.common &&\r\n obj.common.custom &&\r\n obj.common.custom[instanceId]) ?\r\n obj.common.custom[instanceId].smartName : undefined;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Enable smart name for a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static enableSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = {};\r\n } else {\r\n obj.common.smartName = {};\r\n }\r\n }\r\n\r\n /**\r\n * Completely remove smart name from a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string | number} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static removeSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n if (obj.common && obj.common.custom && obj.common.custom[instanceId]) {\r\n obj.common.custom[instanceId] = null;\r\n }\r\n } else {\r\n obj.common.smartName = null;\r\n }\r\n }\r\n\r\n /**\r\n * Update the smartname of a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} newSmartName\r\n * @param {string | undefined} byON\r\n * @param {string | undefined} smartType\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static updateSmartName(obj, newSmartName, byON, smartType, instanceId, noCommon) {\r\n const language = I18n.getLanguage();\r\n\r\n // convert Old format\r\n if (typeof obj.common.smartName === 'string') {\r\n const nnn = obj.common.smartName;\r\n obj.common.smartName = {};\r\n obj.common.smartName[language] = nnn;\r\n }\r\n\r\n // convert old settings\r\n if (obj.native && obj.native.byON) {\r\n delete obj.native.byON;\r\n let _smartName = obj.common.smartName;\r\n\r\n if (!_smartName || typeof _smartName !== 'object') {\r\n _smartName = {en: _smartName};\r\n _smartName[language] = _smartName.en;\r\n }\r\n obj.common.smartName = _smartName;\r\n }\r\n if (smartType !== undefined) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n if (!smartType) {\r\n delete obj.common.custom[instanceId].smartName.smartType;\r\n } else {\r\n obj.common.custom[instanceId].smartName.smartType = smartType;\r\n }\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n if (!smartType) {\r\n delete obj.common.smartName.smartType;\r\n } else {\r\n obj.common.smartName.smartType = smartType;\r\n }\r\n\r\n }\r\n }\r\n if (byON !== undefined) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n obj.common.custom[instanceId].smartName.byON = byON;\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n obj.common.smartName.byON = byON;\r\n }\r\n }\r\n if (newSmartName !== undefined) {\r\n let smartName;\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n smartName = obj.common.custom[instanceId].smartName;\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n smartName = obj.common.smartName;\r\n }\r\n smartName[language] = newSmartName;\r\n\r\n // If smart name deleted\r\n if (smartName && (!smartName[language] ||\r\n (smartName[language] === obj.common.name &&\r\n (!obj.common.role || obj.common.role.indexOf('button') >= 0)))) {\r\n delete smartName[language];\r\n let empty = true;\r\n // Check if structure has any definitions\r\n for (const key in smartName) {\r\n if (smartName.hasOwnProperty(key)) {\r\n empty = false;\r\n break;\r\n }\r\n }\r\n // If empty => delete smartName completely\r\n if (empty) {\r\n if (noCommon) {\r\n if (obj.common.custom[instanceId].smartName.byON === undefined) {\r\n delete obj.common.custom[instanceId];\r\n } else {\r\n delete obj.common.custom[instanceId].en;\r\n delete obj.common.custom[instanceId].de;\r\n delete obj.common.custom[instanceId].ru;\r\n delete obj.common.custom[instanceId].nl;\r\n delete obj.common.custom[instanceId].pl;\r\n delete obj.common.custom[instanceId].it;\r\n delete obj.common.custom[instanceId].fr;\r\n delete obj.common.custom[instanceId].pt;\r\n delete obj.common.custom[instanceId].es;\r\n delete obj.common.custom[instanceId]['zh-cn'];\r\n }\r\n } else {\r\n if (obj.common.smartName.byON !== undefined) {\r\n delete obj.common.smartName.en;\r\n delete obj.common.smartName.de;\r\n delete obj.common.smartName.ru;\r\n delete obj.common.smartName.nl;\r\n delete obj.common.smartName.pl;\r\n delete obj.common.smartName.it;\r\n delete obj.common.smartName.fr;\r\n delete obj.common.smartName.pt;\r\n delete obj.common.smartName.es;\r\n delete obj.common.smartName['zh-cn'];\r\n } else {\r\n obj.common.smartName = null;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Disable the smart name of a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static disableSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = false;\r\n } else {\r\n obj.common.smartName = false;\r\n }\r\n }\r\n\r\n /**\r\n * Copy text to the clipboard.\r\n * @param {string} text\r\n * @param {Event} [e]\r\n */\r\n static copyToClipboard(text, e) {\r\n const el = window.document.createElement('textarea');\r\n el.value = text;\r\n window.document.body.appendChild(el);\r\n el.select();\r\n window.document.execCommand('copy');\r\n window.document.body.removeChild(el);\r\n console.log(text);\r\n e && e.stopPropagation();\r\n e && e.preventDefault();\r\n }\r\n\r\n /**\r\n * Gets the extension of a file name.\r\n * @param {string | null} [fileName] the file name.\r\n * @returns {string | null} The extension in lower case.\r\n */\r\n static getFileExtension(fileName) {\r\n const pos = (fileName || '').lastIndexOf('.');\r\n if (pos !== -1) {\r\n return fileName.substring(pos + 1).toLowerCase();\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Format number of bytes as a string with B, KB, MB or GB.\r\n * The base for all calculations is 1024.\r\n * @param {number} bytes The number of bytes.\r\n * @returns {string} The formatted string (e.g. '723.5 KB')\r\n */\r\n static formatBytes(bytes) {\r\n if (Math.abs(bytes) < 1024) {\r\n return bytes + ' B';\r\n }\r\n\r\n const units = ['KB','MB','GB'];\r\n //const units = ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];\r\n let u = -1;\r\n\r\n do {\r\n bytes /= 1024;\r\n ++u;\r\n } while (Math.abs(bytes) >= 1024 && u < units.length - 1);\r\n\r\n return bytes.toFixed(1) + ' ' + units[u];\r\n }\r\n\r\n /**\r\n * Invert the given color according to theme type to get the inverted text color for background\r\n * @param {string} color Color in the format '#rrggbb' or '#rgb' (or without hash)\r\n * @param {string} themeType theme type\r\n * @param {string} invert dark theme has light color in control or light theme has light color in control\r\n * @returns {string}\r\n */\r\n static getInvertedColor(color, themeType, invert) {\r\n if (!color) {\r\n return undefined;\r\n } else {\r\n const invertedColor = Utils.invertColor(color, true);\r\n if (invertedColor === '#FFFFFF' && (themeType === 'dark' || (invert && themeType === 'light'))) {\r\n return '#DDD';\r\n } else\r\n if (invertedColor === '#000000' && (themeType === 'light' || (invert && themeType === 'dark'))) {\r\n return '#222';\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n // Big thanks to: https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color\r\n /**\r\n * Invert the given color\r\n * @param {string} hex Color in the format '#rrggbb' or '#rgb' (or without hash)\r\n * @param {boolean} bw Set to black or white.\r\n * @returns {string}\r\n */\r\n static invertColor(hex, bw) {\r\n if (hex === undefined || hex === null || hex === '' || typeof hex !== 'string') {\r\n return '';\r\n }\r\n if (hex.startsWith('rgba')) {\r\n const m = hex.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*([.\\d]+)\\)/);\r\n if (m) {\r\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0');\r\n }\r\n } else if (hex.startsWith('rgba')) {\r\n const m = hex.match(/rgb?\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)/);\r\n if (m) {\r\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0');\r\n }\r\n } else\r\n if (hex.startsWith('#')) {\r\n hex = hex.slice(1);\r\n }\r\n // convert 3-digit hex to 6-digits.\r\n if (hex.length === 3) {\r\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\r\n }\r\n if (hex.length !== 6) {\r\n console.warn('Cannot invert color: ' + hex);\r\n return hex;\r\n }\r\n let r = parseInt(hex.slice(0, 2), 16);\r\n let g = parseInt(hex.slice(2, 4), 16);\r\n let b = parseInt(hex.slice(4, 6), 16);\r\n\r\n if (bw) {\r\n // http://stackoverflow.com/a/3943023/112731\r\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\r\n ? '#000000'\r\n : '#FFFFFF';\r\n }\r\n // invert color components\r\n r = (255 - r).toString(16);\r\n g = (255 - g).toString(16);\r\n b = (255 - b).toString(16);\r\n // pad each with zeros and return\r\n return '#' + r.padStart(2, '0') + g.padStart(2, '0') + b.padStart(2, '0');\r\n }\r\n\r\n // https://github.com/lukeed/clsx/blob/master/src/index.js\r\n // License\r\n // MIT © Luke Edwards\r\n /**\r\n * @private\r\n * @param {any} mix\r\n * @returns {string}\r\n */\r\n static _toVal(mix) {\r\n let k, y, str='';\r\n\r\n if (typeof mix === 'string' || typeof mix === 'number') {\r\n str += mix;\r\n } else if (typeof mix === 'object') {\r\n if (Array.isArray(mix)) {\r\n for (k=0; k < mix.length; k++) {\r\n if (mix[k]) {\r\n if ((y = Utils._toVal(mix[k]))) {\r\n str && (str += ' ');\r\n str += y;\r\n }\r\n }\r\n }\r\n } else {\r\n for (k in mix) {\r\n if (mix[k]) {\r\n str && (str += ' ');\r\n str += k;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n // https://github.com/lukeed/clsx/blob/master/src/index.js\r\n // License\r\n // MIT © Luke Edwards\r\n /**\r\n * Convert any object to a string with its values.\r\n * @returns {string}\r\n */\r\n static clsx () {\r\n let i = 0;\r\n let tmp;\r\n let x;\r\n let str = '';\r\n while (i < arguments.length) {\r\n if ((tmp = arguments[i++])) {\r\n if ((x = Utils._toVal(tmp))) {\r\n str && (str += ' ');\r\n str += x\r\n }\r\n }\r\n }\r\n return str;\r\n }\r\n\r\n /**\r\n * Get the current theme name (either from local storage or the browser settings).\r\n * @param {string} [themeName]\r\n * @returns {string}\r\n */\r\n static getThemeName(themeName = '') {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return window.vendorPrefix;\r\n }\r\n\r\n return themeName ? themeName : window.localStorage && window.localStorage.getItem('App.themeName') ?\r\n window.localStorage.getItem('App.themeName') : window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'colored';\r\n }\r\n\r\n /**\r\n * Get the type of theme.\r\n * @param {string} [themeName]\r\n * @returns {'dark' | 'light'}\r\n */\r\n static getThemeType(themeName = '') {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return 'light';\r\n }\r\n\r\n themeName = themeName || (window.localStorage && window.localStorage.getItem('App.themeName'));\r\n return themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light';\r\n }\r\n\r\n /**\r\n * Set the theme name and theme type.\r\n * @param {string} themeName\r\n */\r\n static setThemeName(themeName) {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return; // ignore\r\n }\r\n window.localStorage.setItem('App.themeName', themeName);\r\n window.localStorage.setItem('App.theme', themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light');\r\n }\r\n\r\n /**\r\n * Toggle the theme name between 'dark' and 'colored'.\r\n * @param {string | null} themeName\r\n * @returns {string} the new theme name.\r\n */\r\n static toggleTheme(themeName) {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return window.vendorPrefix;\r\n }\r\n themeName = themeName || (window.localStorage && window.localStorage.getItem('App.themeName'));\r\n\r\n // dark => blue => colored => light => dark\r\n const themes = Utils.getThemeNames();\r\n const pos = themes.indexOf(themeName);\r\n let newTheme;\r\n if (pos !== -1) {\r\n newTheme = themes[(pos + 1) % themes.length];\r\n } else {\r\n newTheme = themes[0];\r\n }\r\n Utils.setThemeName(newTheme);\r\n\r\n return newTheme;\r\n }\r\n\r\n /**\r\n * Get the list of themes\r\n * @returns {array} list of possible themes\r\n */\r\n static getThemeNames() {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return [window.vendorPrefix];\r\n }\r\n\r\n return ['light', 'dark', 'blue', 'colored'];\r\n }\r\n\r\n /**\r\n * Parse a query string into its parts.\r\n * @param {string} query\r\n * @returns {Record}\r\n */\r\n static parseQuery(query) {\r\n query = (query || '').toString().replace(/^\\?/, '');\r\n /** @type {Record} */\r\n const result = {};\r\n query.split('&').forEach(part => {\r\n part = part.trim();\r\n if (part) {\r\n const parts = part.split('=');\r\n const attr = decodeURIComponent(parts[0]).trim();\r\n if (parts.length > 1) {\r\n result[attr] = decodeURIComponent(parts[1]);\r\n if (result[attr] === 'true') {\r\n result[attr] = true;\r\n } else if (result[attr] === 'false') {\r\n result[attr] = false;\r\n } else {\r\n const f = parseFloat(result[attr]);\r\n if (f.toString() === result[attr]) {\r\n result[attr] = f;\r\n }\r\n }\r\n } else {\r\n result[attr] = true;\r\n }\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns parent ID.\r\n * @param {string} id\r\n * @returns {string | null} parent ID or null if no parent\r\n */\r\n static getParentId(id) {\r\n const p = (id || '').toString().split('.');\r\n if (p.length > 1) {\r\n p.pop();\r\n return p.join('.');\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n static formatDate(dateObj, dateFormat) {\r\n // format could be DD.MM.YYYY, YYYY.MM.DD or MM/DD/YYYY\r\n\r\n if (!dateObj) {\r\n return '';\r\n }\r\n\r\n let text;\r\n let mm = dateObj.getMonth() + 1;\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n\r\n let dd = dateObj.getDate();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n\r\n if (dateFormat === 'MM/DD/YYYY') {\r\n text = mm + '/' + dd + '/' + dateObj.getFullYear();\r\n } else {\r\n text = dateObj.getFullYear() + '-' + mm + '-' + dd;\r\n }\r\n\r\n // time\r\n let v = dateObj.getHours();\r\n if (v < 10) {\r\n text += ' 0' + v;\r\n } else {\r\n text += ' ' + v;\r\n }\r\n v = dateObj.getMinutes();\r\n if (v < 10) {\r\n text += ':0' + v;\r\n } else {\r\n text += ':' + v;\r\n }\r\n\r\n v = dateObj.getSeconds();\r\n if (v < 10) {\r\n text += ':0' + v;\r\n } else {\r\n text += ':' + v;\r\n }\r\n\r\n v = dateObj.getMilliseconds();\r\n if (v < 10) {\r\n text += '.00' + v;\r\n } else if (v < 100) {\r\n text += '.0' + v;\r\n } else {\r\n text += '.' + v;\r\n }\r\n\r\n return text;\r\n }\r\n\r\n static formatTime(seconds) {\r\n if (seconds) {\r\n seconds = Math.round(seconds);\r\n const d = Math.floor(seconds / (3600 * 24));\r\n const h = Math.floor((seconds % (3600 * 24)) / 3600);\r\n const m = Math.floor((seconds % 3600) / 60);\r\n const s = seconds % 60;\r\n if (d) {\r\n return `${d}.${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n } else if (h) {\r\n return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n } else {\r\n return `0:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n }\r\n } else {\r\n return '0:00:00';\r\n }\r\n }\r\n\r\n static MDtext2link(text) {\r\n const m = text.match(/\\d+\\.\\)\\s/);\r\n if (m) {\r\n text = text.replace(m[0], m[0].replace(/\\s/, ' '));\r\n }\r\n\r\n return text.replace(/[^a-zA-Zа-яА-Я0-9]/g, '').trim().replace(/\\s/g, '').toLowerCase();\r\n }\r\n\r\n static openLink(url, target) {\r\n if (target === 'this') {\r\n window.location = url;\r\n } else {\r\n window.open(url, target || '_blank');\r\n }\r\n }\r\n\r\n static MDgetTitle(text) {\r\n let {body, header} = Utils.extractHeader(text);\r\n if (!header.title) {\r\n // remove {docsify-bla}\r\n body = body.replace(/{[^}]*}/g, '');\r\n body = body.trim();\r\n const lines = body.replace(/\\r/g, '').split('\\n');\r\n for (let i = 0; i < lines.length; i++) {\r\n if (lines[i].startsWith('# ')) {\r\n return lines[i].substring(2).trim();\r\n }\r\n }\r\n return '';\r\n } else {\r\n return header.title;\r\n }\r\n }\r\n\r\n static MDextractHeader(text) {\r\n const attrs = {};\r\n if (text.substring(0, 3) === '---') {\r\n const pos = text.substring(3).indexOf('\\n---');\r\n if (pos !== -1) {\r\n const _header = text.substring(3, pos + 3);\r\n const lines = _header.replace(/\\r/g, '').split('\\n');\r\n lines.forEach(line => {\r\n if (!line.trim()) {\r\n return;\r\n }\r\n const pos = line.indexOf(':');\r\n if (pos !== -1) {\r\n const attr = line.substring(0, pos).trim();\r\n attrs[attr] = line.substring(pos + 1).trim();\r\n attrs[attr] = attrs[attr].replace(/^['\"]|['\"]$/g, '');\r\n if (attrs[attr] === 'true') {\r\n attrs[attr] = true;\r\n } else if (attrs[attr] === 'false') {\r\n attrs[attr] = false;\r\n } else if (parseFloat(attrs[attr]).toString() === attrs[attr]) {\r\n attrs[attr] = parseFloat(attrs[attr]);\r\n }\r\n } else {\r\n attrs[line.trim()] = true;\r\n }\r\n });\r\n text = text.substring(pos + 7);\r\n }\r\n }\r\n return {header: attrs, body: text};\r\n }\r\n\r\n static MDremoveDocsify(text) {\r\n const m = text.match(/{docsify-[^}]*}/g);\r\n if (m) {\r\n m.forEach(doc => text = text.replace(doc, ''));\r\n }\r\n return text;\r\n }\r\n\r\n /**\r\n * Generate the json file on the file for download.\r\n * @param {string} filename file name\r\n * @returns {object} json structure (not stringified)\r\n */\r\n static generateFile(filename, json) {\r\n let el = document.createElement('a');\r\n el.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(json, null, 2)));\r\n el.setAttribute('download', filename);\r\n\r\n el.style.display = 'none';\r\n document.body.appendChild(el);\r\n\r\n el.click();\r\n\r\n document.body.removeChild(el);\r\n }\r\n\r\n /**\r\n * Convert quality code into text\r\n * @param {number} quality code\r\n * @returns {array} lines that decode qulity\r\n */\r\n static quality2text(quality) {\r\n const custom = quality & 0xFFFF0000;\r\n const text = QUALITY_BITS[quality];\r\n let result;\r\n if (text) {\r\n result = [text];\r\n } else if (quality & 0x01) {\r\n result = [QUALITY_BITS[0x01], '0x' + (quality & (0xFFFF & ~1)).toString(16)];\r\n } else if (quality & 0x02) {\r\n result = [QUALITY_BITS[0x02], '0x' + (quality & (0xFFFF & ~2)).toString(16)];\r\n } else {\r\n result = ['0x' + quality.toString(16)];\r\n }\r\n if (custom) {\r\n result.push('0x' + (custom >> 16).toString(16).toUpperCase());\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Deep copy object\r\n * @param {object} object\r\n * @returns {object}\r\n */\r\n static clone(object) {\r\n return JSON.parse(JSON.stringify(object));\r\n }\r\n\r\n /**\r\n * Get states of object\r\n * @param {object} obj\r\n * @returns {object} states as an object in form {\"value1\": \"label1\", \"value2\": \"label2\"} or null\r\n */\r\n static getStates(obj) {\r\n let states = obj?.common?.states;\r\n if (states) {\r\n if (typeof states === 'string' && states[0] === '{') {\r\n try {\r\n states = JSON.parse(states);\r\n } catch (ex) {\r\n console.error(`Cannot parse states: ${states}`);\r\n states = null;\r\n }\r\n } else\r\n // if old format val1:text1;val2:text2\r\n if (typeof states === 'string') {\r\n const parts = states.split(';');\r\n states = {};\r\n for (let p = 0; p < parts.length; p++) {\r\n const s = parts[p].split(':');\r\n states[s[0]] = s[1];\r\n }\r\n } else if (Array.isArray(states)) {\r\n const result = {};\r\n states.forEach((value, key) => result[key] = value);\r\n return result;\r\n }\r\n }\r\n return states;\r\n }\r\n\r\n /**\r\n * Get svg file as text\r\n * @param {string} url URL of SVG file\r\n * @returns {object} Promise with \"data:image...\"\r\n */\r\n static getSvg(url) {\r\n return fetch(url)\r\n .then(response => response.blob())\r\n .then(blob => {\r\n return new Promise(resolve => {\r\n const reader = new FileReader();\r\n reader.onload = function() { // do not optimize this function. \"this\" is important.\r\n resolve(this.result);\r\n };\r\n reader.readAsDataURL(blob);\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport default Utils;\r\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import * as React from 'react';\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nexport default function useId(idOverride) {\n var _React$useState = React.useState(idOverride),\n defaultId = _React$useState[0],\n setDefaultId = _React$useState[1];\n\n var id = idOverride || defaultId;\n React.useEffect(function () {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the random value for client-side rendering only.\n // We can't use it server-side.\n setDefaultId(\"mui-\".concat(Math.round(Math.random() * 1e5)));\n }\n }, [defaultId]);\n return id;\n}","import { deepmerge } from '@material-ui/utils';\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n\n });\n}\n\nexport default merge;","export { default } from './Button';","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc.defaultView || window;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","export { default } from './Dialog';","export { default } from './DialogActions';","export { default } from './DialogContent';","export { default } from './DialogContentText';","export { default } from './DialogTitle';","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return _extends({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return _extends({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, _defineProperty({}, breakpoints.up('sm'), _extends({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, _defineProperty(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), _defineProperty(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\nimport { deepmerge } from '@material-ui/utils';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport indigo from '../colors/indigo';\nimport pink from '../colors/pink';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport green from '../colors/green';\nimport { darken, getContrastRatio, lighten } from './colorManipulator';\nexport var light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: grey[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport var dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: grey[800],\n default: '#303030'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\n\nexport default function createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: indigo[300],\n main: indigo[500],\n dark: indigo[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: pink.A200,\n main: pink.A400,\n dark: pink.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: red[300],\n main: red[500],\n dark: red[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: orange[300],\n main: orange[500],\n dark: orange[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: blue[300],\n main: blue[500],\n dark: blue[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: green[300],\n main: green[500],\n dark: green[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = _objectWithoutProperties(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n\n function getContrastText(background) {\n var contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = getContrastRatio(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = _extends({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : _formatMuiErrorMessage(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: common,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nexport default function createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = _objectWithoutProperties(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return _extends({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return deepmerge(_extends({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","var shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","var shape = {\n borderRadius: 4\n};\nexport default shape;","import { createUnarySpacing } from '@material-ui/system';\nvar warnOnce;\nexport default function createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = createUnarySpacing({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\nimport createBreakpoints from './createBreakpoints';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport transitions from './transitions';\nimport zIndex from './zIndex';\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = _objectWithoutProperties(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n\n var palette = createPalette(paletteInput);\n var breakpoints = createBreakpoints(breakpointsInput);\n var spacing = createSpacing(spacingInput);\n var muiTheme = deepmerge({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: createMixins(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: shadows,\n typography: createTypography(palette, typographyInput),\n spacing: spacing,\n shape: shape,\n transitions: transitions,\n zIndex: zIndex\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return deepmerge(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: _defineProperty({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\nexport function createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\nexport default createTheme;","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","var common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj) {\n var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\"\n}), 'Delete');\n\nexports.default = _default;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\nexport default isBrowser;\n","import { isRegExp, isString } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n // eslint-disable-next-line no-param-reassign\n colno = ll;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString: string): string {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n","export { default } from './FormControl';\nexport { default as useFormControl } from './useFormControl';","export { default } from './Modal';\nexport { default as ModalManager } from './ModalManager';","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport PropTypes from 'prop-types';\nimport merge from './merge'; // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nvar values = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n};\nvar defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: function up(key) {\n return \"@media (min-width:\".concat(values[key], \"px)\");\n }\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n if (process.env.NODE_ENV !== 'production') {\n if (!props.theme) {\n console.error('Material-UI: You are calling a style function without a theme value.');\n }\n }\n\n if (Array.isArray(propValue)) {\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n return propValue.reduce(function (acc, item, index) {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (_typeof(propValue) === 'object') {\n var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n\n return Object.keys(propValue).reduce(function (acc, breakpoint) {\n acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);\n return acc;\n }, {});\n }\n\n var output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var base = styleFunction(props);\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n var extended = themeBreakpoints.keys.reduce(function (acc, key) {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme: props.theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return merge(base, extended);\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n\nexport default breakpoints;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","import React from 'react';\nimport { ProviderContext } from '.';\n\n// @ts-ignore\nexport default React.createContext();\n","import Slide from '@material-ui/core/Slide';\nimport { SnackbarClassKey } from '@material-ui/core/Snackbar';\nimport { CloseReason, ContainerClassKey, SnackbarProviderProps, VariantType, SnackbarOrigin, VariantClassKey } from '../index';\nimport { SnackbarItemProps } from '../SnackbarItem';\nimport { Snack } from '../SnackbarProvider';\n\nexport const allClasses: {\n mui: Record;\n container: Record;\n} = {\n mui: {\n root: {},\n anchorOriginTopCenter: {},\n anchorOriginBottomCenter: {},\n anchorOriginTopRight: {},\n anchorOriginBottomRight: {},\n anchorOriginTopLeft: {},\n anchorOriginBottomLeft: {},\n },\n container: {\n containerRoot: {},\n containerAnchorOriginTopCenter: {},\n containerAnchorOriginBottomCenter: {},\n containerAnchorOriginTopRight: {},\n containerAnchorOriginBottomRight: {},\n containerAnchorOriginTopLeft: {},\n containerAnchorOriginBottomLeft: {},\n },\n};\n\nexport const MESSAGES = {\n NO_PERSIST_ALL: 'WARNING - notistack: Reached maxSnack while all enqueued snackbars have \\'persist\\' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented.',\n};\n\nexport const SNACKBAR_INDENTS = {\n view: { default: 20, dense: 4 },\n snackbar: { default: 6, dense: 2 },\n};\n\nexport const DEFAULTS = {\n maxSnack: 3,\n dense: false,\n hideIconVariant: false,\n variant: 'default' as VariantType,\n autoHideDuration: 5000,\n anchorOrigin: { vertical: 'bottom', horizontal: 'left' } as SnackbarOrigin,\n TransitionComponent: Slide,\n transitionDuration: {\n enter: 225,\n exit: 195,\n },\n};\n\nexport const capitalise = (text: string): string => text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const originKeyExtractor = (anchor: Snack['anchorOrigin']): string => (\n `${capitalise(anchor.vertical)}${capitalise(anchor.horizontal)}`\n);\n\n/**\n * Omit SnackbarContainer class keys that are not needed for SnackbarItem\n */\nexport const omitContainerKeys = (classes: SnackbarProviderProps['classes']): SnackbarItemProps['classes'] => (\n // @ts-ignore\n Object.keys(classes).filter(key => !allClasses.container[key]).reduce((obj, key) => ({ ...obj, [key]: classes[key] }), {})\n);\n\nexport const REASONS: { [key: string]: CloseReason } = {\n TIMEOUT: 'timeout',\n CLICKAWAY: 'clickaway',\n MAXSNACK: 'maxsnack',\n INSTRUCTED: 'instructed',\n};\n\n/** Tranforms classes name */\nexport const transformer = {\n toContainerAnchorOrigin: (origin: string) => `containerAnchorOrigin${origin}` as ContainerClassKey,\n toAnchorOrigin: ({ vertical, horizontal }: SnackbarOrigin) => (\n `anchorOrigin${capitalise(vertical)}${capitalise(horizontal)}` as SnackbarClassKey\n ),\n toVariant: (variant: VariantType) => `variant${capitalise(variant)}` as VariantClassKey,\n};\n\nexport const isDefined = (value: string | null | undefined | number): boolean => (!!value || value === 0);\n\nconst numberOrNull = (numberish?: number | null) => (\n typeof numberish === 'number' || numberish === null\n);\n\n// @ts-ignore\nexport const merge = (options, props, defaults) => (name: keyof Snack): any => {\n if (name === 'autoHideDuration') {\n if (numberOrNull(options.autoHideDuration)) return options.autoHideDuration;\n if (numberOrNull(props.autoHideDuration)) return props.autoHideDuration;\n return DEFAULTS.autoHideDuration;\n }\n\n return options[name] || props[name] || defaults[name];\n};\n\nexport function objectMerge(options = {}, props = {}, defaults = {}) {\n return {\n ...defaults,\n ...props,\n ...options,\n };\n}\n","import React, { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { createStyles, Theme, withStyles, WithStyles } from '@material-ui/core/styles';\nimport { SnackbarContentProps } from '../index';\n\nconst styles = (theme: Theme) => createStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n flexGrow: 1,\n [theme.breakpoints.up('sm')]: {\n flexGrow: 'initial',\n minWidth: 288,\n },\n }\n});\n\ninterface Props extends WithStyles, SnackbarContentProps { }\n\nconst SnackbarContent = forwardRef(({ classes, className, ...props }, ref) => (\n
\n))\n\nexport default withStyles(styles)(SnackbarContent);\n","import { Snack } from '../SnackbarProvider';\n\nconst DIRECTION = {\n right: 'left',\n left: 'right',\n bottom: 'up',\n top: 'down',\n} as const;\nexport type DirectionType = typeof DIRECTION[keyof typeof DIRECTION]\n\nexport const getTransitionDirection = (anchorOrigin: Snack['anchorOrigin']): DirectionType => {\n if (anchorOrigin.horizontal !== 'center') {\n return DIRECTION[anchorOrigin.horizontal];\n }\n return DIRECTION[anchorOrigin.vertical];\n};\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\nimport { IconVariant } from '../index';\n\ntype Icon = (props: SvgIconProps) => JSX.Element;\n\nconst CheckIcon: Icon = props => (\n \n \n \n);\n\nconst WarningIcon: Icon = props => (\n \n \n \n);\n\nconst ErrorIcon: Icon = props => (\n \n \n \n);\n\nconst InfoIcon: Icon = props => (\n \n \n \n);\n\nconst iconStyles = {\n fontSize: 20,\n marginInlineEnd: 8,\n};\n\nconst defaultIconVariants: IconVariant = {\n default: undefined,\n success: ,\n warning: ,\n error: ,\n info: ,\n};\n\nexport default defaultIconVariants;\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/createChainedFunction.js\n */\nexport default function createChainedFunction(funcs, extraArg) {\n return funcs.reduce((acc, func) => {\n if (func == null) return acc;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof func !== 'function') {\n // eslint-disable-next-line no-console\n console.error('Invalid Argument Type. must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction(...args) {\n const argums = [...args];\n if (extraArg && argums.indexOf(extraArg) === -1) {\n argums.push(extraArg);\n }\n acc.apply(this, argums);\n func.apply(this, argums);\n };\n }, () => { });\n}\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/useEventCallback.js\n */\nimport * as React from 'react';\n\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\nexport default function useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useCallback((...args) => (0, ref.current)(...args), []);\n}\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Snackbar/Snackbar.js\n */\nimport * as React from 'react';\nimport ClickAwayListener from '@material-ui/core/ClickAwayListener';\nimport { REASONS } from '../utils/constants';\nimport useEventCallback from '../utils/useEventCallback';\n\nconst Snackbar = React.forwardRef((props, ref) => {\n const {\n children,\n autoHideDuration,\n ClickAwayListenerProps,\n disableWindowBlurListener = false,\n onClose,\n onMouseEnter,\n onMouseLeave,\n open,\n resumeHideDuration,\n ...other\n } = props;\n\n const timerAutoHide = React.useRef();\n\n const handleClose = useEventCallback((...args) => {\n if (onClose) {\n onClose(...args);\n }\n });\n\n const setAutoHideTimer = useEventCallback((autoHideDurationParam) => {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(() => {\n handleClose(null, REASONS.TIMEOUT);\n }, autoHideDurationParam);\n });\n\n React.useEffect(() => {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return () => {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]);\n\n /**\n * Pause the timer when the user is interacting with the Snackbar\n * or when the user hide the window.\n */\n const handlePause = () => {\n clearTimeout(timerAutoHide.current);\n };\n\n /**\n * Restart the timer when the user is no longer interacting with the Snackbar\n * or when the window is shown back.\n */\n const handleResume = React.useCallback(() => {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n const handleMouseEnter = (event) => {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n handlePause();\n };\n\n const handleMouseLeave = (event) => {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n handleResume();\n };\n\n const handleClickAway = (event) => {\n if (onClose) {\n onClose(event, REASONS.CLICKAWAY);\n }\n };\n\n React.useEffect(() => {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n\n return () => {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]);\n\n return (\n \n
\n {children}\n
\n
\n );\n});\n\nexport default Snackbar;\n","import React, { useState, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport { withStyles, WithStyles, createStyles, Theme, emphasize } from '@material-ui/core/styles';\nimport Collapse from '@material-ui/core/Collapse';\nimport SnackbarContent from '../SnackbarContent';\nimport { getTransitionDirection } from './SnackbarItem.util';\nimport { allClasses, REASONS, objectMerge, DEFAULTS, transformer } from '../utils/constants';\nimport { SharedProps, RequiredBy, TransitionHandlerProps, SnackbarProviderProps as ProviderProps } from '../index';\nimport defaultIconVariants from '../utils/defaultIconVariants';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport { Snack } from '../SnackbarProvider';\nimport Snackbar from './Snackbar';\n\nconst styles = (theme: Theme) => {\n // @ts-ignore\n const mode = theme.palette.mode || theme.palette.type;\n const backgroundColor = emphasize(theme.palette.background.default, mode === 'light' ? 0.8 : 0.98);\n return createStyles({\n ...allClasses.mui,\n contentRoot: {\n ...theme.typography.body2,\n backgroundColor,\n color: theme.palette.getContrastText(backgroundColor),\n alignItems: 'center',\n padding: '6px 16px',\n borderRadius: '4px',\n boxShadow: '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)',\n },\n lessPadding: {\n paddingLeft: 8 * 2.5,\n },\n variantSuccess: {\n backgroundColor: '#43a047', // green\n color: '#fff',\n },\n variantError: {\n backgroundColor: '#d32f2f', // dark red\n color: '#fff',\n },\n variantInfo: {\n backgroundColor: '#2196f3', // nice blue\n color: '#fff',\n },\n variantWarning: {\n backgroundColor: '#ff9800', // amber\n color: '#fff',\n },\n message: {\n display: 'flex',\n alignItems: 'center',\n padding: '8px 0',\n },\n action: {\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: 16,\n marginRight: -8,\n },\n wrappedRoot: {\n position: 'relative',\n transform: 'translateX(0)',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n },\n });\n}\n\n\ntype RemovedProps =\n | 'variant' // the one received from Provider is processed and passed to snack prop \n | 'anchorOrigin' // same as above\n | 'autoHideDuration' // same as above\n | 'preventDuplicate' // the one recevied from enqueueSnackbar is processed in provider, therefore shouldn't be passed to SnackbarItem */\n\n\nexport interface SnackbarItemProps extends WithStyles, RequiredBy, 'onEntered' | 'onExited' | 'onClose'> {\n snack: Snack;\n dense: ProviderProps['dense'];\n iconVariant: ProviderProps['iconVariant'];\n hideIconVariant: ProviderProps['hideIconVariant'];\n}\n\nconst SnackbarItem: React.FC = ({ classes, ...props }) => {\n const timeout = useRef>();\n const [collapsed, setCollapsed] = useState(true);\n\n useEffect(() => (): void => {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n }, []);\n\n const handleClose = createChainedFunction([props.snack.onClose, props.onClose], props.snack.key);\n\n const handleEntered: TransitionHandlerProps['onEntered'] = () => {\n if (props.snack.requestClose) {\n handleClose(null, REASONS.INSTRCUTED);\n }\n };\n\n const handleExitedScreen = (): void => {\n timeout.current = setTimeout(() => {\n setCollapsed(!collapsed);\n }, 125);\n };\n\n const {\n style,\n dense,\n ariaAttributes: otherAriaAttributes,\n className: otherClassName,\n hideIconVariant,\n iconVariant,\n snack,\n action: otherAction,\n content: otherContent,\n TransitionComponent: otherTranComponent,\n TransitionProps: otherTranProps,\n transitionDuration: otherTranDuration,\n onEnter: ignoredOnEnter,\n onEntered: ignoredOnEntered,\n onEntering: ignoredOnEntering,\n onExit: ignoredOnExit,\n onExited: ignoredOnExited,\n onExiting: ignoredOnExiting,\n ...other\n } = props;\n\n const {\n persist,\n key,\n open,\n entered,\n requestClose,\n className: singleClassName,\n variant,\n content: singleContent,\n action: singleAction,\n ariaAttributes: singleAriaAttributes,\n anchorOrigin,\n message: snackMessage,\n TransitionComponent: singleTranComponent,\n TransitionProps: singleTranProps,\n transitionDuration: singleTranDuration,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n ...singleSnackProps\n } = snack;\n\n const icon = {\n ...defaultIconVariants,\n ...iconVariant,\n }[variant];\n\n const ariaAttributes = {\n 'aria-describedby': 'notistack-snackbar',\n ...objectMerge(singleAriaAttributes, otherAriaAttributes),\n };\n\n const TransitionComponent = singleTranComponent || otherTranComponent || DEFAULTS.TransitionComponent;\n const transitionDuration = objectMerge(singleTranDuration, otherTranDuration, DEFAULTS.transitionDuration);\n const transitionProps = {\n direction: getTransitionDirection(anchorOrigin),\n ...objectMerge(singleTranProps, otherTranProps),\n };\n\n let action = singleAction || otherAction;\n if (typeof action === 'function') {\n action = action(key);\n }\n\n let content = singleContent || otherContent;\n if (typeof content === 'function') {\n content = content(key, snack.message);\n }\n\n const callbacks: { [key in keyof TransitionHandlerProps]?: any } =\n ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].reduce((acc, cbName) => ({\n ...acc,\n // @ts-ignore\n [cbName]: createChainedFunction([props.snack[cbName], props[cbName]], props.snack.key),\n }), {});\n\n return (\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n {content || (\n \n
\n {!hideIconVariant ? icon : null}\n {snackMessage}\n
\n {action && (\n
{action}
\n )}\n \n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(SnackbarItem);\n","import React from 'react';\nimport clsx from 'clsx';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { SNACKBAR_INDENTS } from './utils/constants';\nimport { SnackbarProviderProps } from '.';\n\nconst collapse = {\n // Material-UI 4.12.x and above uses MuiCollapse-root; earlier versions use\n // Mui-Collapse-container. https://github.com/mui-org/material-ui/pull/24084\n container: '& > .MuiCollapse-container, & > .MuiCollapse-root',\n wrapper: '& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper',\n};\n\nconst xsWidthMargin = 16;\n\nconst useStyle = makeStyles((theme) => ({\n root: {\n boxSizing: 'border-box',\n display: 'flex',\n maxHeight: '100%',\n position: 'fixed',\n zIndex: theme.zIndex.snackbar,\n height: 'auto',\n width: 'auto',\n transition: 'top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms',\n // container itself is invisible and should not block clicks, clicks should be passed to its children\n pointerEvents: 'none',\n [collapse.container]: {\n pointerEvents: 'all',\n },\n [collapse.wrapper]: {\n padding: `${SNACKBAR_INDENTS.snackbar.default}px 0px`,\n transition: 'padding 300ms ease 0ms',\n },\n maxWidth: `calc(100% - ${SNACKBAR_INDENTS.view.default * 2}px)`,\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n maxWidth: `calc(100% - ${xsWidthMargin * 2}px)`,\n },\n },\n rootDense: {\n [collapse.wrapper]: {\n padding: `${SNACKBAR_INDENTS.snackbar.dense}px 0px`,\n },\n },\n top: {\n top: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default,\n flexDirection: 'column',\n },\n bottom: {\n bottom: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default,\n flexDirection: 'column-reverse',\n },\n left: {\n left: SNACKBAR_INDENTS.view.default,\n [theme.breakpoints.up('sm')]: {\n alignItems: 'flex-start',\n },\n [theme.breakpoints.down('xs')]: {\n left: `${xsWidthMargin}px`,\n },\n },\n right: {\n right: SNACKBAR_INDENTS.view.default,\n [theme.breakpoints.up('sm')]: {\n alignItems: 'flex-end',\n },\n [theme.breakpoints.down('xs')]: {\n right: `${xsWidthMargin}px`,\n },\n },\n center: {\n left: '50%',\n transform: 'translateX(-50%)',\n [theme.breakpoints.up('sm')]: {\n alignItems: 'center',\n },\n },\n}));\n\ninterface SnackbarContainerProps {\n children: JSX.Element | JSX.Element[];\n className?: string;\n dense: SnackbarProviderProps['dense'];\n anchorOrigin: NonNullable;\n}\n\nconst SnackbarContainer: React.FC = (props) => {\n const classes = useStyle();\n const { className, anchorOrigin, dense, ...other } = props;\n\n const combinedClassname = clsx(\n classes[anchorOrigin.vertical],\n classes[anchorOrigin.horizontal],\n { [classes.rootDense]: dense },\n classes.root, // root should come after others to override maxWidth\n className,\n );\n\n return (\n
\n );\n};\n\nexport default React.memo(SnackbarContainer);\n","import React, { Component } from 'react';\nimport { createPortal } from 'react-dom';\nimport clsx from 'clsx';\nimport SnackbarContext from './SnackbarContext';\nimport { MESSAGES, REASONS, originKeyExtractor, omitContainerKeys, DEFAULTS, merge, transformer, isDefined } from './utils/constants';\nimport SnackbarItem from './SnackbarItem';\nimport SnackbarContainer from './SnackbarContainer';\nimport warning from './utils/warning';\nimport { SnackbarProviderProps, SnackbarKey, SnackbarMessage, OptionsObject, RequiredBy, ProviderContext, TransitionHandlerProps } from '.';\nimport createChainedFunction from './utils/createChainedFunction';\n\ntype Reducer = (state: State) => State;\ntype SnacksByPosition = { [key: string]: Snack[] };\n\nexport interface Snack extends RequiredBy {\n message: SnackbarMessage;\n open: boolean;\n entered: boolean;\n requestClose: boolean;\n}\n\ninterface State {\n snacks: Snack[];\n queue: Snack[];\n contextValue: ProviderContext;\n}\n\nclass SnackbarProvider extends Component {\n constructor(props: SnackbarProviderProps) {\n super(props);\n this.state = {\n snacks: [],\n queue: [], // eslint-disable-line react/no-unused-state\n contextValue: {\n enqueueSnackbar: this.enqueueSnackbar,\n closeSnackbar: this.closeSnackbar,\n },\n };\n }\n\n get maxSnack(): number {\n return this.props.maxSnack || DEFAULTS.maxSnack;\n }\n\n /**\n * Adds a new snackbar to the queue to be presented.\n * Returns generated or user defined key referencing the new snackbar or null\n */\n enqueueSnackbar = (message: SnackbarMessage, opts: OptionsObject = {}): SnackbarKey => {\n const {\n key,\n preventDuplicate,\n ...options\n } = opts;\n\n const hasSpecifiedKey = isDefined(key);\n const id = hasSpecifiedKey ? (key as SnackbarKey) : new Date().getTime() + Math.random();\n\n const merger = merge(options, this.props, DEFAULTS);\n const snack: Snack = {\n key: id,\n ...options,\n message,\n open: true,\n entered: false,\n requestClose: false,\n variant: merger('variant'),\n anchorOrigin: merger('anchorOrigin'),\n autoHideDuration: merger('autoHideDuration'),\n };\n\n if (options.persist) {\n snack.autoHideDuration = undefined;\n }\n\n this.setState((state) => {\n if ((preventDuplicate === undefined && this.props.preventDuplicate) || preventDuplicate) {\n const compareFunction = (item: Snack): boolean => (\n hasSpecifiedKey ? item.key === key : item.message === message\n );\n\n const inQueue = state.queue.findIndex(compareFunction) > -1;\n const inView = state.snacks.findIndex(compareFunction) > -1;\n if (inQueue || inView) {\n return state;\n }\n }\n\n return this.handleDisplaySnack({\n ...state,\n queue: [...state.queue, snack],\n });\n });\n\n return id;\n };\n\n /**\n * Reducer: Display snack if there's space for it. Otherwise, immediately\n * begin dismissing the oldest message to start showing the new one.\n */\n handleDisplaySnack: Reducer = (state) => {\n const { snacks } = state;\n if (snacks.length >= this.maxSnack) {\n return this.handleDismissOldest(state);\n }\n return this.processQueue(state);\n };\n\n /**\n * Reducer: Display items (notifications) in the queue if there's space for them.\n */\n processQueue: Reducer = (state) => {\n const { queue, snacks } = state;\n if (queue.length > 0) {\n return {\n ...state,\n snacks: [...snacks, queue[0]],\n queue: queue.slice(1, queue.length),\n };\n }\n return state;\n };\n\n /**\n * Reducer: Hide oldest snackbar on the screen because there exists a new one which we have to display.\n * (ignoring the one with 'persist' flag. i.e. explicitly told by user not to get dismissed).\n *\n * Note 1: If there is already a message leaving the screen, no new messages are dismissed.\n * Note 2: If the oldest message has not yet entered the screen, only a request to close the\n * snackbar is made. Once it entered the screen, it will be immediately dismissed.\n */\n handleDismissOldest: Reducer = (state) => {\n if (state.snacks.some(item => !item.open || item.requestClose)) {\n return state;\n }\n\n let popped = false;\n let ignore = false;\n\n const persistentCount = state.snacks.reduce((acc, current) => (\n acc + (current.open && current.persist ? 1 : 0)\n ), 0);\n\n if (persistentCount === this.maxSnack) {\n warning(MESSAGES.NO_PERSIST_ALL);\n ignore = true;\n }\n\n const snacks = state.snacks.map((item) => {\n if (!popped && (!item.persist || ignore)) {\n popped = true;\n\n if (!item.entered) {\n return {\n ...item,\n requestClose: true,\n };\n }\n\n if (item.onClose) item.onClose(null, REASONS.MAXSNACK, item.key);\n if (this.props.onClose) this.props.onClose(null, REASONS.MAXSNACK, item.key);\n\n return {\n ...item,\n open: false,\n };\n }\n\n return { ...item };\n });\n\n return { ...state, snacks };\n };\n\n /**\n * Set the entered state of the snackbar with the given key.\n */\n handleEnteredSnack: TransitionHandlerProps['onEntered'] = (node, isAppearing, key) => {\n if (!isDefined(key)) {\n throw new Error('handleEnteredSnack Cannot be called with undefined key');\n }\n\n this.setState(({ snacks }) => ({\n snacks: snacks.map(item => (\n item.key === key ? { ...item, entered: true } : { ...item }\n )),\n }));\n }\n\n /**\n * Hide a snackbar after its timeout.\n */\n handleCloseSnack: TransitionHandlerProps['onClose'] = (event, reason, key) => {\n // should not use createChainedFunction for onClose.\n // because this.closeSnackbar called this function\n if (this.props.onClose) {\n this.props.onClose(event, reason, key);\n }\n\n if (reason === REASONS.CLICKAWAY) return;\n const shouldCloseAll = key === undefined;\n\n this.setState(({ snacks, queue }) => ({\n snacks: snacks.map((item) => {\n if (!shouldCloseAll && item.key !== key) {\n return { ...item };\n }\n\n return item.entered\n ? { ...item, open: false }\n : { ...item, requestClose: true };\n }),\n queue: queue.filter(item => item.key !== key), // eslint-disable-line react/no-unused-state\n }));\n };\n\n /**\n * Close snackbar with the given key\n */\n closeSnackbar: ProviderContext['closeSnackbar'] = (key) => {\n // call individual snackbar onClose callback passed through options parameter\n const toBeClosed = this.state.snacks.find(item => item.key === key);\n if (isDefined(key) && toBeClosed && toBeClosed.onClose) {\n toBeClosed.onClose(null, REASONS.INSTRUCTED, key);\n }\n\n this.handleCloseSnack(null, REASONS.INSTRUCTED, key);\n }\n\n /**\n * When we set open attribute of a snackbar to false (i.e. after we hide a snackbar),\n * it leaves the screen and immediately after leaving animation is done, this method\n * gets called. We remove the hidden snackbar from state and then display notifications\n * waiting in the queue (if any). If after this process the queue is not empty, the\n * oldest message is dismissed.\n */\n // @ts-ignore\n handleExitedSnack: TransitionHandlerProps['onExited'] = (event, key1, key2) => {\n const key = key1 || key2;\n if (!isDefined(key)) {\n throw new Error('handleExitedSnack Cannot be called with undefined key');\n }\n\n this.setState((state) => {\n const newState = this.processQueue({\n ...state,\n snacks: state.snacks.filter(item => item.key !== key),\n });\n\n if (newState.queue.length === 0) {\n return newState;\n }\n\n return this.handleDismissOldest(newState);\n });\n };\n\n render(): JSX.Element {\n const { contextValue } = this.state;\n const {\n maxSnack: dontspread1,\n preventDuplicate: dontspread2,\n variant: dontspread3,\n anchorOrigin: dontspread4,\n iconVariant,\n dense = DEFAULTS.dense,\n hideIconVariant = DEFAULTS.hideIconVariant,\n domRoot,\n children,\n classes = {},\n ...props\n } = this.props;\n\n const categ = this.state.snacks.reduce((acc, current) => {\n const category = originKeyExtractor(current.anchorOrigin);\n const existingOfCategory = acc[category] || [];\n return {\n ...acc,\n [category]: [...existingOfCategory, current],\n };\n }, {});\n\n const snackbars = Object.keys(categ).map((origin) => {\n const snacks = categ[origin];\n return (\n \n {snacks.map(snack => (\n \n ))}\n \n );\n });\n\n return (\n \n {children}\n {domRoot ? createPortal(snackbars, domRoot) : snackbars}\n \n );\n }\n}\n\nexport default SnackbarProvider;\n","import { useContext } from 'react';\nimport SnackbarContext from './SnackbarContext';\nimport { ProviderContext } from '.';\n\nexport default (): ProviderContext => useContext(SnackbarContext);\n","var grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nexport default grey;","var indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nexport default indigo;","var pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nexport default pink;","var red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","var orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","var blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","var green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport useControlled from '../utils/useControlled';\nimport useFormControl from '../FormControl/useFormControl';\nimport withStyles from '../styles/withStyles';\nimport IconButton from '../IconButton';\nexport var styles = {\n root: {\n padding: 9\n },\n checked: {},\n disabled: {},\n input: {\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n var autoFocus = props.autoFocus,\n checkedProp = props.checked,\n checkedIcon = props.checkedIcon,\n classes = props.classes,\n className = props.className,\n defaultChecked = props.defaultChecked,\n disabledProp = props.disabled,\n icon = props.icon,\n id = props.id,\n inputProps = props.inputProps,\n inputRef = props.inputRef,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onFocus = props.onFocus,\n readOnly = props.readOnly,\n required = props.required,\n tabIndex = props.tabIndex,\n type = props.type,\n value = props.value,\n other = _objectWithoutProperties(props, [\"autoFocus\", \"checked\", \"checkedIcon\", \"classes\", \"className\", \"defaultChecked\", \"disabled\", \"icon\", \"id\", \"inputProps\", \"inputRef\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"readOnly\", \"required\", \"tabIndex\", \"type\", \"value\"]);\n\n var _useControlled = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n checked = _useControlled2[0],\n setCheckedState = _useControlled2[1];\n\n var muiFormControl = useFormControl();\n\n var handleFocus = function handleFocus(event) {\n if (onFocus) {\n onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n\n var handleInputChange = function handleInputChange(event) {\n var newChecked = event.target.checked;\n setCheckedState(newChecked);\n\n if (onChange) {\n // TODO v5: remove the second argument.\n onChange(event, newChecked);\n }\n };\n\n var disabled = disabledProp;\n\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n\n var hasLabelFor = type === 'checkbox' || type === 'radio';\n return /*#__PURE__*/React.createElement(IconButton, _extends({\n component: \"span\",\n className: clsx(classes.root, className, checked && classes.checked, disabled && classes.disabled),\n disabled: disabled,\n tabIndex: null,\n role: undefined,\n onFocus: handleFocus,\n onBlur: handleBlur,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"input\", _extends({\n autoFocus: autoFocus,\n checked: checkedProp,\n defaultChecked: defaultChecked,\n className: classes.input,\n disabled: disabled,\n id: hasLabelFor && id,\n name: name,\n onChange: handleInputChange,\n readOnly: readOnly,\n ref: inputRef,\n required: required,\n tabIndex: tabIndex,\n type: type,\n value: value\n }, inputProps)), checked ? checkedIcon : icon);\n}); // NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\n\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /*\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwitchBase'\n})(SwitchBase);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Clear');\n\nexports.default = _default;","import React from 'react';\nexport default React.createContext(null);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: theme.typography.pxToRem(24),\n transition: theme.transitions.create('fill', {\n duration: theme.transitions.duration.shorter\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(35)\n }\n };\n};\nvar SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'svg' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n htmlColor = props.htmlColor,\n titleAccess = props.titleAccess,\n _props$viewBox = props.viewBox,\n viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"titleAccess\", \"viewBox\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n focusable: \"false\",\n viewBox: viewBox,\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, other), children, titleAccess ? /*#__PURE__*/React.createElement(\"title\", null, titleAccess) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n */\n color: PropTypes.oneOf(['action', 'disabled', 'error', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this property.\n */\n shapeRendering: PropTypes.string,\n\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default withStyles(styles, {\n name: 'MuiSvgIcon'\n})(SvgIcon);","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useEventCallback from '../utils/useEventCallback';\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = React.useState(false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = useEventCallback(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: childClassName\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Ripple from './Ripple';\nvar DURATION = 550;\nexport var DELAY_RIPPLE = 80;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n },\n\n /* Styles applied to the internal `Ripple` components `ripple` class. */\n ripple: {\n opacity: 0,\n position: 'absolute'\n },\n\n /* Styles applied to the internal `Ripple` components `rippleVisible` class. */\n rippleVisible: {\n opacity: 0.3,\n transform: 'scale(1)',\n animation: \"$enter \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */\n ripplePulsate: {\n animationDuration: \"\".concat(theme.transitions.duration.shorter, \"ms\")\n },\n\n /* Styles applied to the internal `Ripple` components `child` class. */\n child: {\n opacity: 1,\n display: 'block',\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the internal `Ripple` components `childLeaving` class. */\n childLeaving: {\n opacity: 0,\n animation: \"$exit \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `childPulsate` class. */\n childPulsate: {\n position: 'absolute',\n left: 0,\n top: 0,\n animation: \"$pulsate 2500ms \".concat(theme.transitions.easing.easeInOut, \" 200ms infinite\")\n },\n '@keyframes enter': {\n '0%': {\n transform: 'scale(0)',\n opacity: 0.1\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.3\n }\n },\n '@keyframes exit': {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n },\n '@keyframes pulsate': {\n '0%': {\n transform: 'scale(1)'\n },\n '50%': {\n transform: 'scale(0.92)'\n },\n '100%': {\n transform: 'scale(1)'\n }\n }\n };\n};\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nvar TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(props, ref) {\n var _props$center = props.center,\n centerProp = _props$center === void 0 ? false : _props$center,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"center\", \"classes\", \"className\"]);\n\n var _React$useState = React.useState([]),\n ripples = _React$useState[0],\n setRipples = _React$useState[1];\n\n var nextKey = React.useRef(0);\n var rippleCallback = React.useRef(null);\n React.useEffect(function () {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n var ignoringMouseDown = React.useRef(false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n var startTimer = React.useRef(null); // This is the hook called once the previous timeout is ready.\n\n var startTimerCommit = React.useRef(null);\n var container = React.useRef(null);\n React.useEffect(function () {\n return function () {\n clearTimeout(startTimer.current);\n };\n }, []);\n var startCommit = React.useCallback(function (params) {\n var pulsate = params.pulsate,\n rippleX = params.rippleX,\n rippleY = params.rippleY,\n rippleSize = params.rippleSize,\n cb = params.cb;\n setRipples(function (oldRipples) {\n return [].concat(_toConsumableArray(oldRipples), [/*#__PURE__*/React.createElement(Ripple, {\n key: nextKey.current,\n classes: classes,\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n })]);\n });\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n var start = React.useCallback(function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cb = arguments.length > 2 ? arguments[2] : undefined;\n var _options$pulsate = options.pulsate,\n pulsate = _options$pulsate === void 0 ? false : _options$pulsate,\n _options$center = options.center,\n center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,\n _options$fakeElement = options.fakeElement,\n fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n var element = fakeElement ? null : container.current;\n var rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n var rippleX;\n var rippleY;\n var rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n var _ref = event.touches ? event.touches[0] : event,\n clientX = _ref.clientX,\n clientY = _ref.clientY;\n\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = function () {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(function () {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }\n }, [centerProp, startCommit]);\n var pulsate = React.useCallback(function () {\n start({}, {\n pulsate: true\n });\n }, [start]);\n var stop = React.useCallback(function (event, cb) {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n event.persist();\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(function () {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(function (oldRipples) {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n React.useImperativeHandle(ref, function () {\n return {\n pulsate: pulsate,\n start: start,\n stop: stop\n };\n }, [pulsate, start, stop]);\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, className),\n ref: container\n }, other), /*#__PURE__*/React.createElement(TransitionGroup, {\n component: null,\n exit: true\n }, ripples));\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiTouchRipple'\n})( /*#__PURE__*/React.memo(TouchRipple));","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport clsx from 'clsx';\nimport { elementTypeAcceptingRef, refType } from '@material-ui/utils';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport TouchRipple from './TouchRipple';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = _objectWithoutProperties(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = React.useRef(null);\n\n function getButtonNode() {\n // #StrictMode ready\n return ReactDOM.findDOMNode(buttonRef.current);\n }\n\n var rippleRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n React.useImperativeHandle(action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n React.useEffect(function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return useEventCallback(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = useEventCallback(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = React.useRef(false);\n var handleKeyDown = useEventCallback(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = useEventCallback(function (event) {\n // calling preventDefault in keyUp on a \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _styles = require(\"@material-ui/styles\");\n\nvar _defaultTheme = _interopRequireDefault(require(\"./defaultTheme\"));\n\nfunction withStyles(stylesOrCreator, options) {\n return (0, _styles.withStyles)(stylesOrCreator, (0, _extends2.default)({\n defaultTheme: _defaultTheme.default\n }, options));\n}\n\nvar _default = withStyles;\nexports.default = _default;","/** @license Material-UI v4.12.1\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport { default as borders } from './borders';\nexport * from './borders';\nexport { default as breakpoints } from './breakpoints';\nexport { default as compose } from './compose';\nexport { default as styleFunctionSx } from './styleFunctionSx';\nexport * from './styleFunctionSx';\nexport { default as display } from './display';\nexport { default as flexbox } from './flexbox';\nexport * from './flexbox';\nexport { default as grid } from './grid';\nexport * from './grid';\nexport { default as palette } from './palette';\nexport * from './palette';\nexport { default as positions } from './positions';\nexport * from './positions';\nexport { default as shadows } from './shadows';\nexport { default as sizing } from './sizing';\nexport * from './sizing';\nexport { default as spacing } from './spacing';\nexport * from './spacing';\nexport { default as style } from './style';\nexport { default as typography } from './typography';\nexport * from './typography';","export default function requirePropFactory(componentNameInError) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n var requireProp = function requireProp(requiredProp) {\n return function (props, propName, componentName, location, propFullName) {\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameInError, \"` must be used on `\").concat(requiredProp, \"`.\"));\n }\n\n return null;\n };\n };\n\n return requireProp;\n}","import { borders, compose, display, flexbox, grid, palette, positions, shadows, sizing, spacing, typography, styleFunctionSx } from '@material-ui/system';\nimport styled from '../styles/styled';\nexport var styleFunction = styleFunctionSx(compose(borders, display, flexbox, grid, positions, palette, shadows, sizing, spacing, typography));\n/**\n * @ignore - do not document.\n */\n\nvar Box = styled('div')(styleFunction, {\n name: 'MuiBox'\n});\nexport default Box;","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { makeStyles as makeStylesWithoutDefault } from '@material-ui/styles';\nimport defaultTheme from './defaultTheme';\n\nfunction makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return makeStylesWithoutDefault(stylesOrCreator, _extends({\n defaultTheme: defaultTheme\n }, options));\n}\n\nexport default makeStyles;","import style from './style';\nimport compose from './compose';\nexport var displayPrint = style({\n prop: 'displayPrint',\n cssProperty: false,\n transform: function transform(value) {\n return {\n '@media print': {\n display: value\n }\n };\n }\n});\nexport var displayRaw = style({\n prop: 'display'\n});\nexport var overflow = style({\n prop: 'overflow'\n});\nexport var textOverflow = style({\n prop: 'textOverflow'\n});\nexport var visibility = style({\n prop: 'visibility'\n});\nexport var whiteSpace = style({\n prop: 'whiteSpace'\n});\nexport default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);","import style from './style';\nvar boxShadow = style({\n prop: 'boxShadow',\n themeKey: 'shadows'\n});\nexport default boxShadow;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 12,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE 11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -12,\n '$sizeSmall&': {\n marginLeft: -3\n }\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -12,\n '$sizeSmall&': {\n marginRight: -3\n }\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: 3,\n fontSize: theme.typography.pxToRem(18)\n },\n\n /* Styles applied to the children container element. */\n label: {\n width: '100%',\n display: 'flex',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n }\n };\n};\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nvar IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {\n var _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"edge\", \"children\", \"classes\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], disabled && classes.disabled, size === \"small\" && classes[\"size\".concat(capitalize(size))], {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge]),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes = {\n /**\n * The icon element.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n var found = React.Children.toArray(props.children).some(function (child) {\n return /*#__PURE__*/React.isValidElement(child) && child.props.onClick;\n });\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener ' + 'to a child of a button element.', 'Firefox will never trigger the event.', 'You should move the onClick listener to the parent button element.', 'https://github.com/mui-org/material-ui/issues/13957'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['start', 'end', false]),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiIconButton'\n})(IconButton);","import { createTheme } from '@material-ui/core/styles';\n\nimport orange from '@material-ui/core/colors/orange';\n\nconst step = (16 - 5) / 23 / 100;\n\n/**\n * Convert hex color in the format '#rrggbb' or '#rgb' to an RGB object.\n * @param {string} hex\n * @returns {{r: number, g: number, b: number}}\n */\nfunction toInt(hex) {\n const rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n\n if (hex.length === 7) {\n rgb.r = parseInt(hex.substr(1, 2), 16);\n rgb.g = parseInt(hex.substr(3, 2), 16);\n rgb.b = parseInt(hex.substr(5, 2), 16);\n } else if (hex.length === 4) {\n\n const r = hex.substr(1, 1);\n const g = hex.substr(2, 1);\n const b = hex.substr(3, 1);\n\n rgb.r = parseInt(r + r, 16);\n rgb.g = parseInt(g + g, 16);\n rgb.b = parseInt(b + b, 16);\n }\n\n return rgb;\n}\n\n/**\n * Convert an RGB object to a hex color string in the format '#rrggbb'.\n * @param {{r: number, g: number, b: number}} int\n * @returns {string}\n */\nfunction toHex(int) {\n return '#' + Math.round(int.r).toString(16) + Math.round(int.g).toString(16) + Math.round(int.b).toString(16);\n}\n\n/**\n * @param {string} color color in the format '#rrggbb' or '#rgb'\n * @param {string} overlayColor overlay color in the format '#rrggbb' or '#rgb'\n * @param {number} elevation elevation as an integer starting with 1\n * @returns {string} the hex color string in the format '#rrggbb'\n */\nfunction getElevation(color, overlayColor, elevation) {\n const rgb = toInt(color);\n const overlay = toInt(overlayColor);\n\n rgb.r += overlay.r * (0.05 + step * (elevation - 1));\n rgb.g += overlay.g * (0.05 + step * (elevation - 1));\n rgb.b += overlay.b * (0.05 + step * (elevation - 1));\n\n return toHex(rgb);\n}\n\n/**\n * Get all 24 elevations of the given color and overlay.\n * @param {string} color color in the format '#rrggbb' or '#rgb'\n * @param {string} overlay overlay color in the format '#rrggbb' or '#rgb'\n * @returns {import('@material-ui/core/styles/withStyles').CSSProperties}\n */\nfunction getElevations(color, overlay) {\n /** @type {import('@material-ui/core/styles/withStyles').CSSProperties} */\n const elevations = {};\n\n for(let i = 1; i <= 24; i++) {\n elevations['elevation' + i] = {\n backgroundColor: getElevation(color, overlay, i)\n }\n }\n\n return elevations;\n}\n\n/**\n * The theme creation factory function.\n * @param {string} type\n * @returns {import('./types').Theme}\n */\nconst Theme = type => {\n let theme;\n if (type === 'dark') {\n theme = {\n name: type,\n palette: {\n type: 'dark',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n primary: {\n main: '#4dabf5'\n },\n secondary: {\n main: '#436a93'\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff'\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#272727'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100]\n }\n }\n },\n MuiPaper: getElevations('#121212', '#fff')\n }\n };\n } else if (type === 'blue') {\n theme = {\n name: type,\n palette: {\n type: 'dark',\n background: {\n paper: '#151d21',\n default: '#151d21'\n },\n primary: {\n main: '#4dabf5'\n },\n secondary: {\n main: '#436a93'\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff'\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#2a3135'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100]\n }\n }\n },\n MuiPaper: getElevations('#151d21', '#fff')\n }\n };\n } else if (type === 'colored') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#3399CC'\n },\n secondary: {\n main: '#164477'\n },\n expert: '#96fc96'\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#3399CC'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else if (type === 'PT') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#0F99DE'\n },\n secondary: {\n main: '#88A536'\n },\n expert: '#BD1B24'\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#0F99DE'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else if (type === 'DX') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#F5F5F7'\n },\n secondary: {\n main: '#a9a9a9'\n },\n expert: '#BD1B24',\n text: {\n primary: '#007AFE',\n secondary: '#007AFE',\n disabled: '#007AFEAA',\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#a9a9a9'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#3399CC'\n },\n secondary: {\n main: '#164477'\n },\n expert: '#14bb00'\n },\n overrides: {\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n }\n\n theme.toolbar = {\n height: 48\n };\n\n // add save toolbar\n theme.saveToolbar = {\n background: theme.palette.primary.main,\n button: {\n borderRadius: 3,\n height: 32\n }\n };\n\n return createTheme(theme);\n};\n\nexport default Theme;\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport './loader.css'\n\nconst styles = theme => ({\n\n});\n\n/**\n * @typedef {object} LoaderProps\n * @property {string} [key] The key to identify this component.\n * @property {number} [size] The size in pixels of this loader.\n * @property {string} [themeType] The chosen theme type.\n * @property {string} [theme] The chosen theme.\n *\n * @extends {React.Component}\n */\nclass Loader extends React.Component {\n /**\n * @param {LoaderProps} props\n */\n constructor(props) {\n super(props);\n this.size = this.props.size || 234;\n }\n\n render() {\n const theme = this.props.themeType || this.props.theme || 'light';\n return
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
;\n }\n}\n\nLoader.propTypes = {\n size: PropTypes.number,\n themeType: PropTypes.string\n};\n\n/** @type {typeof Loader} */\nconst _export = withStyles(styles)(Loader);\nexport default _export;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z\"\n}), 'Save');\n\nexports.default = _default;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { isFilled, isAdornedStart } from '../InputBase/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport isMuiElement from '../utils/isMuiElement';\nimport FormControlContext from './FormControlContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top' // Fix alignment issue on Safari.\n\n },\n\n /* Styles applied to the root element if `margin=\"normal\"`. */\n marginNormal: {\n marginTop: 16,\n marginBottom: 8\n },\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n marginTop: 8,\n marginBottom: 4\n },\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n }\n};\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/components/text-fields/#components).\n *\n * ```jsx\n * \n * Email address\n * \n * We'll never share your email.\n * \n * ```\n *\n * ⚠️Only one input can be used within a FormControl.\n */\n\nvar FormControl = /*#__PURE__*/React.forwardRef(function FormControl(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n visuallyFocused = props.focused,\n _props$hiddenLabel = props.hiddenLabel,\n hiddenLabel = _props$hiddenLabel === void 0 ? false : _props$hiddenLabel,\n _props$margin = props.margin,\n margin = _props$margin === void 0 ? 'none' : _props$margin,\n _props$required = props.required,\n required = _props$required === void 0 ? false : _props$required,\n size = props.size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"fullWidth\", \"focused\", \"hiddenLabel\", \"margin\", \"required\", \"size\", \"variant\"]);\n\n var _React$useState = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialAdornedStart = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n var input = isMuiElement(child, ['Select']) ? child.props.input : child;\n\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n\n return initialAdornedStart;\n }),\n adornedStart = _React$useState[0],\n setAdornedStart = _React$useState[1];\n\n var _React$useState2 = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialFilled = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n if (isFilled(child.props, true)) {\n initialFilled = true;\n }\n });\n }\n\n return initialFilled;\n }),\n filled = _React$useState2[0],\n setFilled = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _focused = _React$useState3[0],\n setFocused = _React$useState3[1];\n\n var focused = visuallyFocused !== undefined ? visuallyFocused : _focused;\n\n if (disabled && focused) {\n setFocused(false);\n }\n\n var registerEffect;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var registeredInput = React.useRef(false);\n\n registerEffect = function registerEffect() {\n if (registeredInput.current) {\n console.error(['Material-UI: There are multiple InputBase components inside a FormControl.', 'This is not supported. It might cause infinite rendering loops.', 'Only use one InputBase.'].join('\\n'));\n }\n\n registeredInput.current = true;\n return function () {\n registeredInput.current = false;\n };\n };\n }\n\n var onFilled = React.useCallback(function () {\n setFilled(true);\n }, []);\n var onEmpty = React.useCallback(function () {\n setFilled(false);\n }, []);\n var childContext = {\n adornedStart: adornedStart,\n setAdornedStart: setAdornedStart,\n color: color,\n disabled: disabled,\n error: error,\n filled: filled,\n focused: focused,\n fullWidth: fullWidth,\n hiddenLabel: hiddenLabel,\n margin: (size === 'small' ? 'dense' : undefined) || margin,\n onBlur: function onBlur() {\n setFocused(false);\n },\n onEmpty: onEmpty,\n onFilled: onFilled,\n onFocus: function onFocus() {\n setFocused(true);\n },\n registerEffect: registerEffect,\n required: required,\n variant: variant\n };\n return /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: childContext\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, margin !== 'none' && classes[\"margin\".concat(capitalize(margin))], fullWidth && classes.fullWidth),\n ref: ref\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The contents of the form control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label should be displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the component will be displayed in focused state.\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the component will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label will be hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, the label will indicate that the input is required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the text field.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormControl'\n})(FormControl);","import { getGlobalObject } from './global';\nimport { isString } from './is';\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown, keyAttrs?: string[]): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n // eslint-disable-next-line no-plusplus\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n const elem = el as {\n tagName?: string;\n id?: string;\n className?: string;\n getAttribute(key: string): string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs = keyAttrs?.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs?.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n const global = getGlobalObject();\n try {\n return global.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n","import { getGlobalObject } from './global';\nimport { logger } from './logger';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === `function`) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (global as any).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsv2json = exports.json2tsv = void 0;\nconst json2tsv_1 = require(\"./json2tsv\");\nvar json2tsv_2 = require(\"./json2tsv\");\nObject.defineProperty(exports, \"json2tsv\", { enumerable: true, get: function () { return json2tsv_2.json2tsv; } });\nconst tsv2json_1 = require(\"./tsv2json\");\nvar tsv2json_2 = require(\"./tsv2json\");\nObject.defineProperty(exports, \"tsv2json\", { enumerable: true, get: function () { return tsv2json_2.tsv2json; } });\n// eslint-disable-next-line import/no-anonymous-default-export\nexports.default = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\n// For CommonJS default export support\nmodule.exports = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\nmodule.exports.default = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\n//# sourceMappingURL=index.js.map","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\n\nfunction getScale(value) {\n return \"scale(\".concat(value, \", \").concat(Math.pow(value, 2), \")\");\n}\n\nvar styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n/**\n * The Grow transition is used by the [Tooltip](/components/tooltips/) and\n * [Popover](/components/popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? 'auto' : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var timer = React.useRef();\n var autoTimeout = React.useRef();\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var _getTransitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration,\n delay = _getTransitionProps.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay\n })].join(',');\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var _getTransitionProps2 = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration,\n delay = _getTransitionProps2.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay || duration * 0.333\n })].join(',');\n node.style.opacity = '0';\n node.style.transform = getScale(0.75);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTimeout.current || 0);\n }\n };\n\n React.useEffect(function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, show the component; triggers the enter or exit animation.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;","/* eslint-disable import/prefer-default-export */\n// Global index counter to preserve source order.\n// We create the style sheet during the creation of the component,\n// children are handled after the parents, so the order of style elements would be parent->child.\n// It is a problem though when a parent passes a className\n// which needs to override any child's styles.\n// StyleSheet of the child has a higher specificity, because of the source order.\n// So our solution is to render sheets them in the reverse order child->sheet, so\n// that parent has a higher specificity.\nvar indexCounter = -1e9;\nexport function increment() {\n indexCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (indexCounter >= 0) {\n console.warn(['Material-UI: You might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join('\\n'));\n }\n }\n\n return indexCounter;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { deepmerge } from '@material-ui/utils';\nimport noopTheme from './noopTheme';\nexport default function getStylesCreator(stylesOrCreator) {\n var themingEnabled = typeof stylesOrCreator === 'function';\n\n if (process.env.NODE_ENV !== 'production') {\n if (_typeof(stylesOrCreator) !== 'object' && !themingEnabled) {\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You need to provide a function generating the styles or a styles object.'].join('\\n'));\n }\n }\n\n return {\n create: function create(theme, name) {\n var styles;\n\n try {\n styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n if (themingEnabled === true && theme === noopTheme) {\n // TODO: prepend error message/name instead\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n throw err;\n }\n\n if (!name || !theme.overrides || !theme.overrides[name]) {\n return styles;\n }\n\n var overrides = theme.overrides[name];\n\n var stylesWithOverrides = _extends({}, styles);\n\n Object.keys(overrides).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!stylesWithOverrides[key]) {\n console.warn(['Material-UI: You are trying to override a style that does not exist.', \"Fix the `\".concat(key, \"` key of `theme.overrides.\").concat(name, \"`.\")].join('\\n'));\n }\n }\n\n stylesWithOverrides[key] = deepmerge(stylesWithOverrides[key], overrides[key]);\n });\n return stylesWithOverrides;\n },\n options: {}\n };\n}","// We use the same empty object to ref count the styles that don't need a theme object.\nvar noopTheme = {};\nexport default noopTheme;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { getDynamicStyles } from 'jss';\nimport mergeClasses from '../mergeClasses';\nimport multiKeyStore from './multiKeyStore';\nimport useTheme from '../useTheme';\nimport { StylesContext } from '../StylesProvider';\nimport { increment } from './indexCounter';\nimport getStylesCreator from '../getStylesCreator';\nimport noopTheme from '../getStylesCreator/noopTheme';\n\nfunction getClasses(_ref, classes, Component) {\n var state = _ref.state,\n stylesOptions = _ref.stylesOptions;\n\n if (stylesOptions.disableGeneration) {\n return classes || {};\n }\n\n if (!state.cacheClasses) {\n state.cacheClasses = {\n // Cache for the finalized classes value.\n value: null,\n // Cache for the last used classes prop pointer.\n lastProp: null,\n // Cache for the last used rendered classes pointer.\n lastJSS: {}\n };\n } // Tracks if either the rendered classes or classes prop has changed,\n // requiring the generation of a new finalized classes object.\n\n\n var generate = false;\n\n if (state.classes !== state.cacheClasses.lastJSS) {\n state.cacheClasses.lastJSS = state.classes;\n generate = true;\n }\n\n if (classes !== state.cacheClasses.lastProp) {\n state.cacheClasses.lastProp = classes;\n generate = true;\n }\n\n if (generate) {\n state.cacheClasses.value = mergeClasses({\n baseClasses: state.cacheClasses.lastJSS,\n newClasses: classes,\n Component: Component\n });\n }\n\n return state.cacheClasses.value;\n}\n\nfunction attach(_ref2, props) {\n var state = _ref2.state,\n theme = _ref2.theme,\n stylesOptions = _ref2.stylesOptions,\n stylesCreator = _ref2.stylesCreator,\n name = _ref2.name;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n\n if (!sheetManager) {\n sheetManager = {\n refs: 0,\n staticSheet: null,\n dynamicStyles: null\n };\n multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);\n }\n\n var options = _extends({}, stylesCreator.options, stylesOptions, {\n theme: theme,\n flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'\n });\n\n options.generateId = options.serverGenerateClassName || options.generateClassName;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n var staticSheet;\n\n if (stylesOptions.sheetsCache) {\n staticSheet = multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);\n }\n\n var styles = stylesCreator.create(theme, name);\n\n if (!staticSheet) {\n staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({\n link: false\n }, options));\n staticSheet.attach();\n\n if (stylesOptions.sheetsCache) {\n multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);\n }\n }\n\n if (sheetsRegistry) {\n sheetsRegistry.add(staticSheet);\n }\n\n sheetManager.staticSheet = staticSheet;\n sheetManager.dynamicStyles = getDynamicStyles(styles);\n }\n\n if (sheetManager.dynamicStyles) {\n var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({\n link: true\n }, options));\n dynamicSheet.update(props);\n dynamicSheet.attach();\n state.dynamicSheet = dynamicSheet;\n state.classes = mergeClasses({\n baseClasses: sheetManager.staticSheet.classes,\n newClasses: dynamicSheet.classes\n });\n\n if (sheetsRegistry) {\n sheetsRegistry.add(dynamicSheet);\n }\n } else {\n state.classes = sheetManager.staticSheet.classes;\n }\n\n sheetManager.refs += 1;\n}\n\nfunction update(_ref3, props) {\n var state = _ref3.state;\n\n if (state.dynamicSheet) {\n state.dynamicSheet.update(props);\n }\n}\n\nfunction detach(_ref4) {\n var state = _ref4.state,\n theme = _ref4.theme,\n stylesOptions = _ref4.stylesOptions,\n stylesCreator = _ref4.stylesCreator;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n sheetManager.refs -= 1;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);\n stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(sheetManager.staticSheet);\n }\n }\n\n if (state.dynamicSheet) {\n stylesOptions.jss.removeStyleSheet(state.dynamicSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(state.dynamicSheet);\n }\n }\n}\n\nfunction useSynchronousEffect(func, values) {\n var key = React.useRef([]);\n var output; // Store \"generation\" key. Just returns a new object every time\n\n var currentKey = React.useMemo(function () {\n return {};\n }, values); // eslint-disable-line react-hooks/exhaustive-deps\n // \"the first render\", or \"memo dropped the value\"\n\n if (key.current !== currentKey) {\n key.current = currentKey;\n output = func();\n }\n\n React.useEffect(function () {\n return function () {\n if (output) {\n output();\n }\n };\n }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n\nexport default function makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n classNamePrefixOption = options.classNamePrefix,\n Component = options.Component,\n _options$defaultTheme = options.defaultTheme,\n defaultTheme = _options$defaultTheme === void 0 ? noopTheme : _options$defaultTheme,\n stylesOptions2 = _objectWithoutProperties(options, [\"name\", \"classNamePrefix\", \"Component\", \"defaultTheme\"]);\n\n var stylesCreator = getStylesCreator(stylesOrCreator);\n var classNamePrefix = name || classNamePrefixOption || 'makeStyles';\n stylesCreator.options = {\n index: increment(),\n name: name,\n meta: classNamePrefix,\n classNamePrefix: classNamePrefix\n };\n\n var useStyles = function useStyles() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var theme = useTheme() || defaultTheme;\n\n var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2);\n\n var instance = React.useRef();\n var shouldUpdate = React.useRef();\n useSynchronousEffect(function () {\n var current = {\n name: name,\n state: {},\n stylesCreator: stylesCreator,\n stylesOptions: stylesOptions,\n theme: theme\n };\n attach(current, props);\n shouldUpdate.current = false;\n instance.current = current;\n return function () {\n detach(current);\n };\n }, [theme, stylesCreator]);\n React.useEffect(function () {\n if (shouldUpdate.current) {\n update(instance.current, props);\n }\n\n shouldUpdate.current = true;\n });\n var classes = getClasses(instance.current, props.classes, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(classes);\n }\n\n return classes;\n };\n\n return useStyles;\n}","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nvar _default = orange;\nexports.default = _default;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.text.primary,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n },\n '&$disabled': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // Ensure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `variant=\"text\"`. */\n text: {\n padding: '6px 8px'\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"primary\"`. */\n textPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"secondary\"`. */\n textSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n padding: '5px 15px',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabledBackground)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(alpha(theme.palette.primary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.primary.main),\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(alpha(theme.palette.secondary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.secondary.main),\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabled)\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&:active': {\n boxShadow: theme.shadows[8]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"primary\"`. */\n containedPrimary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"secondary\"`. */\n containedSecondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n '&$focusVisible': {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n '&$disabled': {\n boxShadow: 'none'\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit',\n borderColor: 'currentColor'\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"text\"`. */\n textSizeSmall: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"text\"`. */\n textSizeLarge: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"outlined\"`. */\n outlinedSizeSmall: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"outlined\"`. */\n outlinedSizeLarge: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"contained\"`. */\n containedSizeSmall: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"contained\"`. */\n containedSizeLarge: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {},\n\n /* Styles applied to the root element if `size=\"large\"`. */\n sizeLarge: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the startIcon element if supplied. */\n startIcon: {\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n '&$iconSizeSmall': {\n marginLeft: -2\n }\n },\n\n /* Styles applied to the endIcon element if supplied. */\n endIcon: {\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n '&$iconSizeSmall': {\n marginRight: -2\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"small\"`. */\n iconSizeSmall: {\n '& > *:first-child': {\n fontSize: 18\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"medium\"`. */\n iconSizeMedium: {\n '& > *:first-child': {\n fontSize: 20\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"large\"`. */\n iconSizeLarge: {\n '& > *:first-child': {\n fontSize: 22\n }\n }\n };\n};\nvar Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n endIconProp = props.endIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n startIconProp = props.startIcon,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'text' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"]);\n\n var startIcon = startIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.startIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, startIconProp);\n var endIcon = endIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.endIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, endIconProp);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes[\"\".concat(variant).concat(capitalize(color))], size !== 'medium' && [classes[\"\".concat(variant, \"Size\").concat(capitalize(size))], classes[\"size\".concat(capitalize(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, startIcon, children, endIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButton'\n})(Button);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport Modal from '../Modal';\nimport Backdrop from '../Backdrop';\nimport Fade from '../Fade';\nimport { duration } from '../styles/transitions';\nimport Paper from '../Paper';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n '@media print': {\n // Use !important to override the Modal inline-style.\n position: 'absolute !important'\n }\n },\n\n /* Styles applied to the container element if `scroll=\"paper\"`. */\n scrollPaper: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the container element if `scroll=\"body\"`. */\n scrollBody: {\n overflowY: 'auto',\n overflowX: 'hidden',\n textAlign: 'center',\n '&:after': {\n content: '\"\"',\n display: 'inline-block',\n verticalAlign: 'middle',\n height: '100%',\n width: '0'\n }\n },\n\n /* Styles applied to the container element. */\n container: {\n height: '100%',\n '@media print': {\n height: 'auto'\n },\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n margin: 32,\n position: 'relative',\n overflowY: 'auto',\n // Fix IE 11 issue, to remove at some point.\n '@media print': {\n overflowY: 'visible',\n boxShadow: 'none'\n }\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"paper\"`. */\n paperScrollPaper: {\n display: 'flex',\n flexDirection: 'column',\n maxHeight: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"body\"`. */\n paperScrollBody: {\n display: 'inline-block',\n verticalAlign: 'middle',\n textAlign: 'left' // 'initial' doesn't work on IE 11\n\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=false`. */\n paperWidthFalse: {\n maxWidth: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xs\"`. */\n paperWidthXs: {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444),\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"sm\"`. */\n paperWidthSm: {\n maxWidth: theme.breakpoints.values.sm,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.sm + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"md\"`. */\n paperWidthMd: {\n maxWidth: theme.breakpoints.values.md,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.md + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"lg\"`. */\n paperWidthLg: {\n maxWidth: theme.breakpoints.values.lg,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.lg + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xl\"`. */\n paperWidthXl: {\n maxWidth: theme.breakpoints.values.xl,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.xl + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `fullWidth={true}`. */\n paperFullWidth: {\n width: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `fullScreen={true}`. */\n paperFullScreen: {\n margin: 0,\n width: '100%',\n maxWidth: '100%',\n height: '100%',\n maxHeight: 'none',\n borderRadius: 0,\n '&$paperScrollBody': {\n margin: 0,\n maxWidth: '100%'\n }\n }\n };\n};\nvar defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * Dialogs are overlaid modal paper based components with a backdrop.\n */\n\nvar Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {\n var BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableBackdro = props.disableBackdropClick,\n disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableEscapeK = props.disableEscapeKeyDown,\n disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK,\n _props$fullScreen = props.fullScreen,\n fullScreen = _props$fullScreen === void 0 ? false : _props$fullScreen,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'sm' : _props$maxWidth,\n onBackdropClick = props.onBackdropClick,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onEscapeKeyDown = props.onEscapeKeyDown,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n open = props.open,\n _props$PaperComponent = props.PaperComponent,\n PaperComponent = _props$PaperComponent === void 0 ? Paper : _props$PaperComponent,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n _props$scroll = props.scroll,\n scroll = _props$scroll === void 0 ? 'paper' : _props$scroll,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Fade : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n ariaDescribedby = props['aria-describedby'],\n ariaLabelledby = props['aria-labelledby'],\n other = _objectWithoutProperties(props, [\"BackdropProps\", \"children\", \"classes\", \"className\", \"disableBackdropClick\", \"disableEscapeKeyDown\", \"fullScreen\", \"fullWidth\", \"maxWidth\", \"onBackdropClick\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onEscapeKeyDown\", \"onExit\", \"onExited\", \"onExiting\", \"open\", \"PaperComponent\", \"PaperProps\", \"scroll\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"aria-describedby\", \"aria-labelledby\"]);\n\n var mouseDownTarget = React.useRef();\n\n var handleMouseDown = function handleMouseDown(event) {\n mouseDownTarget.current = event.target;\n };\n\n var handleBackdropClick = function handleBackdropClick(event) {\n // Ignore the events not coming from the \"backdrop\"\n // We don't want to close the dialog when clicking the dialog content.\n if (event.target !== event.currentTarget) {\n return;\n } // Make sure the event starts and ends on the same DOM element.\n\n\n if (event.target !== mouseDownTarget.current) {\n return;\n }\n\n mouseDownTarget.current = null;\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (!disableBackdropClick && onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n return /*#__PURE__*/React.createElement(Modal, _extends({\n className: clsx(classes.root, className),\n BackdropComponent: Backdrop,\n BackdropProps: _extends({\n transitionDuration: transitionDuration\n }, BackdropProps),\n closeAfterTransition: true\n }, disableBackdropClick ? {\n disableBackdropClick: disableBackdropClick\n } : {}, {\n disableEscapeKeyDown: disableEscapeKeyDown,\n onEscapeKeyDown: onEscapeKeyDown,\n onClose: onClose,\n open: open,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n timeout: transitionDuration,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n onExit: onExit,\n onExiting: onExiting,\n onExited: onExited,\n role: \"none presentation\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.container, classes[\"scroll\".concat(capitalize(scroll))]),\n onMouseUp: handleBackdropClick,\n onMouseDown: handleMouseDown\n }, /*#__PURE__*/React.createElement(PaperComponent, _extends({\n elevation: 24,\n role: \"dialog\",\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": ariaLabelledby\n }, PaperProps, {\n className: clsx(classes.paper, classes[\"paperScroll\".concat(capitalize(scroll))], classes[\"paperWidth\".concat(capitalize(String(maxWidth)))], PaperProps.className, fullScreen && classes.paperFullScreen, fullWidth && classes.paperFullWidth)\n }), children))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Dialog.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The id(s) of the element(s) that describe the dialog.\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * The id(s) of the element(s) that label the dialog.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * Dialog children, usually the included sub-components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, clicking the backdrop will not fire the `onClose` callback.\n * @deprecated Use the onClose prop with the `reason` argument to filter the `backdropClick` events.\n */\n disableBackdropClick: deprecatedPropType(PropTypes.bool, 'Use the onClose prop with the `reason` argument to filter the `backdropClick` events.'),\n\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n */\n disableEscapeKeyDown: PropTypes.bool,\n\n /**\n * If `true`, the dialog will be full-screen\n */\n fullScreen: PropTypes.bool,\n\n /**\n * If `true`, the dialog stretches to `maxWidth`.\n *\n * Notice that the dialog width grow is limited by the default margin.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * Determine the max-width of the dialog.\n * The dialog width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false]),\n\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the onClose prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `backdropClick` events.'),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the dialog enters.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the escape key is pressed,\n * `disableKeyboard` is false and the modal is in focus.\n * @deprecated Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.\n */\n onEscapeKeyDown: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.'),\n\n /**\n * Callback fired before the dialog exits.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * If `true`, the Dialog is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * The component used to render the body of the dialog.\n */\n PaperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Determine the container for scrolling the dialog.\n */\n scroll: PropTypes.oneOf(['body', 'paper']),\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialog'\n})(Dialog);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogActions'\n})(DialogActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n overflowY: 'auto',\n padding: '8px 24px',\n '&:first-child': {\n // dialog without title\n paddingTop: 20\n }\n },\n\n /* Styles applied to the root element if `dividers={true}`. */\n dividers: {\n padding: '16px 24px',\n borderTop: \"1px solid \".concat(theme.palette.divider),\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n }\n };\n};\nvar DialogContent = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$dividers = props.dividers,\n dividers = _props$dividers === void 0 ? false : _props$dividers,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"dividers\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dividers && classes.dividers),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display the top and bottom dividers.\n */\n dividers: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogContent'\n})(DialogContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n marginBottom: 12\n }\n};\nvar DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(props, ref) {\n return /*#__PURE__*/React.createElement(Typography, _extends({\n component: \"p\",\n variant: \"body1\",\n color: \"textSecondary\",\n ref: ref\n }, props));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContentText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogContentText'\n})(DialogContentText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n margin: 0,\n padding: '16px 24px',\n flex: '0 0 auto'\n }\n};\nvar DialogTitle = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), disableTypography ? children : /*#__PURE__*/React.createElement(Typography, {\n component: \"h2\",\n variant: \"h6\"\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogTitle.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a typography component.\n * For instance, this can be useful to render an h4 instead of the default h2.\n */\n disableTypography: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogTitle'\n})(DialogTitle);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { duration } from '../styles/transitions';\nimport ClickAwayListener from '../ClickAwayListener';\nimport useEventCallback from '../utils/useEventCallback';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport Grow from '../Grow';\nimport SnackbarContent from '../SnackbarContent';\nexport var styles = function styles(theme) {\n var top1 = {\n top: 8\n };\n var bottom1 = {\n bottom: 8\n };\n var right = {\n justifyContent: 'flex-end'\n };\n var left = {\n justifyContent: 'flex-start'\n };\n var top3 = {\n top: 24\n };\n var bottom3 = {\n bottom: 24\n };\n var right3 = {\n right: 24\n };\n var left3 = {\n left: 24\n };\n var center = {\n left: '50%',\n right: 'auto',\n transform: 'translateX(-50%)'\n };\n return {\n /* Styles applied to the root element. */\n root: {\n zIndex: theme.zIndex.snackbar,\n position: 'fixed',\n display: 'flex',\n left: 8,\n right: 8,\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */\n anchorOriginTopCenter: _extends({}, top1, _defineProperty({}, theme.breakpoints.up('sm'), _extends({}, top3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */\n anchorOriginBottomCenter: _extends({}, bottom1, _defineProperty({}, theme.breakpoints.up('sm'), _extends({}, bottom3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */\n anchorOriginTopRight: _extends({}, top1, right, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n left: 'auto'\n }, top3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */\n anchorOriginBottomRight: _extends({}, bottom1, right, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n left: 'auto'\n }, bottom3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */\n anchorOriginTopLeft: _extends({}, top1, left, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n right: 'auto'\n }, top3, left3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */\n anchorOriginBottomLeft: _extends({}, bottom1, left, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n right: 'auto'\n }, bottom3, left3)))\n };\n};\nvar Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(props, ref) {\n var action = props.action,\n _props$anchorOrigin = props.anchorOrigin;\n _props$anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'bottom',\n horizontal: 'center'\n } : _props$anchorOrigin;\n\n var vertical = _props$anchorOrigin.vertical,\n horizontal = _props$anchorOrigin.horizontal,\n _props$autoHideDurati = props.autoHideDuration,\n autoHideDuration = _props$autoHideDurati === void 0 ? null : _props$autoHideDurati,\n children = props.children,\n classes = props.classes,\n className = props.className,\n ClickAwayListenerProps = props.ClickAwayListenerProps,\n ContentProps = props.ContentProps,\n _props$disableWindowB = props.disableWindowBlurListener,\n disableWindowBlurListener = _props$disableWindowB === void 0 ? false : _props$disableWindowB,\n message = props.message,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n open = props.open,\n resumeHideDuration = props.resumeHideDuration,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n } : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"action\", \"anchorOrigin\", \"autoHideDuration\", \"children\", \"classes\", \"className\", \"ClickAwayListenerProps\", \"ContentProps\", \"disableWindowBlurListener\", \"message\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"onMouseEnter\", \"onMouseLeave\", \"open\", \"resumeHideDuration\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n var timerAutoHide = React.useRef();\n\n var _React$useState = React.useState(true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var handleClose = useEventCallback(function () {\n if (onClose) {\n onClose.apply(void 0, arguments);\n }\n });\n var setAutoHideTimer = useEventCallback(function (autoHideDurationParam) {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(function () {\n handleClose(null, 'timeout');\n }, autoHideDurationParam);\n });\n React.useEffect(function () {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return function () {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]); // Pause the timer when the user is interacting with the Snackbar\n // or when the user hide the window.\n\n var handlePause = function handlePause() {\n clearTimeout(timerAutoHide.current);\n }; // Restart the timer when the user is no longer interacting with the Snackbar\n // or when the window is shown back.\n\n\n var handleResume = React.useCallback(function () {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n var handleMouseEnter = function handleMouseEnter(event) {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n\n handlePause();\n };\n\n var handleMouseLeave = function handleMouseLeave(event) {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n\n handleResume();\n };\n\n var handleClickAway = function handleClickAway(event) {\n if (onClose) {\n onClose(event, 'clickaway');\n }\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n };\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n React.useEffect(function () {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n return function () {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]); // So we only render active snackbars.\n\n if (!open && exited) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(ClickAwayListener, _extends({\n onClickAway: handleClickAway\n }, ClickAwayListenerProps), /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"anchorOrigin\".concat(capitalize(vertical)).concat(capitalize(horizontal))], className),\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEnter: createChainedFunction(handleEnter, onEnter),\n onEntered: onEntered,\n onEntering: onEntering,\n onExit: onExit,\n onExited: createChainedFunction(handleExited, onExited),\n onExiting: onExiting,\n timeout: transitionDuration,\n direction: vertical === 'top' ? 'down' : 'up'\n }, TransitionProps), children || /*#__PURE__*/React.createElement(SnackbarContent, _extends({\n message: message,\n action: action\n }, ContentProps)))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Snackbar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display. It renders after the message, at the end of the snackbar.\n */\n action: PropTypes.node,\n\n /**\n * The anchor of the `Snackbar`.\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['center', 'left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onClose` function. `onClose` should then set the state of the `open`\n * prop to hide the Snackbar. This behavior is disabled by default with\n * the `null` value.\n */\n autoHideDuration: PropTypes.number,\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children: PropTypes.element,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Props applied to the `ClickAwayListener` element.\n */\n ClickAwayListenerProps: PropTypes.object,\n\n /**\n * Props applied to the [`SnackbarContent`](/api/snackbar-content/) element.\n */\n ContentProps: PropTypes.object,\n\n /**\n * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.\n */\n disableWindowBlurListener: PropTypes.bool,\n\n /**\n * When displaying multiple consecutive Snackbars from a parent rendering a single\n * , add the key prop to ensure independent treatment of each message.\n * e.g. , otherwise, the message may update-in-place and\n * features such as autoHideDuration may be canceled.\n */\n key: PropTypes.any,\n\n /**\n * The message to display.\n */\n message: PropTypes.node,\n\n /**\n * Callback fired when the component requests to be closed.\n * Typically `onClose` is used to set state in the parent component,\n * which is used to control the `Snackbar` `open` prop.\n * The `reason` parameter can optionally be used to control the response to `onClose`,\n * for example ignoring `clickaway`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"timeout\"` (`autoHideDuration` expired), `\"clickaway\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the transition is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired before the transition is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * @ignore\n */\n onMouseEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n\n /**\n * If `true`, `Snackbar` is open.\n */\n open: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before dismissing after user interaction.\n * If `autoHideDuration` prop isn't specified, it does nothing.\n * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,\n * we default to `autoHideDuration / 2` ms.\n */\n resumeHideDuration: PropTypes.number,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiSnackbar'\n})(Snackbar);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');\n\nexports.default = _default;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minHeight: 36,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n borderRadius: '50%',\n padding: 0,\n minWidth: 0,\n width: 56,\n height: 56,\n boxShadow: theme.shadows[6],\n '&:active': {\n boxShadow: theme.shadows[12]\n },\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n },\n textDecoration: 'none'\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // assure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n primary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n secondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"extended\"`. */\n extended: {\n borderRadius: 48 / 2,\n padding: '0 16px',\n width: 'auto',\n minHeight: 'auto',\n minWidth: 48,\n height: 48,\n '&$sizeSmall': {\n width: 'auto',\n padding: '0 8px',\n borderRadius: 34 / 2,\n minWidth: 34,\n height: 34\n },\n '&$sizeMedium': {\n width: 'auto',\n padding: '0 16px',\n borderRadius: 40 / 2,\n minWidth: 40,\n height: 40\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `size=\"small\"``. */\n sizeSmall: {\n width: 40,\n height: 40\n },\n\n /* Styles applied to the root element if `size=\"medium\"``. */\n sizeMedium: {\n width: 48,\n height: 48\n }\n };\n};\nvar Fab = /*#__PURE__*/React.forwardRef(function Fab(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$size = props.size,\n size = _props$size === void 0 ? 'large' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circular' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableFocusRipple\", \"focusVisibleClassName\", \"size\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, size !== 'large' && classes[\"size\".concat(capitalize(size))], disabled && classes.disabled, variant === 'extended' && classes.extended, {\n 'primary': classes.primary,\n 'secondary': classes.secondary,\n 'inherit': classes.colorInherit\n }[color]),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? Fab.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n * 'round' is deprecated, use 'circular' instead.\n */\n variant: chainPropTypes(PropTypes.oneOf(['extended', 'circular', 'round']), function (props) {\n if (props.variant === 'round') {\n throw new Error('Material-UI: variant=\"round\" was renamed variant=\"circular\" for consistency.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFab'\n})(Fab);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `disableGutters={false}`. */\n gutters: _defineProperty({\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2)\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `variant=\"regular\"`. */\n regular: theme.mixins.toolbar,\n\n /* Styles applied to the root element if `variant=\"dense\"`. */\n dense: {\n minHeight: 48\n }\n };\n};\nvar Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'regular' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes[variant], className, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Toolbar.propTypes = {\n /**\n * Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, disables gutter padding.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['regular', 'dense'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiToolbar'\n})(Toolbar);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport SVG from 'react-inlinesvg';\n\nimport IconSystem from '@material-ui/icons/SettingsApplications';\nimport IconPhoto from '@material-ui/icons/Photo';\nimport IconGroup from '@material-ui/icons/SupervisedUserCircle';\nimport IconUser from '@material-ui/icons/PersonOutlined';\nimport IconHost from '@material-ui/icons/Router';\nimport IconConnection from '@material-ui/icons/Wifi';\nimport IconInfo from '@material-ui/icons/Info';\nimport IconMeta from '@material-ui/icons/Description';\nimport IconAlias from '../icons/IconAlias';\n\nimport Utils from './Utils';\n\nexport function getSystemIcon(obj) {\n let icon;\n const id = obj?._id;\n\n if (!id) {\n return null;\n }\n\n // system or design have special icons\n if (id.startsWith('_design/') || (id === 'system')) {\n icon = ;\n } else if (id === '0_userdata' || id === '0_userdata.0') {\n icon = ;\n } else if (id === 'alias' || id === 'alias.0') {\n icon = ;\n } else if (id === 'system.adapter') {\n icon = ;\n } else if (id === 'system.group') {\n icon = ;\n } else if (id === 'system.user') {\n icon = ;\n } else if (id === 'system.host') {\n icon = ;\n } else if (id.endsWith('.connection') || id.endsWith('.connected')) {\n icon = ;\n } else if (id.endsWith('.info')) {\n icon = ;\n } else if (obj?.type === 'meta') {\n icon = ;\n }\n\n return icon || null;\n}\n\nexport function getSelectIdIcon(obj, imagePrefix) {\n imagePrefix = imagePrefix || '.';//http://localhost:8081';\n let src = '';\n const common = obj?.common;\n\n if (common) {\n const cIcon = common.icon;\n if (cIcon) {\n if (!cIcon.startsWith('data:image/')) {\n if (cIcon.includes('.')) {\n let instance;\n if (obj.type === 'instance' || obj.type === 'adapter') {\n src = imagePrefix + '/adapter/' + common.name + '/' + cIcon;\n } else if (obj._id && obj._id.startsWith('system.adapter.')) {\n instance = obj._id.split('.', 3);\n if (cIcon[0] === '/') {\n instance[2] += cIcon;\n } else {\n instance[2] += '/' + cIcon;\n }\n src = imagePrefix + '/adapter/' + instance[2];\n } else {\n instance = obj._id.split('.', 2);\n if (cIcon[0] === '/') {\n instance[0] += cIcon;\n } else {\n instance[0] += '/' + cIcon;\n }\n src = imagePrefix + '/adapter/' + instance[0];\n }\n } else {\n return null;\n }\n } else {\n // base 64 image\n src = cIcon;\n }\n }\n }\n\n return src || null;\n}\n\nclass Icon extends React.Component {\n render() {\n if (this.props.src) {\n if (typeof this.props.src === 'string') {\n if (this.props.src.length < 3) {\n return {this.props.src}; // utf-8 char\n } else {\n if (this.props.src.startsWith('data:image/svg')) {\n return ;\n } else {\n return \"\";\n }\n }\n } else {\n return this.props.src;\n }\n } else {\n return null;\n }\n }\n}\n\nIcon.propTypes = {\n color: PropTypes.string,\n title: PropTypes.string,\n src: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n className: PropTypes.string,\n imagePrefix: PropTypes.string,\n style: PropTypes.object,\n styleUTF8: PropTypes.object,\n};\n\nexport default Icon;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.json2tsv = void 0;\nfunction assertString2DArray(arg) {\n if (!Array.isArray(arg)) {\n throw new TypeError(`Expected string[][], got ${typeof arg}`);\n }\n for (const x of arg) {\n if (!Array.isArray(x)) {\n throw new TypeError(`Expected string[][], got ${typeof x}[]`);\n }\n for (const y of x) {\n if (typeof y !== 'string') {\n throw new TypeError(`Expected string[][], got ${typeof y}[][]`);\n }\n }\n }\n}\nconst SPECIAL_CHAR_REGEX = /[\\t\\n\"]/;\nfunction hasSpecialChar(string) {\n return SPECIAL_CHAR_REGEX.test(string);\n}\nfunction json2tsv(json) {\n assertString2DArray(json);\n return json.map(row => {\n return row.map(cell => {\n return hasSpecialChar(cell) ? `\"${cell.replace(/\"/g, '\"\"')}\"` : cell;\n }).join('\\t');\n }).join('\\n');\n}\nexports.json2tsv = json2tsv;\n//# sourceMappingURL=json2tsv.js.map","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsv2json = void 0;\n/**\n * Modifies the given array, removing the extracted prefix.\n *\n * Assumes the array is nonempty.\n *\n * Here's how it works:\n * If a cell does not start with \", it is a 'raw' cell and everything is read verbatim until a \\t or \\n is found, which ends the cell.\n * If a cell starts with \", it starts in 'escaped' mode, ignoring this first \". In escaped mode, \\t and \\n are treated as normal characters. Once another \" is found, unless it is not a \"\", the escaped mode is over (but the cell isn't necessarily over yet - it will be over on the next \\t or \\n).\n * If the full tsv data finishes with a cell in escaped mode, then that cell is over.\n */\nfunction extractFirstCell(tsvCharacters) {\n const result = [];\n let escapedMode = tsvCharacters[0] === '\"';\n let index = escapedMode ? 1 : 0;\n function done(lineIsOver) {\n tsvCharacters.splice(0, index + 1);\n return { cell: result.join(''), lineIsOver };\n }\n while (index < tsvCharacters.length) {\n const char = tsvCharacters[index];\n const nextChar = tsvCharacters[index + 1];\n if (escapedMode) {\n if (char === '\"') {\n if (nextChar === '\"') {\n result.push('\"');\n index++;\n }\n else {\n escapedMode = false;\n }\n }\n else {\n result.push(char);\n }\n }\n else {\n if (char === '\\r' && nextChar === '\\n') {\n index++;\n return done(true);\n }\n if (char === '\\n')\n return done(true);\n if (char === '\\t')\n return done(false);\n result.push(char);\n }\n index++;\n }\n return done(true);\n}\nfunction tsv2json(tsv) {\n if (typeof tsv !== 'string')\n throw new TypeError(`Expected string, got ${typeof tsv}`);\n if (tsv === '')\n return [[]];\n const characters = [...tsv]; // Account for surrogate pairs\n const result = [];\n let currentRow = [];\n while (characters.length > 0) {\n const { cell, lineIsOver } = extractFirstCell(characters);\n currentRow.push(cell);\n if (lineIsOver) {\n result.push(currentRow);\n currentRow = [];\n }\n }\n return result;\n}\nexports.tsv2json = tsv2json;\n//# sourceMappingURL=tsv2json.js.map","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAceInstance = exports.debounce = exports.editorEvents = exports.editorOptions = void 0;\nvar editorOptions = [\n \"minLines\",\n \"maxLines\",\n \"readOnly\",\n \"highlightActiveLine\",\n \"tabSize\",\n \"enableBasicAutocompletion\",\n \"enableLiveAutocompletion\",\n \"enableSnippets\"\n];\nexports.editorOptions = editorOptions;\nvar editorEvents = [\n \"onChange\",\n \"onFocus\",\n \"onInput\",\n \"onBlur\",\n \"onCopy\",\n \"onPaste\",\n \"onSelectionChange\",\n \"onCursorChange\",\n \"onScroll\",\n \"handleOptions\",\n \"updateRef\"\n];\nexports.editorEvents = editorEvents;\nvar getAceInstance = function () {\n var ace;\n if (typeof window === \"undefined\") {\n // ace-builds just needs some window object to attach ace to.\n // During SSR even just an empty object will work.\n global.window = {};\n ace = require(\"ace-builds\");\n // And it can be discarded immediately afterward to avoid confusing\n // other libraries that might detect SSR the same way we did.\n delete global.window;\n }\n else if (window.ace) {\n // Fallback for ace.require when vanilla ACE is hosted over a CDN\n ace = window.ace;\n ace.acequire = window.ace.require || window.ace.acequire;\n }\n else {\n ace = require(\"ace-builds\");\n }\n return ace;\n};\nexports.getAceInstance = getAceInstance;\nvar debounce = function (fn, delay) {\n var timer = null;\n // tslint:disable-next-line\n return function () {\n var context = this;\n var args = arguments;\n clearTimeout(timer);\n timer = setTimeout(function () {\n fn.apply(context, args);\n }, delay);\n };\n};\nexports.debounce = debounce;\n//# sourceMappingURL=editorOptions.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar editorOptions_1 = require(\"./editorOptions\");\nvar ace = (0, editorOptions_1.getAceInstance)();\nvar ace_builds_1 = require(\"ace-builds\");\nvar ext_split_1 = require(\"ace-builds/src-noconflict/ext-split\");\nvar PropTypes = require(\"prop-types\");\nvar React = require(\"react\");\nvar isEqual = require(\"lodash.isequal\");\nvar get = require(\"lodash.get\");\nvar SplitComponent = /** @class */ (function (_super) {\n __extends(SplitComponent, _super);\n function SplitComponent(props) {\n var _this = _super.call(this, props) || this;\n editorOptions_1.editorEvents.forEach(function (method) {\n _this[method] = _this[method].bind(_this);\n });\n _this.debounce = editorOptions_1.debounce;\n return _this;\n }\n SplitComponent.prototype.isInShadow = function (node) {\n var parent = node && node.parentNode;\n while (parent) {\n if (parent.toString() === \"[object ShadowRoot]\") {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n };\n SplitComponent.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, className = _a.className, onBeforeLoad = _a.onBeforeLoad, mode = _a.mode, focus = _a.focus, theme = _a.theme, fontSize = _a.fontSize, value = _a.value, defaultValue = _a.defaultValue, cursorStart = _a.cursorStart, showGutter = _a.showGutter, wrapEnabled = _a.wrapEnabled, showPrintMargin = _a.showPrintMargin, _b = _a.scrollMargin, scrollMargin = _b === void 0 ? [0, 0, 0, 0] : _b, keyboardHandler = _a.keyboardHandler, onLoad = _a.onLoad, commands = _a.commands, annotations = _a.annotations, markers = _a.markers, splits = _a.splits;\n this.editor = ace.edit(this.refEditor);\n if (this.isInShadow(this.refEditor)) {\n this.editor.renderer.attachToShadowRoot();\n }\n this.editor.setTheme(\"ace/theme/\" + theme);\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n var editorProps = Object.keys(this.props.editorProps);\n var split = new ext_split_1.Split(this.editor.container, \"ace/theme/\" + theme, splits);\n this.editor.env.split = split;\n this.splitEditor = split.getEditor(0);\n this.split = split;\n // in a split scenario we don't want a print margin for the entire application\n this.editor.setShowPrintMargin(false);\n this.editor.renderer.setShowGutter(false);\n // get a list of possible options to avoid 'misspelled option errors'\n var availableOptions = this.splitEditor.$options;\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(this.onChange, this.props.debounceChangePeriod);\n }\n split.forEach(function (editor, index) {\n for (var i = 0; i < editorProps.length; i++) {\n editor[editorProps[i]] = _this.props.editorProps[editorProps[i]];\n }\n var defaultValueForEditor = get(defaultValue, index);\n var valueForEditor = get(value, index, \"\");\n editor.session.setUndoManager(new ace.UndoManager());\n editor.setTheme(\"ace/theme/\" + theme);\n editor.renderer.setScrollMargin(scrollMargin[0], scrollMargin[1], scrollMargin[2], scrollMargin[3]);\n editor.getSession().setMode(\"ace/mode/\" + mode);\n editor.setFontSize(fontSize);\n editor.renderer.setShowGutter(showGutter);\n editor.getSession().setUseWrapMode(wrapEnabled);\n editor.setShowPrintMargin(showPrintMargin);\n editor.on(\"focus\", _this.onFocus);\n editor.on(\"blur\", _this.onBlur);\n editor.on(\"input\", _this.onInput);\n editor.on(\"copy\", _this.onCopy);\n editor.on(\"paste\", _this.onPaste);\n editor.on(\"change\", _this.onChange);\n editor\n .getSession()\n .selection.on(\"changeSelection\", _this.onSelectionChange);\n editor.getSession().selection.on(\"changeCursor\", _this.onCursorChange);\n editor.session.on(\"changeScrollTop\", _this.onScroll);\n editor.setValue(defaultValueForEditor === undefined\n ? valueForEditor\n : defaultValueForEditor, cursorStart);\n var newAnnotations = get(annotations, index, []);\n var newMarkers = get(markers, index, []);\n editor.getSession().setAnnotations(newAnnotations);\n if (newMarkers && newMarkers.length > 0) {\n _this.handleMarkers(newMarkers, editor);\n }\n for (var i = 0; i < editorOptions_1.editorOptions.length; i++) {\n var option = editorOptions_1.editorOptions[i];\n if (availableOptions.hasOwnProperty(option)) {\n editor.setOption(option, _this.props[option]);\n }\n else if (_this.props[option]) {\n console.warn(\"ReaceAce: editor option \" + option + \" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?\");\n }\n }\n _this.handleOptions(_this.props, editor);\n if (Array.isArray(commands)) {\n commands.forEach(function (command) {\n if (typeof command.exec === \"string\") {\n editor.commands.bindKey(command.bindKey, command.exec);\n }\n else {\n editor.commands.addCommand(command);\n }\n });\n }\n if (keyboardHandler) {\n editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n });\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n if (focus) {\n this.splitEditor.focus();\n }\n var sp = this.editor.env.split;\n sp.setOrientation(this.props.orientation === \"below\" ? sp.BELOW : sp.BESIDE);\n sp.resize(true);\n if (onLoad) {\n onLoad(sp);\n }\n };\n SplitComponent.prototype.componentDidUpdate = function (prevProps) {\n var _this = this;\n var oldProps = prevProps;\n var nextProps = this.props;\n var split = this.editor.env.split;\n if (nextProps.splits !== oldProps.splits) {\n split.setSplits(nextProps.splits);\n }\n if (nextProps.orientation !== oldProps.orientation) {\n split.setOrientation(nextProps.orientation === \"below\" ? split.BELOW : split.BESIDE);\n }\n split.forEach(function (editor, index) {\n if (nextProps.mode !== oldProps.mode) {\n editor.getSession().setMode(\"ace/mode/\" + nextProps.mode);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n editor.setKeyboardHandler(\"ace/keyboard/\" + nextProps.keyboardHandler);\n }\n else {\n editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n editor.setFontSize(nextProps.fontSize);\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n editor.renderer.setShowGutter(nextProps.showGutter);\n }\n for (var i = 0; i < editorOptions_1.editorOptions.length; i++) {\n var option = editorOptions_1.editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n editor.setOption(option, nextProps[option]);\n }\n }\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n _this.handleOptions(nextProps, editor);\n }\n var nextValue = get(nextProps.value, index, \"\");\n if (editor.getValue() !== nextValue) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n _this.silent = true;\n var pos = editor.session.selection.toJSON();\n editor.setValue(nextValue, nextProps.cursorStart);\n editor.session.selection.fromJSON(pos);\n _this.silent = false;\n }\n var newAnnotations = get(nextProps.annotations, index, []);\n var oldAnnotations = get(oldProps.annotations, index, []);\n if (!isEqual(newAnnotations, oldAnnotations)) {\n editor.getSession().setAnnotations(newAnnotations);\n }\n var newMarkers = get(nextProps.markers, index, []);\n var oldMarkers = get(oldProps.markers, index, []);\n if (!isEqual(newMarkers, oldMarkers) && Array.isArray(newMarkers)) {\n _this.handleMarkers(newMarkers, editor);\n }\n });\n if (nextProps.className !== oldProps.className) {\n var appliedClasses = this.refEditor.className;\n var appliedClassesArray_1 = appliedClasses.trim().split(\" \");\n var oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(function (oldClass) {\n var index = appliedClassesArray_1.indexOf(oldClass);\n appliedClassesArray_1.splice(index, 1);\n });\n this.refEditor.className =\n \" \" + nextProps.className + \" \" + appliedClassesArray_1.join(\" \");\n }\n if (nextProps.theme !== oldProps.theme) {\n split.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n if (nextProps.focus && !oldProps.focus) {\n this.splitEditor.focus();\n }\n if (nextProps.height !== this.props.height ||\n nextProps.width !== this.props.width) {\n this.editor.resize();\n }\n };\n SplitComponent.prototype.componentWillUnmount = function () {\n this.editor.destroy();\n this.editor = null;\n };\n SplitComponent.prototype.onChange = function (event) {\n if (this.props.onChange && !this.silent) {\n var value_1 = [];\n this.editor.env.split.forEach(function (editor) {\n value_1.push(editor.getValue());\n });\n this.props.onChange(value_1, event);\n }\n };\n SplitComponent.prototype.onSelectionChange = function (event) {\n if (this.props.onSelectionChange) {\n var value_2 = [];\n this.editor.env.split.forEach(function (editor) {\n value_2.push(editor.getSelection());\n });\n this.props.onSelectionChange(value_2, event);\n }\n };\n SplitComponent.prototype.onCursorChange = function (event) {\n if (this.props.onCursorChange) {\n var value_3 = [];\n this.editor.env.split.forEach(function (editor) {\n value_3.push(editor.getSelection());\n });\n this.props.onCursorChange(value_3, event);\n }\n };\n SplitComponent.prototype.onFocus = function (event) {\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n SplitComponent.prototype.onInput = function (event) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n };\n SplitComponent.prototype.onBlur = function (event) {\n if (this.props.onBlur) {\n this.props.onBlur(event);\n }\n };\n SplitComponent.prototype.onCopy = function (text) {\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n };\n SplitComponent.prototype.onPaste = function (text) {\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n };\n SplitComponent.prototype.onScroll = function () {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n };\n SplitComponent.prototype.handleOptions = function (props, editor) {\n var setOptions = Object.keys(props.setOptions);\n for (var y = 0; y < setOptions.length; y++) {\n editor.setOption(setOptions[y], props.setOptions[setOptions[y]]);\n }\n };\n SplitComponent.prototype.handleMarkers = function (markers, editor) {\n // remove foreground markers\n var currentMarkers = editor.getSession().getMarkers(true);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers\n currentMarkers = editor.getSession().getMarkers(false);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // add new markers\n markers.forEach(function (_a) {\n var startRow = _a.startRow, startCol = _a.startCol, endRow = _a.endRow, endCol = _a.endCol, className = _a.className, type = _a.type, _b = _a.inFront, inFront = _b === void 0 ? false : _b;\n var range = new ace_builds_1.Range(startRow, startCol, endRow, endCol);\n editor\n .getSession()\n .addMarker(range, className, type, inFront);\n });\n };\n SplitComponent.prototype.updateRef = function (item) {\n this.refEditor = item;\n };\n SplitComponent.prototype.render = function () {\n var _a = this.props, name = _a.name, width = _a.width, height = _a.height, style = _a.style;\n var divStyle = __assign({ width: width, height: height }, style);\n return React.createElement(\"div\", { ref: this.updateRef, id: name, style: divStyle });\n };\n SplitComponent.propTypes = {\n className: PropTypes.string,\n debounceChangePeriod: PropTypes.number,\n defaultValue: PropTypes.arrayOf(PropTypes.string),\n focus: PropTypes.bool,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.string,\n mode: PropTypes.string,\n name: PropTypes.string,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n orientation: PropTypes.string,\n showGutter: PropTypes.bool,\n splits: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.arrayOf(PropTypes.string),\n width: PropTypes.string,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n enableLiveAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n commands: PropTypes.array\n };\n SplitComponent.defaultProps = {\n name: \"ace-editor\",\n focus: false,\n orientation: \"beside\",\n splits: 2,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n value: [],\n fontSize: 12,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false\n };\n return SplitComponent;\n}(React.Component));\nexports.default = SplitComponent;\n//# sourceMappingURL=split.js.map","/** The status of an event. */\n// eslint-disable-next-line import/export\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error occurred during submission. */\n Failed = 'failed',\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace, import/export\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nenum States {\n /** Pending */\n PENDING = 'PENDING',\n /** Resolved / OK */\n RESOLVED = 'RESOLVED',\n /** Rejected / Error */\n REJECTED = 'REJECTED',\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<{\n done: boolean;\n onfulfilled?: ((value: T) => T | PromiseLike) | null;\n onrejected?: ((reason: any) => any) | null;\n }> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public static resolve(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n }\n\n /** JSDoc */\n public static reject(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n }\n\n /** JSDoc */\n public static all(collection: Array>): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n if (!Array.isArray(collection)) {\n reject(new TypeError(`Promise.all requires an array as input.`));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n let counter = collection.length;\n const resolvedCollection: U[] = [];\n\n collection.forEach((item, index) => {\n void SyncPromise.resolve(item)\n .then(value => {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._attachHandler({\n done: false,\n onfulfilled: result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: reason => {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve((val as unknown) as any);\n });\n });\n }\n\n /** JSDoc */\n public toString(): string {\n return '[object SyncPromise]';\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n // TODO: FIXME\n /** JSDoc */\n private readonly _attachHandler = (handler: {\n /** JSDoc */\n done: boolean;\n /** JSDoc */\n onfulfilled?(value: T): any;\n /** JSDoc */\n onrejected?(reason: any): any;\n }) => {\n this._handlers = this._handlers.concat(handler);\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler.done) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n if (handler.onfulfilled) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler.onfulfilled((this._value as unknown) as any);\n }\n }\n\n if (this._state === States.REJECTED) {\n if (handler.onrejected) {\n handler.onrejected(this._value);\n }\n }\n\n handler.done = true;\n });\n };\n}\n\nexport { SyncPromise };\n","import { Session as SessionInterface, SessionContext, SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n\n/**\n * @inheritdoc\n */\nexport class Session implements SessionInterface {\n public userAgent?: string;\n public errors: number = 0;\n public release?: string;\n public sid: string = uuid4();\n public did?: string;\n public timestamp: number;\n public started: number;\n public duration?: number = 0;\n public status: SessionStatus = SessionStatus.Ok;\n public environment?: string;\n public ipAddress?: string;\n public init: boolean = true;\n public ignoreDuration: boolean = false;\n\n public constructor(context?: Omit) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n this.timestamp = startingTime;\n this.started = startingTime;\n if (context) {\n this.update(context);\n }\n }\n\n /** JSDoc */\n // eslint-disable-next-line complexity\n public update(context: SessionContext = {}): void {\n if (context.user) {\n if (!this.ipAddress && context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n\n if (!this.did && !context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n this.timestamp = context.timestamp || timestampInSeconds();\n if (context.ignoreDuration) {\n this.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n this.init = context.init;\n }\n if (!this.did && context.did) {\n this.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n if (this.ignoreDuration) {\n this.duration = undefined;\n } else if (typeof context.duration === 'number') {\n this.duration = context.duration;\n } else {\n const duration = this.timestamp - this.started;\n this.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n this.release = context.release;\n }\n if (context.environment) {\n this.environment = context.environment;\n }\n if (!this.ipAddress && context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n if (!this.userAgent && context.userAgent) {\n this.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n if (context.status) {\n this.status = context.status;\n }\n }\n\n /** JSDoc */\n public close(status?: Exclude): void {\n if (status) {\n this.update({ status });\n } else if (this.status === SessionStatus.Ok) {\n this.update({ status: SessionStatus.Exited });\n } else {\n this.update();\n }\n }\n\n /** JSDoc */\n public toJSON(): {\n init: boolean;\n sid: string;\n did?: string;\n timestamp: string;\n started: string;\n duration?: number;\n status: SessionStatus;\n errors: number;\n attrs?: {\n release?: string;\n environment?: string;\n user_agent?: string;\n ip_address?: string;\n };\n } {\n return dropUndefinedKeys({\n sid: `${this.sid}`,\n init: this.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(this.started * 1000).toISOString(),\n timestamp: new Date(this.timestamp * 1000).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? `${this.did}` : undefined,\n duration: this.duration,\n attrs: dropUndefinedKeys({\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent,\n }),\n });\n }\n}\n","/* eslint-disable max-lines */\nimport {\n Breadcrumb,\n CaptureContext,\n Context,\n Contexts,\n Event,\n EventHint,\n EventProcessor,\n Extra,\n Extras,\n Primitive,\n RequestSession,\n Scope as ScopeInterface,\n ScopeContext,\n Severity,\n Span,\n Transaction,\n User,\n} from '@sentry/types';\nimport { dateTimestampInSeconds, getGlobalObject, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n\nimport { Session } from './session';\n\n/**\n * Absolute maximum number of breadcrumbs added to an event.\n * The `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: Primitive } = {};\n\n /** Extra */\n protected _extra: Extras = {};\n\n /** Contexts */\n protected _contexts: Contexts = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction Name */\n protected _transactionName?: string;\n\n /** Span */\n protected _span?: Span;\n\n /** Session */\n protected _session?: Session;\n\n /** Request Mode Session Status */\n protected _requestSession?: RequestSession;\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n if (this._session) {\n this._session.update({ user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n public getRequestSession(): RequestSession | undefined {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n public setRequestSession(requestSession?: RequestSession): this {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n public setTransaction(name?: string): this {\n return this.setTransactionName(name);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts = { ...this._contexts, [key]: context };\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n public getTransaction(): Transaction | undefined {\n // often, this span will be a transaction, but it's not guaranteed to be\n const span = this.getSpan() as undefined | (Span & { spanRecorder: { spans: Span[] } });\n\n // try it the new way first\n if (span?.transaction) {\n return span?.transaction;\n }\n\n // fallback to the old way (known bug: this only finds transactions with sampled = true)\n if (span?.spanRecorder?.spans[0]) {\n return span.spanRecorder.spans[0] as Transaction;\n }\n\n // neither way found a transaction\n return undefined;\n }\n\n /**\n * @inheritDoc\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext as (scope: T) => T)(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext as ScopeContext;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n this._breadcrumbs = [...this._breadcrumbs, mergedBreadcrumb].slice(-maxCrumbs);\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional information about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transactionName = this._span.transaction?.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n void (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n","/* eslint-disable max-lines */\nimport {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n CustomSamplingContext,\n Event,\n EventHint,\n Extra,\n Extras,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Primitive,\n SessionContext,\n SessionStatus,\n Severity,\n Span,\n SpanContext,\n Transaction,\n TransactionContext,\n User,\n} from '@sentry/types';\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isNodeEnv, logger, uuid4 } from '@sentry/utils';\n\nimport { Scope } from './scope';\nimport { Session } from './session';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * A layer in the process stack.\n * @hidden\n */\nexport interface Layer {\n client?: Client;\n scope?: Scope;\n}\n\n/**\n * An object that contains a hub and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: {\n hub?: Hub;\n /**\n * Extra Hub properties injected by various SDKs\n */\n integrations?: Integration[];\n extensions?: {\n /** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n domain?: { [key: string]: any };\n } & {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n };\n}\n\n/**\n * @hidden\n * @deprecated Can be removed once `Hub.getActiveDomain` is removed.\n */\nexport interface DomainAsCarrier extends Carrier {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n members: { [key: string]: any }[];\n}\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [{}];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this.getStackTop().scope = scope;\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = uuid4();\n if (event.type !== 'transaction') {\n this._lastEventId = eventId;\n }\n\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const { scope, client } = this.getStackTop();\n\n if (!scope || !client) return;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const scope = this.getScope();\n if (scope) scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): void {\n const scope = this.getScope();\n if (scope) scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): void {\n const scope = this.getScope();\n if (scope) scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): void {\n const scope = this.getScope();\n if (scope) scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): void {\n const scope = this.getScope();\n if (scope) scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const scope = this.getScope();\n if (scope) scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const { scope, client } = this.getStackTop();\n if (scope && client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(context: SpanContext): Span {\n return this._callExtensionMethod('startSpan', context);\n }\n\n /**\n * @inheritDoc\n */\n public startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(endSession: boolean = false): void {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n public endSession(): void {\n this.getStackTop()\n ?.scope?.getSession()\n ?.close();\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n this.getStackTop()?.scope?.setSession();\n }\n\n /**\n * @inheritDoc\n */\n public startSession(context?: SessionContext): Session {\n const { scope, client } = this.getStackTop();\n const { release, environment } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const global = getGlobalObject<{ navigator?: { userAgent?: string } }>();\n const { userAgent } = global.navigator || {};\n\n const session = new Session({\n release,\n environment,\n ...(scope && { user: scope.getUser() }),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n if (scope) {\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === SessionStatus.Ok) {\n currentSession.update({ status: SessionStatus.Exited });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n }\n\n return session;\n }\n\n /**\n * Sends the current Session on the scope\n */\n private _sendSessionUpdate(): void {\n const { scope, client } = this.getStackTop();\n if (!scope) return;\n\n const session = scope.getSession && scope.getSession();\n if (session) {\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _invokeClient(method: M, ...args: any[]): void {\n const { scope, client } = this.getStackTop();\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (client as any)[method](...args, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Returns the active domain, if one exists\n * @deprecated No longer used; remove in v7\n * @returns The domain, or undefined if there is no active domain\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function getActiveDomain(): DomainAsCarrier | undefined {\n logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n\n const sentry = getMainCarrier().__SENTRY__;\n\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n const activeDomain = getMainCarrier().__SENTRY__?.extensions?.domain?.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\n/* eslint-disable @typescript-eslint/no-use-before-define */\nimport * as React from 'react';\nimport { noTextChildNodes, possibleStandardNames, randomString, styleToObject } from './helpers';\nfunction parseAttributes(node, reactKey) {\n var attributes = {\n key: reactKey,\n };\n /* istanbul ignore else */\n if (node instanceof Element) {\n var nodeClassNames = node.getAttribute('class');\n if (nodeClassNames) {\n attributes.className = nodeClassNames;\n }\n __spreadArray([], __read(node.attributes)).forEach(function (d) {\n switch (d.name) {\n // this is manually handled above, so break;\n case 'class':\n break;\n case 'style':\n attributes[d.name] = styleToObject(d.value);\n break;\n case 'allowfullscreen':\n case 'allowpaymentrequest':\n case 'async':\n case 'autofocus':\n case 'autoplay':\n case 'checked':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'formnovalidate':\n case 'hidden':\n case 'ismap':\n case 'itemscope':\n case 'loop':\n case 'multiple':\n case 'muted':\n case 'nomodule':\n case 'novalidate':\n case 'open':\n case 'readonly':\n case 'required':\n case 'reversed':\n case 'selected':\n case 'typemustmatch':\n attributes[possibleStandardNames[d.name] || d.name] = true;\n break;\n default:\n attributes[possibleStandardNames[d.name] || d.name] = d.value;\n }\n });\n }\n return attributes;\n}\nfunction parseChildren(childNodeList, level, options) {\n var children = __spreadArray([], __read(childNodeList)).map(function (node, index) {\n return convertFromNode(node, __assign(__assign({}, options), { index: index, level: level + 1 }));\n })\n .filter(Boolean);\n if (!children.length) {\n return null;\n }\n return children;\n}\nfunction parseName(nodeName) {\n if (/[a-z]+[A-Z]+[a-z]+/.test(nodeName)) {\n return nodeName;\n }\n return nodeName.toLowerCase();\n}\nexport function convertFromNode(input, options) {\n var _a;\n if (options === void 0) { options = {}; }\n if (!input || !(input instanceof Node)) {\n return null;\n }\n var _b = options.actions, actions = _b === void 0 ? [] : _b, _c = options.index, index = _c === void 0 ? 0 : _c, _d = options.level, level = _d === void 0 ? 0 : _d, randomKey = options.randomKey;\n var node = input;\n var key = level + \"-\" + index;\n var result = [];\n if (randomKey && level === 0) {\n key = randomString() + \"-\" + key;\n }\n /* istanbul ignore else */\n if (Array.isArray(actions)) {\n actions.forEach(function (action) {\n if (action.condition(node, key, level)) {\n if (typeof action.pre === 'function') {\n node = action.pre(node, key, level);\n if (!(node instanceof Node)) {\n node = input;\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)');\n }\n }\n }\n if (typeof action.post === 'function') {\n result.push(action.post(node, key, level));\n }\n }\n });\n }\n if (result.length) {\n return result;\n }\n switch (node.nodeType) {\n case 1: {\n // regular dom-node\n return React.createElement(parseName(node.nodeName), parseAttributes(node, key), parseChildren(node.childNodes, level, options));\n }\n case 3: {\n // textnode\n var nodeText = ((_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.toString()) || '';\n /* istanbul ignore else */\n if (/^\\s+$/.test(nodeText) && !/[\\u202F\\u00A0]/.test(nodeText)) {\n return null;\n }\n /* istanbul ignore next */\n if (!node.parentNode) {\n return nodeText;\n }\n var parentNodeName = node.parentNode.nodeName.toLowerCase();\n if (noTextChildNodes.indexOf(parentNodeName) !== -1) {\n /* istanbul ignore else */\n if (/\\S/.test(nodeText)) {\n // eslint-disable-next-line no-console\n console.warn(\"A textNode is not allowed inside '\" + parentNodeName + \"'. Your text \\\"\" + nodeText + \"\\\" will be ignored\");\n }\n return null;\n }\n return nodeText;\n }\n case 8: {\n // html-comment\n return null;\n }\n /* istanbul ignore next */\n default: {\n return null;\n }\n }\n}\nexport function convertFromString(input, options) {\n if (options === void 0) { options = {}; }\n if (!input || typeof input !== 'string') {\n return null;\n }\n var _a = options.nodeOnly, nodeOnly = _a === void 0 ? false : _a, _b = options.selector, selector = _b === void 0 ? 'body > *' : _b, _c = options.type, type = _c === void 0 ? 'text/html' : _c;\n try {\n var parser = new DOMParser();\n var doc = parser.parseFromString(input, type);\n var node = doc.querySelector(selector);\n if (!(node instanceof Node)) {\n throw new Error('Error parsing input');\n }\n if (nodeOnly) {\n return node;\n }\n return convertFromNode(node, options);\n }\n catch (error) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n return null;\n}\nexport default function convert(input, options) {\n if (options === void 0) { options = {}; }\n if (typeof input === 'string') {\n return convertFromString(input, options);\n }\n if (input instanceof Node) {\n return convertFromNode(input, options);\n }\n return null;\n}\n//# sourceMappingURL=index.js.map","// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata\nexport const SDK_NAME = 'sentry.javascript.browser';\n","import { DsnLike } from './dsn';\nimport { Event } from './event';\nimport { SentryRequestType } from './request';\nimport { Response } from './response';\nimport { SdkMetadata } from './sdkmetadata';\nimport { Session, SessionAggregates } from './session';\n\nexport enum Outcome {\n BeforeSend = 'before_send',\n EventProcessor = 'event_processor',\n NetworkError = 'network_error',\n QueueOverflow = 'queue_overflow',\n RateLimitBackoff = 'ratelimit_backoff',\n SampleRate = 'sample_rate',\n}\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the event to the Store endpoint in Sentry.\n *\n * @param event Event that should be sent to Sentry.\n */\n sendEvent(event: Event): PromiseLike;\n\n /**\n * Sends the session to the Envelope endpoint in Sentry.\n *\n * @param session Session that should be sent to Sentry | Session Aggregates that should be sent to Sentry.\n */\n sendSession?(session: Session | SessionAggregates): PromiseLike;\n\n /**\n * Wait for all events to be sent or the timeout to expire, whichever comes first.\n *\n * @param timeout Maximum time in ms the transport should wait for events to be flushed. Omitting this parameter will\n * cause the transport to wait until all events are sent before resolving the promise.\n * @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are\n * still events in the queue when the timeout is reached.\n */\n close(timeout?: number): PromiseLike;\n\n /**\n * Increment the counter for the specific client outcome\n */\n recordLostEvent?(type: Outcome, category: SentryRequestType): void;\n}\n\n/** JSDoc */\nexport type TransportClass = new (options: TransportOptions) => T;\n\n/** JSDoc */\nexport interface TransportOptions {\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: { [key: string]: string };\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n /** Fetch API init parameters */\n fetchParameters?: { [key: string]: string };\n /** The envelope tunnel to use. */\n tunnel?: string;\n /** Send SDK Client Reports. Enabled by default. */\n sendClientReports?: boolean;\n /**\n * Set of metadata about the SDK that can be internally used to enhance envelopes and events,\n * and provide additional data about every request.\n * */\n _metadata?: SdkMetadata;\n}\n","export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\n/** Error message */\nconst ERROR_MESSAGE = 'Invalid Dsn';\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport class Dsn implements DsnComponents {\n /** Protocol used to connect to Sentry. */\n public protocol!: DsnProtocol;\n /** Public authorization key (deprecated, renamed to publicKey). */\n public user!: string;\n /** Public authorization key. */\n public publicKey!: string;\n /** Private authorization key (deprecated, optional). */\n public pass!: string;\n /** Hostname of the Sentry instance. */\n public host!: string;\n /** Port of the Sentry instance. */\n public port!: string;\n /** Path */\n public path!: string;\n /** Project ID */\n public projectId!: string;\n\n /** Creates a new Dsn component */\n public constructor(from: DsnLike) {\n if (typeof from === 'string') {\n this._fromString(from);\n } else {\n this._fromComponents(from);\n }\n\n this._validate();\n }\n\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n public toString(withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = this;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }\n\n /** Parses a string into this Dsn. */\n private _fromString(str: string): void {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n }\n\n /** Maps Dsn components into this instance. */\n private _fromComponents(components: DsnComponents): void {\n // TODO this is for backwards compatibility, and can be removed in a future version\n if ('user' in components && !('publicKey' in components)) {\n components.publicKey = components.user;\n }\n this.user = components.publicKey || '';\n\n this.protocol = components.protocol;\n this.publicKey = components.publicKey || '';\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n }\n\n /** Validates this Dsn and throws on error. */\n private _validate(): void {\n ['protocol', 'publicKey', 'host', 'projectId'].forEach(component => {\n if (!this[component as keyof DsnComponents]) {\n throw new SentryError(`${ERROR_MESSAGE}: ${component} missing`);\n }\n });\n\n if (!this.projectId.match(/^\\d+$/)) {\n throw new SentryError(`${ERROR_MESSAGE}: Invalid projectId ${this.projectId}`);\n }\n\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(`${ERROR_MESSAGE}: Invalid protocol ${this.protocol}`);\n }\n\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(`${ERROR_MESSAGE}: Invalid port ${this.port}`);\n }\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n} & { initialized?: boolean };\n\n/**\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n return integrations.reduce((acc, integrations) => {\n if (acc.every(accIntegration => integrations.name !== accIntegration.name)) {\n acc.push(integrations);\n }\n return acc;\n }, [] as Integration[]);\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n\n let integrations: Integration[] = [...filterDuplicates(defaultIntegrations)];\n\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = [\n ...integrations.filter(integrations =>\n userIntegrations.every(userIntegration => userIntegration.name !== integrations.name),\n ),\n // And filter out duplicated user options integrations\n ...filterDuplicates(userIntegrations),\n ];\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n Object.defineProperty(integrations, 'initialized', { value: true });\n return integrations;\n}\n","/* eslint-disable max-lines */\nimport { Scope, Session } from '@sentry/hub';\nimport {\n Client,\n Event,\n EventHint,\n Integration,\n IntegrationClass,\n Options,\n Outcome,\n SessionStatus,\n Severity,\n Transport,\n} from '@sentry/types';\nimport {\n checkOrSetAlreadyCaught,\n dateTimestampInSeconds,\n Dsn,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n normalize,\n SentryError,\n SyncPromise,\n truncate,\n uuid4,\n} from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the environment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: Dsn;\n\n /** Array of used integrations. */\n protected _integrations: IntegrationIndex = {};\n\n /** Number of calls being processed */\n protected _numProcessing: number = 0;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint?.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!this._isEnabled()) {\n logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n\n if (!(typeof session.release === 'string')) {\n logger.warn('Discarded session because of missing or non-string release');\n } else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): Dsn | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._getBackend().getTransport();\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return this.getTransport()\n .close(timeout)\n .then(transportFlushed => clientFinished && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n if (this._isEnabled() && !this._integrations.initialized) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === SessionStatus.Ok;\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n session.update({\n ...(crashed && { status: SessionStatus.Crashed }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /** Deliver captured session to Sentry */\n protected _sendSession(session: Session): void {\n this._getBackend().sendSession(session);\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { normalizeDepth = 3 } = this.getOptions();\n const prepared: Event = {\n ...event,\n event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = SyncPromise.resolve(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n\n const { _experiments = {} } = this.getOptions();\n if (_experiments.ensureNoCircularStructures) {\n return normalize(normalized);\n }\n\n return normalized;\n }\n\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n protected _applyClientOptions(event: Event): void {\n const options = this.getOptions();\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\n protected _applyIntegrationsMetadata(event: Event): void {\n const integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationsArray];\n }\n }\n\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n protected _sendEvent(event: Event): void {\n this._getBackend().sendEvent(event);\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n logger.error(reason);\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { beforeSend, sampleRate } = this.getOptions();\n const transport = this.getTransport();\n\n if (!this._isEnabled()) {\n return SyncPromise.reject(new SentryError('SDK not enabled, will not capture event.'));\n }\n\n const isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n transport.recordLostEvent?.(Outcome.SampleRate, 'event');\n return SyncPromise.reject(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n ),\n );\n }\n\n return this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n transport.recordLostEvent?.(Outcome.EventProcessor, event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n\n const isInternalException = hint && hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n return this._ensureBeforeSendRv(beforeSendResult);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n transport.recordLostEvent?.(Outcome.BeforeSend, event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n\n const session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing += 1;\n void promise.then(\n value => {\n this._numProcessing -= 1;\n return value;\n },\n reason => {\n this._numProcessing -= 1;\n return reason;\n },\n );\n }\n\n /**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\n protected _ensureBeforeSendRv(\n rv: PromiseLike | Event | null,\n ): PromiseLike | Event | null {\n const nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return (rv as PromiseLike).then(\n event => {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n },\n e => {\n throw new SentryError(`beforeSend rejected with ${e}`);\n },\n );\n } else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n }\n}\n","import { Event, Response, Status, Transport } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return SyncPromise.resolve({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: Status.Skipped,\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return SyncPromise.resolve(true);\n }\n}\n","import { Event, EventHint, Options, Session, Severity, Transport } from '@sentry/types';\nimport { logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instantiate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates a {@link Event} from an exception. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates a {@link Event} from a plain message. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /** Submits the session to Sentry */\n sendSession(session: Session): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instantiate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n void this._transport.sendEvent(event).then(null, reason => {\n logger.error(`Error while sending event: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): void {\n if (!this._transport.sendSession) {\n logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n\n void this._transport.sendSession(session).then(null, reason => {\n logger.error(`Error while sending session: ${reason}`);\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n}\n","/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access, max-lines */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n args: string[];\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function computeStackTrace(ex: any): StackTrace {\n let stack = null;\n let popSize = 0;\n\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n popSize = ex.framesToPop;\n } else if (reactMinifiedRegexp.test(ex.message)) {\n popSize = 1;\n }\n }\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (let i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n\n // Arpad: Working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n let url = parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2];\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, url] = extractSafariExtensionDetails(func, url);\n\n element = {\n url,\n func,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = (ex.columnNumber as number) + 1;\n }\n\n let url = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, url] = extractSafariExtensionDetails(func, url);\n\n element = {\n url,\n func,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\((.*)\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunatelly \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, url: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${url}` : `safari-web-extension:${url}`,\n ]\n : [func, url];\n};\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(\n exception: Record,\n syntheticException?: Error,\n rejection?: boolean,\n): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .reverse();\n}\n","import { Event, EventHint, Options, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n SyncPromise,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/**\n * Builds and Event from a Exception\n * @hidden\n */\nexport function eventFromException(options: Options, exception: unknown, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n options: Options,\n message: string,\n level: Severity = Severity.Info,\n hint?: EventHint,\n): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n rejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n // eslint-disable-next-line no-param-reassign\n exception = errorEvent.error;\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name, code, and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n const domException = exception as DOMException;\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n if ('code' in domException) {\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n const objectException = exception as Record;\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n","import { Event, SdkInfo, SentryRequest, SentryRequestType, Session, SessionAggregates } from '@sentry/types';\n\nimport { API } from './api';\n\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api: API): SdkInfo | undefined {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n const { name, version } = api.metadata.sdk;\n return { name, version };\n}\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event: Event, sdkInfo?: SdkInfo): Event {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session: Session | SessionAggregates, api: API): SentryRequest {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n const envelopeHeaders = JSON.stringify({\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(api.forceEnvelope() && { dsn: api.getDsn().toString() }),\n });\n // I know this is hacky but we don't want to add `session` to request type since it's never rate limited\n const type: SentryRequestType = 'aggregates' in session ? ('sessions' as SentryRequestType) : 'session';\n const itemHeaders = JSON.stringify({\n type,\n });\n\n return {\n body: `${envelopeHeaders}\\n${itemHeaders}\\n${JSON.stringify(session)}`,\n type,\n url: api.getEnvelopeEndpointWithUrlEncodedAuth(),\n };\n}\n\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event: Event, api: API): SentryRequest {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n const eventType = event.type || 'event';\n const useEnvelope = eventType === 'transaction' || api.forceEnvelope();\n\n const { transactionSampling, ...metadata } = event.debug_meta || {};\n const { method: samplingMethod, rate: sampleRate } = transactionSampling || {};\n if (Object.keys(metadata).length === 0) {\n delete event.debug_meta;\n } else {\n event.debug_meta = metadata;\n }\n\n const req: SentryRequest = {\n body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n type: eventType,\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n\n // https://develop.sentry.dev/sdk/envelopes/\n\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n const envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(api.forceEnvelope() && { dsn: api.getDsn().toString() }),\n });\n const itemHeaders = JSON.stringify({\n type: eventType,\n\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n\n // The content-type is assumed to be 'application/json' and not part of\n // the current spec for transaction items, so we don't bloat the request\n // body with it.\n //\n // content_type: 'application/json',\n //\n // The length is optional. It must be the number of bytes in req.Body\n // encoded as UTF-8. Since the server can figure this out and would\n // otherwise refuse events that report the length incorrectly, we decided\n // not to send the length to avoid problems related to reporting the wrong\n // size and to reduce request body size.\n //\n // length: new TextEncoder().encode(req.body).length,\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}`;\n req.body = envelope;\n }\n\n return req;\n}\n","import { DsnLike, SdkMetadata } from '@sentry/types';\nimport { Dsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n **/\nexport class API {\n /** The DSN as passed to Sentry.init() */\n public dsn: DsnLike;\n\n /** Metadata about the SDK (name, version, etc) for inclusion in envelope headers */\n public metadata: SdkMetadata;\n\n /** The internally used Dsn object. */\n private readonly _dsnObject: Dsn;\n\n /** The envelope tunnel to use. */\n private readonly _tunnel?: string;\n\n /** Create a new instance of API */\n public constructor(dsn: DsnLike, metadata: SdkMetadata = {}, tunnel?: string) {\n this.dsn = dsn;\n this._dsnObject = new Dsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n\n /** Returns the Dsn object. */\n public getDsn(): Dsn {\n return this._dsnObject;\n }\n\n /** Does this transport force envelopes? */\n public forceEnvelope(): boolean {\n return !!this._tunnel;\n }\n\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n public getBaseApiEndpoint(): string {\n const dsn = this.getDsn();\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n }\n\n /** Returns the store endpoint URL. */\n public getStoreEndpoint(): string {\n return this._getIngestEndpoint('store');\n }\n\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n return `${this.getStoreEndpoint()}?${this._encodedAuth()}`;\n }\n\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n public getEnvelopeEndpointWithUrlEncodedAuth(): string {\n if (this.forceEnvelope()) {\n return this._tunnel as string;\n }\n\n return `${this._getEnvelopeEndpoint()}?${this._encodedAuth()}`;\n }\n\n /** Returns only the path component for the store endpoint. */\n public getStoreEndpointPath(): string {\n const dsn = this.getDsn();\n return `${dsn.path ? `/${dsn.path}` : ''}/api/${dsn.projectId}/store/`;\n }\n\n /**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\n public getRequestHeaders(clientName: string, clientVersion: string): { [key: string]: string } {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n const dsn = this.getDsn();\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.publicKey}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n }\n\n /** Returns the url to the report dialog endpoint. */\n public getReportDialogEndpoint(\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n } = {},\n ): string {\n const dsn = this.getDsn();\n const endpoint = `${this.getBaseApiEndpoint()}embed/error-page/`;\n\n const encodedOptions = [];\n encodedOptions.push(`dsn=${dsn.toString()}`);\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(`name=${encodeURIComponent(dialogOptions.user.name)}`);\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(`email=${encodeURIComponent(dialogOptions.user.email)}`);\n }\n } else {\n encodedOptions.push(`${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`);\n }\n }\n if (encodedOptions.length) {\n return `${endpoint}?${encodedOptions.join('&')}`;\n }\n\n return endpoint;\n }\n\n /** Returns the envelope endpoint URL. */\n private _getEnvelopeEndpoint(): string {\n return this._getIngestEndpoint('envelope');\n }\n\n /** Returns the ingest API endpoint for target. */\n private _getIngestEndpoint(target: 'store' | 'envelope'): string {\n if (this._tunnel) {\n return this._tunnel;\n }\n const base = this.getBaseApiEndpoint();\n const dsn = this.getDsn();\n return `${base}${dsn.projectId}/${target}/`;\n }\n\n /** Returns a URL-encoded string with auth config suitable for a query string. */\n private _encodedAuth(): string {\n const dsn = this.getDsn();\n const auth = {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n };\n return urlEncode(auth);\n }\n}\n","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n\n/** A simple queue that holds promises. */\nexport class PromiseBuffer {\n /** Internal set of queued Promises */\n private readonly _buffer: Array> = [];\n\n public constructor(protected _limit?: number) {}\n\n /**\n * Says if the buffer is ready to take more requests\n */\n public isReady(): boolean {\n return this._limit === undefined || this.length() < this._limit;\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n public add(taskProducer: () => PromiseLike): PromiseLike {\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n void task\n .then(() => this.remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n this.remove(task).then(null, () => {\n // We have to add another catch here because `this.remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n public remove(task: PromiseLike): PromiseLike {\n const removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n }\n\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n public length(): number {\n return this._buffer.length;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n public drain(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n void SyncPromise.all(this._buffer)\n .then(() => {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, () => {\n resolve(true);\n });\n });\n }\n}\n","import { forget, getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\n\nconst global = getGlobalObject();\nlet cachedFetchImpl: FetchImpl;\n\nexport type FetchImpl = typeof fetch;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation(): FetchImpl {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n\n const document = global.document;\n let fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (typeof document?.createElement === `function`) {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n if (sandbox.contentWindow?.fetch) {\n fetchImpl = sandbox.contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url: string, body: string): void {\n const isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n const hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n const sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n\n if (supportsFetch()) {\n const fetch = getNativeFetchImplementation();\n return forget(\n fetch(url, {\n body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }),\n );\n }\n}\n","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forget(promise: PromiseLike): void {\n void promise.then(null, e => {\n // TODO: Use a better logging mechanism\n // eslint-disable-next-line no-console\n console.error(e);\n });\n}\n","import { API } from '@sentry/core';\nimport {\n Event,\n Outcome,\n Response as SentryResponse,\n SentryRequestType,\n Status,\n Transport,\n TransportOptions,\n} from '@sentry/types';\nimport {\n dateTimestampInSeconds,\n getGlobalObject,\n logger,\n parseRetryAfterHeader,\n PromiseBuffer,\n SentryError,\n} from '@sentry/utils';\n\nimport { sendReport } from './utils';\n\nconst CATEGORY_MAPPING: {\n [key in SentryRequestType]: string;\n} = {\n event: 'error',\n transaction: 'transaction',\n session: 'session',\n attachment: 'attachment',\n};\n\nconst global = getGlobalObject();\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @deprecated\n */\n public url: string;\n\n /** Helper to get Sentry API endpoints. */\n protected readonly _api: API;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = new PromiseBuffer(30);\n\n /** Locks transport after receiving rate limits in a response */\n protected readonly _rateLimits: Record = {};\n\n protected _outcomes: { [key: string]: number } = {};\n\n public constructor(public options: TransportOptions) {\n this._api = new API(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = this._api.getStoreEndpointWithUrlEncodedAuth();\n\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', () => {\n if (global.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n\n /**\n * @inheritDoc\n */\n public recordLostEvent(reason: Outcome, category: SentryRequestType): void {\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n const key = `${CATEGORY_MAPPING[category]}:${reason}`;\n logger.log(`Adding outcome: ${key}`);\n this._outcomes[key] = (this._outcomes[key] ?? 0) + 1;\n }\n\n /**\n * Send outcomes as an envelope\n */\n protected _flushOutcomes(): void {\n if (!this.options.sendClientReports) {\n return;\n }\n\n const outcomes = this._outcomes;\n this._outcomes = {};\n\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n logger.log('No outcomes to flush');\n return;\n }\n\n logger.log(`Flushing outcomes:\\n${JSON.stringify(outcomes, null, 2)}`);\n\n const url = this._api.getEnvelopeEndpointWithUrlEncodedAuth();\n // Envelope header is required to be at least an empty object\n const envelopeHeader = JSON.stringify({ ...(this.options.tunnel && { dsn: this._api.getDsn().toString() }) });\n const itemHeaders = JSON.stringify({\n type: 'client_report',\n });\n const item = JSON.stringify({\n timestamp: dateTimestampInSeconds(),\n discarded_events: Object.keys(outcomes).map(key => {\n const [category, reason] = key.split(':');\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n }),\n });\n const envelope = `${envelopeHeader}\\n${itemHeaders}\\n${item}`;\n\n try {\n sendReport(url, envelope);\n } catch (e) {\n logger.error(e);\n }\n }\n\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n protected _handleResponse({\n requestType,\n response,\n headers,\n resolve,\n reject,\n }: {\n requestType: SentryRequestType;\n response: Response | XMLHttpRequest;\n headers: Record;\n resolve: (value?: SentryResponse | PromiseLike | null | undefined) => void;\n reject: (reason?: unknown) => void;\n }): void {\n const status = Status.fromHttpCode(response.status);\n /**\n * \"The name is case-insensitive.\"\n * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n */\n const limited = this._handleRateLimit(headers);\n if (limited)\n logger.warn(`Too many ${requestType} requests, backing off until: ${this._disabledUntil(requestType)}`);\n\n if (status === Status.Success) {\n resolve({ status });\n return;\n }\n\n reject(response);\n }\n\n /**\n * Gets the time that given category is disabled until for rate limiting\n */\n protected _disabledUntil(requestType: SentryRequestType): Date {\n const category = CATEGORY_MAPPING[requestType];\n return this._rateLimits[category] || this._rateLimits.all;\n }\n\n /**\n * Checks if a category is rate limited\n */\n protected _isRateLimited(requestType: SentryRequestType): boolean {\n return this._disabledUntil(requestType) > new Date(Date.now());\n }\n\n /**\n * Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.\n */\n protected _handleRateLimit(headers: Record): boolean {\n const now = Date.now();\n const rlHeader = headers['x-sentry-rate-limits'];\n const raHeader = headers['retry-after'];\n\n if (rlHeader) {\n // rate limit headers are of the form\n //
,
,..\n // where each
is of the form\n // : : : \n // where\n // is a delay in ms\n // is the event type(s) (error, transaction, etc) being rate limited and is of the form\n // ;;...\n // is what's being limited (org, project, or key) - ignored by SDK\n // is an arbitrary string like \"org_quota\" - ignored by SDK\n for (const limit of rlHeader.trim().split(',')) {\n const parameters = limit.split(':', 2);\n const headerDelay = parseInt(parameters[0], 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n for (const category of parameters[1].split(';')) {\n this._rateLimits[category || 'all'] = new Date(now + delay);\n }\n }\n return true;\n } else if (raHeader) {\n this._rateLimits.all = new Date(now + parseRetryAfterHeader(now, raHeader));\n return true;\n }\n return false;\n }\n}\n","import { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { Event, Outcome, Response, SentryRequest, Session, TransportOptions } from '@sentry/types';\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\nimport { FetchImpl, getNativeFetchImplementation } from './utils';\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /**\n * Fetch API reference which always points to native browser implementation.\n */\n private _fetch: typeof fetch;\n\n public constructor(options: TransportOptions, fetchImpl: FetchImpl = getNativeFetchImplementation()) {\n super(options);\n this._fetch = fetchImpl;\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): PromiseLike {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n }\n\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n private _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike {\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent(Outcome.RateLimitBackoff, sentryRequest.type);\n\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: `Transport for ${sentryRequest.type} requests locked till ${this._disabledUntil(\n sentryRequest.type,\n )} due to too many requests.`,\n status: 429,\n });\n }\n\n const options: RequestInit = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n\n return this._buffer\n .add(\n () =>\n new SyncPromise((resolve, reject) => {\n void this._fetch(sentryRequest.url, options)\n .then(response => {\n const headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n this._handleResponse({\n requestType: sentryRequest.type,\n response,\n headers,\n resolve,\n reject,\n });\n })\n .catch(reject);\n }),\n )\n .then(undefined, reason => {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n this.recordLostEvent(Outcome.QueueOverflow, sentryRequest.type);\n } else {\n this.recordLostEvent(Outcome.NetworkError, sentryRequest.type);\n }\n throw reason;\n });\n }\n}\n","import { eventToSentryRequest, sessionToSentryRequest } from '@sentry/core';\nimport { Event, Outcome, Response, SentryRequest, Session } from '@sentry/types';\nimport { SentryError, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): PromiseLike {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n }\n\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n private _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike {\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent(Outcome.RateLimitBackoff, sentryRequest.type);\n\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: `Transport for ${sentryRequest.type} requests locked till ${this._disabledUntil(\n sentryRequest.type,\n )} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer\n .add(\n () =>\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = (): void => {\n if (request.readyState === 4) {\n const headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n this._handleResponse({ requestType: sentryRequest.type, response: request, headers, resolve, reject });\n }\n };\n\n request.open('POST', sentryRequest.url);\n for (const header in this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(this.options.headers, header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n }),\n )\n .then(undefined, reason => {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n this.recordLostEvent(Outcome.QueueOverflow, sentryRequest.type);\n } else {\n this.recordLostEvent(Outcome.NetworkError, sentryRequest.type);\n }\n throw reason;\n });\n }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\n\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.denyUrls}.\n * By default, all errors will be sent.\n */\n allowUrls?: Array;\n\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To allow certain errors instead, use {@link Options.allowUrls}.\n * By default, all errors will be sent.\n */\n denyUrls?: Array;\n\n /** @deprecated use {@link Options.allowUrls} instead. */\n whitelistUrls?: Array;\n\n /** @deprecated use {@link Options.denyUrls} instead. */\n blacklistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike {\n return eventFromException(this._options, exception, hint);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n return eventFromMessage(this._options, message, level, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n tunnel: this._options.tunnel,\n sendClientReports: this._options.sendClientReports,\n _metadata: this._options._metadata,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n}\n","import { canUseDOM as canUseDOMFlag } from 'exenv';\nexport var STATUS = {\n FAILED: 'failed',\n LOADED: 'loaded',\n LOADING: 'loading',\n PENDING: 'pending',\n READY: 'ready',\n UNSUPPORTED: 'unsupported',\n};\nexport function canUseDOM() {\n return canUseDOMFlag;\n}\nexport function isSupportedEnvironment() {\n return supportsInlineSVG() && typeof window !== 'undefined' && window !== null;\n}\nexport function supportsInlineSVG() {\n /* istanbul ignore next */\n if (!document) {\n return false;\n }\n var div = document.createElement('div');\n div.innerHTML = '';\n return !!div.firstChild && div.firstChild.namespaceURI === 'http://www.w3.org/2000/svg';\n}\nexport function randomString(length) {\n var letters = 'abcdefghijklmnopqrstuvwxyz';\n var numbers = '1234567890';\n var charset = \"\" + letters + letters.toUpperCase() + numbers;\n var randomCharacter = function (character) {\n return character[Math.floor(Math.random() * character.length)];\n };\n var R = '';\n for (var i = 0; i < length; i++) {\n R += randomCharacter(charset);\n }\n return R;\n}\n/**\n * Remove properties from an object\n */\nexport function removeProperties(input) {\n var filter = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n filter[_i - 1] = arguments[_i];\n }\n var output = {};\n for (var key in input) {\n /* istanbul ignore else */\n if ({}.hasOwnProperty.call(input, key)) {\n if (!filter.includes(key)) {\n output[key] = input[key];\n }\n }\n }\n return output;\n}\n//# sourceMappingURL=helpers.js.map","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { WrappedFunction } from '@sentry/types';\n\nimport { getGlobalObject } from './global';\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\n/** Object describing handler that will be triggered for a given `type` of instrumentation */\ninterface InstrumentHandler {\n type: InstrumentHandlerType;\n callback: InstrumentHandlerCallback;\n}\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler: InstrumentHandler): void {\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n (handlers[handler.type] as InstrumentHandlerCallback[]).push(handler.callback);\n instrument(handler.type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function(level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function(originalConsoleLevel: () => any): Function {\n return function(...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function(originalFetch: () => void): () => void {\n return function(...args: any[]): void {\n const handlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\ntype XHRSendInput = null | Blob | BufferSource | FormData | URLSearchParams | string;\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n body?: XHRSendInput;\n };\n}\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n // Poor man's implementation of ES6 `Map`, tracking and keeping in sync key and value separately.\n const requestKeys: XMLHttpRequest[] = [];\n const requestValues: Array[] = [];\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function(originalOpen: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const url = args[1];\n xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = function(): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n\n try {\n const requestPos = requestKeys.indexOf(xhr);\n if (requestPos !== -1) {\n // Make sure to pop both key and value to keep it in sync.\n requestKeys.splice(requestPos);\n const args = requestValues.splice(requestPos)[0];\n if (xhr.__sentry_xhr__ && args[0] !== undefined) {\n xhr.__sentry_xhr__.body = args[0] as XHRSendInput;\n }\n }\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr,\n });\n }\n };\n\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function(original: WrappedFunction): Function {\n return function(...readyStateArgs: any[]): void {\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n } else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n return originalOpen.apply(xhr, args);\n };\n });\n\n fill(xhrproto, 'send', function(originalSend: () => void): () => void {\n return function(this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n requestKeys.push(this);\n requestValues.push(args);\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function(this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function(this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\nconst debounceDuration = 1000;\nlet debounceTimerID: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous: Event | undefined, current: Event): boolean {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event: Event): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n\n try {\n const target = event.target as HTMLElement;\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {\n return (event: Event): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = global.setTimeout(() => {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: Function;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n global.document.addEventListener('click', globalDOMEventHandler, false);\n global.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (global as any)[target] && (global as any)[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(originalAddEventListener: AddEventListener): AddEventListener {\n return function(\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount += 1;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(proto, 'removeEventListener', function(originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function(\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount -= 1;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n });\n });\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function(msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function(e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function(this: WrappedFunction, ...args: any[]): string {\n const context = this.__sentry_original__ || this;\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n parseUrl,\n safeJoin,\n} from '@sentry/utils';\n\n/** JSDoc */\ninterface BreadcrumbsOptions {\n console: boolean;\n dom: boolean | { serializeAttribute: string | string[] };\n fetch: boolean;\n history: boolean;\n sentry: boolean;\n xhr: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /** JSDoc */\n private readonly _options: BreadcrumbsOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n public addSentryBreadcrumb(event: Event): void {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._consoleBreadcrumb(...args);\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._domBreadcrumb(...args);\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._xhrBreadcrumb(...args);\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._fetchBreadcrumb(...args);\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: (...args) => {\n this._historyBreadcrumb(...args);\n },\n type: 'history',\n });\n }\n }\n\n /**\n * Creates breadcrumbs from console API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }\n\n /**\n * Creates breadcrumbs from DOM API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _domBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n let keyAttrs = typeof this._options.dom === 'object' ? this._options.dom.serializeAttribute : undefined;\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node, keyAttrs)\n : htmlTreeAsString((handlerData.event as unknown) as Node, keyAttrs);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n /**\n * Creates breadcrumbs from XHR API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {};\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: {\n method,\n url,\n status_code,\n },\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n input: body,\n },\n );\n\n return;\n }\n }\n\n /**\n * Creates breadcrumbs from fetch API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }\n\n /**\n * Creates breadcrumbs from history API calls\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }\n}\n","import { BaseClient, Scope, SDK_VERSION } from '@sentry/core';\nimport { Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { injectReportDialog, ReportDialogOptions } from './helpers';\nimport { Breadcrumbs } from './integrations';\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(BrowserBackend, options);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n\n injectReportDialog({\n ...options,\n dsn: options.dsn || this.getDsn(),\n });\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _sendEvent(event: Event): void {\n const integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n super._sendEvent(event);\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration, StackFrame } from '@sentry/types';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n allowUrls: Array;\n denyUrls: Array;\n ignoreErrors: Array;\n ignoreInternal: boolean;\n\n /** @deprecated use {@link InboundFiltersOptions.allowUrls} instead. */\n whitelistUrls: Array;\n /** @deprecated use {@link InboundFiltersOptions.denyUrls} instead. */\n blacklistUrls: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n\n public constructor(private readonly _options: Partial = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n // This checks prevents most of the occurrences of the bug linked below:\n // https://github.com/getsentry/sentry-javascript/issues/2622\n // The bug is caused by multiple SDK instances, where one is minified and one is using non-mangled code.\n // Unfortunatelly we cannot fix it reliably (thus reserved property in rollup's terser config),\n // as we cannot force people using multiple instances in their apps to sync SDK versions.\n const options = typeof self._mergeOptions === 'function' ? self._mergeOptions(clientOptions) : {};\n if (typeof self._shouldDropEvent !== 'function') {\n return event;\n }\n return self._shouldDropEvent(event, options) ? null : event;\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: Partial): boolean {\n if (this._isSentryError(event, options)) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (this._isDeniedUrl(event, options)) {\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!this._isAllowedUrl(event, options)) {\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: Partial): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n return (\n (event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false\n );\n } catch (_oO) {\n return false;\n }\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: Partial): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isDeniedUrl(event: Event, options: Partial): boolean {\n // TODO: Use Glob instead?\n if (!options.denyUrls || !options.denyUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.denyUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isAllowedUrl(event: Event, options: Partial): boolean {\n // TODO: Use Glob instead?\n if (!options.allowUrls || !options.allowUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.allowUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: Partial = {}): Partial {\n return {\n allowUrls: [\n // eslint-disable-next-line deprecation/deprecation\n ...(this._options.whitelistUrls || []),\n ...(this._options.allowUrls || []),\n // eslint-disable-next-line deprecation/deprecation\n ...(clientOptions.whitelistUrls || []),\n ...(clientOptions.allowUrls || []),\n ],\n denyUrls: [\n // eslint-disable-next-line deprecation/deprecation\n ...(this._options.blacklistUrls || []),\n ...(this._options.denyUrls || []),\n // eslint-disable-next-line deprecation/deprecation\n ...(clientOptions.blacklistUrls || []),\n ...(clientOptions.denyUrls || []),\n ],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame?.filename !== '' && frame?.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n const frames = event.stacktrace.frames;\n return this._getLastValidUrl(frames);\n }\n if (event.exception) {\n const frames =\n event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return this._getLastValidUrl(frames);\n }\n return null;\n } catch (oO) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** JSDoc */\ninterface TryCatchOptions {\n setTimeout: boolean;\n setInterval: boolean;\n requestAnimationFrame: boolean;\n XMLHttpRequest: boolean;\n eventTarget: boolean | string[];\n}\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /** JSDoc */\n private readonly _options: TryCatchOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n const global = getGlobalObject();\n\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n }\n\n if (this._options.setInterval) {\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n }\n\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n\n if (this._options.eventTarget) {\n const eventTarget = Array.isArray(this._options.eventTarget) ? this._options.eventTarget : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(this._wrapEventTarget.bind(this));\n }\n }\n\n /** JSDoc */\n private _wrapTimeFunction(original: () => void): () => number {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n }\n\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _wrapRAF(original: any): (callback: () => void) => any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(this: any, callback: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.call(\n this,\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n }\n\n /** JSDoc */\n private _wrapEventTarget(target: string): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const global = getGlobalObject() as { [key: string]: any };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = global[target] && global[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function(\n original: () => void,\n ): (eventName: string, fn: EventListenerObject, options?: boolean | AddEventListenerOptions) => void {\n return function(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap((fn as any) as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(proto, 'removeEventListener', function(\n originalRemoveEventListener: () => void,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = (fn as unknown) as WrappedFunction;\n try {\n const originalEventHandler = wrappedEventHandler?.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n }\n\n /** JSDoc */\n private _wrapXHR(originalSend: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function(this: XMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function(original: WrappedFunction): () => any {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n }\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Primitive, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\n/** JSDoc */\ninterface GlobalHandlersIntegrations {\n onerror: boolean;\n onunhandledrejection: boolean;\n}\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /** JSDoc */\n private _onErrorHandlerInstalled: boolean = false;\n\n /** JSDoc */\n private _onUnhandledRejectionHandlerInstalled: boolean = false;\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n }\n\n /** JSDoc */\n private _installGlobalOnErrorHandler(): void {\n if (this._onErrorHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const error = data.error;\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n\n const client = currentHub.getClient();\n const event =\n error === undefined && isString(data.msg)\n ? this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : this._enhanceEventWithInitialFrame(\n eventFromUnknownInput(error || data.msg, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }),\n data.url,\n data.line,\n data.column,\n );\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n\n this._onErrorHandlerInstalled = true;\n }\n\n /** JSDoc */\n private _installGlobalOnUnhandledRejectionHandler(): void {\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n\n addInstrumentationHandler({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n callback: (e: any) => {\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n const currentHub = getCurrentHub();\n const hasIntegration = currentHub.getIntegration(GlobalHandlers);\n const isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n\n const client = currentHub.getClient();\n const event = isPrimitive(error)\n ? this._eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n\n event.level = Severity.Error;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n\n currentHub.captureEvent(event, {\n originalException: error,\n });\n\n return;\n },\n type: 'unhandledrejection',\n });\n\n this._onUnhandledRejectionHandlerInstalled = true;\n }\n\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name;\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n }\n\n /**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\n private _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n }\n\n /** JSDoc */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n private readonly _key: string;\n\n /**\n * @inheritDoc\n */\n private readonly _limit: number;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { key?: string; limit?: number } = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n const handler = self._handler && self._handler.bind(self);\n return typeof handler === 'function' ? handler(event, hint) : event;\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n private _handler(event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = this._walkErrorTree(hint.originalException as ExtendedError, this._key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n }\n\n /**\n * @inheritDoc\n */\n private _walkErrorTree(error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, [exception, ...stack]);\n }\n}\n","import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string = Dedupe.id;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((currentEvent: Event) => {\n const self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (self._shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(`Event dropped due to being a duplicate of previously captured event.`);\n return null;\n }\n } catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (this._isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (this._isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n }\n\n /** JSDoc */\n private _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n }\n\n /** JSDoc */\n private _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n } else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n }\n\n /** JSDoc */\n private _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = this._getFramesFromEvent(currentEvent);\n let previousFrames = this._getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n /** JSDoc */\n private _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n }\n\n /** JSDoc */\n private _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = this._getExceptionFromEvent(previousEvent);\n const currentException = this._getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n }\n\n /** JSDoc */\n private _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n\n // grab as much info as exists and add it to the event\n const url = event.request?.url || global.location?.href;\n const { referrer } = global.document || {};\n const { userAgent } = global.navigator || {};\n\n const headers = {\n ...event.request?.headers,\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...(url && { url }), headers };\n\n return { ...event, request };\n }\n return event;\n });\n }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { addInstrumentationHandler, getGlobalObject, logger, SyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient } from './client';\nimport { ReportDialogOptions, wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n initAndBind(BrowserClient, options);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n const client = hub.getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n logger.warn('Cannot flush events. No client defined.');\n return SyncPromise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n logger.warn('Cannot flush events and disable SDK. No client defined.');\n return SyncPromise.resolve(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn: (...args: any) => any): any {\n return internalWrap(fn)();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking(): void {\n const window = getGlobalObject();\n const document = window.document;\n\n if (typeof document === 'undefined') {\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (typeof hub.startSession !== 'function' || typeof hub.captureSession !== 'function') {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler({\n callback: ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (from === undefined || from === to) {\n return;\n }\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n },\n type: 'history',\n });\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, supportsReportingObserver } from '@sentry/utils';\n\n/** JSDoc */\ninterface Report {\n [key: string]: any;\n type: ReportTypes;\n url: string;\n body?: ReportBody;\n}\n\n/** JSDoc */\nenum ReportTypes {\n /** JSDoc */\n Crash = 'crash',\n /** JSDoc */\n Deprecation = 'deprecation',\n /** JSDoc */\n Intervention = 'intervention',\n}\n\n/** JSDoc */\ntype ReportBody = CrashReportBody | DeprecationReportBody | InterventionReportBody;\n\n/** JSDoc */\ninterface CrashReportBody {\n [key: string]: any;\n crashId: string;\n reason?: string;\n}\n\n/** JSDoc */\ninterface DeprecationReportBody {\n [key: string]: any;\n id: string;\n anticipatedRemoval?: Date;\n message: string;\n sourceFile?: string;\n lineNumber?: number;\n columnNumber?: number;\n}\n\n/** JSDoc */\ninterface InterventionReportBody {\n [key: string]: any;\n id: string;\n message: string;\n sourceFile?: string;\n lineNumber?: number;\n columnNumber?: number;\n}\n\n/** Reporting API integration - https://w3c.github.io/reporting/ */\nexport class ReportingObserver implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ReportingObserver';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = ReportingObserver.id;\n\n /**\n * Returns current hub.\n */\n private _getCurrentHub?: () => Hub;\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n types?: ReportTypes[];\n } = {\n types: [ReportTypes.Crash, ReportTypes.Deprecation, ReportTypes.Intervention],\n },\n ) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!supportsReportingObserver()) {\n return;\n }\n\n this._getCurrentHub = getCurrentHub;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const observer = new (getGlobalObject().ReportingObserver)(this.handler.bind(this), {\n buffered: true,\n types: this._options.types,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n observer.observe();\n }\n\n /**\n * @inheritDoc\n */\n public handler(reports: Report[]): void {\n const hub = this._getCurrentHub && this._getCurrentHub();\n if (!hub || !hub.getIntegration(ReportingObserver)) {\n return;\n }\n for (const report of reports) {\n hub.withScope(scope => {\n scope.setExtra('url', report.url);\n\n const label = `ReportingObserver [${report.type}]`;\n let details = 'No details available';\n\n if (report.body) {\n // Object.keys doesn't work on ReportBody, as all properties are inheirted\n const plainBody: {\n [key: string]: any;\n } = {};\n\n // eslint-disable-next-line guard-for-in\n for (const prop in report.body) {\n plainBody[prop] = report.body[prop];\n }\n\n scope.setExtra('body', plainBody);\n\n if (report.type === ReportTypes.Crash) {\n const body = report.body as CrashReportBody;\n // A fancy way to create a message out of crashId OR reason OR both OR fallback\n details = [body.crashId || '', body.reason || ''].join(' ').trim() || details;\n } else {\n const body = report.body as DeprecationReportBody | InterventionReportBody;\n details = body.message || details;\n }\n }\n\n hub.captureMessage(`${label}: ${details}`);\n });\n }\n }\n}\n","import { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\n// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js\nconst angularPattern = /^\\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\\] (.*?)\\n?(\\S+)$/;\n\n/**\n * AngularJS integration\n *\n * Provides an $exceptionHandler for AngularJS\n */\nexport class Angular implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'AngularJS';\n\n /**\n * moduleName used in Angular's DI resolution algorithm\n */\n public static moduleName: string = 'ngSentry';\n\n /**\n * @inheritDoc\n */\n public name: string = Angular.id;\n\n /**\n * Angular's instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _angular: any;\n\n /**\n * ngSentry module instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _module: any;\n\n /**\n * Returns current hub.\n */\n private _getCurrentHub?: () => Hub;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(options: { angular?: any } = {}) {\n logger.log('You are still using the Angular integration, consider moving to @sentry/angular');\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this._angular = options.angular || getGlobalObject().angular;\n\n if (!this._angular) {\n logger.error('AngularIntegration is missing an Angular instance');\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._module = this._angular.module(Angular.moduleName, []);\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._module) {\n return;\n }\n\n this._getCurrentHub = getCurrentHub;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._module.config([\n '$provide',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ($provide: any): void => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n $provide.decorator('$exceptionHandler', ['$delegate', this._$exceptionHandlerDecorator.bind(this)]);\n },\n ]);\n }\n\n /**\n * Angular's exceptionHandler for Sentry integration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _$exceptionHandlerDecorator($delegate: any): any {\n return (exception: Error, cause?: string): void => {\n const hub = this._getCurrentHub && this._getCurrentHub();\n\n if (hub && hub.getIntegration(Angular)) {\n hub.withScope(scope => {\n if (cause) {\n scope.setExtra('cause', cause);\n }\n\n scope.addEventProcessor((event: Event) => {\n const ex = event.exception && event.exception.values && event.exception.values[0];\n\n if (ex) {\n const matches = angularPattern.exec(ex.value || '');\n\n if (matches) {\n // This type now becomes something like: $rootScope:inprog\n ex.type = matches[1];\n ex.value = matches[2];\n event.message = `${ex.type}: ${ex.value}`;\n // auto set a new tag specifically for the angular error url\n event.extra = {\n ...event.extra,\n angularDocs: matches[3].substr(0, 250),\n };\n }\n }\n\n return event;\n });\n\n hub.captureException(exception);\n });\n }\n $delegate(exception, cause);\n };\n }\n}\n","import { EventProcessor, Hub, Integration, Severity } from '@sentry/types';\nimport { fill, getGlobalObject, safeJoin } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** Send Console API calls as Sentry Events */\nexport class CaptureConsole implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'CaptureConsole';\n\n /**\n * @inheritDoc\n */\n public name: string = CaptureConsole.id;\n\n /**\n * @inheritDoc\n */\n private readonly _levels: string[] = ['log', 'info', 'warn', 'error', 'debug', 'assert'];\n\n /**\n * @inheritDoc\n */\n public constructor(options: { levels?: string[] } = {}) {\n if (options.levels) {\n this._levels = options.levels;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!('console' in global)) {\n return;\n }\n\n this._levels.forEach((level: string) => {\n if (!(level in global.console)) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(global.console, level, (originalConsoleLevel: () => any) => (...args: any[]): void => {\n const hub = getCurrentHub();\n\n if (hub.getIntegration(CaptureConsole)) {\n hub.withScope(scope => {\n scope.setLevel(Severity.fromString(level));\n scope.setExtra('arguments', args);\n scope.addEventProcessor(event => {\n event.logger = 'console';\n return event;\n });\n\n let message = safeJoin(args, ' ');\n if (level === 'assert') {\n if (args[0] === false) {\n message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;\n scope.setExtra('arguments', args.slice(1));\n hub.captureMessage(message);\n }\n } else if (level === 'error' && args[0] instanceof Error) {\n hub.captureException(args[0]);\n } else {\n hub.captureMessage(message);\n }\n });\n }\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n });\n });\n }\n}\n","import { Event, EventHint, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { consoleSandbox } from '@sentry/utils';\n\n/** JSDoc */\ninterface DebugOptions {\n stringify?: boolean;\n debugger?: boolean;\n}\n\n/** JSDoc */\nexport class Debug implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Debug';\n\n /**\n * @inheritDoc\n */\n public name: string = Debug.id;\n\n /** JSDoc */\n private readonly _options: DebugOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: DebugOptions) {\n this._options = {\n debugger: false,\n stringify: false,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(Debug);\n if (self) {\n if (self._options.debugger) {\n // eslint-disable-next-line no-debugger\n debugger;\n }\n\n /* eslint-disable no-console */\n consoleSandbox(() => {\n if (self._options.stringify) {\n console.log(JSON.stringify(event, null, 2));\n if (hint) {\n console.log(JSON.stringify(hint, null, 2));\n }\n } else {\n console.log(event);\n if (hint) {\n console.log(hint);\n }\n }\n });\n /* eslint-enable no-console */\n }\n return event;\n });\n }\n}\n","import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string = Dedupe.id;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((currentEvent: Event) => {\n const self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (self._shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(`Event dropped due to being a duplicate of previously captured event.`);\n return null;\n }\n } catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (this._isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (this._isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n }\n\n /** JSDoc */\n private _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n }\n\n /** JSDoc */\n private _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n } else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n }\n\n /** JSDoc */\n private _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = this._getFramesFromEvent(currentEvent);\n let previousFrames = this._getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n /** JSDoc */\n private _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n }\n\n /** JSDoc */\n private _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = this._getExceptionFromEvent(previousEvent);\n const currentException = this._getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!this._isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!this._isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n }\n\n /** JSDoc */\n private _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n }\n}\n","import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, isInstanceOf, logger } from '@sentry/utils';\n\n/** JSDoc */\nexport class Ember implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Ember';\n\n /**\n * @inheritDoc\n */\n public name: string = Ember.id;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any\n private readonly _Ember: any;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(options: { Ember?: any } = {}) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this._Ember = options.Ember || getGlobalObject().Ember;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._Ember) {\n logger.error('EmberIntegration is missing an Ember instance');\n return;\n }\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n const oldOnError = this._Ember.onerror;\n\n this._Ember.onerror = (error: Error): void => {\n if (getCurrentHub().getIntegration(Ember)) {\n getCurrentHub().captureException(error, { originalException: error });\n }\n\n if (typeof oldOnError === 'function') {\n oldOnError.call(this._Ember, error);\n } else if (this._Ember.testing) {\n throw error;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._Ember.RSVP.on('error', (reason: unknown): void => {\n if (getCurrentHub().getIntegration(Ember)) {\n getCurrentHub().withScope(scope => {\n if (isInstanceOf(reason, Error)) {\n scope.setExtra('context', 'Unhandled Promise error detected');\n getCurrentHub().captureException(reason, { originalException: reason as Error });\n } else {\n scope.setExtra('reason', reason);\n getCurrentHub().captureMessage('Unhandled Promise error detected');\n }\n });\n }\n });\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n","import { Event, EventHint, EventProcessor, ExtendedError, Hub, Integration } from '@sentry/types';\nimport { isError, isPlainObject, logger, normalize } from '@sentry/utils';\n\n/** JSDoc */\ninterface ExtraErrorDataOptions {\n depth?: number;\n}\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class ExtraErrorData implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ExtraErrorData';\n\n /**\n * @inheritDoc\n */\n public name: string = ExtraErrorData.id;\n\n /**\n * @inheritDoc\n */\n public constructor(private readonly _options: ExtraErrorDataOptions = { depth: 3 }) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(ExtraErrorData);\n if (!self) {\n return event;\n }\n return self.enhanceEventWithErrorData(event, hint);\n });\n }\n\n /**\n * Attaches extracted information from the Error object to extra field in the Event\n */\n public enhanceEventWithErrorData(event: Event, hint?: EventHint): Event {\n if (!hint || !hint.originalException || !isError(hint.originalException)) {\n return event;\n }\n const name = (hint.originalException as ExtendedError).name || hint.originalException.constructor.name;\n\n const errorData = this._extractErrorData(hint.originalException as ExtendedError);\n\n if (errorData) {\n let contexts = {\n ...event.contexts,\n };\n\n const normalizedErrorData = normalize(errorData, this._options.depth);\n if (isPlainObject(normalizedErrorData)) {\n contexts = {\n ...event.contexts,\n [name]: {\n ...normalizedErrorData,\n },\n };\n }\n\n return {\n ...event,\n contexts,\n };\n }\n\n return event;\n }\n\n /**\n * Extract extra information from the Error object\n */\n private _extractErrorData(error: ExtendedError): Record | null {\n // We are trying to enhance already existing event, so no harm done if it won't succeed\n try {\n const nativeKeys = [\n 'name',\n 'message',\n 'stack',\n 'line',\n 'column',\n 'fileName',\n 'lineNumber',\n 'columnNumber',\n 'toJSON',\n ];\n\n const extraErrorInfo: Record = {};\n\n // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n for (const key of Object.keys(error)) {\n if (nativeKeys.indexOf(key) !== -1) {\n continue;\n }\n const value = error[key];\n extraErrorInfo[key] = isError(value) ? (value as Error).toString() : value;\n }\n\n // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n if (typeof error.toJSON === 'function') {\n const serializedError = error.toJSON() as Record;\n\n for (const key of Object.keys(serializedError)) {\n const value = serializedError[key];\n extraErrorInfo[key] = isError(value) ? (value as Error).toString() : value;\n }\n }\n\n return extraErrorInfo;\n } catch (oO) {\n logger.error('Unable to extract extra data from the Error object:', oO);\n }\n\n return null;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, logger, normalize, uuid4 } from '@sentry/utils';\nimport localForage from 'localforage';\n\ntype LocalForage = {\n setItem(key: string, value: T, callback?: (err: any, value: T) => void): Promise;\n iterate(\n iteratee: (value: T, key: string, iterationNumber: number) => U,\n callback?: (err: any, result: U) => void,\n ): Promise;\n removeItem(key: string, callback?: (err: any) => void): Promise;\n};\n\n/**\n * cache offline errors and send when connected\n */\nexport class Offline implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Offline';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = Offline.id;\n\n /**\n * the global instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public global: any;\n\n /**\n * the current hub instance\n */\n public hub?: Hub;\n\n /**\n * maximum number of events to store while offline\n */\n public maxStoredEvents: number;\n\n /**\n * event cache\n */\n public offlineEventStore: LocalForage;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { maxStoredEvents?: number } = {}) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.global = getGlobalObject();\n this.maxStoredEvents = options.maxStoredEvents || 30; // set a reasonable default\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this.offlineEventStore = localForage.createInstance({\n name: 'sentry/offlineEventStore',\n });\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n this.hub = getCurrentHub();\n\n if ('addEventListener' in this.global) {\n this.global.addEventListener('online', () => {\n void this._sendEvents().catch(() => {\n logger.warn('could not send cached events');\n });\n });\n }\n\n addGlobalEventProcessor((event: Event) => {\n if (this.hub && this.hub.getIntegration(Offline)) {\n // cache if we are positively offline\n if ('navigator' in this.global && 'onLine' in this.global.navigator && !this.global.navigator.onLine) {\n void this._cacheEvent(event)\n .then((_event: Event): Promise => this._enforceMaxEvents())\n .catch((_error): void => {\n logger.warn('could not cache event while offline');\n });\n\n // return null on success or failure, because being offline will still result in an error\n return null;\n }\n }\n\n return event;\n });\n\n // if online now, send any events stored in a previous offline session\n if ('navigator' in this.global && 'onLine' in this.global.navigator && this.global.navigator.onLine) {\n void this._sendEvents().catch(() => {\n logger.warn('could not send cached events');\n });\n }\n }\n\n /**\n * cache an event to send later\n * @param event an event\n */\n private async _cacheEvent(event: Event): Promise {\n return this.offlineEventStore.setItem(uuid4(), normalize(event));\n }\n\n /**\n * purge excess events if necessary\n */\n private async _enforceMaxEvents(): Promise {\n const events: Array<{ event: Event; cacheKey: string }> = [];\n\n return this.offlineEventStore\n .iterate((event: Event, cacheKey: string, _index: number): void => {\n // aggregate events\n events.push({ cacheKey, event });\n })\n .then(\n (): Promise =>\n // this promise resolves when the iteration is finished\n this._purgeEvents(\n // purge all events past maxStoredEvents in reverse chronological order\n events\n .sort((a, b) => (b.event.timestamp || 0) - (a.event.timestamp || 0))\n .slice(this.maxStoredEvents < events.length ? this.maxStoredEvents : events.length)\n .map(event => event.cacheKey),\n ),\n )\n .catch((_error): void => {\n logger.warn('could not enforce max events');\n });\n }\n\n /**\n * purge event from cache\n */\n private async _purgeEvent(cacheKey: string): Promise {\n return this.offlineEventStore.removeItem(cacheKey);\n }\n\n /**\n * purge events from cache\n */\n private async _purgeEvents(cacheKeys: string[]): Promise {\n // trail with .then to ensure the return type as void and not void|void[]\n return Promise.all(cacheKeys.map(cacheKey => this._purgeEvent(cacheKey))).then();\n }\n\n /**\n * send all events\n */\n private async _sendEvents(): Promise {\n return this.offlineEventStore.iterate((event: Event, cacheKey: string, _index: number): void => {\n if (this.hub) {\n this.hub.captureEvent(event);\n\n void this._purgeEvent(cacheKey).catch((_error): void => {\n logger.warn('could not purge event from cache');\n });\n } else {\n logger.warn('no hub found - could not send cached event');\n }\n });\n }\n}\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up++;\n } else if (up) {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n // eslint-disable-next-line no-plusplus\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(\n resolvedPath.split('/').filter(p => !!p),\n !resolvedAbsolute,\n ).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n /* eslint-disable no-param-reassign */\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n /* eslint-enable no-param-reassign */\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(\n path.split('/').filter(p => !!p),\n !isPathAbsolute,\n ).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n","import { Event, EventProcessor, Hub, Integration, StackFrame, Stacktrace } from '@sentry/types';\nimport { basename, relative } from '@sentry/utils';\n\ntype StackFrameIteratee = (frame: StackFrame) => StackFrame;\n\n/** Rewrite event frames paths */\nexport class RewriteFrames implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'RewriteFrames';\n\n /**\n * @inheritDoc\n */\n public name: string = RewriteFrames.id;\n\n /**\n * @inheritDoc\n */\n private readonly _root?: string;\n\n /**\n * @inheritDoc\n */\n private readonly _prefix: string = 'app:///';\n\n /**\n * @inheritDoc\n */\n public constructor(options: { root?: string; prefix?: string; iteratee?: StackFrameIteratee } = {}) {\n if (options.root) {\n this._root = options.root;\n }\n if (options.prefix) {\n this._prefix = options.prefix;\n }\n if (options.iteratee) {\n this._iteratee = options.iteratee;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(RewriteFrames);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /** JSDoc */\n public process(originalEvent: Event): Event {\n let processedEvent = originalEvent;\n\n if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n processedEvent = this._processExceptionsEvent(processedEvent);\n }\n\n if (originalEvent.stacktrace) {\n processedEvent = this._processStacktraceEvent(processedEvent);\n }\n\n return processedEvent;\n }\n\n /**\n * @inheritDoc\n */\n private readonly _iteratee: StackFrameIteratee = (frame: StackFrame) => {\n if (!frame.filename) {\n return frame;\n }\n // Check if the frame filename begins with `/` or a Windows-style prefix such as `C:\\`\n const isWindowsFrame = /^[A-Z]:\\\\/.test(frame.filename);\n const startsWithSlash = /^\\//.test(frame.filename);\n if (isWindowsFrame || startsWithSlash) {\n const filename = isWindowsFrame\n ? frame.filename\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n : frame.filename;\n const base = this._root ? relative(this._root, filename) : basename(filename);\n frame.filename = `${this._prefix}${base}`;\n }\n return frame;\n };\n\n /** JSDoc */\n private _processExceptionsEvent(event: Event): Event {\n try {\n return {\n ...event,\n exception: {\n ...event.exception,\n // The check for this is performed inside `process` call itself, safe to skip here\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n values: event.exception!.values!.map(value => ({\n ...value,\n stacktrace: this._processStacktrace(value.stacktrace),\n })),\n },\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n private _processStacktraceEvent(event: Event): Event {\n try {\n return {\n ...event,\n stacktrace: this._processStacktrace(event.stacktrace),\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n private _processStacktrace(stacktrace?: Stacktrace): Stacktrace {\n return {\n ...stacktrace,\n frames: stacktrace && stacktrace.frames && stacktrace.frames.map(f => this._iteratee(f)),\n };\n }\n}\n","import { Event, EventProcessor, Hub, Integration } from '@sentry/types';\n\n/** This function adds duration since Sentry was initialized till the time event was sent */\nexport class SessionTiming implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'SessionTiming';\n\n /**\n * @inheritDoc\n */\n public name: string = SessionTiming.id;\n\n /** Exact time Client was initialized expressed in milliseconds since Unix Epoch. */\n protected readonly _startTime: number = Date.now();\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(SessionTiming);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public process(event: Event): Event {\n const now = Date.now();\n\n return {\n ...event,\n extra: {\n ...event.extra,\n ['session:start']: this._startTime,\n ['session:duration']: now - this._startTime,\n ['session:end']: now,\n },\n };\n }\n}\n","import { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types';\n\n/** Add node transaction to the event */\nexport class Transaction implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Transaction';\n\n /**\n * @inheritDoc\n */\n public name: string = Transaction.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(Transaction);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public process(event: Event): Event {\n const frames = this._getFramesFromEvent(event);\n\n // use for loop so we don't have to reverse whole frames array\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame.in_app === true) {\n event.transaction = this._getTransaction(frame);\n break;\n }\n }\n\n return event;\n }\n\n /** JSDoc */\n private _getFramesFromEvent(event: Event): StackFrame[] {\n const exception = event.exception && event.exception.values && event.exception.values[0];\n return (exception && exception.stacktrace && exception.stacktrace.frames) || [];\n }\n\n /** JSDoc */\n private _getTransaction(frame: StackFrame): string {\n return frame.module || frame.function ? `${frame.module || '?'}/${frame.function || '?'}` : '';\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventProcessor, Hub, Integration, IntegrationClass, Scope, Span, Transaction } from '@sentry/types';\nimport { basename, getGlobalObject, logger, timestampWithMs } from '@sentry/utils';\n\n/**\n * Used to extract Tracing integration from the current client,\n * without the need to import `Tracing` itself from the @sentry/apm package.\n * @deprecated as @sentry/tracing should be used over @sentry/apm.\n */\nconst TRACING_GETTER = ({\n id: 'Tracing',\n} as any) as IntegrationClass;\n\n/**\n * Used to extract BrowserTracing integration from @sentry/tracing\n */\nconst BROWSER_TRACING_GETTER = ({\n id: 'BrowserTracing',\n} as any) as IntegrationClass;\n\n/** Global Vue object limited to the methods/attributes we require */\ninterface VueInstance {\n config: {\n errorHandler?(error: Error, vm?: ViewModel, info?: string): void;\n };\n util?: {\n warn(...input: any): void;\n };\n mixin(hooks: { [key: string]: () => void }): void;\n}\n\n/** Representation of Vue component internals */\ninterface ViewModel {\n [key: string]: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n $root: object;\n $options: {\n [key: string]: any;\n name?: string;\n propsData?: { [key: string]: any };\n _componentTag?: string;\n __file?: string;\n $_sentryPerfHook?: boolean;\n };\n $once(hook: string, cb: () => void): void;\n}\n\n/** Vue Integration configuration */\ninterface IntegrationOptions {\n /** Vue instance to be used inside the integration */\n Vue: VueInstance;\n\n /**\n * When set to `false`, Sentry will suppress reporting of all props data\n * from your Vue components for privacy concerns.\n */\n attachProps: boolean;\n /**\n * When set to `true`, original Vue's `logError` will be called as well.\n * https://github.com/vuejs/vue/blob/c2b1cfe9ccd08835f2d99f6ce60f67b4de55187f/src/core/util/error.js#L38-L48\n */\n logErrors: boolean;\n\n /**\n * When set to `true`, enables tracking of components lifecycle performance.\n * It requires `Tracing` integration to be also enabled.\n */\n tracing: boolean;\n\n /** {@link TracingOptions} */\n tracingOptions: TracingOptions;\n}\n\n/** Vue specific configuration for Tracing Integration */\ninterface TracingOptions {\n /**\n * Decides whether to track components by hooking into its lifecycle methods.\n * Can be either set to `boolean` to enable/disable tracking for all of them.\n * Or to an array of specific component names (case-sensitive).\n */\n trackComponents: boolean | string[];\n /** How long to wait until the tracked root activity is marked as finished and sent of to Sentry */\n timeout: number;\n /**\n * List of hooks to keep track of during component lifecycle.\n * Available hooks: 'activate' | 'create' | 'destroy' | 'mount' | 'update'\n * Based on https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\n */\n hooks: Operation[];\n}\n\n/** Optional metadata attached to Sentry Event */\ninterface Metadata {\n [key: string]: any;\n componentName?: string;\n propsData?: { [key: string]: any };\n lifecycleHook?: string;\n}\n\n// https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\ntype Hook =\n | 'activated'\n | 'beforeCreate'\n | 'beforeDestroy'\n | 'beforeMount'\n | 'beforeUpdate'\n | 'created'\n | 'deactivated'\n | 'destroyed'\n | 'mounted'\n | 'updated';\n\ntype Operation = 'activate' | 'create' | 'destroy' | 'mount' | 'update';\n\n// Mappings from operation to corresponding lifecycle hook.\nconst HOOKS: { [key in Operation]: Hook[] } = {\n activate: ['activated', 'deactivated'],\n create: ['beforeCreate', 'created'],\n destroy: ['beforeDestroy', 'destroyed'],\n mount: ['beforeMount', 'mounted'],\n update: ['beforeUpdate', 'updated'],\n};\n\nconst COMPONENT_NAME_REGEXP = /(?:^|[-_/])(\\w)/g;\nconst ROOT_COMPONENT_NAME = 'root';\nconst ANONYMOUS_COMPONENT_NAME = 'anonymous component';\n\n/** JSDoc */\nexport class Vue implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Vue';\n\n /**\n * @inheritDoc\n */\n public name: string = Vue.id;\n\n private readonly _options: IntegrationOptions;\n\n /**\n * Cache holding already processed component names\n */\n private readonly _componentsCache: { [key: string]: string } = {};\n private _rootSpan?: Span;\n private _rootSpanTimer?: ReturnType;\n private _tracingActivity?: number;\n\n /**\n * @inheritDoc\n */\n public constructor(\n options: Partial & { tracingOptions: Partial }>,\n ) {\n logger.log('You are still using the Vue.js integration, consider moving to @sentry/vue');\n this._options = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Vue: getGlobalObject().Vue,\n attachProps: true,\n logErrors: false,\n tracing: false,\n ...options,\n tracingOptions: {\n hooks: ['mount', 'update'],\n timeout: 2000,\n trackComponents: false,\n ...options.tracingOptions,\n },\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._options.Vue) {\n logger.error('Vue integration is missing a Vue instance');\n return;\n }\n\n this._attachErrorHandler(getCurrentHub);\n\n if (this._options.tracing) {\n this._startTracing(getCurrentHub);\n }\n }\n\n /**\n * Extract component name from the ViewModel\n */\n private _getComponentName(vm: ViewModel): string {\n // Such level of granularity is most likely not necessary, but better safe than sorry. — Kamil\n if (!vm) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$root === vm) {\n return ROOT_COMPONENT_NAME;\n }\n\n if (!vm.$options) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$options.name) {\n return vm.$options.name;\n }\n\n if (vm.$options._componentTag) {\n return vm.$options._componentTag;\n }\n\n // injected by vue-loader\n if (vm.$options.__file) {\n const unifiedFile = vm.$options.__file.replace(/^[a-zA-Z]:/, '').replace(/\\\\/g, '/');\n const filename = basename(unifiedFile, '.vue');\n return (\n this._componentsCache[filename] ||\n (this._componentsCache[filename] = filename.replace(COMPONENT_NAME_REGEXP, (_, c: string) =>\n c ? c.toUpperCase() : '',\n ))\n );\n }\n\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n /** Keep it as attribute function, to keep correct `this` binding inside the hooks callbacks */\n // eslint-disable-next-line @typescript-eslint/typedef\n private readonly _applyTracingHooks = (vm: ViewModel, getCurrentHub: () => Hub): void => {\n // Don't attach twice, just in case\n if (vm.$options.$_sentryPerfHook) {\n return;\n }\n vm.$options.$_sentryPerfHook = true;\n\n const name = this._getComponentName(vm);\n const rootMount = name === ROOT_COMPONENT_NAME;\n const spans: { [key: string]: Span } = {};\n\n // Render hook starts after once event is emitted,\n // but it ends before the second event of the same type.\n //\n // Because of this, we start measuring inside the first event,\n // but finish it before it triggers, to skip the event emitter timing itself.\n const rootHandler = (hook: Hook): void => {\n const now = timestampWithMs();\n\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (this._rootSpan) {\n this._finishRootSpan(now, getCurrentHub);\n } else {\n vm.$once(`hook:${hook}`, () => {\n // Create an activity on the first event call. There'll be no second call, as rootSpan will be in place,\n // thus new event handler won't be attached.\n\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line deprecation/deprecation\n const tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n this._tracingActivity = (tracingIntegration as any).constructor.pushActivity('Vue Application Render');\n const transaction = (tracingIntegration as any).constructor.getTransaction();\n if (transaction) {\n this._rootSpan = transaction.startChild({\n description: 'Application Render',\n op: 'vue',\n });\n }\n // Use functionality from @sentry/tracing\n } else {\n const activeTransaction = getActiveTransaction(getCurrentHub());\n if (activeTransaction) {\n this._rootSpan = activeTransaction.startChild({\n description: 'Application Render',\n op: 'vue',\n });\n }\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n });\n }\n };\n\n const childHandler = (hook: Hook, operation: Operation): void => {\n // Skip components that we don't want to track to minimize the noise and give a more granular control to the user\n const shouldTrack = Array.isArray(this._options.tracingOptions.trackComponents)\n ? this._options.tracingOptions.trackComponents.indexOf(name) > -1\n : this._options.tracingOptions.trackComponents;\n\n if (!this._rootSpan || !shouldTrack) {\n return;\n }\n\n const now = timestampWithMs();\n const span = spans[operation];\n\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (span) {\n span.finish();\n this._finishRootSpan(now, getCurrentHub);\n } else {\n vm.$once(`hook:${hook}`, () => {\n if (this._rootSpan) {\n spans[operation] = this._rootSpan.startChild({\n description: `Vue <${name}>`,\n op: operation,\n });\n }\n });\n }\n };\n\n // Each component has it's own scope, so all activities are only related to one of them\n this._options.tracingOptions.hooks.forEach(operation => {\n // Retrieve corresponding hooks from Vue lifecycle.\n // eg. mount => ['beforeMount', 'mounted']\n const internalHooks = HOOKS[operation];\n\n if (!internalHooks) {\n logger.warn(`Unknown hook: ${operation}`);\n return;\n }\n\n internalHooks.forEach(internalHook => {\n const handler = rootMount\n ? rootHandler.bind(this, internalHook)\n : childHandler.bind(this, internalHook, operation);\n const currentValue = vm.$options[internalHook];\n\n if (Array.isArray(currentValue)) {\n vm.$options[internalHook] = [handler, ...currentValue];\n } else if (typeof currentValue === 'function') {\n vm.$options[internalHook] = [handler, currentValue];\n } else {\n vm.$options[internalHook] = [handler];\n }\n });\n });\n };\n\n /** Finish top-level span and activity with a debounce configured using `timeout` option */\n private _finishRootSpan(timestamp: number, getCurrentHub: () => Hub): void {\n if (this._rootSpanTimer) {\n clearTimeout(this._rootSpanTimer);\n }\n\n this._rootSpanTimer = setTimeout(() => {\n if (this._tracingActivity) {\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n // eslint-disable-next-line deprecation/deprecation\n const tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (tracingIntegration as any).constructor.popActivity(this._tracingActivity);\n }\n }\n\n // We should always finish the span, only should pop activity if using @sentry/apm\n if (this._rootSpan) {\n this._rootSpan.finish(timestamp);\n }\n }, this._options.tracingOptions.timeout);\n }\n\n /** Inject configured tracing hooks into Vue's component lifecycles */\n private _startTracing(getCurrentHub: () => Hub): void {\n const applyTracingHooks = this._applyTracingHooks;\n\n this._options.Vue.mixin({\n beforeCreate(this: ViewModel): void {\n // eslint-disable-next-line deprecation/deprecation\n if (getCurrentHub().getIntegration(TRACING_GETTER) || getCurrentHub().getIntegration(BROWSER_TRACING_GETTER)) {\n // `this` points to currently rendered component\n applyTracingHooks(this, getCurrentHub);\n } else {\n logger.error('Vue integration has tracing enabled, but Tracing integration is not configured');\n }\n },\n });\n }\n\n /** Inject Sentry's handler into owns Vue's error handler */\n private _attachErrorHandler(getCurrentHub: () => Hub): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const currentErrorHandler = this._options.Vue.config.errorHandler;\n\n this._options.Vue.config.errorHandler = (error: Error, vm?: ViewModel, info?: string): void => {\n const metadata: Metadata = {};\n\n if (vm) {\n try {\n metadata.componentName = this._getComponentName(vm);\n\n if (this._options.attachProps) {\n metadata.propsData = vm.$options.propsData;\n }\n } catch (_oO) {\n logger.warn('Unable to extract metadata from Vue component.');\n }\n }\n\n if (info) {\n metadata.lifecycleHook = info;\n }\n\n if (getCurrentHub().getIntegration(Vue)) {\n // Capture exception in the next event loop, to make sure that all breadcrumbs are recorded in time.\n setTimeout(() => {\n getCurrentHub().withScope(scope => {\n scope.setContext('vue', metadata);\n getCurrentHub().captureException(error);\n });\n });\n }\n\n if (typeof currentErrorHandler === 'function') {\n currentErrorHandler.call(this._options.Vue, error, vm, info);\n }\n\n if (this._options.logErrors) {\n if (this._options.Vue.util) {\n this._options.Vue.util.warn(`Error in ${info}: \"${error && error.toString()}\"`, vm);\n }\n // eslint-disable-next-line no-console\n console.error(error);\n }\n };\n }\n}\n\ninterface HubType extends Hub {\n getScope?(): Scope | undefined;\n}\n\n/** Grabs active transaction off scope */\nexport function getActiveTransaction(hub: HubType): T | undefined {\n if (hub && hub.getScope) {\n const scope = hub.getScope() as Scope;\n if (scope) {\n return scope.getTransaction() as T | undefined;\n }\n }\n\n return undefined;\n}\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport Connection, {PROGRESS} from './Connection';\nimport PropTypes from 'prop-types';\nimport * as Sentry from '@sentry/browser';\nimport * as SentryIntegrations from '@sentry/integrations';\n\nimport DialogError from './Dialogs/Error';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport IconClose from '@material-ui/icons/Close';\n\nimport printPrompt from './Prompt';\nimport theme from './Theme';\nimport Loader from './Components/Loader';\nimport Router from './Components/Router';\nimport Utils from './Components/Utils';\nimport SaveCloseButtons from './Components/SaveCloseButtons';\nimport I18n from './i18n';\n\nimport './index.css';\n\nif (!window.localStorage) {\n window.localStorage = {\n getItem: () => null,\n setItem: () => null,\n };\n}\n\n/**\n * @extends {Router}\n */\nclass GenericApp extends Router {\n /**\n * @param {import('./types').GenericAppProps} props\n * @param {import('./types').GenericAppSettings | undefined} settings\n */\n constructor(props, settings) {\n // Remove `!Connection.isWeb() && window.adapterName !== 'material'` when iobroker.socket will support native ws\n if (!Connection.isWeb() && window.io && window.location.port === '3000') {\n try {\n const io = new window.SocketClient();\n delete window.io;\n window.io = io;\n } catch (e) {\n // ignore\n }\n }\n\n super(props);\n\n printPrompt();\n\n let query = (window.location.search || '').replace(/^\\?/, '').replace(/#.*$/, '');\n let args = {};\n query.trim().split('&').filter(t => t.trim()).forEach(b => {\n const parts = b.split('=');\n args[parts[0]] = parts.length === 2 ? parts[1] : true;\n if (args[parts[0]] === 'true') {\n args[parts[0]] = true;\n } else if (args[parts[0]] === 'false') {\n args[parts[0]] = false;\n }\n });\n\n // extract instance from URL\n this.instance = args.instance !== undefined ? parseInt(args.instance, 10) || 0 : (parseInt(window.location.search.slice(1), 10) || 0);\n // extract adapter name from URL\n const tmp = window.location.pathname.split('/');\n this.adapterName = settings?.adapterName || props.adapterName || window.adapterName || tmp[tmp.length - 2] || 'iot';\n this.instanceId = `system.adapter.${this.adapterName}.${this.instance}`;\n this.newReact = args.newReact === true; // it is admin5\n\n const location = Router.getLocation();\n location.tab = location.tab || window.localStorage.getItem(this.adapterName + '-adapter') || '';\n\n const themeInstance = this.createTheme();\n\n this.state = {\n selectedTab: window.localStorage.getItem(this.adapterName + '-adapter') || '',\n selectedTabNum: -1,\n native: {},\n errorText: '',\n changed: false,\n connected: false,\n loaded: false,\n isConfigurationError: '',\n expertMode: false,\n toast: '',\n theme: themeInstance,\n themeName: this.getThemeName(themeInstance),\n themeType: this.getThemeType(themeInstance),\n bottomButtons: (settings && settings.bottomButtons) === false ? false : ((props && props.bottomButtons) === false ? false : true),\n width: GenericApp.getWidth(),\n };\n\n // init translations\n const translations = {\n 'en': require('./i18n/en.json'),\n 'de': require('./i18n/de.json'),\n 'ru': require('./i18n/ru.json'),\n 'pt': require('./i18n/pt.json'),\n 'nl': require('./i18n/nl.json'),\n 'fr': require('./i18n/fr.json'),\n 'it': require('./i18n/it.json'),\n 'es': require('./i18n/es.json'),\n 'pl': require('./i18n/pl.json'),\n 'zh-cn': require('./i18n/zh-cn.json'),\n };\n\n // merge together\n if (settings && settings.translations) {\n Object.keys(settings.translations).forEach(lang => translations[lang] = Object.assign(translations[lang], settings.translations[lang]));\n } else if (props.translations) {\n Object.keys(props.translations).forEach(lang => translations[lang] = Object.assign(translations[lang], props.translations[lang]));\n }\n\n I18n.setTranslations(translations);\n\n this.savedNative = {}; // to detect if the config changed\n\n this.encryptedFields = props.encryptedFields || settings?.encryptedFields || [];\n\n this.sentryDSN = (settings && settings.sentryDSN) || props.sentryDSN;\n\n this.socket = new Connection({\n ...(props?.socket || settings?.socket),\n name: this.adapterName,\n doNotLoadAllObjects: settings?.doNotLoadAllObjects,\n onProgress: progress => {\n if (progress === PROGRESS.CONNECTING) {\n this.setState({connected: false});\n } else if (progress === PROGRESS.READY) {\n this.setState({connected: true});\n } else {\n this.setState({connected: true});\n }\n },\n onReady: (objects, scripts) => {\n I18n.setLanguage(this.socket.systemLang);\n\n // subscribe because of language and expert mode\n this.socket.subscribeObject('system.config', this.onSystemConfigChanged)\n .then(() => this.getSystemConfig())\n .then(obj => {\n this._secret = (typeof obj !== 'undefined' && obj.native && obj.native.secret) || 'Zgfr56gFe87jJOM';\n this._systemConfig = obj?.common || {};\n return this.socket.getObject(this.instanceId);\n })\n .then(instanceObj => {\n let waitPromise;\n\n const sentryEnabled =\n this._systemConfig.diag !== 'none' &&\n instanceObj &&\n instanceObj.common &&\n instanceObj.common.name &&\n instanceObj.common.version &&\n !instanceObj.common.disableDataReporting &&\n window.location.host !== 'localhost:3000';\n\n // activate sentry plugin\n if (!this.sentryStarted && this.sentryDSN && sentryEnabled) {\n this.sentryStarted = true;\n\n Sentry.init({\n dsn: this.sentryDSN,\n release: `iobroker.${instanceObj.common.name}@${instanceObj.common.version}`,\n integrations: [\n new SentryIntegrations.Dedupe()\n ]\n });\n }\n\n // read UUID and init sentry with it.\n // for backward compatibility it will be processed separately from above logic: some adapters could still have this.sentryDSN as undefined\n if (!this.sentryInited && sentryEnabled) {\n this.sentryInited = true;\n\n waitPromise = this.socket.getObject('system.meta.uuid')\n .then(uuidObj => {\n if (uuidObj && uuidObj.native && uuidObj.native.uuid) {\n Sentry.configureScope(scope =>\n scope.setUser({id: uuidObj.native.uuid}));\n }\n });\n }\n\n waitPromise = waitPromise || Promise.resolve();\n\n waitPromise\n .then(() => {\n if (instanceObj) {\n this.common = instanceObj?.common;\n this.onPrepareLoad(instanceObj.native, instanceObj.encryptedNative); // decode all secrets\n this.savedNative = JSON.parse(JSON.stringify(instanceObj.native));\n this.setState({native: instanceObj.native, loaded: true, expertMode: this.getExpertMode()}, () =>\n this.onConnectionReady && this.onConnectionReady());\n } else {\n console.warn('Cannot load instance settings');\n this.setState({native: {}, loaded: true, expertMode: this.getExpertMode()}, () => this.onConnectionReady && this.onConnectionReady());\n }\n });\n });\n },\n onError: err => {\n console.error(err);\n this.showError(err);\n }\n });\n }\n\n onSystemConfigChanged = (id, obj) => {\n if (obj && id === 'system.config') {\n if (this.socket.systemLang !== obj?.common.language) {\n this.socket.systemLang = obj?.common.language || 'en';\n I18n.setLanguage(this.socket.systemLang);\n }\n\n if (this._systemConfig.expertMode !== !!obj?.common?.expertMode) {\n this._systemConfig = obj?.common || {};\n this.setState({expertMode: this.getExpertMode()});\n } else {\n this._systemConfig = obj?.common || {};\n }\n }\n }\n\n /**\n * Called immediately after a component is mounted. Setting state here will trigger re-rendering.\n */\n componentDidMount() {\n window.addEventListener('resize', this.onResize, true);\n window.addEventListener('message', this.onReceiveMessage, false);\n super.componentDidMount();\n }\n\n /**\n * Called immediately before a component is destroyed.\n */\n componentWillUnmount() {\n window.removeEventListener('resize', this.onResize, true);\n window.removeEventListener('message', this.onReceiveMessage, false);\n super.componentWillUnmount();\n }\n\n onReceiveMessage = message => {\n if (message?.data) {\n if (message.data === 'updateTheme') {\n const newThemeName = Utils.getThemeName()\n Utils.setThemeName(Utils.getThemeName());\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n }, () => {\n this.props.onThemeChange && this.props.onThemeChange(newThemeName);\n this.onThemeChanged && this.onThemeChanged(newThemeName);\n });\n } else if (message.data === 'updateExpertMode') {\n this.onToggleExpertMode && this.onToggleExpertMode(this.getExpertMode());\n } else {\n console.warn('Received unknown message: ' + JSON.stringify(message.data));\n }\n }\n };\n\n /**\n * @private\n */\n onResize = () => {\n this.resizeTimer && clearTimeout(this.resizeTimer);\n this.resizeTimer = setTimeout(() => {\n this.resizeTimer = null;\n this.setState({width: GenericApp.getWidth()});\n }, 200);\n };\n\n /**\n * Gets the width depending on the window inner width.\n * @returns {import('./types').Width}\n */\n static getWidth() {\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n const SIZES = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n };\n const width = window.innerWidth;\n const keys = Object.keys(SIZES).reverse();\n const widthComputed = keys.find(key => width >= SIZES[key]);\n\n return widthComputed || 'xs';\n }\n\n /**\n * Get a theme\n * @param {string} name Theme name\n * @returns {import('./types').Theme}\n */\n createTheme(name = '') {\n return theme(Utils.getThemeName(name));\n }\n\n /**\n * Get the theme name\n * @param {import('./types').Theme} theme Theme\n * @returns {string} Theme name\n */\n getThemeName(theme) {\n return theme.name;\n }\n\n /**\n * Get the theme type\n * @param {import('./types').Theme} theme Theme\n * @returns {string} Theme type\n */\n getThemeType(theme) {\n return theme.palette.type;\n }\n\n /**\n * Changes the current theme\n */\n toggleTheme() {\n const themeName = this.state.themeName;\n\n // dark => blue => colored => light => dark\n const newThemeName = themeName === 'dark' ? 'blue' :\n (themeName === 'blue' ? 'colored' :\n (themeName === 'colored' ? 'light' : 'dark'));\n\n Utils.setThemeName(newThemeName);\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n });\n }\n\n /**\n * Gets the system configuration.\n * @returns {Promise}\n */\n getSystemConfig() {\n return this.socket.getSystemConfig();\n }\n\n /**\n * Get current expert mode\n * @returns {boolean}\n */\n getExpertMode() {\n return window.sessionStorage.getItem('App.expertMode') === 'true' || !!this._systemConfig.expertMode;\n }\n\n /**\n * Gets called when the socket.io connection is ready.\n * You can overload this function to execute own commands.\n */\n onConnectionReady() {\n }\n\n /**\n * Encrypts a string.\n * @param {string} value\n * @returns {string}\n */\n encrypt(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(this._secret[i % this._secret.length].charCodeAt(0) ^ value.charCodeAt(i));\n }\n return result;\n }\n\n /**\n * Decrypts a string.\n * @param {string} value\n * @returns {string}\n */\n decrypt(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(this._secret[i % this._secret.length].charCodeAt(0) ^ value.charCodeAt(i));\n }\n return result;\n }\n\n /**\n * Gets called when the navigation hash changes.\n * You may override this if needed.\n */\n onHashChanged() {\n const location = Router.getLocation();\n if (location.tab !== this.state.selectedTab) {\n this.selectTab(location.tab);\n }\n }\n\n /**\n * Selects the given tab.\n * @param {string} tab\n * @param {number} [index]\n */\n selectTab(tab, index) {\n window.localStorage[this.adapterName + '-adapter'] = tab;\n this.setState({selectedTab: tab, selectedTabNum: index})\n }\n\n /**\n * Gets called before the settings are saved.\n * You may override this if needed.\n * @param {Record} settings\n */\n onPrepareSave(settings) {\n // here you can encode values\n this.encryptedFields && this.encryptedFields.forEach(attr => {\n if (settings[attr]) {\n settings[attr] = this.encrypt(settings[attr]);\n }\n });\n\n return true;\n }\n\n /**\n * Gets called after the settings are loaded.\n * You may override this if needed.\n * @param {Record} settings\n * @param {string[]} encryptedNative optional list of fields to be decrypted\n */\n onPrepareLoad(settings, encryptedNative) {\n // here you can encode values\n this.encryptedFields && this.encryptedFields.forEach(attr => {\n if (settings[attr]) {\n settings[attr] = this.decrypt(settings[attr]);\n }\n });\n encryptedNative && encryptedNative.forEach(attr => {\n this.encryptedFields = this.encryptedFields || [];\n !this.encryptedFields.includes(attr) && this.encryptedFields.push(attr);\n if (settings[attr]) {\n settings[attr] = this.decrypt(settings[attr]);\n }\n });\n }\n\n /**\n * Gets the extendable instances.\n * @returns {Promise}\n */\n getExtendableInstances() {\n return new Promise(resolve => {\n this.socket._socket.emit('getObjectView', 'system', 'instance', null, (err, doc) => {\n if (err) {\n resolve([]);\n } else {\n resolve(doc.rows.filter(item => item.value.common.webExtendable).map(item => item.value));\n }\n });\n });\n }\n\n /**\n * Gets the IP addresses of the given host.\n * @param {string} host\n */\n getIpAddresses(host) {\n return new Promise((resolve, reject) => {\n this.socket._socket.emit('getHostByIp', host || this.common.host, (ip, _host) => {\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - ' + I18n.t('ra_Listen on all IPs'), address: '0.0.0.0', family: 'ipv4'}];\n const IPs6 = [{name: '[IPv6] ::', address: '::', family: 'ipv6'}];\n if (_host) {\n host = _host;\n if (host.native.hardware && host.native.hardware.networkInterfaces) {\n Object.keys(host.native.hardware.networkInterfaces).forEach(eth =>\n host.native.hardware.networkInterfaces[eth].forEach(inter => {\n if (inter.family !== 'IPv6') {\n IPs4.push({name: '[' + inter.family + '] ' + inter.address + ' - ' + eth, address: inter.address, family: 'ipv4'});\n } else {\n IPs6.push({name: '[' + inter.family + '] ' + inter.address + ' - ' + eth, address: inter.address, family: 'ipv6'});\n }\n }));\n }\n IPs6.forEach(ip => IPs4.push(ip));\n }\n resolve(IPs4);\n });\n });\n }\n\n /**\n * Saves the settings to the server.\n * @param {boolean} isClose True if the user is closing the dialog.\n */\n onSave(isClose) {\n let oldObj;\n if (this.state.isConfigurationError) {\n this.setState({errorText: this.state.isConfigurationError});\n return;\n }\n\n this.socket.getObject(this.instanceId)\n .then(_oldObj => {\n oldObj = _oldObj || {};\n\n for (const a in this.state.native) {\n if (this.state.native.hasOwnProperty(a)) {\n if (this.state.native[a] === null) {\n oldObj.native[a] = null;\n } else\n if (this.state.native[a] !== undefined) {\n oldObj.native[a] = JSON.parse(JSON.stringify(this.state.native[a]));\n } else {\n delete oldObj.native[a];\n }\n }\n }\n\n if (this.state.common) {\n for (const b in this.state.common) {\n if (this.state.common[b] === null) {\n oldObj.common[b] = null;\n } else\n if (this.state.common[b] !== undefined) {\n oldObj.common[b] = JSON.parse(JSON.stringify(this.state.common[b]));\n } else {\n delete oldObj.common[b];\n }\n }\n }\n\n if (this.onPrepareSave(oldObj.native) !== false) {\n return this.socket.setObject(this.instanceId, oldObj);\n } else {\n return Promise.reject('Invalid configuration');\n }\n })\n .then(() => {\n this.savedNative = oldObj.native;\n globalThis.changed = false;\n this.setState({changed: false});\n isClose && GenericApp.onClose();\n })\n .catch(e => {\n console.error(`Cannot save configuration: ${e}`);\n });\n }\n\n /**\n * Renders the toast.\n * @returns {JSX.Element | null} The JSX element.\n */\n renderToast() {\n if (!this.state.toast) return null;\n return (\n this.setState({toast: ''})}\n ContentProps={{\n 'aria-describedby': 'message-id',\n }}\n message={{this.state.toast}}\n action={[\n this.setState({toast: ''})}\n >\n \n ,\n ]}\n />);\n }\n\n /**\n * Closes the dialog.\n * @private\n */\n static onClose() {\n if (typeof window.parent !== 'undefined' && window.parent) {\n try {\n if (window.parent.$iframeDialog && typeof window.parent.$iframeDialog.close === 'function') {\n window.parent.$iframeDialog.close();\n } else {\n window.parent.postMessage('close', '*');\n }\n } catch (e) {\n window.parent.postMessage('close', '*');\n }\n }\n }\n\n /**\n * Renders the error dialog.\n * @returns {JSX.Element | null} The JSX element.\n */\n renderError() {\n if (!this.state.errorText) {\n return null;\n } else {\n return this.setState({errorText: ''})}/>;\n }\n }\n\n /**\n * Checks if the configuration has changed.\n * @param {Record} [native] the new state\n */\n getIsChanged(native) {\n native = native || this.state.native;\n const isChanged = JSON.stringify(native) !== JSON.stringify(this.savedNative);\n\n if(isChanged) {\n globalThis.changed = true;\n } else {\n globalThis.changed = false;\n }\n\n return isChanged;\n }\n\n /**\n * Gets called when loading the configuration.\n * @param {Record} newNative The new configuration object.\n */\n onLoadConfig(newNative) {\n if (JSON.stringify(newNative) !== JSON.stringify(this.state.native)) {\n this.setState({native: newNative, changed: this.getIsChanged(newNative)})\n }\n }\n\n /**\n * Sets the configuration error.\n * @param {string} errorText\n */\n setConfigurationError(errorText) {\n if (this.state.isConfigurationError !== errorText) {\n this.setState({isConfigurationError: errorText});\n }\n }\n\n /**\n * Renders the save and close buttons.\n * @returns {JSX.Element | undefined} The JSX element.\n */\n renderSaveCloseButtons() {\n if (this.state.bottomButtons) {\n return this.onSave(isClose)}\n onClose={() => GenericApp.onClose()}\n />;\n } else {\n return null;\n }\n }\n\n /**\n * @private\n * @param {Record} obj\n * @param {any} attrs\n * @param {any} value\n * @returns {boolean | undefined}\n */\n _updateNativeValue(obj, attrs, value) {\n if (typeof attrs !== 'object') {\n attrs = attrs.split('.');\n }\n const attr = attrs.shift();\n if (!attrs.length) {\n if (value && typeof value === 'object') {\n if (JSON.stringify(obj[attr]) !== JSON.stringify(value)) {\n obj[attr] = value;\n return true;\n }\n } else if (obj[attr] !== value) {\n obj[attr] = value;\n return true;\n } else {\n return false;\n }\n\n } else {\n obj[attr] = obj[attr] || {};\n if (typeof obj[attr] !== 'object') {\n throw new Error('attribute ' + attr + ' is no object, but ' + typeof obj[attr]);\n }\n return this._updateNativeValue(obj[attr], attrs, value);\n }\n }\n\n /**\n * Update the native value\n * @param {string} attr The attribute name with dots as delimiter.\n * @param {any} value The new value.\n * @param {(() => void)} [cb] Callback which will be called upon completion.\n */\n updateNativeValue(attr, value, cb) {\n const native = JSON.parse(JSON.stringify(this.state.native));\n if (this._updateNativeValue(native, attr, value)) {\n const changed = this.getIsChanged(native);\n this.setState({native, changed}, cb);\n }\n }\n\n /**\n * Set the error text to be shown.\n * @param {string | JSX.Element} text\n */\n showError(text) {\n this.setState({errorText: text});\n }\n\n /**\n * Sets the toast to be shown.\n * @param {string} toast\n */\n showToast(toast) {\n this.setState({toast});\n }\n\n /**\n * Renders this component.\n * @returns {JSX.Element} The JSX element.\n */\n render() {\n if (!this.state.loaded) {\n return ;\n }\n\n return
\n {this.renderError()}\n {this.renderToast()}\n {this.renderSaveCloseButtons()}\n
;\n }\n}\n\nGenericApp.propTypes = {\n adapterName: PropTypes.string, // (optional) name of adapter\n onThemeChange: PropTypes.func, // (optional) called by theme change\n socket: PropTypes.object, // (optional) socket information (host, port)\n encryptedFields: PropTypes.array, // (optional) list of native attributes, that must be encrypted\n bottomButtons: PropTypes.bool, // If the bottom buttons (Save/Close) must be shown\n};\n\nexport default GenericApp;\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nexport class Memo {\n /** Determines if WeakSet is available */\n private readonly _hasWeakSet: boolean;\n /** Either WeakSet or Array */\n private readonly _inner: any;\n\n public constructor() {\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n public memoize(obj: any): boolean {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < this._inner.length; i++) {\n const value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n }\n\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n public unmemoize(obj: any): void {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (let i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n }\n}\n","/*!\n localForage -- Offline Storage, Improved\n Version 1.10.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {\n return;\n }\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb || !idb.open) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support\n // (see: https://github.com/pouchdb/pouchdb/issues/5572).\n // Safari 10.1 shipped with fetch, we can use that to detect it.\n // Note: this creates issues with `window.fetch` polyfills and\n // overrides; see:\n // https://github.com/localForage/localForage/issues/856\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n // See: https://github.com/mozilla/localForage/issues/128\n // See: https://github.com/mozilla/localForage/issues/272\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\nfunction normalizeKey(key) {\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n return key;\n}\n\nfunction getCallback() {\n if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n return arguments[arguments.length - 1];\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs = void 0;\nvar dbContexts = {};\nvar toString = Object.prototype.toString;\n\n// Transaction Modes\nvar READ_ONLY = 'readonly';\nvar READ_WRITE = 'readwrite';\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve, reject) {\n deferredOperation.resolve = resolve;\n deferredOperation.reject = reject;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n return deferredOperation.promise;\n }\n}\n\nfunction _rejectReadiness(dbInfo, err) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Reject its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.reject(err);\n return deferredOperation.promise;\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n var db = openreq.result;\n db.onversionchange = function (e) {\n // Triggered when the database is modified (e.g. adding an objectStore) or\n // deleted (even when initiated by other sessions in different tabs).\n // Closing the connection here prevents those operations from being blocked.\n // If the database is accessed again later by this instance, the connection\n // will be reopened or the database recreated as needed.\n e.target.close();\n };\n resolve(db);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Try to establish a new db connection to replace the\n// current one which is broken (i.e. experiencing\n// InvalidStateError while creating a transaction).\nfunction _tryReconnect(dbInfo) {\n _deferReadiness(dbInfo);\n\n var dbContext = dbContexts[dbInfo.name];\n var forages = dbContext.forages;\n\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n if (forage._dbInfo.db) {\n forage._dbInfo.db.close();\n forage._dbInfo.db = null;\n }\n }\n dbInfo.db = null;\n\n return _getOriginalConnection(dbInfo).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n // store the latest db reference\n // in case the db was upgraded\n dbInfo.db = dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n })[\"catch\"](function (err) {\n _rejectReadiness(dbInfo, err);\n throw err;\n });\n}\n\n// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n// so we have to do it with callbacks\nfunction createTransaction(dbInfo, mode, callback, retries) {\n if (retries === undefined) {\n retries = 1;\n }\n\n try {\n var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n callback(null, tx);\n } catch (err) {\n if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n return Promise$1.resolve().then(function () {\n if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n // increase the db version, to create the new ObjectStore\n if (dbInfo.db) {\n dbInfo.version = dbInfo.db.version + 1;\n }\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n }).then(function () {\n return _tryReconnect(dbInfo).then(function () {\n createTransaction(dbInfo, mode, callback, retries - 1);\n });\n })[\"catch\"](callback);\n }\n\n callback(err);\n }\n}\n\nfunction createDbContext() {\n return {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = createDbContext();\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n // when the iterator callback returns any\n // (non-`undefined`) value, then we stop\n // the iteration immediately\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n var req = store.put(value, key);\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var advanced = false;\n var req = store.openKeyCursor();\n\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openKeyCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\n var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n return db;\n });\n\n if (!options.storeName) {\n promise = dbPromise.then(function (db) {\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n }\n\n var dropDBPromise = new Promise$1(function (resolve, reject) {\n var req = idb.deleteDatabase(options.name);\n\n req.onerror = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n reject(req.error);\n };\n\n req.onblocked = function () {\n // Closing all open connections in onversionchange handler should prevent this situation, but if\n // we do get here, it just means the request remains pending - eventually it will succeed or error\n console.warn('dropInstance blocked for database \"' + options.name + '\" until all open connections are closed');\n };\n\n req.onsuccess = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n resolve(db);\n };\n });\n\n return dropDBPromise.then(function (db) {\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n var _forage = forages[i];\n _advanceReadiness(_forage._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n } else {\n promise = dbPromise.then(function (db) {\n if (!db.objectStoreNames.contains(options.storeName)) {\n return;\n }\n\n var newVersion = db.version + 1;\n\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n forage._dbInfo.version = newVersion;\n }\n\n var dropObjectPromise = new Promise$1(function (resolve, reject) {\n var req = idb.open(options.name, newVersion);\n\n req.onerror = function (err) {\n var db = req.result;\n db.close();\n reject(err);\n };\n\n req.onupgradeneeded = function () {\n var db = req.result;\n db.deleteObjectStore(options.storeName);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n db.close();\n resolve(db);\n };\n });\n\n return dropObjectPromise.then(function (db) {\n dbContext.db = db;\n for (var j = 0; j < forages.length; j++) {\n var _forage2 = forages[j];\n _forage2._dbInfo.db = db;\n _advanceReadiness(_forage2._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n }\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n _support: isIndexedDBValid(),\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys,\n dropInstance: dropInstance\n};\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n\nfunction createDbTable(t, dbInfo, callback, errorCallback) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n}\n\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n createDbTable(t, dbInfo, function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n }, reject);\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n t.executeSql(sqlStatement, args, callback, function (t, error) {\n if (error.code === error.SYNTAX_ERR) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n if (!results.rows.length) {\n // if the table is missing (was deleted)\n // re-create it table and retry\n createDbTable(t, dbInfo, function () {\n t.executeSql(sqlStatement, args, callback, errorCallback);\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// https://www.w3.org/TR/webdatabase/#databases\n// > There is no way to enumerate or delete the databases available for an origin from this API.\nfunction getAllStoreNames(db) {\n return new Promise$1(function (resolve, reject) {\n db.transaction(function (t) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n var storeNames = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n storeNames.push(results.rows.item(i).name);\n }\n\n resolve({\n db: db,\n storeNames: storeNames\n });\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n}\n\nfunction dropInstance$1(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n var db;\n if (options.name === currentConfig.name) {\n // use the db reference of the current instance\n db = self._dbInfo.db;\n } else {\n db = openDatabase(options.name, '', '', 0);\n }\n\n if (!options.storeName) {\n // drop all database tables\n resolve(getAllStoreNames(db));\n } else {\n resolve({\n db: db,\n storeNames: [options.storeName]\n });\n }\n }).then(function (operationInfo) {\n return new Promise$1(function (resolve, reject) {\n operationInfo.db.transaction(function (t) {\n function dropTable(storeName) {\n return new Promise$1(function (resolve, reject) {\n t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n }\n\n var operations = [];\n for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n operations.push(dropTable(operationInfo.storeNames[i]));\n }\n\n Promise$1.all(operations).then(function () {\n resolve();\n })[\"catch\"](function (e) {\n reject(e);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n _support: isWebSQLValid(),\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1,\n dropInstance: dropInstance$1\n};\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n // in IE8 typeof localStorage.setItem === 'object'\n !!localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getKeyPrefix(options, defaultConfig) {\n var keyPrefix = options.name + '/';\n\n if (options.storeName !== defaultConfig.storeName) {\n keyPrefix += options.storeName + '/';\n }\n return keyPrefix;\n}\n\n// Check if localStorage throws when saving an item\nfunction checkIfLocalStorageThrows() {\n var localStorageTestKey = '_localforage_support_test';\n\n try {\n localStorage.setItem(localStorageTestKey, true);\n localStorage.removeItem(localStorageTestKey);\n\n return false;\n } catch (e) {\n return true;\n }\n}\n\n// Check if localStorage is usable and allows to save an item\n// This method checks if localStorage is usable in Safari Private Browsing\n// mode, or in any other case where the available quota for localStorage\n// is 0 and there wasn't any saved items yet.\nfunction _isLocalStorageUsable() {\n return !checkIfLocalStorageThrows() || localStorage.length > 0;\n}\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\n if (!_isLocalStorageUsable()) {\n return Promise$1.reject();\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n var itemKey = localStorage.key(i);\n if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance$2(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n var currentConfig = this.config();\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n if (!options.storeName) {\n resolve(options.name + '/');\n } else {\n resolve(_getKeyPrefix(options, self._defaultConfig));\n }\n }).then(function (keyPrefix) {\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n _support: isLocalStorageValid(),\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2,\n dropInstance: dropInstance$2\n};\n\nvar sameValue = function sameValue(x, y) {\n return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n};\n\nvar includes = function includes(array, searchElement) {\n var len = array.length;\n var i = 0;\n while (i < len) {\n if (sameValue(array[i], searchElement)) {\n return true;\n }\n i++;\n }\n\n return false;\n};\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\n// Drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar DefinedDrivers = {};\n\nvar DriverSupport = {};\n\nvar DefaultDrivers = {\n INDEXEDDB: asyncStorage,\n WEBSQL: webSQLStorage,\n LOCALSTORAGE: localStorageWrapper\n};\n\nvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\nvar OptionalDriverMethods = ['dropInstance'];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var _key in arg) {\n if (arg.hasOwnProperty(_key)) {\n if (isArray(arg[_key])) {\n arguments[0][_key] = arg[_key].slice();\n } else {\n arguments[0][_key] = arg[_key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n for (var driverTypeKey in DefaultDrivers) {\n if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n var driver = DefaultDrivers[driverTypeKey];\n var driverName = driver._driver;\n this[driverTypeKey] = driverName;\n\n if (!DefinedDrivers[driverName]) {\n // we don't need to wait for the promise,\n // since the default drivers can be defined\n // in a blocking manner\n this.defineDriver(driver);\n }\n }\n }\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n\n var driverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0, len = driverMethods.length; i < len; i++) {\n var driverMethodName = driverMethods[i];\n\n // when the property is there,\n // it should be a method even when optional\n var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var configureMissingMethods = function configureMissingMethods() {\n var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n return function () {\n var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n var promise = Promise$1.reject(error);\n executeCallback(promise, arguments[arguments.length - 1]);\n return promise;\n };\n };\n\n for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n var optionalDriverMethod = OptionalDriverMethods[_i];\n if (!driverObject[optionalDriverMethod]) {\n driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n }\n }\n };\n\n configureMissingMethods();\n\n var setDriverSupport = function setDriverSupport(support) {\n if (DefinedDrivers[driverName]) {\n console.info('Redefining LocalForage driver: ' + driverName);\n }\n DefinedDrivers[driverName] = driverObject;\n DriverSupport[driverName] = support;\n // don't use a then, so that we can define\n // drivers that have simple _support methods\n // in a blocking manner\n resolve();\n };\n\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n driverObject._support().then(setDriverSupport, reject);\n } else {\n setDriverSupport(!!driverObject._support);\n }\n } else {\n setDriverSupport(true);\n }\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!DriverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (file, acceptedFiles) {\n if (file && acceptedFiles) {\n var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');\n var fileName = file.name || '';\n var mimeType = (file.type || '').toLowerCase();\n var baseMimeType = mimeType.replace(/\\/.*$/, '');\n return acceptedFilesArray.some(function (type) {\n var validType = type.trim().toLowerCase();\n\n if (validType.charAt(0) === '.') {\n return fileName.toLowerCase().endsWith(validType);\n } else if (validType.endsWith('/*')) {\n // This is something like a image/* mime type\n return baseMimeType === validType.replace(/\\/.*$/, '');\n }\n\n return mimeType === validType;\n });\n }\n\n return true;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport NativeSelectInput from './NativeSelectInput';\nimport withStyles from '../styles/withStyles';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the select component `root` class. */\n root: {},\n\n /* Styles applied to the select component `select` class. */\n select: {\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n minWidth: 16,\n // So it doesn't collapse.\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE 11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n '&$disabled': {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n '&&': {\n paddingRight: 24\n }\n },\n\n /* Styles applied to the select component if `variant=\"filled\"`. */\n filled: {\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component if `variant=\"outlined\"`. */\n outlined: {\n borderRadius: theme.shape.borderRadius,\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component `selectMenu` class. */\n selectMenu: {\n height: 'auto',\n // Resets for multpile select with chips\n minHeight: '1.1876em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n\n /* Pseudo-class applied to the select component `disabled` class. */\n disabled: {},\n\n /* Styles applied to the icon component. */\n icon: {\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - 12px)',\n // Center vertically\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the icon component if the popup is open. */\n iconOpen: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the icon component if `variant=\"filled\"`. */\n iconFilled: {\n right: 7\n },\n\n /* Styles applied to the icon component if `variant=\"outlined\"`. */\n iconOutlined: {\n right: 7\n },\n\n /* Styles applied to the underlying native input component. */\n nativeInput: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%'\n }\n };\n};\nvar defaultInput = /*#__PURE__*/React.createElement(Input, null);\n/**\n * An alternative to `;\n\n if (this.props.dense) {\n return select;\n } else {\n return \n {this.props.label}\n {select}\n ;\n\n }\n }\n}\n\nSelectWithIcon.propTypes = {\n t: PropTypes.func,\n lang: PropTypes.string,\n themeType: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n list: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n options: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n label: PropTypes.string,\n different: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n fullWidth: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n removePrefix: PropTypes.string,\n allowNone: PropTypes.bool,\n inputProps: PropTypes.object,\n};\n\nexport default withStyles(styles)(SelectWithIcon);","export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n","import isBrowser from './isBrowser';\n\nconst timeoutDuration = (function(){\n const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}());\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nexport default function getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`]) +\n parseFloat(styles[`border${sideB}Width`])\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.width;\n const height =\n sizes.height || element.clientHeight || result.height;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop);\n const marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getReferenceNode from './getReferenceNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\nimport getReferenceNode from './getReferenceNode';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n constructor(reference, popper, options = {}) {\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = { ...Popper.Defaults, ...options };\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: [],\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n scheduleUpdate = () => requestAnimationFrame(this.update);\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\n}\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z\"\n}), 'FileCopy');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z\"\n}), 'ImportExport');\n\nexports.default = _default;","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export var COMMON_MIME_TYPES = new Map([\n ['avi', 'video/avi'],\n ['gif', 'image/gif'],\n ['ico', 'image/x-icon'],\n ['jpeg', 'image/jpeg'],\n ['jpg', 'image/jpeg'],\n ['mkv', 'video/x-matroska'],\n ['mov', 'video/quicktime'],\n ['mp4', 'video/mp4'],\n ['pdf', 'application/pdf'],\n ['png', 'image/png'],\n ['zip', 'application/zip'],\n ['doc', 'application/msword'],\n ['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document']\n]);\nexport function toFileWithPath(file, path) {\n var f = withMimeType(file);\n if (typeof f.path !== 'string') { // on electron, path is already set to the absolute path\n var webkitRelativePath = file.webkitRelativePath;\n Object.defineProperty(f, 'path', {\n value: typeof path === 'string'\n ? path\n // If is set,\n // the File will have a {webkitRelativePath} property\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory\n : typeof webkitRelativePath === 'string' && webkitRelativePath.length > 0\n ? webkitRelativePath\n : file.name,\n writable: false,\n configurable: false,\n enumerable: true\n });\n }\n return f;\n}\nfunction withMimeType(file) {\n var name = file.name;\n var hasExtension = name && name.lastIndexOf('.') !== -1;\n if (hasExtension && !file.type) {\n var ext = name.split('.')\n .pop().toLowerCase();\n var type = COMMON_MIME_TYPES.get(ext);\n if (type) {\n Object.defineProperty(file, 'type', {\n value: type,\n writable: false,\n configurable: false,\n enumerable: true\n });\n }\n }\n return file;\n}\n//# sourceMappingURL=file.js.map","import { __awaiter, __generator, __read, __spread } from \"tslib\";\nimport { toFileWithPath } from './file';\nvar FILES_TO_IGNORE = [\n // Thumbnail cache files for macOS and Windows\n '.DS_Store',\n 'Thumbs.db' // Windows\n];\n/**\n * Convert a DragEvent's DataTrasfer object to a list of File objects\n * NOTE: If some of the items are folders,\n * everything will be flattened and placed in the same list but the paths will be kept as a {path} property.\n * @param evt\n */\nexport function fromEvent(evt) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, isDragEvt(evt) && evt.dataTransfer\n ? getDataTransferFiles(evt.dataTransfer, evt.type)\n : getInputFiles(evt)];\n });\n });\n}\nfunction isDragEvt(value) {\n return !!value.dataTransfer;\n}\nfunction getInputFiles(evt) {\n var files = isInput(evt.target)\n ? evt.target.files\n ? fromList(evt.target.files)\n : []\n : [];\n return files.map(function (file) { return toFileWithPath(file); });\n}\nfunction isInput(value) {\n return value !== null;\n}\nfunction getDataTransferFiles(dt, type) {\n return __awaiter(this, void 0, void 0, function () {\n var items, files;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!dt.items) return [3 /*break*/, 2];\n items = fromList(dt.items)\n .filter(function (item) { return item.kind === 'file'; });\n // According to https://html.spec.whatwg.org/multipage/dnd.html#dndevents,\n // only 'dragstart' and 'drop' has access to the data (source node)\n if (type !== 'drop') {\n return [2 /*return*/, items];\n }\n return [4 /*yield*/, Promise.all(items.map(toFilePromises))];\n case 1:\n files = _a.sent();\n return [2 /*return*/, noIgnoredFiles(flatten(files))];\n case 2: return [2 /*return*/, noIgnoredFiles(fromList(dt.files)\n .map(function (file) { return toFileWithPath(file); }))];\n }\n });\n });\n}\nfunction noIgnoredFiles(files) {\n return files.filter(function (file) { return FILES_TO_IGNORE.indexOf(file.name) === -1; });\n}\n// IE11 does not support Array.from()\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Browser_compatibility\n// https://developer.mozilla.org/en-US/docs/Web/API/FileList\n// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList\nfunction fromList(items) {\n var files = [];\n // tslint:disable: prefer-for-of\n for (var i = 0; i < items.length; i++) {\n var file = items[i];\n files.push(file);\n }\n return files;\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem\nfunction toFilePromises(item) {\n if (typeof item.webkitGetAsEntry !== 'function') {\n return fromDataTransferItem(item);\n }\n var entry = item.webkitGetAsEntry();\n // Safari supports dropping an image node from a different window and can be retrieved using\n // the DataTransferItem.getAsFile() API\n // NOTE: FileSystemEntry.file() throws if trying to get the file\n if (entry && entry.isDirectory) {\n return fromDirEntry(entry);\n }\n return fromDataTransferItem(item);\n}\nfunction flatten(items) {\n return items.reduce(function (acc, files) { return __spread(acc, (Array.isArray(files) ? flatten(files) : [files])); }, []);\n}\nfunction fromDataTransferItem(item) {\n var file = item.getAsFile();\n if (!file) {\n return Promise.reject(item + \" is not a File\");\n }\n var fwp = toFileWithPath(file);\n return Promise.resolve(fwp);\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry\nfunction fromEntry(entry) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry)];\n });\n });\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry\nfunction fromDirEntry(entry) {\n var reader = entry.createReader();\n return new Promise(function (resolve, reject) {\n var entries = [];\n function readEntries() {\n var _this = this;\n // https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry/createReader\n // https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader/readEntries\n reader.readEntries(function (batch) { return __awaiter(_this, void 0, void 0, function () {\n var files, err_1, items;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!batch.length) return [3 /*break*/, 5];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, Promise.all(entries)];\n case 2:\n files = _a.sent();\n resolve(files);\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n reject(err_1);\n return [3 /*break*/, 4];\n case 4: return [3 /*break*/, 6];\n case 5:\n items = Promise.all(batch.map(fromEntry));\n entries.push(items);\n // Continue reading\n readEntries();\n _a.label = 6;\n case 6: return [2 /*return*/];\n }\n });\n }); }, function (err) {\n reject(err);\n });\n }\n readEntries();\n });\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry\nfunction fromFileEntry(entry) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n entry.file(function (file) {\n var fwp = toFileWithPath(file, entry.fullPath);\n resolve(fwp);\n }, function (err) {\n reject(err);\n });\n })];\n });\n });\n}\n//# sourceMappingURL=file-selector.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport accepts from 'attr-accept'; // Error codes\n\nexport var FILE_INVALID_TYPE = 'file-invalid-type';\nexport var FILE_TOO_LARGE = 'file-too-large';\nexport var FILE_TOO_SMALL = 'file-too-small';\nexport var TOO_MANY_FILES = 'too-many-files';\nexport var ErrorCode = {\n FileInvalidType: FILE_INVALID_TYPE,\n FileTooLarge: FILE_TOO_LARGE,\n FileTooSmall: FILE_TOO_SMALL,\n TooManyFiles: TOO_MANY_FILES\n}; // File Errors\n\nexport var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr(accept) {\n accept = Array.isArray(accept) && accept.length === 1 ? accept[0] : accept;\n var messageSuffix = Array.isArray(accept) ? \"one of \".concat(accept.join(', ')) : accept;\n return {\n code: FILE_INVALID_TYPE,\n message: \"File type must be \".concat(messageSuffix)\n };\n};\nexport var getTooLargeRejectionErr = function getTooLargeRejectionErr(maxSize) {\n return {\n code: FILE_TOO_LARGE,\n message: \"File is larger than \".concat(maxSize, \" bytes\")\n };\n};\nexport var getTooSmallRejectionErr = function getTooSmallRejectionErr(minSize) {\n return {\n code: FILE_TOO_SMALL,\n message: \"File is smaller than \".concat(minSize, \" bytes\")\n };\n};\nexport var TOO_MANY_FILES_REJECTION = {\n code: TOO_MANY_FILES,\n message: 'Too many files'\n}; // Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with\n// that MIME type will always be accepted\n\nexport function fileAccepted(file, accept) {\n var isAcceptable = file.type === 'application/x-moz-file' || accepts(file, accept);\n return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];\n}\nexport function fileMatchSize(file, minSize, maxSize) {\n if (isDefined(file.size)) {\n if (isDefined(minSize) && isDefined(maxSize)) {\n if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];\n } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n }\n\n return [true, null];\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n\nexport function allFilesAccepted(_ref) {\n var files = _ref.files,\n accept = _ref.accept,\n minSize = _ref.minSize,\n maxSize = _ref.maxSize,\n multiple = _ref.multiple,\n maxFiles = _ref.maxFiles;\n\n if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {\n return false;\n }\n\n return files.every(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 1),\n accepted = _fileAccepted2[0];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 1),\n sizeMatch = _fileMatchSize2[0];\n\n return accepted && sizeMatch;\n });\n} // React's synthetic events has event.isPropagationStopped,\n// but to remain compatibility with other libs (Preact) fall back\n// to check event.cancelBubble\n\nexport function isPropagationStopped(event) {\n if (typeof event.isPropagationStopped === 'function') {\n return event.isPropagationStopped();\n } else if (typeof event.cancelBubble !== 'undefined') {\n return event.cancelBubble;\n }\n\n return false;\n}\nexport function isEvtWithFiles(event) {\n if (!event.dataTransfer) {\n return !!event.target && !!event.target.files;\n } // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file\n\n\n return Array.prototype.some.call(event.dataTransfer.types, function (type) {\n return type === 'Files' || type === 'application/x-moz-file';\n });\n}\nexport function isKindFile(item) {\n return _typeof(item) === 'object' && item !== null && item.kind === 'file';\n} // allow the entire document to be a drag target\n\nexport function onDocumentDragOver(event) {\n event.preventDefault();\n}\n\nfunction isIe(userAgent) {\n return userAgent.indexOf('MSIE') !== -1 || userAgent.indexOf('Trident/') !== -1;\n}\n\nfunction isEdge(userAgent) {\n return userAgent.indexOf('Edge/') !== -1;\n}\n\nexport function isIeOrEdge() {\n var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.navigator.userAgent;\n return isIe(userAgent) || isEdge(userAgent);\n}\n/**\n * This is intended to be used to compose event handlers\n * They are executed in order until one of them calls `event.isPropagationStopped()`.\n * Note that the check is done on the first invoke too,\n * meaning that if propagation was stopped before invoking the fns,\n * no handlers will be executed.\n *\n * @param {Function} fns the event hanlder functions\n * @return {Function} the event handler to add to an element\n */\n\nexport function composeEventHandlers() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return fns.some(function (fn) {\n if (!isPropagationStopped(event) && fn) {\n fn.apply(void 0, [event].concat(args));\n }\n\n return isPropagationStopped(event);\n });\n };\n}","var _excluded = [\"children\"],\n _excluded2 = [\"open\"],\n _excluded3 = [\"refKey\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"onClick\", \"onDragEnter\", \"onDragOver\", \"onDragLeave\", \"onDrop\"],\n _excluded4 = [\"refKey\", \"onChange\", \"onClick\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* eslint prefer-template: 0 */\nimport React, { forwardRef, Fragment, useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { fromEvent } from 'file-selector';\nimport { allFilesAccepted, composeEventHandlers, fileAccepted, fileMatchSize, isEvtWithFiles, isIeOrEdge, isPropagationStopped, onDocumentDragOver, TOO_MANY_FILES_REJECTION } from './utils/index';\n/**\n * Convenience wrapper component for the `useDropzone` hook\n *\n * ```jsx\n * \n * {({getRootProps, getInputProps}) => (\n *
\n * \n *

Drag 'n' drop some files here, or click to select files

\n *
\n * )}\n *
\n * ```\n */\n\nvar Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n params = _objectWithoutProperties(_ref, _excluded);\n\n var _useDropzone = useDropzone(params),\n open = _useDropzone.open,\n props = _objectWithoutProperties(_useDropzone, _excluded2);\n\n useImperativeHandle(ref, function () {\n return {\n open: open\n };\n }, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element\n\n return /*#__PURE__*/React.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {\n open: open\n })));\n});\nDropzone.displayName = 'Dropzone'; // Add default props for react-docgen\n\nvar defaultProps = {\n disabled: false,\n getFilesFromEvent: fromEvent,\n maxSize: Infinity,\n minSize: 0,\n multiple: true,\n maxFiles: 0,\n preventDropOnDocument: true,\n noClick: false,\n noKeyboard: false,\n noDrag: false,\n noDragEventsBubbling: false,\n validator: null\n};\nDropzone.defaultProps = defaultProps;\nDropzone.propTypes = {\n /**\n * Render function that exposes the dropzone state and prop getter fns\n *\n * @param {object} params\n * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render\n * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render\n * @param {Function} params.open Open the native file selection dialog\n * @param {boolean} params.isFocused Dropzone area is in focus\n * @param {boolean} params.isFileDialogActive File dialog is opened\n * @param {boolean} params.isDragActive Active drag is in progress\n * @param {boolean} params.isDragAccept Dragged files are accepted\n * @param {boolean} params.isDragReject Some dragged files are rejected\n * @param {File[]} params.draggedFiles Files in active drag\n * @param {File[]} params.acceptedFiles Accepted files\n * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected\n */\n children: PropTypes.func,\n\n /**\n * Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n */\n accept: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * If true, disables click to open the native file selection dialog\n */\n noClick: PropTypes.bool,\n\n /**\n * If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n */\n noKeyboard: PropTypes.bool,\n\n /**\n * If true, disables drag 'n' drop\n */\n noDrag: PropTypes.bool,\n\n /**\n * If true, stops drag event propagation to parents\n */\n noDragEventsBubbling: PropTypes.bool,\n\n /**\n * Minimum file size (in bytes)\n */\n minSize: PropTypes.number,\n\n /**\n * Maximum file size (in bytes)\n */\n maxSize: PropTypes.number,\n\n /**\n * Maximum accepted number of files\n * The default value is 0 which means there is no limitation to how many files are accepted.\n */\n maxFiles: PropTypes.number,\n\n /**\n * Enable/disable the dropzone\n */\n disabled: PropTypes.bool,\n\n /**\n * Use this to provide a custom file aggregator\n *\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n getFilesFromEvent: PropTypes.func,\n\n /**\n * Cb for when closing the file dialog with no selection\n */\n onFileDialogCancel: PropTypes.func,\n\n /**\n * Cb for when the `dragenter` event occurs.\n *\n * @param {DragEvent} event\n */\n onDragEnter: PropTypes.func,\n\n /**\n * Cb for when the `dragleave` event occurs\n *\n * @param {DragEvent} event\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Cb for when the `dragover` event occurs\n *\n * @param {DragEvent} event\n */\n onDragOver: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n *\n * @param {File[]} acceptedFiles\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n onDrop: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n *\n * @param {File[]} files\n * @param {(DragEvent|Event)} event\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n *\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event\n */\n onDropRejected: PropTypes.func,\n\n /**\n * Custom validation function \n * @param {File} file\n * @returns {FileError|FileError[]}\n */\n validator: PropTypes.func\n};\nexport default Dropzone;\n/**\n * A function that is invoked for the `dragenter`,\n * `dragover` and `dragleave` events.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dragCb\n * @param {DragEvent} event\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dropCb\n * @param {File[]} acceptedFiles List of accepted files\n * @param {FileRejection[]} fileRejections List of rejected files and why they were rejected\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are files (such as link, text, etc.).\n *\n * @callback dropAcceptedCb\n * @param {File[]} files List of accepted files that meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n *\n * @callback dropRejectedCb\n * @param {File[]} files List of rejected files that do not meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is used aggregate files,\n * in a asynchronous fashion, from drag or input change events.\n *\n * @callback getFilesFromEvent\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n * @returns {(File[]|Promise)}\n */\n\n/**\n * An object with the current dropzone state and some helper functions.\n *\n * @typedef {object} DropzoneState\n * @property {Function} getRootProps Returns the props you should apply to the root drop container you render\n * @property {Function} getInputProps Returns the props you should apply to hidden file input you render\n * @property {Function} open Open the native file selection dialog\n * @property {boolean} isFocused Dropzone area is in focus\n * @property {boolean} isFileDialogActive File dialog is opened\n * @property {boolean} isDragActive Active drag is in progress\n * @property {boolean} isDragAccept Dragged files are accepted\n * @property {boolean} isDragReject Some dragged files are rejected\n * @property {File[]} draggedFiles Files in active drag\n * @property {File[]} acceptedFiles Accepted files\n * @property {FileRejection[]} fileRejections Rejected files and why they were rejected\n */\n\nvar initialState = {\n isFocused: false,\n isFileDialogActive: false,\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false,\n draggedFiles: [],\n acceptedFiles: [],\n fileRejections: []\n};\n/**\n * A React hook that creates a drag 'n' drop area.\n *\n * ```jsx\n * function MyDropzone(props) {\n * const {getRootProps, getInputProps} = useDropzone({\n * onDrop: acceptedFiles => {\n * // do something with the File objects, e.g. upload to some server\n * }\n * });\n * return (\n *
\n * \n *

Drag and drop some files here, or click to select files

\n *
\n * )\n * }\n * ```\n *\n * @function useDropzone\n *\n * @param {object} props\n * @param {string|string[]} [props.accept] Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n * @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window\n * @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog\n * @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n * @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop\n * @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents\n * @param {number} [props.minSize=0] Minimum file size (in bytes)\n * @param {number} [props.maxSize=Infinity] Maximum file size (in bytes)\n * @param {boolean} [props.disabled=false] Enable/disable the dropzone\n * @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator\n * @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection\n * @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs.\n * @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs\n * @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs\n * @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n * @param {dropAcceptedCb} [props.onDropAccepted]\n * @param {dropRejectedCb} [props.onDropRejected]\n *\n * @returns {DropzoneState}\n */\n\nexport function useDropzone() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _defaultProps$options = _objectSpread(_objectSpread({}, defaultProps), options),\n accept = _defaultProps$options.accept,\n disabled = _defaultProps$options.disabled,\n getFilesFromEvent = _defaultProps$options.getFilesFromEvent,\n maxSize = _defaultProps$options.maxSize,\n minSize = _defaultProps$options.minSize,\n multiple = _defaultProps$options.multiple,\n maxFiles = _defaultProps$options.maxFiles,\n onDragEnter = _defaultProps$options.onDragEnter,\n onDragLeave = _defaultProps$options.onDragLeave,\n onDragOver = _defaultProps$options.onDragOver,\n onDrop = _defaultProps$options.onDrop,\n onDropAccepted = _defaultProps$options.onDropAccepted,\n onDropRejected = _defaultProps$options.onDropRejected,\n onFileDialogCancel = _defaultProps$options.onFileDialogCancel,\n preventDropOnDocument = _defaultProps$options.preventDropOnDocument,\n noClick = _defaultProps$options.noClick,\n noKeyboard = _defaultProps$options.noKeyboard,\n noDrag = _defaultProps$options.noDrag,\n noDragEventsBubbling = _defaultProps$options.noDragEventsBubbling,\n validator = _defaultProps$options.validator;\n\n var rootRef = useRef(null);\n var inputRef = useRef(null);\n\n var _useReducer = useReducer(reducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n var isFocused = state.isFocused,\n isFileDialogActive = state.isFileDialogActive,\n draggedFiles = state.draggedFiles; // Fn for opening the file dialog programmatically\n\n var openFileDialog = useCallback(function () {\n if (inputRef.current) {\n dispatch({\n type: 'openDialog'\n });\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }, [dispatch]); // Update file dialog active state when the window is focused on\n\n var onWindowFocus = function onWindowFocus() {\n // Execute the timeout only if the file dialog is opened in the browser\n if (isFileDialogActive) {\n setTimeout(function () {\n if (inputRef.current) {\n var files = inputRef.current.files;\n\n if (!files.length) {\n dispatch({\n type: 'closeDialog'\n });\n\n if (typeof onFileDialogCancel === 'function') {\n onFileDialogCancel();\n }\n }\n }\n }, 300);\n }\n };\n\n useEffect(function () {\n window.addEventListener('focus', onWindowFocus, false);\n return function () {\n window.removeEventListener('focus', onWindowFocus, false);\n };\n }, [inputRef, isFileDialogActive, onFileDialogCancel]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone\n\n var onKeyDownCb = useCallback(function (event) {\n // Ignore keyboard events bubbling up the DOM tree\n if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {\n return;\n }\n\n if (event.keyCode === 32 || event.keyCode === 13) {\n event.preventDefault();\n openFileDialog();\n }\n }, [rootRef, inputRef]); // Update focus state for the dropzone\n\n var onFocusCb = useCallback(function () {\n dispatch({\n type: 'focus'\n });\n }, []);\n var onBlurCb = useCallback(function () {\n dispatch({\n type: 'blur'\n });\n }, []); // Cb to open the file dialog when click occurs on the dropzone\n\n var onClickCb = useCallback(function () {\n if (noClick) {\n return;\n } // In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()\n // to ensure React can handle state changes\n // See: https://github.com/react-dropzone/react-dropzone/issues/450\n\n\n if (isIeOrEdge()) {\n setTimeout(openFileDialog, 0);\n } else {\n openFileDialog();\n }\n }, [inputRef, noClick]);\n var dragTargetsRef = useRef([]);\n\n var onDocumentDrop = function onDocumentDrop(event) {\n if (rootRef.current && rootRef.current.contains(event.target)) {\n // If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return;\n }\n\n event.preventDefault();\n dragTargetsRef.current = [];\n };\n\n useEffect(function () {\n if (preventDropOnDocument) {\n document.addEventListener('dragover', onDocumentDragOver, false);\n document.addEventListener('drop', onDocumentDrop, false);\n }\n\n return function () {\n if (preventDropOnDocument) {\n document.removeEventListener('dragover', onDocumentDragOver);\n document.removeEventListener('drop', onDocumentDrop);\n }\n };\n }, [rootRef, preventDropOnDocument]);\n var onDragEnterCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (draggedFiles) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n dispatch({\n draggedFiles: draggedFiles,\n isDragActive: true,\n type: 'setDraggedFiles'\n });\n\n if (onDragEnter) {\n onDragEnter(event);\n }\n });\n }\n }, [getFilesFromEvent, onDragEnter, noDragEventsBubbling]);\n var onDragOverCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event);\n var hasFiles = isEvtWithFiles(event);\n\n if (hasFiles && event.dataTransfer) {\n try {\n event.dataTransfer.dropEffect = 'copy';\n } catch (_unused) {}\n /* eslint-disable-line no-empty */\n\n }\n\n if (hasFiles && onDragOver) {\n onDragOver(event);\n }\n\n return false;\n }, [onDragOver, noDragEventsBubbling]);\n var onDragLeaveCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event); // Only deactivate once the dropzone and all children have been left\n\n var targets = dragTargetsRef.current.filter(function (target) {\n return rootRef.current && rootRef.current.contains(target);\n }); // Make sure to remove a target present multiple times only once\n // (Firefox may fire dragenter/dragleave multiple times on the same element)\n\n var targetIdx = targets.indexOf(event.target);\n\n if (targetIdx !== -1) {\n targets.splice(targetIdx, 1);\n }\n\n dragTargetsRef.current = targets;\n\n if (targets.length > 0) {\n return;\n }\n\n dispatch({\n isDragActive: false,\n type: 'setDraggedFiles',\n draggedFiles: []\n });\n\n if (isEvtWithFiles(event) && onDragLeave) {\n onDragLeave(event);\n }\n }, [rootRef, onDragLeave, noDragEventsBubbling]);\n var onDropCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [];\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n var acceptedFiles = [];\n var fileRejections = [];\n files.forEach(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 2),\n accepted = _fileAccepted2[0],\n acceptError = _fileAccepted2[1];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2),\n sizeMatch = _fileMatchSize2[0],\n sizeError = _fileMatchSize2[1];\n\n var customErrors = validator ? validator(file) : null;\n\n if (accepted && sizeMatch && !customErrors) {\n acceptedFiles.push(file);\n } else {\n var errors = [acceptError, sizeError];\n\n if (customErrors) {\n errors = errors.concat(customErrors);\n }\n\n fileRejections.push({\n file: file,\n errors: errors.filter(function (e) {\n return e;\n })\n });\n }\n });\n\n if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {\n // Reject everything and empty accepted files\n acceptedFiles.forEach(function (file) {\n fileRejections.push({\n file: file,\n errors: [TOO_MANY_FILES_REJECTION]\n });\n });\n acceptedFiles.splice(0);\n }\n\n dispatch({\n acceptedFiles: acceptedFiles,\n fileRejections: fileRejections,\n type: 'setFiles'\n });\n\n if (onDrop) {\n onDrop(acceptedFiles, fileRejections, event);\n }\n\n if (fileRejections.length > 0 && onDropRejected) {\n onDropRejected(fileRejections, event);\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted(acceptedFiles, event);\n }\n });\n }\n\n dispatch({\n type: 'reset'\n });\n }, [multiple, accept, minSize, maxSize, maxFiles, getFilesFromEvent, onDrop, onDropAccepted, onDropRejected, noDragEventsBubbling, validator]);\n\n var composeHandler = function composeHandler(fn) {\n return disabled ? null : fn;\n };\n\n var composeKeyboardHandler = function composeKeyboardHandler(fn) {\n return noKeyboard ? null : composeHandler(fn);\n };\n\n var composeDragHandler = function composeDragHandler(fn) {\n return noDrag ? null : composeHandler(fn);\n };\n\n var stopPropagation = function stopPropagation(event) {\n if (noDragEventsBubbling) {\n event.stopPropagation();\n }\n };\n\n var getRootProps = useMemo(function () {\n return function () {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$refKey = _ref2.refKey,\n refKey = _ref2$refKey === void 0 ? 'ref' : _ref2$refKey,\n onKeyDown = _ref2.onKeyDown,\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick,\n onDragEnter = _ref2.onDragEnter,\n onDragOver = _ref2.onDragOver,\n onDragLeave = _ref2.onDragLeave,\n onDrop = _ref2.onDrop,\n rest = _objectWithoutProperties(_ref2, _excluded3);\n\n return _objectSpread(_objectSpread(_defineProperty({\n onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),\n onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),\n onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),\n onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter, onDragEnterCb)),\n onDragOver: composeDragHandler(composeEventHandlers(onDragOver, onDragOverCb)),\n onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave, onDragLeaveCb)),\n onDrop: composeDragHandler(composeEventHandlers(onDrop, onDropCb))\n }, refKey, rootRef), !disabled && !noKeyboard ? {\n tabIndex: 0\n } : {}), rest);\n };\n }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);\n var onInputElementClick = useCallback(function (event) {\n event.stopPropagation();\n }, []);\n var getInputProps = useMemo(function () {\n return function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n onChange = _ref3.onChange,\n onClick = _ref3.onClick,\n rest = _objectWithoutProperties(_ref3, _excluded4);\n\n var inputProps = _defineProperty({\n accept: accept,\n multiple: multiple,\n type: 'file',\n style: {\n display: 'none'\n },\n onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),\n autoComplete: 'off',\n tabIndex: -1\n }, refKey, inputRef);\n\n return _objectSpread(_objectSpread({}, inputProps), rest);\n };\n }, [inputRef, accept, multiple, onDropCb, disabled]);\n var fileCount = draggedFiles.length;\n var isDragAccept = fileCount > 0 && allFilesAccepted({\n files: draggedFiles,\n accept: accept,\n minSize: minSize,\n maxSize: maxSize,\n multiple: multiple,\n maxFiles: maxFiles\n });\n var isDragReject = fileCount > 0 && !isDragAccept;\n return _objectSpread(_objectSpread({}, state), {}, {\n isDragAccept: isDragAccept,\n isDragReject: isDragReject,\n isFocused: isFocused && !disabled,\n getRootProps: getRootProps,\n getInputProps: getInputProps,\n rootRef: rootRef,\n inputRef: inputRef,\n open: composeHandler(openFileDialog)\n });\n}\n\nfunction reducer(state, action) {\n /* istanbul ignore next */\n switch (action.type) {\n case 'focus':\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: true\n });\n\n case 'blur':\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: false\n });\n\n case 'openDialog':\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: true\n });\n\n case 'closeDialog':\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: false\n });\n\n case 'setDraggedFiles':\n /* eslint no-case-declarations: 0 */\n var isDragActive = action.isDragActive,\n draggedFiles = action.draggedFiles;\n return _objectSpread(_objectSpread({}, state), {}, {\n draggedFiles: draggedFiles,\n isDragActive: isDragActive\n });\n\n case 'setFiles':\n return _objectSpread(_objectSpread({}, state), {}, {\n acceptedFiles: action.acceptedFiles,\n fileRejections: action.fileRejections\n });\n\n case 'reset':\n return _objectSpread({}, initialState);\n\n default:\n return state;\n }\n}\n\nexport { ErrorCode } from './utils';","import superPropBase from \"@babel/runtime/helpers/esm/superPropBase\";\nexport default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}","import getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","import nested from '../ThemeProvider/nested';\n/**\n * This is the list of the style rule name we use as drop in replacement for the built-in\n * pseudo classes (:checked, :disabled, :focused, etc.).\n *\n * Why do they exist in the first place?\n * These classes are used at a specificity of 2.\n * It allows them to override previously definied styles as well as\n * being untouched by simple user overrides.\n */\n\nvar pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters.\n// When new generator function is created, rule counter is reset.\n// We need to reset the rule counter for SSR for each request.\n//\n// It's inspired by\n// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js\n\nexport default function createGenerateClassName() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$disableGloba = options.disableGlobal,\n disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,\n _options$productionPr = options.productionPrefix,\n productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,\n _options$seed = options.seed,\n seed = _options$seed === void 0 ? '' : _options$seed;\n var seedPrefix = seed === '' ? '' : \"\".concat(seed, \"-\");\n var ruleCounter = 0;\n\n var getNextCounterId = function getNextCounterId() {\n ruleCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (ruleCounter >= 1e10) {\n console.warn(['Material-UI: You might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join(''));\n }\n }\n\n return ruleCounter;\n };\n\n return function (rule, styleSheet) {\n var name = styleSheet.options.name; // Is a global static MUI style?\n\n if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {\n // We can use a shorthand class name, we never use the keys to style the components.\n if (pseudoClasses.indexOf(rule.key) !== -1) {\n return \"Mui-\".concat(rule.key);\n }\n\n var prefix = \"\".concat(seedPrefix).concat(name, \"-\").concat(rule.key);\n\n if (!styleSheet.options.theme[nested] || seed !== '') {\n return prefix;\n }\n\n return \"\".concat(prefix, \"-\").concat(getNextCounterId());\n }\n\n if (process.env.NODE_ENV === 'production') {\n return \"\".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId());\n }\n\n var suffix = \"\".concat(rule.key, \"-\").concat(getNextCounterId()); // Help with debuggability.\n\n if (styleSheet.options.classNamePrefix) {\n return \"\".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, \"-\").concat(suffix);\n }\n\n return \"\".concat(seedPrefix).concat(suffix);\n };\n}","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport { elementAcceptingRef, exactProp } from '@material-ui/utils';\n\nfunction mapEventPropToEvent(eventProp) {\n return eventProp.substring(2).toLowerCase();\n}\n\nfunction clickedRootScrollbar(event) {\n return document.documentElement.clientWidth < event.clientX || document.documentElement.clientHeight < event.clientY;\n}\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n */\n\n\nfunction ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = React.useRef(false);\n var nodeRef = React.useRef(null);\n var activatedRef = React.useRef(false);\n var syntheticEventRef = React.useRef(false);\n React.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = useEventCallback(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = ownerDocument(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n React.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = ownerDocument(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n React.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = ownerDocument(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ClickAwayListener.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The wrapped element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * If `true`, the React tree is ignored and only the DOM tree is considered.\n * This prop changes how portaled elements are handled.\n */\n disableReactTree: PropTypes.bool,\n\n /**\n * The mouse event to listen to. You can disable the listener by providing `false`.\n */\n mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]),\n\n /**\n * Callback fired when a \"click away\" event is detected.\n */\n onClickAway: PropTypes.func.isRequired,\n\n /**\n * The touch event to listen to. You can disable the listener by providing `false`.\n */\n touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);\n}\n\nexport default ClickAwayListener;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nvar styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\nvar defaultTimeout = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The Fade transition is used by the [Modal](/components/modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"TransitionComponent\", \"timeout\"]);\n\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport InputBase from '../InputBase';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {\n 'label + &': {\n marginTop: 16\n }\n },\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if color secondary. */\n colorSecondary: {\n '&$underline:after': {\n borderBottomColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if `disableUnderline={false}`. */\n underline: {\n '&:after': {\n borderBottom: \"2px solid \".concat(theme.palette.primary.main),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&$focused:after': {\n transform: 'scaleX(1)'\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: \"1px solid \".concat(bottomLineColor),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&:hover:not($disabled):before': {\n borderBottom: \"2px solid \".concat(theme.palette.text.primary),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: \"1px solid \".concat(bottomLineColor)\n }\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted'\n }\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {},\n\n /* Styles applied to the `input` element. */\n input: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {},\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {},\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {}\n };\n};\nvar Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {\n var disableUnderline = props.disableUnderline,\n classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = _objectWithoutProperties(props, [\"disableUnderline\", \"classes\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"]);\n\n return /*#__PURE__*/React.createElement(InputBase, _extends({\n classes: _extends({}, classes, {\n root: clsx(classes.root, !disableUnderline && classes.underline),\n underline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nInput.muiName = 'Input';\nexport default withStyles(styles, {\n name: 'MuiInput'\n})(Input);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n\n/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport formControlState from '../FormControl/formControlState';\nimport FormControlContext, { useFormControl } from '../FormControl/FormControlContext';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport useForkRef from '../utils/useForkRef';\nimport TextareaAutosize from '../TextareaAutosize';\nimport { isFilled } from './utils';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n var placeholderHidden = {\n opacity: '0 !important'\n };\n var placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return {\n '@global': {\n '@keyframes mui-auto-fill': {},\n '@keyframes mui-auto-fill-cancel': {}\n },\n\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.1876em',\n // Reset (19px), match the native input line-height\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n '&$disabled': {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n }),\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {},\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {},\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n '&$marginDense': {\n paddingTop: 4 - 1\n }\n },\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the `input` element. */\n input: {\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.1876em',\n // Reset (19px), match the native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE 11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE 11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n '-webkit-appearance': 'none'\n },\n // Show and hide the placeholder logic\n 'label[data-shrink=false] + $formControl &': {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE 11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE 11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n '&$disabled': {\n opacity: 1 // Reset iOS opacity\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 4 - 1\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n height: 'auto',\n resize: 'none',\n padding: 0\n },\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {\n // Improve type search style.\n '-moz-appearance': 'textfield',\n '-webkit-appearance': 'textfield'\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {},\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {},\n\n /* Styles applied to the `input` element if `hiddenLabel={true}`. */\n inputHiddenLabel: {}\n };\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\nvar InputBase = /*#__PURE__*/React.forwardRef(function InputBase(props, ref) {\n var ariaDescribedby = props['aria-describedby'],\n autoComplete = props.autoComplete,\n autoFocus = props.autoFocus,\n classes = props.classes,\n className = props.className,\n color = props.color,\n defaultValue = props.defaultValue,\n disabled = props.disabled,\n endAdornment = props.endAdornment,\n error = props.error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n id = props.id,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$inputProps = props.inputProps,\n inputPropsProp = _props$inputProps === void 0 ? {} : _props$inputProps,\n inputRefProp = props.inputRef,\n margin = props.margin,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n placeholder = props.placeholder,\n readOnly = props.readOnly,\n renderSuffix = props.renderSuffix,\n rows = props.rows,\n rowsMax = props.rowsMax,\n rowsMin = props.rowsMin,\n maxRows = props.maxRows,\n minRows = props.minRows,\n startAdornment = props.startAdornment,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n valueProp = props.value,\n other = _objectWithoutProperties(props, [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"classes\", \"className\", \"color\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"rowsMax\", \"rowsMin\", \"maxRows\", \"minRows\", \"startAdornment\", \"type\", \"value\"]);\n\n var value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n\n var _React$useRef = React.useRef(value != null),\n isControlled = _React$useRef.current;\n\n var inputRef = React.useRef();\n var handleInputRefWarning = React.useCallback(function (instance) {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['Material-UI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `inputRef` prop.', 'Make sure the `inputRef` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n var handleInputPropsRefProp = useForkRef(inputPropsProp.ref, handleInputRefWarning);\n var handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);\n var handleInputRef = useForkRef(inputRef, handleInputRefProp);\n\n var _React$useState = React.useState(false),\n focused = _React$useState[0],\n setFocused = _React$useState[1];\n\n var muiFormControl = useFormControl();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(function () {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'margin', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n React.useEffect(function () {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n var onFilled = muiFormControl && muiFormControl.onFilled;\n var onEmpty = muiFormControl && muiFormControl.onEmpty;\n var checkDirty = React.useCallback(function (obj) {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(function () {\n if (isControlled) {\n checkDirty({\n value: value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n var handleFocus = function handleFocus(event) {\n // Fix a bug with IE 11 where the focus/blur events are triggered\n // while the input is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n var handleChange = function handleChange(event) {\n if (!isControlled) {\n var element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.\" : _formatMuiErrorMessage(1));\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange.apply(inputPropsProp, [event].concat(args));\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange.apply(void 0, [event].concat(args));\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n React.useEffect(function () {\n checkDirty(inputRef.current);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n var handleClick = function handleClick(event) {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var InputComponent = inputComponent;\n\n var inputProps = _extends({}, inputPropsProp, {\n ref: handleInputRef\n });\n\n if (typeof InputComponent !== 'string') {\n inputProps = _extends({\n // Rename ref to inputRef as we don't know the\n // provided `inputComponent` structure.\n inputRef: handleInputRef,\n type: type\n }, inputProps, {\n ref: null\n });\n } else if (multiline) {\n if (rows && !maxRows && !minRows && !rowsMax && !rowsMin) {\n InputComponent = 'textarea';\n } else {\n inputProps = _extends({\n minRows: rows || minRows,\n rowsMax: rowsMax,\n maxRows: maxRows\n }, inputProps);\n InputComponent = TextareaAutosize;\n }\n } else {\n inputProps = _extends({\n type: type\n }, inputProps);\n }\n\n var handleAutoFill = function handleAutoFill(event) {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n React.useEffect(function () {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fullWidth && classes.fullWidth, fcs.focused && classes.focused, muiFormControl && classes.formControl, multiline && classes.multiline, startAdornment && classes.adornedStart, endAdornment && classes.adornedEnd, fcs.margin === 'dense' && classes.marginDense),\n onClick: handleClick,\n ref: ref\n }, other), startAdornment, /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: null\n }, /*#__PURE__*/React.createElement(InputComponent, _extends({\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp\n }, inputProps, {\n className: clsx(classes.input, inputPropsProp.className, fcs.disabled && classes.disabled, multiline && classes.inputMultiline, fcs.hiddenLabel && classes.inputHiddenLabel, startAdornment && classes.inputAdornedStart, endAdornment && classes.inputAdornedEnd, type === 'search' && classes.inputTypeSearch, fcs.margin === 'dense' && classes.inputMarginDense),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))), endAdornment, renderSuffix ? renderSuffix(_extends({}, fcs, {\n startAdornment: startAdornment\n })) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the input is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Maximum number of rows to display.\n * @deprecated Use `maxRows` instead.\n */\n rowsMax: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display.\n * @deprecated Use `minRows` instead.\n */\n rowsMin: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiInputBase'\n})(InputBase);","import warning from 'tiny-warning';\nimport { createRule } from 'jss';\n\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\n\nvar functionPlugin = function functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = createRule(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n }\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule;\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (process.env.NODE_ENV === 'development') {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;\n break;\n }\n }\n }\n }\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n};\n\nexport default functionPlugin;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { RuleList } from 'jss';\n\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule =\n/*#__PURE__*/\nfunction () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (rule) this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString() {\n return this.rules.toString();\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule =\n/*#__PURE__*/\nfunction () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, _extends({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n sheet.addRule(name, rules[name], _extends({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n sheet.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule, sheet) {\n if (rule.type !== 'style' || !sheet) return;\n handleNestedGlobalContainerRule(rule, sheet);\n handlePrefixedGlobalRule(rule, sheet);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\nexport default jssGlobal;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport warning from 'tiny-warning';\n\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n return rule.selector;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : void 0;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return _extends({}, prevOptions, {\n index: prevOptions.index + 1\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = _extends({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n container.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\nexport default jssNested;\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n","import { hasCSSTOMSupport } from 'jss';\n\nvar px = hasCSSTOMSupport && CSS ? CSS.px : 'px';\nvar ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';\nvar percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n 'border-block': px,\n 'border-block-end': px,\n 'border-block-end-width': px,\n 'border-block-start': px,\n 'border-block-start-width': px,\n 'border-block-width': px,\n 'border-inline': px,\n 'border-inline-end': px,\n 'border-inline-end-width': px,\n 'border-inline-start': px,\n 'border-inline-start-width': px,\n 'border-inline-width': px,\n 'border-start-start-radius': px,\n 'border-start-end-radius': px,\n 'border-end-start-radius': px,\n 'border-end-end-radius': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n 'margin-block': px,\n 'margin-block-end': px,\n 'margin-block-start': px,\n 'margin-inline': px,\n 'margin-inline-end': px,\n 'margin-inline-start': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n 'padding-block': px,\n 'padding-block-end': px,\n 'padding-block-start': px,\n 'padding-inline': px,\n 'padding-inline-end': px,\n 'padding-inline-start': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n inset: px,\n 'inset-block': px,\n 'inset-block-end': px,\n 'inset-block-start': px,\n 'inset-inline': px,\n 'inset-inline-end': px,\n 'inset-inline-start': px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-decoration-thickness': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n gap: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'row-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n\n/**\n * Clones the object and adds a camel cased property version.\n */\n\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (value == null) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n } // eslint-disable-next-line no-restricted-globals\n\n } else if (typeof value === 'number' && isNaN(value) === false) {\n var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.\n\n if (unit && !(value === 0 && unit === px)) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default defaultUnit;\n","import isInBrowser from 'is-in-browser';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\n\n// Export javascript style and css style vendor prefixes.\nvar js = '';\nvar css = '';\nvar vendor = '';\nvar browser = '';\nvar isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.\n\nif (isInBrowser) {\n // Order matters. We need to check Webkit the last one because\n // other vendors use to add Webkit prefixes to some properties\n var jsCssMap = {\n Moz: '-moz-',\n ms: '-ms-',\n O: '-o-',\n Webkit: '-webkit-'\n };\n\n var _document$createEleme = document.createElement('p'),\n style = _document$createEleme.style;\n\n var testProp = 'Transform';\n\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n js = key;\n css = jsCssMap[key];\n break;\n }\n } // Correctly detect the Edge browser.\n\n\n if (js === 'Webkit' && 'msHyphens' in style) {\n js = 'ms';\n css = jsCssMap.ms;\n browser = 'edge';\n } // Correctly detect the Safari browser.\n\n\n if (js === 'Webkit' && '-apple-trailing-word' in style) {\n vendor = 'apple';\n }\n}\n/**\n * Vendor prefix string for the current browser.\n *\n * @type {{js: String, css: String, vendor: String, browser: String}}\n * @api public\n */\n\n\nvar prefix = {\n js: js,\n css: css,\n vendor: vendor,\n browser: browser,\n isTouch: isTouch\n};\n\n/**\n * Test if a keyframe at-rule should be prefixed or not\n *\n * @param {String} vendor prefix string for the current browser.\n * @return {String}\n * @api public\n */\n\nfunction supportedKeyframes(key) {\n // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'\n if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.\n // https://caniuse.com/#search=keyframes\n\n if (prefix.js === 'ms') return key;\n return \"@\" + prefix.css + \"keyframes\" + key.substr(10);\n}\n\n// https://caniuse.com/#search=appearance\n\nvar appearence = {\n noPrefill: ['appearance'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'appearance') return false;\n if (prefix.js === 'ms') return \"-webkit-\" + prop;\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=color-adjust\n\nvar colorAdjust = {\n noPrefill: ['color-adjust'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'color-adjust') return false;\n if (prefix.js === 'Webkit') return prefix.css + \"print-\" + prop;\n return prop;\n }\n};\n\nvar regExp = /[-\\s]+(.)?/g;\n/**\n * Replaces the letter with the capital letter\n *\n * @param {String} match\n * @param {String} c\n * @return {String}\n * @api private\n */\n\nfunction toUpper(match, c) {\n return c ? c.toUpperCase() : '';\n}\n/**\n * Convert dash separated strings to camel-cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction camelize(str) {\n return str.replace(regExp, toUpper);\n}\n\n/**\n * Convert dash separated strings to pascal cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction pascalize(str) {\n return camelize(\"-\" + str);\n}\n\n// but we can use a longhand property instead.\n// https://caniuse.com/#search=mask\n\nvar mask = {\n noPrefill: ['mask'],\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^mask/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var longhand = 'mask-image';\n\n if (camelize(longhand) in style) {\n return prop;\n }\n\n if (prefix.js + pascalize(longhand) in style) {\n return prefix.css + prop;\n }\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=text-orientation\n\nvar textOrientation = {\n noPrefill: ['text-orientation'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'text-orientation') return false;\n\n if (prefix.vendor === 'apple' && !prefix.isTouch) {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=transform\n\nvar transform = {\n noPrefill: ['transform'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transform') return false;\n\n if (options.transform) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=transition\n\nvar transition = {\n noPrefill: ['transition'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transition') return false;\n\n if (options.transition) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=writing-mode\n\nvar writingMode = {\n noPrefill: ['writing-mode'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'writing-mode') return false;\n\n if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=user-select\n\nvar userSelect = {\n noPrefill: ['user-select'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'user-select') return false;\n\n if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=multicolumn\n// https://github.com/postcss/autoprefixer/issues/491\n// https://github.com/postcss/autoprefixer/issues/177\n\nvar breakPropsOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^break-/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var jsProp = \"WebkitColumn\" + pascalize(prop);\n return jsProp in style ? prefix.css + \"column-\" + prop : false;\n }\n\n if (prefix.js === 'Moz') {\n var _jsProp = \"page\" + pascalize(prop);\n\n return _jsProp in style ? \"page-\" + prop : false;\n }\n\n return false;\n }\n};\n\n// See https://github.com/postcss/autoprefixer/issues/324.\n\nvar inlineLogicalOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^(border|margin|padding)-inline/.test(prop)) return false;\n if (prefix.js === 'Moz') return prop;\n var newProp = prop.replace('-inline', '');\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\n// Camelization is required because we can't test using.\n// CSS syntax for e.g. in FF.\n\nvar unprefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n return camelize(prop) in style ? prop : false;\n }\n};\n\nvar prefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.\n\n if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.\n\n if (prop[0] === '-' && prop[1] === '-') return prop;\n if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.\n\n if (prefix.js !== 'Webkit' && \"Webkit\" + pascalized in style) return \"-webkit-\" + prop;\n return false;\n }\n};\n\n// https://caniuse.com/#search=scroll-snap\n\nvar scrollSnap = {\n supportedProperty: function supportedProperty(prop) {\n if (prop.substring(0, 11) !== 'scroll-snap') return false;\n\n if (prefix.js === 'ms') {\n return \"\" + prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=overscroll-behavior\n\nvar overscrollBehavior = {\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'overscroll-behavior') return false;\n\n if (prefix.js === 'ms') {\n return prefix.css + \"scroll-chaining\";\n }\n\n return prop;\n }\n};\n\nvar propMap = {\n 'flex-grow': 'flex-positive',\n 'flex-shrink': 'flex-negative',\n 'flex-basis': 'flex-preferred-size',\n 'justify-content': 'flex-pack',\n order: 'flex-order',\n 'align-items': 'flex-align',\n 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.\n\n}; // Support old flex spec from 2012.\n\nvar flex2012 = {\n supportedProperty: function supportedProperty(prop, style) {\n var newProp = propMap[prop];\n if (!newProp) return false;\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\nvar propMap$1 = {\n flex: 'box-flex',\n 'flex-grow': 'box-flex',\n 'flex-direction': ['box-orient', 'box-direction'],\n order: 'box-ordinal-group',\n 'align-items': 'box-align',\n 'flex-flow': ['box-orient', 'box-direction'],\n 'justify-content': 'box-pack'\n};\nvar propKeys = Object.keys(propMap$1);\n\nvar prefixCss = function prefixCss(p) {\n return prefix.css + p;\n}; // Support old flex spec from 2009.\n\n\nvar flex2009 = {\n supportedProperty: function supportedProperty(prop, style, _ref) {\n var multiple = _ref.multiple;\n\n if (propKeys.indexOf(prop) > -1) {\n var newProp = propMap$1[prop];\n\n if (!Array.isArray(newProp)) {\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n\n if (!multiple) return false;\n\n for (var i = 0; i < newProp.length; i++) {\n if (!(prefix.js + pascalize(newProp[0]) in style)) {\n return false;\n }\n }\n\n return newProp.map(prefixCss);\n }\n\n return false;\n }\n};\n\n// plugins = [\n// ...plugins,\n// breakPropsOld,\n// inlineLogicalOld,\n// unprefixed,\n// prefixed,\n// scrollSnap,\n// flex2012,\n// flex2009\n// ]\n// Plugins without 'noPrefill' value, going last.\n// 'flex-*' plugins should be at the bottom.\n// 'flex2009' going after 'flex2012'.\n// 'prefixed' going after 'unprefixed'\n\nvar plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];\nvar propertyDetectors = plugins.filter(function (p) {\n return p.supportedProperty;\n}).map(function (p) {\n return p.supportedProperty;\n});\nvar noPrefill = plugins.filter(function (p) {\n return p.noPrefill;\n}).reduce(function (a, p) {\n a.push.apply(a, _toConsumableArray(p.noPrefill));\n return a;\n}, []);\n\nvar el;\nvar cache = {};\n\nif (isInBrowser) {\n el = document.createElement('p'); // We test every property on vendor prefix requirement.\n // Once tested, result is cached. It gives us up to 70% perf boost.\n // http://jsperf.com/element-style-object-access-vs-plain-object\n //\n // Prefill cache with known css properties to reduce amount of\n // properties we need to feature test at runtime.\n // http://davidwalsh.name/vendor-prefix\n\n var computed = window.getComputedStyle(document.documentElement, '');\n\n for (var key$1 in computed) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];\n } // Properties that cannot be correctly detected using the\n // cache prefill method.\n\n\n noPrefill.forEach(function (x) {\n return delete cache[x];\n });\n}\n/**\n * Test if a property is supported, returns supported property with vendor\n * prefix if required. Returns `false` if not supported.\n *\n * @param {String} prop dash separated\n * @param {Object} [options]\n * @return {String|Boolean}\n * @api public\n */\n\n\nfunction supportedProperty(prop, options) {\n if (options === void 0) {\n options = {};\n }\n\n // For server-side rendering.\n if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {\n return cache[prop];\n } // Check if 'transition' or 'transform' natively supported in browser.\n\n\n if (prop === 'transition' || prop === 'transform') {\n options[prop] = prop in el.style;\n } // Find a plugin for current prefix property.\n\n\n for (var i = 0; i < propertyDetectors.length; i++) {\n cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.\n\n if (cache[prop]) break;\n } // Reset styles for current property.\n // Firefox can even throw an error for invalid properties, e.g., \"0\".\n\n\n try {\n el.style[prop] = '';\n } catch (err) {\n return false;\n }\n\n return cache[prop];\n}\n\nvar cache$1 = {};\nvar transitionProperties = {\n transition: 1,\n 'transition-property': 1,\n '-webkit-transition': 1,\n '-webkit-transition-property': 1\n};\nvar transPropsRegExp = /(^\\s*[\\w-]+)|, (\\s*[\\w-]+)(?![^()]*\\))/g;\nvar el$1;\n/**\n * Returns prefixed value transition/transform if needed.\n *\n * @param {String} match\n * @param {String} p1\n * @param {String} p2\n * @return {String}\n * @api private\n */\n\nfunction prefixTransitionCallback(match, p1, p2) {\n if (p1 === 'var') return 'var';\n if (p1 === 'all') return 'all';\n if (p2 === 'all') return ', all';\n var prefixedValue = p1 ? supportedProperty(p1) : \", \" + supportedProperty(p2);\n if (!prefixedValue) return p1 || p2;\n return prefixedValue;\n}\n\nif (isInBrowser) el$1 = document.createElement('p');\n/**\n * Returns prefixed value if needed. Returns `false` if value is not supported.\n *\n * @param {String} property\n * @param {String} value\n * @return {String|Boolean}\n * @api public\n */\n\nfunction supportedValue(property, value) {\n // For server-side rendering.\n var prefixedValue = value;\n if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.\n // We want only prefixable values here.\n // eslint-disable-next-line no-restricted-globals\n\n if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {\n return prefixedValue;\n } // Create cache key for current value.\n\n\n var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {\n return cache$1[cacheKey];\n } // IE can even throw an error in some cases, for e.g. style.content = 'bar'.\n\n\n try {\n // Test value as it is.\n el$1.style[property] = prefixedValue;\n } catch (err) {\n // Return false if value not supported.\n cache$1[cacheKey] = false;\n return false;\n } // If 'transition' or 'transition-property' property.\n\n\n if (transitionProperties[property]) {\n prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);\n } else if (el$1.style[property] === '') {\n // Value with a vendor prefix.\n prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert \"flex\" to \"-ms-flexbox\" for IE10.\n\n if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.\n\n el$1.style[property] = prefixedValue; // Return false if value not supported.\n\n if (el$1.style[property] === '') {\n cache$1[cacheKey] = false;\n return false;\n }\n } // Reset styles for current property.\n\n\n el$1.style[property] = ''; // Write current value to cache.\n\n cache$1[cacheKey] = prefixedValue;\n return cache$1[cacheKey];\n}\n\nexport { prefix, supportedKeyframes, supportedProperty, supportedValue };\n","import { supportedKeyframes, supportedValue, supportedProperty } from 'css-vendor';\nimport { toCssValue } from 'jss';\n\n/**\n * Add vendor prefix to a property name when needed.\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = supportedKeyframes(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = supportedProperty(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return supportedValue(prop, toCssValue(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default jssVendorPrefixer;\n","/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;\n","import functions from 'jss-plugin-rule-value-function';\nimport global from 'jss-plugin-global';\nimport nested from 'jss-plugin-nested';\nimport camelCase from 'jss-plugin-camel-case';\nimport defaultUnit from 'jss-plugin-default-unit';\nimport vendorPrefixer from 'jss-plugin-vendor-prefixer';\nimport propsSort from 'jss-plugin-props-sort'; // Subset of jss-preset-default with only the plugins the Material-UI components are using.\n\nexport default function jssPreset() {\n return {\n plugins: [functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing.\n // This way, we can get a performance boost.\n // In the documentation, we are using `autoprefixer` to solve this problem.\n typeof window === 'undefined' ? null : vendorPrefixer(), propsSort()]\n };\n}","/** @license React v17.0.2\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");u=w(\"react.memo\");v=w(\"react.lazy\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"\"+b.valueOf().toString()+\"\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0c?98:c,function(){a(!0)});gg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\r\n * Copyright 2020-2021, bluefox \r\n *\r\n * MIT License\r\n *\r\n **/\r\nimport PropTypes from 'prop-types';\r\n\r\n/** Possible progress states. */\r\nexport const PROGRESS = {\r\n /** The socket is connecting. */\r\n CONNECTING: 0,\r\n /** The socket is successfully connected. */\r\n CONNECTED: 1,\r\n /** All objects are loaded. */\r\n OBJECTS_LOADED: 2,\r\n /** The socket is ready for use. */\r\n READY: 3\r\n};\r\n\r\nconst PERMISSION_ERROR = 'permissionError';\r\nconst NOT_CONNECTED = 'notConnectedError';\r\nconst TIMEOUT_FOR_ADMIN4 = 1300;\r\n\r\nexport const ERRORS = {\r\n PERMISSION_ERROR,\r\n NOT_CONNECTED\r\n};\r\n\r\nfunction fixAdminUI(obj) {\r\n if (obj && obj.common && !obj.common.adminUI) {\r\n if (obj.common.noConfig) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'none';\r\n } else if (obj.common.jsonConfig) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'json';\r\n } else if (obj.common.materialize) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'materialize';\r\n } else {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'html';\r\n }\r\n\r\n if (obj.common.jsonCustom) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.custom = 'json';\r\n } else if (obj.common.supportCustoms) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.custom = 'json';\r\n }\r\n\r\n if (obj.common.materializeTab && obj.common.adminTab) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.tab = 'materialize';\r\n } else if (obj.common.adminTab) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.tab = 'html';\r\n }\r\n\r\n obj.common.adminUI && console.debug(`Please add to \"${obj._id.replace(/\\.\\d+$/, '')}\" common.adminUI=${JSON.stringify(obj.common.adminUI)}`);\r\n }\r\n return obj;\r\n}\r\n\r\nclass Connection {\r\n /**\r\n * @param {import('./types').ConnectionProps} props\r\n */\r\n constructor(props) {\r\n props = props || { protocol: window.location.protocol, host: window.location.hostname };\r\n this.props = props;\r\n\r\n this.autoSubscribes = this.props.autoSubscribes || [];\r\n this.autoSubscribeLog = this.props.autoSubscribeLog;\r\n\r\n this.props.protocol = this.props.protocol || window.location.protocol;\r\n this.props.host = this.props.host || window.location.hostname;\r\n this.props.port = this.props.port || (window.location.port === '3000' ? (Connection.isWeb() ? 8082 : 8081) : window.location.port);\r\n this.props.ioTimeout = Math.max(this.props.ioTimeout || 20000, 20000);\r\n this.props.cmdTimeout = Math.max(this.props.cmdTimeout || 5000, 5000);\r\n\r\n // breaking change. Do not load all objects by default is true\r\n this.doNotLoadAllObjects = this.props.doNotLoadAllObjects === undefined ? true : this.props.doNotLoadAllObjects;\r\n this.doNotLoadACL = this.props.doNotLoadACL === undefined ? true : this.props.doNotLoadACL;\r\n\r\n /** @type {Record} */\r\n this.states = {};\r\n this.objects = null;\r\n this.acl = null;\r\n this.firstConnect = true;\r\n this.waitForRestart = false;\r\n /** @type {ioBroker.Languages} */\r\n this.systemLang = 'en';\r\n this.connected = false;\r\n this._waitForFirstConnection = new Promise(resolve => { this._waitForFirstConnectionResolve = resolve });\r\n\r\n /** @type {Record} */\r\n this.statesSubscribes = {}; // subscribe for states\r\n\r\n /** @type {Record} */\r\n this.objectsSubscribes = {}; // subscribe for objects\r\n this.onProgress = this.props.onProgress || function () { };\r\n this.onError = this.props.onError || function (err) { console.error(err); };\r\n this.loaded = false;\r\n this.loadTimer = null;\r\n this.loadCounter = 0;\r\n this.admin5only = this.props.admin5only || false;\r\n\r\n /** @type {((connected: boolean) => void)[]} */\r\n this.onConnectionHandlers = [];\r\n /** @type {((message: string) => void)[]} */\r\n this.onLogHandlers = [];\r\n\r\n /** @type {Record>} */\r\n this._promises = {};\r\n this.startSocket();\r\n }\r\n\r\n /**\r\n * Checks if this connection is running in a web adapter and not in an admin.\r\n * @returns {boolean} True if running in a web adapter or in a socketio adapter.\r\n */\r\n static isWeb() {\r\n return window.adapterName === 'material' || window.socketUrl !== undefined;\r\n }\r\n\r\n /**\r\n * Starts the socket.io connection.\r\n * @returns {void}\r\n */\r\n startSocket() {\r\n // if socket io is not yet loaded\r\n if (typeof window.io === 'undefined') {\r\n // if in index.html the onLoad function not defined\r\n if (typeof window.registerSocketOnLoad !== 'function') {\r\n // poll if loaded\r\n this.scriptLoadCounter = this.scriptLoadCounter || 0;\r\n this.scriptLoadCounter++;\r\n\r\n if (this.scriptLoadCounter < 30) {\r\n // wait till the script loaded\r\n setTimeout(() => this.startSocket(), 100);\r\n return;\r\n } else {\r\n window.alert('Cannot load socket.io.js!');\r\n }\r\n } else {\r\n // register on load\r\n window.registerSocketOnLoad(() => this.startSocket());\r\n }\r\n return;\r\n } else {\r\n // socket was initialized, do not repeat\r\n if (this._socket) {\r\n return;\r\n }\r\n }\r\n\r\n let host = this.props.host;\r\n let port = this.props.port;\r\n let protocol = this.props.protocol.replace(':', '');\r\n\r\n // if web adapter, socket io could be on other port or even host\r\n if (window.socketUrl) {\r\n let parts = window.socketUrl.split(':');\r\n host = parts[0] || host;\r\n port = parts[1] || port;\r\n if (host.includes('://')) {\r\n parts = host.split('://');\r\n protocol = parts[0];\r\n host = parts[1];\r\n }\r\n }\r\n\r\n const url = `${protocol}://${host}:${port}`;\r\n\r\n this._socket = window.io.connect(\r\n url,\r\n {\r\n query: 'ws=true',\r\n name: this.props.name,\r\n timeout: this.props.ioTimeout\r\n }\r\n );\r\n\r\n this._socket.on('connect', noTimeout => {\r\n // If the user is not admin it takes some time to install the handlers, because all rights must be checked\r\n if (noTimeout !== true) {\r\n setTimeout(() =>\r\n this.getVersion()\r\n .then(info => {\r\n const [major, minor, patch] = info.version.split('.');\r\n const v = parseInt(major, 10) * 10000 + parseInt(minor, 10) * 100 + parseInt(patch, 10);\r\n if (v < 40102) {\r\n this._authTimer = null;\r\n // possible this is old version of admin\r\n this.onPreConnect(false, false);\r\n } else {\r\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\r\n }\r\n }), 500);\r\n } else {\r\n // iobroker websocket waits, till all handlers are installed\r\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\r\n }\r\n });\r\n\r\n this._socket.on('reconnect', () => {\r\n this.onProgress(PROGRESS.READY);\r\n this.connected = true;\r\n\r\n if (this.waitForRestart) {\r\n window.location.reload(false);\r\n } else {\r\n this._subscribe(true);\r\n this.onConnectionHandlers.forEach(cb => cb(true));\r\n }\r\n });\r\n\r\n this._socket.on('disconnect', () => {\r\n this.connected = false;\r\n this.subscribed = false;\r\n this.onProgress(PROGRESS.CONNECTING);\r\n this.onConnectionHandlers.forEach(cb => cb(false));\r\n });\r\n\r\n this._socket.on('reauthenticate', () =>\r\n this.authenticate());\r\n\r\n this._socket.on('log', message => {\r\n this.props.onLog && this.props.onLog(message);\r\n this.onLogHandlers.forEach(cb => cb(message));\r\n });\r\n\r\n this._socket.on('error', err => {\r\n let _err = err || '';\r\n if (typeof _err.toString !== 'function') {\r\n _err = JSON.stringify(_err);\r\n console.error(`Received strange error: ${_err}`);\r\n }\r\n _err = _err.toString();\r\n if (_err.includes('User not authorized')) {\r\n this.authenticate();\r\n } else {\r\n window.alert(`Socket Error: ${err}`);\r\n }\r\n });\r\n\r\n this._socket.on('connect_error', err =>\r\n console.error(`Connect error: ${err}`));\r\n\r\n this._socket.on('permissionError', err =>\r\n this.onError({ message: 'no permission', operation: err.operation, type: err.type, id: (err.id || '') }));\r\n\r\n this._socket.on('objectChange', (id, obj) =>\r\n setTimeout(() => this.objectChange(id, obj), 0));\r\n\r\n this._socket.on('stateChange', (id, state) =>\r\n setTimeout(() => this.stateChange(id, state), 0));\r\n\r\n this._socket.on('cmdStdout', (id, text) =>\r\n this.onCmdStdoutHandler && this.onCmdStdoutHandler(id, text));\r\n\r\n this._socket.on('cmdStderr', (id, text) =>\r\n this.onCmdStderrHandler && this.onCmdStderrHandler(id, text));\r\n\r\n this._socket.on('cmdExit', (id, exitCode) =>\r\n this.onCmdExitHandler && this.onCmdExitHandler(id, exitCode));\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {boolean} isOk\r\n * @param {boolean} isSecure\r\n */\r\n onPreConnect(isOk, isSecure) {\r\n if (this._authTimer) {\r\n clearTimeout(this._authTimer);\r\n this._authTimer = null;\r\n }\r\n\r\n this.connected = true;\r\n this.isSecure = isSecure;\r\n\r\n if (this.waitForRestart) {\r\n window.location.reload(false);\r\n } else {\r\n if (this.firstConnect) {\r\n // retry strategy\r\n this.loadTimer = setTimeout(() => {\r\n this.loadTimer = null;\r\n this.loadCounter++;\r\n if (this.loadCounter < 10) {\r\n this.onConnect();\r\n }\r\n }, 1000);\r\n\r\n if (!this.loaded) {\r\n this.onConnect();\r\n }\r\n } else {\r\n this.onProgress(PROGRESS.READY);\r\n }\r\n\r\n this._subscribe(true);\r\n this.onConnectionHandlers.forEach(cb => cb(true));\r\n }\r\n\r\n if (this._waitForFirstConnectionResolve) {\r\n this._waitForFirstConnectionResolve();\r\n this._waitForFirstConnectionResolve = null;\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the socket is connected.\r\n * @returns {boolean} true if connected.\r\n */\r\n isConnected() {\r\n return this.connected;\r\n }\r\n\r\n /**\r\n * Checks if the socket is connected.\r\n * @returns {Promise} Promise resolves if once connected.\r\n */\r\n waitForFirstConnection() {\r\n return this._waitForFirstConnection;\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n _getUserPermissions(cb) {\r\n if (this.doNotLoadACL) {\r\n return cb && cb();\r\n } else {\r\n this._socket.emit('getUserPermissions', cb);\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n onConnect() {\r\n this._getUserPermissions((err, acl) => {\r\n if (err) {\r\n return this.onError('Cannot read user permissions: ' + err);\r\n } else\r\n if (!this.doNotLoadACL) {\r\n if (this.loaded) {\r\n return;\r\n }\r\n this.loaded = true;\r\n clearTimeout(this.loadTimer);\r\n this.loadTimer = null;\r\n\r\n this.onProgress(PROGRESS.CONNECTED);\r\n this.firstConnect = false;\r\n\r\n this.acl = acl;\r\n }\r\n\r\n // Read system configuration\r\n return (this.admin5only && !window.vendorPrefix ? this.getCompactSystemConfig() : this.getSystemConfig())\r\n .then(data => {\r\n if (this.doNotLoadACL) {\r\n if (this.loaded) {\r\n return undefined;\r\n }\r\n this.loaded = true;\r\n clearTimeout(this.loadTimer);\r\n this.loadTimer = null;\r\n\r\n this.onProgress(PROGRESS.CONNECTED);\r\n this.firstConnect = false;\r\n }\r\n\r\n this.systemConfig = data;\r\n if (this.systemConfig && this.systemConfig.common) {\r\n this.systemLang = this.systemConfig.common.language;\r\n } else {\r\n this.systemLang = window.navigator.userLanguage || window.navigator.language;\r\n\r\n if (this.systemLang !== 'en' && this.systemLang !== 'de' && this.systemLang !== 'ru') {\r\n this.systemConfig.common.language = 'en';\r\n this.systemLang = 'en';\r\n }\r\n }\r\n\r\n this.props.onLanguage && this.props.onLanguage(this.systemLang);\r\n\r\n if (!this.doNotLoadAllObjects) {\r\n return this.getObjects()\r\n .then(() => {\r\n this.onProgress(PROGRESS.READY);\r\n this.props.onReady && this.props.onReady(this.objects);\r\n });\r\n } else {\r\n this.objects = this.admin5only ? {} : { 'system.config': data };\r\n this.onProgress(PROGRESS.READY);\r\n this.props.onReady && this.props.onReady(this.objects);\r\n }\r\n return undefined;\r\n })\r\n .catch(e => this.onError('Cannot read system config: ' + e));\r\n });\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n authenticate() {\r\n if (window.location.search.includes('&href=')) {\r\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}${window.location.hash}`;\r\n } else {\r\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${window.location.search}${window.location.hash}`;\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n /**\r\n * Subscribe to changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {boolean} binary Set to true if the given state is binary and requires Base64 decoding.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n subscribeState(id, binary, cb) {\r\n if (typeof binary === 'function') {\r\n cb = binary;\r\n binary = false;\r\n }\r\n\r\n if (!this.statesSubscribes[id]) {\r\n let reg = id\r\n .replace(/\\./g, '\\\\.')\r\n .replace(/\\*/g, '.*')\r\n .replace(/\\(/g, '\\\\(')\r\n .replace(/\\)/g, '\\\\)')\r\n .replace(/\\+/g, '\\\\+')\r\n .replace(/\\[/g, '\\\\[');\r\n\r\n if (reg.indexOf('*') === -1) {\r\n reg += '$';\r\n }\r\n this.statesSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\r\n this.statesSubscribes[id].cbs.push(cb);\r\n if (this.connected) {\r\n this._socket.emit('subscribe', id);\r\n }\r\n } else {\r\n !this.statesSubscribes[id].cbs.includes(cb) && this.statesSubscribes[id].cbs.push(cb);\r\n }\r\n if (typeof cb === 'function' && this.connected) {\r\n if (binary) {\r\n this.getBinaryState(id)\r\n .then(base64 => cb(id, base64))\r\n .catch(e => console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(e)}`));\r\n } else {\r\n if (Connection.isWeb()) {\r\n this._socket.emit('getStates', id, (err, states) => {\r\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\r\n states && Object.keys(states).forEach(id => cb(id, states[id]));\r\n });\r\n } else {\r\n this._socket.emit('getForeignStates', id, (err, states) => {\r\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\r\n states && Object.keys(states).forEach(id => cb(id, states[id]));\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Unsubscribes all callbacks from changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n */\r\n /**\r\n * Unsubscribes the given callback from changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n unsubscribeState(id, cb) {\r\n if (this.statesSubscribes[id]) {\r\n if (cb) {\r\n const pos = this.statesSubscribes[id].cbs.indexOf(cb);\r\n pos !== -1 && this.statesSubscribes[id].cbs.splice(pos, 1);\r\n } else {\r\n this.statesSubscribes[id].cbs = [];\r\n }\r\n\r\n if (!this.statesSubscribes[id].cbs || !this.statesSubscribes[id].cbs.length) {\r\n delete this.statesSubscribes[id];\r\n this.connected && this._socket.emit('unsubscribe', id);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @param {import('./types').ObjectChangeHandler} cb The callback.\r\n * @returns {Promise}\r\n */\r\n subscribeObject(id, cb) {\r\n if (!this.objectsSubscribes[id]) {\r\n let reg = id.replace(/\\./g, '\\\\.').replace(/\\*/g, '.*');\r\n if (!reg.includes('*')) {\r\n reg += '$';\r\n }\r\n this.objectsSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\r\n this.objectsSubscribes[id].cbs.push(cb);\r\n this.connected && this._socket.emit('subscribeObjects', id);\r\n } else {\r\n !this.objectsSubscribes[id].cbs.includes(cb) && this.objectsSubscribes[id].cbs.push(cb);\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Unsubscribes all callbacks from changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Unsubscribes the given callback from changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @param {import('./types').ObjectChangeHandler} cb The callback.\r\n * @returns {Promise}\r\n */\r\n unsubscribeObject(id, cb) {\r\n if (this.objectsSubscribes[id]) {\r\n if (cb) {\r\n const pos = this.objectsSubscribes[id].cbs.indexOf(cb);\r\n pos !== -1 && this.objectsSubscribes[id].cbs.splice(pos, 1);\r\n } else {\r\n this.objectsSubscribes[id].cbs = [];\r\n }\r\n\r\n if (this.connected && (!this.objectsSubscribes[id].cbs || !this.objectsSubscribes[id].cbs.length)) {\r\n delete this.objectsSubscribes[id];\r\n this.connected && this._socket.emit('unsubscribeObjects', id);\r\n }\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {string} id\r\n * @param {ioBroker.Object | null | undefined} obj\r\n */\r\n objectChange(id, obj) {\r\n // update main.objects cache\r\n if (!this.objects) {\r\n return;\r\n }\r\n\r\n /** @type {import(\"./types\").OldObject} */\r\n let oldObj;\r\n\r\n let changed = false;\r\n if (obj) {\r\n if (obj._rev && this.objects[id]) {\r\n this.objects[id]._rev = obj._rev;\r\n }\r\n\r\n if (this.objects[id]) {\r\n oldObj = { _id: id, type: this.objects[id].type };\r\n }\r\n\r\n if (!this.objects[id] || JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\r\n this.objects[id] = obj;\r\n changed = true;\r\n }\r\n } else if (this.objects[id]) {\r\n oldObj = { _id: id, type: this.objects[id].type };\r\n delete this.objects[id];\r\n changed = true;\r\n }\r\n\r\n Object.keys(this.objectsSubscribes).forEach(_id => {\r\n if (_id === id || this.objectsSubscribes[_id].reg.test(id)) {\r\n //@ts-ignore\r\n this.objectsSubscribes[_id].cbs.forEach(cb => cb(id, obj, oldObj));\r\n }\r\n });\r\n\r\n if (changed && this.props.onObjectChange) {\r\n this.props.onObjectChange(id, obj);\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {string} id\r\n * @param {ioBroker.State | null | undefined} state\r\n */\r\n stateChange(id, state) {\r\n for (const task in this.statesSubscribes) {\r\n if (this.statesSubscribes.hasOwnProperty(task) && this.statesSubscribes[task].reg.test(id)) {\r\n this.statesSubscribes[task].cbs.forEach(cb => cb(id, state));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets all states.\r\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\r\n * @returns {Promise>}\r\n */\r\n getStates(disableProgressUpdate) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getStates', (err, res) => {\r\n this.states = res;\r\n //@ts-ignore\r\n !disableProgressUpdate && this.onProgress(PROGRESS.STATES_LOADED);\r\n return err ? reject(err) : resolve(this.states);\r\n }));\r\n }\r\n\r\n /**\r\n * Gets the given state.\r\n * @param {string} id The state ID.\r\n * @returns {Promise}\r\n */\r\n getState(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getState', id, (err, state) => err ? reject(err) : resolve(state)));\r\n }\r\n\r\n /**\r\n * Gets the given binary state.\r\n * @param {string} id The state ID.\r\n * @returns {Promise}\r\n */\r\n getBinaryState(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n // the data will come in base64\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getBinaryState', id, (err, state) => err ? reject(err) : resolve(state)));\r\n }\r\n\r\n /**\r\n * Sets the given binary state.\r\n * @param {string} id The state ID.\r\n * @param {string} base64 The Base64 encoded binary data.\r\n * @returns {Promise}\r\n */\r\n setBinaryState(id, base64) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n // the data will come in base64\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setBinaryState', id, base64, err => err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Sets the given state value.\r\n * @param {string} id The state ID.\r\n * @param {string | number | boolean | ioBroker.State | ioBroker.SettableState | null} val The state value.\r\n * @returns {Promise}\r\n */\r\n setState(id, val) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setState', id, val, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Gets all objects.\r\n * @param {(objects?: Record) => void} update Callback that is executed when all objects are retrieved.\r\n * @returns {void}\r\n */\r\n /**\r\n * Gets all objects.\r\n * @param {boolean} update Set to true to retrieve all objects from the server (instead of using the local cache).\r\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\r\n * @returns {Promise> | undefined}\r\n */\r\n getObjects(update, disableProgressUpdate) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n } else {\r\n return new Promise((resolve, reject) => {\r\n if (!update && this.objects) {\r\n return resolve(this.objects);\r\n }\r\n\r\n this._socket.emit(Connection.isWeb() ? 'getObjects' : 'getAllObjects', (err, res) => {\r\n this.objects = res;\r\n disableProgressUpdate && this.onProgress(PROGRESS.OBJECTS_LOADED);\r\n err ? reject(err) : resolve(this.objects);\r\n });\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {boolean} isEnable\r\n */\r\n _subscribe(isEnable) {\r\n if (isEnable && !this.subscribed) {\r\n this.subscribed = true;\r\n this.autoSubscribes.forEach(id => this._socket.emit('subscribeObjects', id));\r\n // re subscribe objects\r\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('subscribeObjects', id));\r\n // re-subscribe logs\r\n this.autoSubscribeLog && this._socket.emit('requireLog', true);\r\n // re subscribe states\r\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('subscribe', id));\r\n } else if (!isEnable && this.subscribed) {\r\n this.subscribed = false;\r\n // un-subscribe objects\r\n this.autoSubscribes.forEach(id => this._socket.emit('unsubscribeObjects', id));\r\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('unsubscribeObjects', id));\r\n // un-subscribe logs\r\n this.autoSubscribeLog && this._socket.emit('requireLog', false);\r\n\r\n // un-subscribe states\r\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('unsubscribe', id));\r\n }\r\n }\r\n\r\n /**\r\n * Requests log updates.\r\n * @param {boolean} isEnabled Set to true to get logs.\r\n * @returns {Promise}\r\n */\r\n requireLog(isEnabled) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('requireLog', isEnabled, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Deletes the given object.\r\n * @param {string} id The object ID.\r\n * @param {boolean} maintenance Force deletion of non conform IDs.\r\n * @returns {Promise}\r\n */\r\n delObject(id, maintenance) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('delObject', id, { maintenance: !!maintenance }, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Deletes the given object and all its children.\r\n * @param {string} id The object ID.\r\n * @param {boolean} maintenance Force deletion of non conform IDs.\r\n * @returns {Promise}\r\n */\r\n delObjects(id, maintenance) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('delObjects', id, {maintenance: !!maintenance}, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Sets the object.\r\n * @param {string} id The object ID.\r\n * @param {ioBroker.SettableObject} obj The object.\r\n * @returns {Promise}\r\n */\r\n setObject(id, obj) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!obj) {\r\n return Promise.reject('Null object is not allowed');\r\n }\r\n\r\n obj = JSON.parse(JSON.stringify(obj));\r\n\r\n if (obj.hasOwnProperty('from')) {\r\n delete obj.from;\r\n }\r\n if (obj.hasOwnProperty('user')) {\r\n delete obj.user;\r\n }\r\n if (obj.hasOwnProperty('ts')) {\r\n delete obj.ts;\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setObject', id, obj, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Gets the object with the given id from the server.\r\n * @param {string} id The object ID.\r\n * @returns {ioBroker.GetObjectPromise} The object.\r\n */\r\n getObject(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getObject', id, (err, obj) =>\r\n err ? reject(err) : resolve(obj)));\r\n }\r\n\r\n /**\r\n * Get all adapter instances.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Get all instances of the given adapter.\r\n * @param {string} adapter The name of the adapter.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getAdapterInstances(adapter, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (typeof adapter === 'boolean') {\r\n update = adapter;\r\n adapter = '';\r\n }\r\n adapter = adapter || '';\r\n\r\n if (!update && this._promises['instances_' + adapter]) {\r\n return this._promises['instances_' + adapter];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['instances_' + adapter] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n timeout = null;\r\n this.getObjectView(\r\n `system.adapter.${adapter}.`,\r\n `system.adapter.${adapter}.\\u9999`,\r\n 'instance'\r\n )\r\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\r\n .catch(e => reject(e));\r\n }, TIMEOUT_FOR_ADMIN4);\r\n\r\n this._socket.emit('getAdapterInstances', adapter, (err, instances) => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n return err ? reject(err) : resolve(instances);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['instances_' + adapter];\r\n }\r\n\r\n /**\r\n * Get all adapters.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Get adapters with the given name.\r\n * @param {string} adapter The name of the adapter.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getAdapters(adapter, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (typeof adapter === 'boolean') {\r\n update = adapter;\r\n adapter = '';\r\n }\r\n\r\n adapter = adapter || '';\r\n\r\n if (!update && this._promises['adapter_' + adapter]) {\r\n return this._promises['adapter_' + adapter];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['adapter_' + adapter] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n timeout = null;\r\n this.getObjectView(\r\n `system.adapter.${adapter}.`,\r\n `system.adapter.${adapter}.\\u9999`,\r\n 'adapter'\r\n )\r\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\r\n .catch(e => reject(e));\r\n }, TIMEOUT_FOR_ADMIN4);\r\n\r\n this._socket.emit('getAdapters', adapter, (err, adapters) => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n return err ? reject(err) : resolve(adapters);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['adapter_' + adapter];\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {any[]} objs\r\n * @param {(err?: any) => void} cb\r\n */\r\n _renameGroups(objs, cb) {\r\n if (!objs || !objs.length) {\r\n cb && cb();\r\n } else {\r\n let obj = objs.pop();\r\n let oldId = obj._id;\r\n obj._id = obj.newId;\r\n delete obj.newId;\r\n\r\n this.setObject(obj._id, obj)\r\n .then(() => this.delObject(oldId))\r\n .then(() => setTimeout(() => this._renameGroups(objs, cb), 0))\r\n .catch(err => cb && cb(err));\r\n }\r\n }\r\n\r\n /**\r\n * Rename a group.\r\n * @param {string} id The id.\r\n * @param {string} newId The new id.\r\n * @param {string | { [lang in ioBroker.Languages]?: string; }} newName The new name.\r\n */\r\n renameGroup(id, newId, newName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n return this.getGroups(true)\r\n .then(groups => {\r\n if (groups.length) {\r\n // find all elements\r\n const groupsToRename = groups\r\n .filter(group => group._id.startsWith(id + '.'));\r\n\r\n groupsToRename.forEach(group => group.newId = newId + group._id.substring(id.length));\r\n\r\n return new Promise((resolve, reject) =>\r\n this._renameGroups(groupsToRename, err => err ? reject(err) : resolve()))\r\n .then(() => {\r\n const obj = groups.find(group => group._id === id);\r\n\r\n if (obj) {\r\n obj._id = newId;\r\n if (newName !== undefined) {\r\n obj.common = obj.common || {};\r\n obj.common.name = newName;\r\n }\r\n\r\n return this.setObject(obj._id, obj)\r\n .then(() => this.delObject(id));\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Sends a message to a specific instance or all instances of some specific adapter.\r\n * @param {string} instance The instance to send this message to.\r\n * @param {string} [command] Command name of the target instance.\r\n * @param {ioBroker.MessagePayload} [data] The message data to send.\r\n * @returns {Promise}\r\n */\r\n sendTo(instance, command, data) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendTo', instance, command, data, result =>\r\n resolve(result)));\r\n }\r\n\r\n /**\r\n * Extend an object and create it if it might not exist.\r\n * @param {string} id The id.\r\n * @param {ioBroker.PartialObject} obj The object.\r\n */\r\n extendObject(id, obj) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n obj = JSON.parse(JSON.stringify(obj));\r\n\r\n if (obj.hasOwnProperty('from')) {\r\n delete obj.from;\r\n }\r\n if (obj.hasOwnProperty('user')) {\r\n delete obj.user;\r\n }\r\n if (obj.hasOwnProperty('ts')) {\r\n delete obj.ts;\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('extendObject', id, obj, err => err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Register a handler for log messages.\r\n * @param {(message: string) => void} handler The handler.\r\n */\r\n registerLogHandler(handler) {\r\n !this.onLogHandlers.includes(handler) && this.onLogHandlers.push(handler);\r\n }\r\n\r\n /**\r\n * Unregister a handler for log messages.\r\n * @param {(message: string) => void} handler The handler.\r\n */\r\n unregisterLogHandler(handler) {\r\n const pos = this.onLogHandlers.indexOf(handler);\r\n pos !== -1 && this.onLogHandlers.splice(pos, 1);\r\n }\r\n\r\n /**\r\n * Register a handler for the connection state.\r\n * @param {(connected: boolean) => void} handler The handler.\r\n */\r\n registerConnectionHandler(handler) {\r\n !this.onConnectionHandlers.includes(handler) && this.onConnectionHandlers.push(handler);\r\n }\r\n\r\n /**\r\n * Unregister a handler for the connection state.\r\n * @param {(connected: boolean) => void} handler The handler.\r\n */\r\n unregisterConnectionHandler(handler) {\r\n const pos = this.onConnectionHandlers.indexOf(handler);\r\n pos !== -1 && this.onConnectionHandlers.splice(pos, 1);\r\n }\r\n\r\n /**\r\n * Set the handler for standard output of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n registerCmdStdoutHandler(handler) {\r\n this.onCmdStdoutHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for standard output of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n unregisterCmdStdoutHandler(handler) {\r\n this.onCmdStdoutHandler = null;\r\n }\r\n\r\n /**\r\n * Set the handler for standard error of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n registerCmdStderrHandler(handler) {\r\n this.onCmdStderrHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for standard error of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n unregisterCmdStderrHandler(handler) {\r\n this.onCmdStderrHandler = null;\r\n }\r\n\r\n /**\r\n * Set the handler for exit of a command.\r\n * @param {(id: string, exitCode: number) => void} handler The handler.\r\n */\r\n registerCmdExitHandler(handler) {\r\n this.onCmdExitHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for exit of a command.\r\n * @param {(id: string, exitCode: number) => void} handler The handler.\r\n */\r\n unregisterCmdExitHandler(handler) {\r\n this.onCmdExitHandler = null;\r\n }\r\n\r\n /**\r\n * Get all enums with the given name.\r\n * @param {string} [_enum] The name of the enum\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise>}\r\n */\r\n getEnums(_enum, update) {\r\n if (!update && this._promises['enums_' + (_enum || 'all')]) {\r\n return this._promises['enums_' + (_enum || 'all')];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['enums_' + (_enum || 'all')] = new Promise((resolve, reject) => {\r\n this._socket.emit('getObjectView', 'system', 'enum', { startkey: 'enum.' + (_enum || ''), endkey: 'enum.' + (_enum ? (_enum + '.') : '') + '\\u9999' }, (err, res) => {\r\n if (!err && res) {\r\n const _res = {};\r\n for (let i = 0; i < res.rows.length; i++) {\r\n if (_enum && res.rows[i].id === 'enum.' + _enum) {\r\n continue;\r\n }\r\n _res[res.rows[i].id] = res.rows[i].value;\r\n }\r\n resolve(_res);\r\n } else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['enums_' + (_enum || 'all')];\r\n }\r\n\r\n /**\r\n * Query a predefined object view.\r\n * @param {string} start The start ID.\r\n * @param {string} end The end ID.\r\n * @param {string} type The type of object.\r\n * @returns {Promise>}\r\n */\r\n getObjectView(start, end, type) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n start = start || '';\r\n end = end || '\\u9999';\r\n\r\n return new Promise((resolve, reject) => {\r\n this._socket.emit('getObjectView', 'system', type, { startkey: start, endkey: end }, (err, res) => {\r\n if (!err) {\r\n const _res = {};\r\n if (res && res.rows) {\r\n for (let i = 0; i < res.rows.length; i++) {\r\n _res[res.rows[i].id] = res.rows[i].value;\r\n }\r\n }\r\n resolve(_res);\r\n } else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Get the stored certificates.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise<{name: string; type: 'public' | 'private' | 'chained'}[]>}\r\n */\r\n getCertificates(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (this._promises.cert && !update) {\r\n return this._promises.cert;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.cert = this.getObject('system.certificates')\r\n .then(res => {\r\n const certs = [];\r\n if (res && res.native && res.native.certificates) {\r\n Object.keys(res.native.certificates).forEach(c => {\r\n const cert = res.native.certificates[c];\r\n if (!cert) {\r\n return;\r\n }\r\n const _cert = {\r\n name: c,\r\n type: ''\r\n };\r\n // If it is filename, it could be everything\r\n if (cert.length < 700 && (cert.indexOf('/') !== -1 || cert.indexOf('\\\\') !== -1)) {\r\n if (c.toLowerCase().includes('private')) {\r\n _cert.type = 'private';\r\n } else if (cert.toLowerCase().includes('private')) {\r\n _cert.type = 'private';\r\n } else if (c.toLowerCase().includes('public')) {\r\n _cert.type = 'public';\r\n } else if (cert.toLowerCase().includes('public')) {\r\n _cert.type = 'public';\r\n }\r\n certs.push(_cert);\r\n } else {\r\n _cert.type = (cert.substring(0, '-----BEGIN RSA PRIVATE KEY'.length) === '-----BEGIN RSA PRIVATE KEY' || cert.substring(0, '-----BEGIN PRIVATE KEY'.length) === '-----BEGIN PRIVATE KEY') ? 'private' : 'public';\r\n\r\n if (_cert.type === 'public') {\r\n const m = cert.split('-----END CERTIFICATE-----');\r\n if (m.filter(t => t.replace(/\\r\\n|\\r|\\n/, '').trim()).length > 1) {\r\n _cert.type = 'chained';\r\n }\r\n }\r\n\r\n certs.push(_cert);\r\n }\r\n });\r\n }\r\n return certs;\r\n });\r\n\r\n return this._promises.cert;\r\n }\r\n\r\n /**\r\n * Get the logs from a host (only for admin connection).\r\n * @param {string} host\r\n * @param {number} [linesNumber]\r\n * @returns {Promise}\r\n */\r\n getLogs(host, linesNumber) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'getLogs', linesNumber || 200, lines =>\r\n resolve(lines)));\r\n }\r\n\r\n /**\r\n * Get the log files (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getLogsFiles(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('readLogs', host, (err, files) =>\r\n err ? reject(err) : resolve(files)));\r\n }\r\n\r\n /**\r\n * Delete the logs from a host (only for admin connection).\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n delLogs(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('sendToHost', host, 'delLogs', null, error =>\r\n error ? reject(error) : resolve()));\r\n }\r\n\r\n /**\r\n * Read the meta items.\r\n * @returns {Promise}\r\n */\r\n readMetaItems() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getObjectView', 'system', 'meta', { startkey: '', endkey: '\\u9999' }, (err, objs) =>\r\n err ? reject(err) : resolve(objs.rows && objs.rows.map(obj => obj.value))));\r\n }\r\n\r\n /**\r\n * Read the directory of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The directory name.\r\n * @returns {Promise}\r\n */\r\n readDir(adapter, fileName) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('readDir', adapter, fileName, (err, files) =>\r\n err ? reject(err) : resolve(files)));\r\n }\r\n\r\n readFile(adapter, fileName, base64) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (!base64) {\r\n this._socket.emit('readFile', adapter, fileName, (err, data, type) => {\r\n //@ts-ignore\r\n err ? reject(err) : resolve(data, type);\r\n });\r\n } else {\r\n this._socket.emit('readFile64', adapter, fileName, base64, (err, data) =>\r\n err ? reject(err) : resolve(data));\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Write a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @param {Buffer | string} data The data (if it's a Buffer, it will be converted to Base64).\r\n * @returns {Promise}\r\n */\r\n writeFile64(adapter, fileName, data) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (typeof data === 'string') {\r\n this._socket.emit('writeFile', adapter, fileName, data, err =>\r\n err ? reject(err) : resolve());\r\n } else {\r\n const base64 = btoa(\r\n new Uint8Array(data)\r\n .reduce((data, byte) => data + String.fromCharCode(byte), '')\r\n );\r\n\r\n this._socket.emit('writeFile64', adapter, fileName, base64, err =>\r\n err ? reject(err) : resolve());\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Delete a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @returns {Promise}\r\n */\r\n deleteFile(adapter, fileName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('deleteFile', adapter, fileName, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Delete a folder of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} folderName The folder name.\r\n * @returns {Promise}\r\n */\r\n deleteFolder(adapter, folderName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('deleteFolder', adapter, folderName, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Get the list of all hosts.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getHosts(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.hosts) {\r\n return this._promises.hosts;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.hosts = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'host',\r\n {startkey: 'system.host.', endkey: 'system.host.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.hosts;\r\n }\r\n\r\n /**\r\n * Get the list of all users.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getUsers(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.users) {\r\n return this._promises.users;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.users = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'user',\r\n {startkey: 'system.user.', endkey: 'system.user.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.users;\r\n }\r\n\r\n /**\r\n * Get the list of all groups.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getGroups(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.groups) {\r\n return this._promises.groups;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.groups = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'group',\r\n {startkey: 'system.group.', endkey: 'system.group.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.groups;\r\n }\r\n\r\n /**\r\n * Get the host information.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] optional read timeout.\r\n * @returns {Promise}\r\n */\r\n getHostInfo(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['hostInfo' + host]) {\r\n return this._promises['hostInfo' + host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['hostInfo' + host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getHostInfo timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getHostInfo', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getHostInfo\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getHostInfo\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises['hostInfo' + host];\r\n }\r\n\r\n /**\r\n * Get the host information (short version).\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] optional read timeout.\r\n * @returns {Promise}\r\n */\r\n getHostInfoShort(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['hostInfoShort' + host]) {\r\n return this._promises['hostInfoShort' + host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['hostInfoShort' + host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('hostInfoShort timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getHostInfoShort', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getHostInfoShort\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getHostInfoShort\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises['hostInfoShort' + host];\r\n }\r\n\r\n /**\r\n * Get the repository.\r\n * @param {string} host\r\n * @param {any} [args]\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] timeout in ms.\r\n * @returns {Promise}\r\n */\r\n getRepository(host, args, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.repo) {\r\n return this._promises.repo;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.repo = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getRepository timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getRepository', args, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getRepository\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getRepository\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.repo;\r\n }\r\n\r\n /**\r\n * Get the installed.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [cmdTimeout] timeout in ms (optional)\r\n * @returns {Promise}\r\n */\r\n getInstalled(host, update, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n this._promises.installed = this._promises.installed || {};\r\n\r\n if (!update && this._promises.installed[host]) {\r\n return this._promises.installed[host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.installed[host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getInstalled timeout');\r\n }\r\n }, cmdTimeout || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getInstalled', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getInstalled\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getInstalled\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.installed[host];\r\n }\r\n\r\n /**\r\n * Execute a command on a host.\r\n * @param {string} host The host name.\r\n * @param {string} cmd The command.\r\n * @param {string} cmdId The command ID.\r\n * @param {number} cmdTimeout Timeout of command in ms\r\n * @returns {Promise}\r\n */\r\n cmdExec(host, cmd, cmdId, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith(host)) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n let timeout = cmdTimeout && setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('cmdExec timeout');\r\n }\r\n }, cmdTimeout);\r\n\r\n this._socket.emit('cmdExec', host, cmdId, cmd, null, err => {\r\n if (!cmdTimeout || timeout) {\r\n timeout && clearTimeout(timeout);\r\n timeout = null;\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a given feature is supported.\r\n * @param {string} feature The feature to check.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n checkFeatureSupported(feature, update) {\r\n if (!update && this._promises['supportedFeatures_' + feature]) {\r\n return this._promises['supportedFeatures_' + feature];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['supportedFeatures_' + feature] = new Promise((resolve, reject) =>\r\n this._socket.emit('checkFeatureSupported', feature, (err, features) => {\r\n err ? reject(err) : resolve(features)\r\n }));\r\n\r\n return this._promises['supportedFeatures_' + feature];\r\n }\r\n\r\n /**\r\n * Read the base settings of a given host.\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n readBaseSettings(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\r\n .then(result => {\r\n if (result) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('readBaseSettings timeout');\r\n }\r\n }, this.props.cmdTimeout);\r\n\r\n if (host.startsWith('system.host.')) {\r\n host = host.replace(/^system\\.host\\./, '');\r\n }\r\n\r\n this._socket.emit('sendToHost', host, 'readBaseSettings', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"BaseSettings\"');\r\n } else if (!data) {\r\n reject('Cannot read \"BaseSettings\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n return Promise.reject('Not supported');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Write the base settings of a given host.\r\n * @param {string} host\r\n * @param {any} config\r\n * @returns {Promise}\r\n */\r\n writeBaseSettings(host, config) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\r\n .then(result => {\r\n if (result) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('writeBaseSettings timeout');\r\n }\r\n }, this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'writeBaseSettings', config, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not write \"BaseSettings\"');\r\n } else if (!data) {\r\n reject('Cannot write \"BaseSettings\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n return Promise.reject('Not supported');\r\n }\r\n })\r\n }\r\n\r\n /**\r\n * Send command to restart the iobroker on host\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n restartController(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) => {\r\n this._socket.emit('sendToHost', host, 'restartController', null, error => {\r\n error ? reject(error) : resolve(true);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Read statistics information from host\r\n * @param {string} host\r\n * @param {string} typeOfDiag one of none, normal, no-city, extended\r\n * @returns {Promise}\r\n */\r\n getDiagData(host, typeOfDiag) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise(resolve => {\r\n this._socket.emit('sendToHost', host, 'getDiagData', typeOfDiag, result =>\r\n resolve(result));\r\n });\r\n }\r\n\r\n /**\r\n * Read all states (which might not belong to this adapter) which match the given pattern.\r\n * @param {string} pattern\r\n * @returns {ioBroker.GetStatesPromise}\r\n */\r\n getForeignStates(pattern) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n if (Connection.isWeb()) {\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getStates', pattern || '*', (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n } else {\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getForeignStates', pattern || '*', (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n }\r\n }\r\n\r\n /**\r\n * Get foreign objects by pattern, by specific type and resolve their enums.\r\n * @param {string} pattern\r\n * @param {string} [type]\r\n * @returns {ioBroker.GetObjectsPromise}\r\n */\r\n getForeignObjects(pattern, type) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getForeignObjects', pattern || '*', type, (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n }\r\n\r\n /**\r\n * Gets the system configuration.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getSystemConfig(update) {\r\n if (!update && this._promises.systemConfig) {\r\n return this._promises.systemConfig;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.systemConfig = this.getObject('system.config')\r\n .then(systemConfig => {\r\n //@ts-ignore\r\n systemConfig = systemConfig || {};\r\n //@ts-ignore\r\n systemConfig.common = systemConfig.common || {};\r\n //@ts-ignore\r\n systemConfig.native = systemConfig.native || {};\r\n return systemConfig;\r\n });\r\n\r\n return this._promises.systemConfig;\r\n }\r\n\r\n /**\r\n * Sets the system configuration.\r\n * @param {ioBroker.SettableObjectWorker} obj\r\n * @returns {Promise>}\r\n */\r\n setSystemConfig(obj) {\r\n return this.setObject('system.config', obj)\r\n .then(() => this._promises.systemConfig = Promise.resolve(obj));\r\n }\r\n\r\n /**\r\n * Get the raw socket.io socket.\r\n * @returns {any}\r\n */\r\n getRawSocket() {\r\n return this._socket;\r\n }\r\n\r\n /**\r\n * Get the history of a given state.\r\n * @param {string} id\r\n * @param {ioBroker.GetHistoryOptions} options\r\n * @returns {Promise}\r\n */\r\n getHistory(id, options) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getHistory', id, options, (err, values) =>\r\n err ? reject(err) : resolve(values)));\r\n }\r\n\r\n /**\r\n * Get the history of a given state.\r\n * @param {string} id\r\n * @param {ioBroker.GetHistoryOptions} options\r\n * @returns {Promise<{values: ioBroker.GetHistoryResult; sesionId: string; stepIgnore: number}>}\r\n */\r\n getHistoryEx(id, options) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getHistory', id, options, (err, values, stepIgnore, sessionId) =>\r\n err ? reject(err) : resolve({ values, sessionId, stepIgnore })));\r\n }\r\n\r\n /**\r\n * Change the password of the given user.\r\n * @param {string} user\r\n * @param {string} password\r\n * @returns {Promise}\r\n */\r\n changePassword(user, password) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('changePassword', user, password, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Get the IP addresses of the given host.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getIpAddresses(host, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host = 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['IPs_' + host]) {\r\n return this._promises['IPs_' + host];\r\n }\r\n this._promises['IPs_' + host] = this.getObject(host)\r\n .then(obj => obj && obj.common ? obj.common.address || [] : []);\r\n\r\n return this._promises['IPs_' + host];\r\n }\r\n\r\n /**\r\n * Get the IP addresses with interface names of the given host or find host by IP.\r\n * @param {string} ipOrHostName\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise]>}\r\n */\r\n getHostByIp(ipOrHostName, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (ipOrHostName.startsWith('system.host.')) {\r\n ipOrHostName = ipOrHostName.replace(/^system\\.host\\./, '');\r\n }\r\n\r\n if (!update && this._promises['rIPs_' + ipOrHostName]) {\r\n return this._promises['rIPs_' + ipOrHostName];\r\n }\r\n this._promises['rIPs_' + ipOrHostName] = new Promise(resolve =>\r\n this._socket.emit('getHostByIp', ipOrHostName, (ip, host) => {\r\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - Listen on all IPs', address: '0.0.0.0', family: 'ipv4'}];\r\n const IPs6 = [{name: '[IPv6] :: - Listen on all IPs', address: '::', family: 'ipv6'}];\r\n if (host.native?.hardware?.networkInterfaces) {\r\n for (const eth in host.native.hardware.networkInterfaces) {\r\n if (!host.native.hardware.networkInterfaces.hasOwnProperty(eth)) {\r\n continue;\r\n }\r\n for (let num = 0; num < host.native.hardware.networkInterfaces[eth].length; num++) {\r\n if (host.native.hardware.networkInterfaces[eth][num].family !== 'IPv6') {\r\n IPs4.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv4'});\r\n } else {\r\n IPs6.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv6'});\r\n }\r\n }\r\n }\r\n }\r\n for (let i = 0; i < IPs6.length; i++) {\r\n IPs4.push(IPs6[i]);\r\n }\r\n resolve(IPs4);\r\n }));\r\n\r\n return this._promises['rIPs_' + ipOrHostName];\r\n }\r\n\r\n /**\r\n * Encrypt a text\r\n * @param {string} text\r\n * @returns {Promise}\r\n */\r\n encrypt(text) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('encrypt', text, (err, text) =>\r\n err ? reject(err) : resolve(text)));\r\n }\r\n\r\n /**\r\n * Decrypt a text\r\n * @param {string} encryptedText\r\n * @returns {Promise}\r\n */\r\n decrypt(encryptedText) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('decrypt', encryptedText, (err, text) =>\r\n err ? reject(err) : resolve(text)));\r\n }\r\n\r\n /**\r\n * Gets the version.\r\n * @returns {Promise<{version: string; serverName: string}>}\r\n */\r\n getVersion() {\r\n this._promises.version = this._promises.version || new Promise((resolve, reject) =>\r\n this._socket.emit('getVersion', (err, version, serverName) => {\r\n // support of old socket.io\r\n if (err && !version && typeof err === 'string' && err.match(/\\d+\\.\\d+\\.\\d+/)) {\r\n resolve({ version: err, serverName: 'socketio' });\r\n } else {\r\n return err ? reject(err) : resolve({ version, serverName });\r\n }\r\n }));\r\n\r\n return this._promises.version;\r\n }\r\n\r\n /**\r\n * Gets the web server name.\r\n * @returns {Promise}\r\n */\r\n getWebServerName() {\r\n this._promises.webName = this._promises.webName || new Promise((resolve, reject) =>\r\n this._socket.emit('getAdapterName', (err, name) =>\r\n err ? reject(err) : resolve(name)));\r\n\r\n return this._promises.webName;\r\n }\r\n\r\n /**\r\n * Gets the admin version.\r\n * @deprecated use getVersion()\r\n * @returns {Promise<{version: string; serverName: string}>}\r\n */\r\n getAdminVersion() {\r\n console.log('Deprecated: use getVersion');\r\n return this.getVersion();\r\n }\r\n\r\n /**\r\n * Change access rights for file\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @param {object} [options] like {mode: 0x644}\r\n * @returns {Promise<{entries: array}>}\r\n */\r\n chmodFile(adapter, filename, options) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('chmodFile', adapter, filename, options, (err, entries, id) =>\r\n err ? reject(err) : resolve({entries, id})));\r\n }\r\n\r\n /**\r\n * Change owner or/and owner group for file\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @param {object} [options] like {owner: 'newOwner', ownerGroup: 'newGroup'}\r\n * @returns {Promise<{entries: array}>}\r\n */\r\n chownFile(adapter, filename, options) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('chownFile', adapter, filename, options, (err, entries, id) =>\r\n err ? reject(err) : resolve({entries, id})));\r\n }\r\n\r\n /**\r\n * Check if the file exists\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @returns {Promise}\r\n */\r\n fileExists(adapter, filename) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('fileExists', adapter, filename, (err, exists) =>\r\n err ? reject(err) : resolve(exists)));\r\n }\r\n\r\n /**\r\n * Get the alarm notifications from a host (only for admin connection).\r\n * @param {string} host\r\n * @param {string} [category] - optional\r\n * @returns {Promise}\r\n */\r\n getNotifications(host, category) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'getNotifications', {category}, notifications =>\r\n resolve(notifications)));\r\n }\r\n\r\n /**\r\n * Clear the alarm notifications on a host (only for admin connection).\r\n * @param {string} host\r\n * @param {string} [category] - optional\r\n * @returns {Promise}\r\n */\r\n clearNotifications(host, category) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'clearNotifications', {category}, notifications =>\r\n resolve(notifications)));\r\n }\r\n\r\n /**\r\n * Read if only easy mode is allowed (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getIsEasyModeStrict() {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getIsEasyModeStrict', (error, isStrict) =>\r\n error ? reject(error) : resolve(isStrict)));\r\n }\r\n\r\n /**\r\n * Read easy mode configuration (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getEasyMode() {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getEasyMode', (error, config) =>\r\n error ? reject(error) : resolve(config)));\r\n }\r\n\r\n /**\r\n * Read current user\r\n * @returns {Promise}\r\n */\r\n getCurrentUser() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('authEnabled', (isSecure, user) =>\r\n resolve(user)));\r\n }\r\n\r\n getCurrentSession(cmdTimeout) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const controller = new AbortController();\r\n\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n controller.abort();\r\n reject('getCurrentSession timeout');\r\n }\r\n }, cmdTimeout || 5000);\r\n\r\n return fetch('./session', { signal: controller.signal })\r\n .then(res => res.json())\r\n .then(json => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n resolve(json);\r\n }\r\n })\r\n .catch(e => {\r\n reject('getCurrentSession: ' + e);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Read adapter ratings\r\n * @returns {Promise}\r\n */\r\n getRatings(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getRatings', update, (err, ratings) =>\r\n err ? reject(err) : resolve(ratings)));\r\n }\r\n\r\n /**\r\n * Read current web, socketio or admin namespace, like admin.0\r\n * @returns {Promise}\r\n */\r\n getCurrentInstance() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.currentInstance = this._promises.currentInstance ||\r\n new Promise((resolve, reject) =>\r\n this._socket.emit('getCurrentInstance', (err, namespace) =>\r\n err ? reject(err) : resolve(namespace)));\r\n\r\n return this._promises.currentInstance;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactAdapters(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.compactAdapters) {\r\n return this._promises.compactAdapters;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n this._promises.compactAdapters = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactAdapters', (err, adapters) =>\r\n err ? reject(err) : resolve(adapters)));\r\n\r\n return this._promises.compactAdapters;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactInstances(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.compactInstances) {\r\n return this._promises.compactInstances;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.compactInstances = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactInstances', (err, instances) =>\r\n err ? reject(err) : resolve(instances)));\r\n\r\n return this._promises.compactInstances;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n // reads only version of installed adapter\r\n getCompactInstalled(host, update, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n this._promises.installedCompact = this._promises.installedCompact || {};\r\n\r\n if (!update && this._promises.installedCompact[host]) {\r\n return this._promises.installedCompact[host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.installedCompact[host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getCompactInstalled timeout');\r\n }\r\n }, cmdTimeout || this.props.cmdTimeout);\r\n\r\n this._socket.emit('getCompactInstalled', host, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getCompactInstalled\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getCompactInstalled\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.installedCompact[host];\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactSystemConfig(update) {\r\n if (!update && this._promises.systemConfigCommon) {\r\n return this._promises.systemConfigCommon;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.systemConfigCommon = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactSystemConfig', (err, systemConfig) =>\r\n err ? reject(err) : resolve(systemConfig)));\r\n\r\n return this._promises.systemConfigCommon;\r\n }\r\n\r\n /**\r\n * Get the repository in compact form (only version and icon).\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] timeout in ms.\r\n * @returns {Promise}\r\n */\r\n getCompactRepository(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.repoCompact) {\r\n return this._promises.repoCompact;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.repoCompact = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getCompactRepository timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('getCompactRepository', host, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getCompactRepository\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getCompactRepository\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.repoCompact;\r\n }\r\n\r\n /**\r\n * Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getCompactHosts(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.hostsCompact) {\r\n return this._promises.hostsCompact;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.hostsCompact = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactHosts', (err, hosts) =>\r\n err ? reject(err) : resolve(hosts)));\r\n\r\n return this._promises.hostsCompact;\r\n }\r\n\r\n /**\r\n * Get uuid\r\n * @returns {Promise}\r\n */\r\n getUuid() {\r\n if (this._promises.uuid) {\r\n return this._promises.uuid;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.uuid = this.getObject('system.meta.uuid')\r\n //@ts-ignore\r\n .then(obj => obj?.native?.uuid);\r\n\r\n return this._promises.uuid;\r\n }\r\n}\r\n\r\nConnection.Connection = {\r\n onLog: PropTypes.func,\r\n onReady: PropTypes.func,\r\n onProgress: PropTypes.func,\r\n};\r\n\r\nexport default Connection;\r\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@material-ui/core/styles/withStyles';\n\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\n\nimport IconCheck from '@material-ui/icons/Check';\n\nimport I18n from '../i18n';\n\nconst styles = theme => ({\n titleBackground: {\n\n },\n titleColor: {\n\n }\n});\n\n/**\n * @typedef {object} DialogErrorProps\n * @property {string} [key] The key to identify this component.\n * @property {string} [title] The dialog title; default: Error (translated)\n * @property {string | JSX.Element} text The dialog text.\n * @property {() => void} [onClose] Close handler.\n * @property {{titleBackground: string; titleColor: string}} classes The styling class names.\n *\n * @extends {React.Component}\n */\nclass DialogError extends React.Component {\n handleOk() {\n this.props.onClose && this.props.onClose();\n };\n\n render() {\n return this.handleOk()}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n {this.props.title || I18n.t('ra_Error')}\n \n \n {this.props.text || I18n.t('ra_Unknown error!')}\n \n \n \n \n \n ;\n }\n}\n\nDialogError.propTypes = {\n onClose: PropTypes.func,\n title: PropTypes.string,\n text: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element\n ]),\n icon: PropTypes.object\n};\n\n/** @type {typeof DialogError} */\nconst _export = withStyles(styles)(DialogError);\nexport default _export;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createTheme = _interopRequireDefault(require(\"./createTheme\"));\n\nvar defaultTheme = (0, _createTheme.default)();\nvar _default = defaultTheme;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createMuiTheme = createMuiTheme;\nexports.default = void 0;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _createBreakpoints = _interopRequireDefault(require(\"./createBreakpoints\"));\n\nvar _createMixins = _interopRequireDefault(require(\"./createMixins\"));\n\nvar _createPalette = _interopRequireDefault(require(\"./createPalette\"));\n\nvar _createTypography = _interopRequireDefault(require(\"./createTypography\"));\n\nvar _shadows = _interopRequireDefault(require(\"./shadows\"));\n\nvar _shape = _interopRequireDefault(require(\"./shape\"));\n\nvar _createSpacing = _interopRequireDefault(require(\"./createSpacing\"));\n\nvar _transitions = _interopRequireDefault(require(\"./transitions\"));\n\nvar _zIndex = _interopRequireDefault(require(\"./zIndex\"));\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = (0, _objectWithoutProperties2.default)(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n var palette = (0, _createPalette.default)(paletteInput);\n var breakpoints = (0, _createBreakpoints.default)(breakpointsInput);\n var spacing = (0, _createSpacing.default)(spacingInput);\n var muiTheme = (0, _utils.deepmerge)({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: (0, _createMixins.default)(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: _shadows.default,\n typography: (0, _createTypography.default)(palette, typographyInput),\n spacing: spacing,\n shape: _shape.default,\n transitions: _transitions.default,\n zIndex: _zIndex.default\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return (0, _utils.deepmerge)(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: (0, _defineProperty2.default)({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\n\nfunction createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\n\nvar _default = createTheme;\nexports.default = _default;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createBreakpoints;\nexports.keys = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nvar keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.\n\nexports.keys = keys;\n\nfunction createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n } : _breakpoints$values,\n _breakpoints$unit = breakpoints.unit,\n unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,\n _breakpoints$step = breakpoints.step,\n step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,\n other = (0, _objectWithoutProperties2.default)(breakpoints, [\"values\", \"unit\", \"step\"]);\n\n function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n }\n\n function down(key) {\n var endIndex = keys.indexOf(key) + 1;\n var upperbound = values[keys[endIndex]];\n\n if (endIndex === keys.length) {\n // xl down applies to all sizes\n return up('xs');\n }\n\n var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;\n return \"@media (max-width:\".concat(value - step / 100).concat(unit, \")\");\n }\n\n function between(start, end) {\n var endIndex = keys.indexOf(end);\n\n if (endIndex === keys.length - 1) {\n return up(start);\n }\n\n return \"@media (min-width:\".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, \") and \") + \"(max-width:\".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, \")\");\n }\n\n function only(key) {\n return between(key, key);\n }\n\n var warnedOnce = false;\n\n function width(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn([\"Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.\", 'Use the `theme.breakpoints.values` instead.'].join('\\n'));\n }\n }\n\n return values[key];\n }\n\n return (0, _extends2.default)({\n keys: keys,\n values: values,\n up: up,\n down: down,\n between: between,\n only: only,\n width: width\n }, other);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createMixins;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _extends3 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nfunction createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return (0, _extends3.default)({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return (0, _extends3.default)({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, (0, _defineProperty2.default)({}, breakpoints.up('sm'), (0, _extends3.default)({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, (0, _defineProperty2.default)(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), (0, _defineProperty2.default)(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPalette;\nexports.dark = exports.light = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _common = _interopRequireDefault(require(\"../colors/common\"));\n\nvar _grey = _interopRequireDefault(require(\"../colors/grey\"));\n\nvar _indigo = _interopRequireDefault(require(\"../colors/indigo\"));\n\nvar _pink = _interopRequireDefault(require(\"../colors/pink\"));\n\nvar _red = _interopRequireDefault(require(\"../colors/red\"));\n\nvar _orange = _interopRequireDefault(require(\"../colors/orange\"));\n\nvar _blue = _interopRequireDefault(require(\"../colors/blue\"));\n\nvar _green = _interopRequireDefault(require(\"../colors/green\"));\n\nvar _colorManipulator = require(\"./colorManipulator\");\n\nvar light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: _common.default.white,\n default: _grey.default[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexports.light = light;\nvar dark = {\n text: {\n primary: _common.default.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: _grey.default[800],\n default: '#303030'\n },\n action: {\n active: _common.default.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nexports.dark = dark;\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = (0, _colorManipulator.lighten)(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = (0, _colorManipulator.darken)(intent.main, tonalOffsetDark);\n }\n }\n}\n\nfunction createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: _indigo.default[300],\n main: _indigo.default[500],\n dark: _indigo.default[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: _pink.default.A200,\n main: _pink.default.A400,\n dark: _pink.default.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: _red.default[300],\n main: _red.default[500],\n dark: _red.default[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: _orange.default[300],\n main: _orange.default[500],\n dark: _orange.default[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: _blue.default[300],\n main: _blue.default[500],\n dark: _blue.default[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: _green.default[300],\n main: _green.default[500],\n dark: _green.default[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = (0, _objectWithoutProperties2.default)(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n function getContrastText(background) {\n var contrastText = (0, _colorManipulator.getContrastRatio)(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = (0, _colorManipulator.getContrastRatio)(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = (0, _extends2.default)({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : (0, _utils.formatMuiErrorMessage)(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = (0, _utils.deepmerge)((0, _extends2.default)({\n // A collection of common colors.\n common: _common.default,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: _grey.default,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar common = {\n black: '#000',\n white: '#fff'\n};\nvar _default = common;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nvar _default = grey;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nvar _default = indigo;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nvar _default = pink;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nvar _default = red;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nvar _default = blue;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nvar _default = green;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hexToRgb = hexToRgb;\nexports.rgbToHex = rgbToHex;\nexports.hslToRgb = hslToRgb;\nexports.decomposeColor = decomposeColor;\nexports.recomposeColor = recomposeColor;\nexports.getContrastRatio = getContrastRatio;\nexports.getLuminance = getLuminance;\nexports.emphasize = emphasize;\nexports.fade = fade;\nexports.alpha = alpha;\nexports.darken = darken;\nexports.lighten = lighten;\n\nvar _utils = require(\"@material-ui/utils\");\n\n/* eslint-disable no-use-before-define */\n\n/**\n * Returns a number whose value is limited to the given range.\n *\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(\"Material-UI: The value provided \".concat(value, \" is out of range [\").concat(min, \", \").concat(max, \"].\"));\n }\n }\n\n return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n *\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nfunction hexToRgb(color) {\n color = color.substr(1);\n var re = new RegExp(\".{1,\".concat(color.length >= 6 ? 2 : 1, \"}\"), 'g');\n var colors = color.match(re);\n\n if (colors && colors[0].length === 1) {\n colors = colors.map(function (n) {\n return n + n;\n });\n }\n\n return colors ? \"rgb\".concat(colors.length === 4 ? 'a' : '', \"(\").concat(colors.map(function (n, index) {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', '), \")\") : '';\n}\n\nfunction intToHex(int) {\n var hex = int.toString(16);\n return hex.length === 1 ? \"0\".concat(hex) : hex;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n *\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\n\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n\n var _decomposeColor = decomposeColor(color),\n values = _decomposeColor.values;\n\n return \"#\".concat(values.map(function (n) {\n return intToHex(n);\n }).join(''));\n}\n/**\n * Converts a color from hsl format to rgb format.\n *\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\n\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n var _color = color,\n values = _color.values;\n var h = values[0];\n var s = values[1] / 100;\n var l = values[2] / 100;\n var a = s * Math.min(l, 1 - l);\n\n var f = function f(n) {\n var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n };\n\n var type = 'rgb';\n var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n\n return recomposeColor({\n type: type,\n values: rgb\n });\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\n\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n var marker = color.indexOf('(');\n var type = color.substring(0, marker);\n\n if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Unsupported `\".concat(color, \"` color.\\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().\") : (0, _utils.formatMuiErrorMessage)(3, color));\n }\n\n var values = color.substring(marker + 1, color.length - 1).split(',');\n values = values.map(function (value) {\n return parseFloat(value);\n });\n return {\n type: type,\n values: values\n };\n}\n/**\n * Converts a color object with type and values to a string.\n *\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\n\nfunction recomposeColor(color) {\n var type = color.type;\n var values = color.values;\n\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map(function (n, i) {\n return i < 3 ? parseInt(n, 10) : n;\n });\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = \"\".concat(values[1], \"%\");\n values[2] = \"\".concat(values[2], \"%\");\n }\n\n return \"\".concat(type, \"(\").concat(values.join(', '), \")\");\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\n\nfunction getContrastRatio(foreground, background) {\n var lumA = getLuminance(foreground);\n var lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\n\nfunction getLuminance(color) {\n color = decomposeColor(color);\n var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(function (val) {\n val /= 255; // normalized\n\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }); // Truncate at 3 digits\n\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction emphasize(color) {\n var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\n\nvar warnedOnce = false;\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0 -1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n *\n * @deprecated\n * Use `import { alpha } from '@material-ui/core/styles'` instead.\n */\n\nfunction fade(color, value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The `fade` color utility was renamed to `alpha` to better describe its functionality.', '', \"You should use `import { alpha } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return alpha(color, value);\n}\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha value is overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0-1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clamp(value);\n\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n\n color.values[3] = value;\n return recomposeColor(color);\n}\n/**\n * Darkens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Lightens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n }\n\n return recomposeColor(color);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createTypography;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nfunction createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = (0, _objectWithoutProperties2.default)(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return (0, _extends2.default)({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return (0, _utils.deepmerge)((0, _extends2.default)({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nvar _default = shadows;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar shape = {\n borderRadius: 4\n};\nvar _default = shape;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createSpacing;\n\nvar _system = require(\"@material-ui/system\");\n\nvar warnOnce;\n\nfunction createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = (0, _system.createUnarySpacing)({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.duration = exports.easing = void 0;\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nvar easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\n\nexports.easing = easing;\nvar duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nexports.duration = duration;\n\nfunction formatMs(milliseconds) {\n return \"\".concat(Math.round(milliseconds), \"ms\");\n}\n/**\n * @param {string|Array} props\n * @param {object} param\n * @param {string} param.prop\n * @param {number} param.duration\n * @param {string} param.easing\n * @param {number} param.delay\n */\n\n\nvar _default = {\n easing: easing,\n duration: duration,\n create: function create() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$duration = options.duration,\n durationOption = _options$duration === void 0 ? duration.standard : _options$duration,\n _options$easing = options.easing,\n easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 0 : _options$delay,\n other = (0, _objectWithoutProperties2.default)(options, [\"duration\", \"easing\", \"delay\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n var isString = function isString(value) {\n return typeof value === 'string';\n };\n\n var isNumber = function isNumber(value) {\n return !isNaN(parseFloat(value));\n };\n\n if (!isString(props) && !Array.isArray(props)) {\n console.error('Material-UI: Argument \"props\" must be a string or Array.');\n }\n\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(\"Material-UI: Argument \\\"duration\\\" must be a number or a string but found \".concat(durationOption, \".\"));\n }\n\n if (!isString(easingOption)) {\n console.error('Material-UI: Argument \"easing\" must be a string.');\n }\n\n if (!isNumber(delay) && !isString(delay)) {\n console.error('Material-UI: Argument \"delay\" must be a number or a string.');\n }\n\n if (Object.keys(other).length !== 0) {\n console.error(\"Material-UI: Unrecognized argument(s) [\".concat(Object.keys(other).join(','), \"].\"));\n }\n }\n\n return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {\n return \"\".concat(animatedProp, \" \").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), \" \").concat(easingOption, \" \").concat(typeof delay === 'string' ? delay : formatMs(delay));\n }).join(',');\n },\n getAutoHeightDuration: function getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n\n var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n\n return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);\n }\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nvar zIndex = {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nvar _default = zIndex;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"\n}), 'Check');\n\nexports.default = _default;","\n/**\n * Print the ioBroker welcome screen to the developer console.\n */\nfunction printPrompt() {\n const prompt = `\n██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ \n██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗\n██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝\n██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗\n██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║\n╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝\n`;\n\n console.log(prompt);\n console.log('Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters');\n console.log('Help us to create open source project with reactJS!');\n console.log('See you :)');\n}\n\nexport default printPrompt;","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\r\nimport React from 'react';\r\n\r\n/**\r\n * @template P Type of the properties object.\r\n * @template S Type of the internal state object.\r\n * @extends {React.Component}\r\n */\r\nclass Router extends React.Component {\r\n /**\r\n * @param {P} props The React properties of this component.\r\n */\r\n constructor(props) {\r\n super(props);\r\n this.onHashChangedBound = this.onHashChanged.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener('hashchange', this.onHashChangedBound);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('hashchange', this.onHashChangedBound);\r\n }\r\n\r\n onHashChanged() {\r\n // override this function\r\n }\r\n\r\n /**\r\n * Gets the location object.\r\n * @returns {{ tab: string; dialog: string; id: string; arg: string; }}\r\n */\r\n static getLocation() {\r\n let hash = window.location.hash;\r\n hash = hash.replace(/^#/, '');\r\n const parts = hash.split('/').map(item => {\r\n try {\r\n return item ? decodeURIComponent(item) : ''\r\n } catch (e) {\r\n console.error('Router: Cannot decode ' + item);\r\n return item || '';\r\n }\r\n });\r\n // #tabName/dialogName/deviceId\r\n return {\r\n tab: parts[0] || '',\r\n dialog: parts[1] || '',\r\n id: parts[2] || '',\r\n arg: parts[3] || ''\r\n };\r\n }\r\n\r\n /**\r\n * Navigate to a new location. Any parameters that are not set will be taken from the current location.\r\n * @param {string | undefined} [tab]\r\n * @param {string | undefined} [dialog]\r\n * @param {string | undefined} [id]\r\n * @param {string | undefined} [arg]\r\n */\r\n static doNavigate(tab, dialog, id, arg) {\r\n let hash = '';\r\n const location = Router.getLocation();\r\n if (arg !== undefined && !id) {\r\n id = location.id;\r\n }\r\n if (id && !dialog) {\r\n dialog = location.dialog;\r\n }\r\n if (dialog && !tab) {\r\n tab = location.tab;\r\n } else\r\n if (tab === null) {\r\n tab = location.tab;\r\n }\r\n\r\n if (tab) {\r\n hash = '#' + tab;\r\n if (dialog) {\r\n hash += '/' + dialog;\r\n\r\n if (id) {\r\n hash += '/' + id;\r\n if (arg !== undefined) {\r\n hash += '/' + arg;\r\n }\r\n }\r\n }\r\n }\r\n if (window.location.hash !== hash) {\r\n window.location.hash = hash;\r\n }\r\n }\r\n}\r\n\r\nexport default Router;","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport Fab from '@material-ui/core/Fab';\nimport PropTypes from 'prop-types';\n\nimport Toolbar from '@material-ui/core/Toolbar';\n\nimport I18n from '../i18n';\n\nimport IconSave from '@material-ui/icons/Save';\nimport IconClose from '@material-ui/icons/Close';\n\nconst styles = theme => ({\n buttonIcon: {\n marginRight: 8\n },\n});\n\n/**\n * @typedef {object} LogoProps\n * @property {boolean} noTextOnButtons Are the buttons without text\n * @property {any} theme Theme object (from this.state.theme)\n * @property {boolean} isIFrame bottom position 0 or 38 for iFrame\n * @property {function} onSave on Save handler\n * @property {function} onClose on Close handler\n *\n * @extends {React.Component}\n */\nclass SaveCloseButtons extends React.Component {\n constructor(props) {\n super(props);\n try {\n this.isIFrame = !props.newReact && window.self !== window.top;\n } catch (e) {\n this.isIFrame = !props.newReact;\n }\n }\n\n render() {\n const noTextOnButtons = this.props.noTextOnButtons;\n const buttonStyle = {\n borderRadius: this.props.theme.saveToolbar.button.borderRadius || 3,\n height: this.props.theme.saveToolbar.button.height || 32,\n };\n\n const style = {\n bottom: this.isIFrame ? 38 : 0,\n left: this.props.paddingLeft || 0,\n right: 0,\n position: 'absolute',\n background: this.props.theme.saveToolbar.background\n };\n if (this.props.dense) {\n style.minHeight = 48;\n }\n\n if (this.props.error) {\n buttonStyle.border = '1px solid red';\n }\n\n return \n this.props.onSave(false)}\n style={buttonStyle}\n >\n {!noTextOnButtons && I18n.t('ra_Save')}\n \n this.props.onSave(true)}\n style={Object.assign({}, buttonStyle, {marginLeft: 10})}>\n \n {!noTextOnButtons ? I18n.t('ra_Save and close') : '+'}\n {noTextOnButtons && }\n \n
\n this.props.onClose()} style={buttonStyle}>\n {!noTextOnButtons && I18n.t('ra_Close')}\n \n ;\n }\n}\n\nSaveCloseButtons.propTypes = {\n dense: PropTypes.bool,\n paddingLeft: PropTypes.number,\n noTextOnButtons: PropTypes.bool,\n theme: PropTypes.object,\n isIFrame: PropTypes.bool,\n changed: PropTypes.bool.isRequired,\n error: PropTypes.bool,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n newReact: PropTypes.bool,\n};\n\n/** @type {typeof SaveCloseButtons} */\nconst _export = withStyles(styles)(SaveCloseButtons);\nexport default _export;","/** @license React v17.0.2\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"object-assign\");var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z\"\n}), 'SettingsApplications');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"\n}), 'Photo');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm3.61 6.34c1.07 0 1.93.86 1.93 1.93 0 1.07-.86 1.93-1.93 1.93-1.07 0-1.93-.86-1.93-1.93-.01-1.07.86-1.93 1.93-1.93zm-6-1.58c1.3 0 2.36 1.06 2.36 2.36 0 1.3-1.06 2.36-2.36 2.36s-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36zm0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68zM11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09z\"\n}), 'SupervisedUserCircle');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'PersonOutlined');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.2 5.9l.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7zm-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1l.8-.8zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM8 18H6v-2h2v2zm3.5 0h-2v-2h2v2zm3.5 0h-2v-2h2v2z\"\n}), 'Router');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z\"\n}), 'Wifi');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\"\n}), 'Info');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z\"\n}), 'Description');\n\nexports.default = _default;","import React from 'react';\nimport PropTypes from 'prop-types';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nconst IconAlias = props => {\n return props.onClick && props.onClick(e)} viewBox=\"0 0 512 512\" width={props.width || 20} height={props.height || props.width || 20} xmlns=\"http://www.w3.org/2000/svg\" className={ props.className }>\n \n ;\n}\n\nIconAlias.propTypes = {\n onClick: PropTypes.func,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\n\nexport default IconAlias;","var unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = o[Symbol.iterator]();\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nmodule.exports = _createForOfIteratorHelper;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ace_builds_1 = require(\"ace-builds\");\nvar PropTypes = require(\"prop-types\");\nvar React = require(\"react\");\nvar isEqual = require(\"lodash.isequal\");\nvar editorOptions_1 = require(\"./editorOptions\");\nvar ace = (0, editorOptions_1.getAceInstance)();\nvar ReactAce = /** @class */ (function (_super) {\n __extends(ReactAce, _super);\n function ReactAce(props) {\n var _this = _super.call(this, props) || this;\n editorOptions_1.editorEvents.forEach(function (method) {\n _this[method] = _this[method].bind(_this);\n });\n _this.debounce = editorOptions_1.debounce;\n return _this;\n }\n ReactAce.prototype.isInShadow = function (node) {\n var parent = node && node.parentNode;\n while (parent) {\n if (parent.toString() === \"[object ShadowRoot]\") {\n return true;\n }\n parent = parent.parentNode;\n }\n return false;\n };\n ReactAce.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, className = _a.className, onBeforeLoad = _a.onBeforeLoad, onValidate = _a.onValidate, mode = _a.mode, focus = _a.focus, theme = _a.theme, fontSize = _a.fontSize, value = _a.value, defaultValue = _a.defaultValue, showGutter = _a.showGutter, wrapEnabled = _a.wrapEnabled, showPrintMargin = _a.showPrintMargin, _b = _a.scrollMargin, scrollMargin = _b === void 0 ? [0, 0, 0, 0] : _b, keyboardHandler = _a.keyboardHandler, onLoad = _a.onLoad, commands = _a.commands, annotations = _a.annotations, markers = _a.markers, placeholder = _a.placeholder;\n this.editor = ace.edit(this.refEditor);\n if (onBeforeLoad) {\n onBeforeLoad(ace);\n }\n var editorProps = Object.keys(this.props.editorProps);\n for (var i = 0; i < editorProps.length; i++) {\n this.editor[editorProps[i]] = this.props.editorProps[editorProps[i]];\n }\n if (this.props.debounceChangePeriod) {\n this.onChange = this.debounce(this.onChange, this.props.debounceChangePeriod);\n }\n this.editor.renderer.setScrollMargin(scrollMargin[0], scrollMargin[1], scrollMargin[2], scrollMargin[3]);\n if (this.isInShadow(this.refEditor)) {\n this.editor.renderer.attachToShadowRoot();\n }\n this.editor\n .getSession()\n .setMode(typeof mode === \"string\" ? \"ace/mode/\" + mode : mode);\n if (theme && theme !== \"\")\n this.editor.setTheme(\"ace/theme/\" + theme);\n this.editor.setFontSize(typeof fontSize === \"number\" ? fontSize + \"px\" : fontSize);\n this.editor\n .getSession()\n .setValue(!defaultValue ? value || \"\" : defaultValue);\n if (this.props.navigateToFileEnd) {\n this.editor.navigateFileEnd();\n }\n this.editor.renderer.setShowGutter(showGutter);\n this.editor.getSession().setUseWrapMode(wrapEnabled);\n this.editor.setShowPrintMargin(showPrintMargin);\n this.editor.on(\"focus\", this.onFocus);\n this.editor.on(\"blur\", this.onBlur);\n this.editor.on(\"copy\", this.onCopy);\n this.editor.on(\"paste\", this.onPaste);\n this.editor.on(\"change\", this.onChange);\n this.editor.on(\"input\", this.onInput);\n if (placeholder) {\n this.updatePlaceholder();\n }\n this.editor\n .getSession()\n .selection.on(\"changeSelection\", this.onSelectionChange);\n this.editor.getSession().selection.on(\"changeCursor\", this.onCursorChange);\n if (onValidate) {\n // @ts-ignore types don't include\n this.editor.getSession().on(\"changeAnnotation\", function () {\n // tslint:disable-next-line:no-shadowed-variable\n var annotations = _this.editor.getSession().getAnnotations();\n _this.props.onValidate(annotations);\n });\n }\n this.editor.session.on(\"changeScrollTop\", this.onScroll);\n this.editor.getSession().setAnnotations(annotations || []);\n if (markers && markers.length > 0) {\n this.handleMarkers(markers);\n }\n // get a list of possible options to avoid 'misspelled option errors'\n var availableOptions = this.editor.$options;\n editorOptions_1.editorOptions.forEach(function (option) {\n if (availableOptions.hasOwnProperty(option)) {\n // @ts-ignore\n _this.editor.setOption(option, _this.props[option]);\n }\n else if (_this.props[option]) {\n console.warn(\"ReactAce: editor option \" + option + \" was activated but not found. Did you need to import a related tool or did you possibly mispell the option?\");\n }\n });\n this.handleOptions(this.props);\n if (Array.isArray(commands)) {\n commands.forEach(function (command) {\n if (typeof command.exec === \"string\") {\n _this.editor.commands.bindKey(command.bindKey, command.exec);\n }\n else {\n _this.editor.commands.addCommand(command);\n }\n });\n }\n if (keyboardHandler) {\n this.editor.setKeyboardHandler(\"ace/keyboard/\" + keyboardHandler);\n }\n if (className) {\n this.refEditor.className += \" \" + className;\n }\n if (onLoad) {\n onLoad(this.editor);\n }\n this.editor.resize();\n if (focus) {\n this.editor.focus();\n }\n };\n ReactAce.prototype.componentDidUpdate = function (prevProps) {\n var oldProps = prevProps;\n var nextProps = this.props;\n for (var i = 0; i < editorOptions_1.editorOptions.length; i++) {\n var option = editorOptions_1.editorOptions[i];\n if (nextProps[option] !== oldProps[option]) {\n // @ts-ignore\n this.editor.setOption(option, nextProps[option]);\n }\n }\n if (nextProps.className !== oldProps.className) {\n var appliedClasses = this.refEditor.className;\n var appliedClassesArray_1 = appliedClasses.trim().split(\" \");\n var oldClassesArray = oldProps.className.trim().split(\" \");\n oldClassesArray.forEach(function (oldClass) {\n var index = appliedClassesArray_1.indexOf(oldClass);\n appliedClassesArray_1.splice(index, 1);\n });\n this.refEditor.className =\n \" \" + nextProps.className + \" \" + appliedClassesArray_1.join(\" \");\n }\n // First process editor value, as it may create a new session (see issue #300)\n if (this.editor &&\n nextProps.value != null &&\n this.editor.getValue() !== nextProps.value) {\n // editor.setValue is a synchronous function call, change event is emitted before setValue return.\n this.silent = true;\n var pos = this.editor.session.selection.toJSON();\n this.editor.setValue(nextProps.value, nextProps.cursorStart);\n this.editor.session.selection.fromJSON(pos);\n this.silent = false;\n }\n if (nextProps.placeholder !== oldProps.placeholder) {\n this.updatePlaceholder();\n }\n if (nextProps.mode !== oldProps.mode) {\n this.editor\n .getSession()\n .setMode(typeof nextProps.mode === \"string\"\n ? \"ace/mode/\" + nextProps.mode\n : nextProps.mode);\n }\n if (nextProps.theme !== oldProps.theme) {\n this.editor.setTheme(\"ace/theme/\" + nextProps.theme);\n }\n if (nextProps.keyboardHandler !== oldProps.keyboardHandler) {\n if (nextProps.keyboardHandler) {\n this.editor.setKeyboardHandler(\"ace/keyboard/\" + nextProps.keyboardHandler);\n }\n else {\n this.editor.setKeyboardHandler(null);\n }\n }\n if (nextProps.fontSize !== oldProps.fontSize) {\n this.editor.setFontSize(typeof nextProps.fontSize === \"number\"\n ? nextProps.fontSize + \"px\"\n : nextProps.fontSize);\n }\n if (nextProps.wrapEnabled !== oldProps.wrapEnabled) {\n this.editor.getSession().setUseWrapMode(nextProps.wrapEnabled);\n }\n if (nextProps.showPrintMargin !== oldProps.showPrintMargin) {\n this.editor.setShowPrintMargin(nextProps.showPrintMargin);\n }\n if (nextProps.showGutter !== oldProps.showGutter) {\n this.editor.renderer.setShowGutter(nextProps.showGutter);\n }\n if (!isEqual(nextProps.setOptions, oldProps.setOptions)) {\n this.handleOptions(nextProps);\n }\n if (!isEqual(nextProps.annotations, oldProps.annotations)) {\n this.editor.getSession().setAnnotations(nextProps.annotations || []);\n }\n if (!isEqual(nextProps.markers, oldProps.markers) &&\n Array.isArray(nextProps.markers)) {\n this.handleMarkers(nextProps.markers);\n }\n // this doesn't look like it works at all....\n if (!isEqual(nextProps.scrollMargin, oldProps.scrollMargin)) {\n this.handleScrollMargins(nextProps.scrollMargin);\n }\n if (prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width) {\n this.editor.resize();\n }\n if (this.props.focus && !prevProps.focus) {\n this.editor.focus();\n }\n };\n ReactAce.prototype.handleScrollMargins = function (margins) {\n if (margins === void 0) { margins = [0, 0, 0, 0]; }\n this.editor.renderer.setScrollMargin(margins[0], margins[1], margins[2], margins[3]);\n };\n ReactAce.prototype.componentWillUnmount = function () {\n this.editor.destroy();\n this.editor = null;\n };\n ReactAce.prototype.onChange = function (event) {\n if (this.props.onChange && !this.silent) {\n var value = this.editor.getValue();\n this.props.onChange(value, event);\n }\n };\n ReactAce.prototype.onSelectionChange = function (event) {\n if (this.props.onSelectionChange) {\n var value = this.editor.getSelection();\n this.props.onSelectionChange(value, event);\n }\n };\n ReactAce.prototype.onCursorChange = function (event) {\n if (this.props.onCursorChange) {\n var value = this.editor.getSelection();\n this.props.onCursorChange(value, event);\n }\n };\n ReactAce.prototype.onInput = function (event) {\n if (this.props.onInput) {\n this.props.onInput(event);\n }\n if (this.props.placeholder) {\n this.updatePlaceholder();\n }\n };\n ReactAce.prototype.onFocus = function (event) {\n if (this.props.onFocus) {\n this.props.onFocus(event, this.editor);\n }\n };\n ReactAce.prototype.onBlur = function (event) {\n if (this.props.onBlur) {\n this.props.onBlur(event, this.editor);\n }\n };\n ReactAce.prototype.onCopy = function (_a) {\n var text = _a.text;\n if (this.props.onCopy) {\n this.props.onCopy(text);\n }\n };\n ReactAce.prototype.onPaste = function (_a) {\n var text = _a.text;\n if (this.props.onPaste) {\n this.props.onPaste(text);\n }\n };\n ReactAce.prototype.onScroll = function () {\n if (this.props.onScroll) {\n this.props.onScroll(this.editor);\n }\n };\n ReactAce.prototype.handleOptions = function (props) {\n var setOptions = Object.keys(props.setOptions);\n for (var y = 0; y < setOptions.length; y++) {\n // @ts-ignore\n this.editor.setOption(setOptions[y], props.setOptions[setOptions[y]]);\n }\n };\n ReactAce.prototype.handleMarkers = function (markers) {\n var _this = this;\n // remove foreground markers\n var currentMarkers = this.editor.getSession().getMarkers(true);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i)) {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // remove background markers except active line marker and selected word marker\n currentMarkers = this.editor.getSession().getMarkers(false);\n for (var i in currentMarkers) {\n if (currentMarkers.hasOwnProperty(i) &&\n currentMarkers[i].clazz !== \"ace_active-line\" &&\n currentMarkers[i].clazz !== \"ace_selected-word\") {\n this.editor.getSession().removeMarker(currentMarkers[i].id);\n }\n }\n // add new markers\n markers.forEach(function (_a) {\n var startRow = _a.startRow, startCol = _a.startCol, endRow = _a.endRow, endCol = _a.endCol, className = _a.className, type = _a.type, _b = _a.inFront, inFront = _b === void 0 ? false : _b;\n var range = new ace_builds_1.Range(startRow, startCol, endRow, endCol);\n _this.editor.getSession().addMarker(range, className, type, inFront);\n });\n };\n ReactAce.prototype.updatePlaceholder = function () {\n // Adapted from https://stackoverflow.com/questions/26695708/how-can-i-add-placeholder-text-when-the-editor-is-empty\n var editor = this.editor;\n var placeholder = this.props.placeholder;\n var showPlaceholder = !editor.session.getValue().length;\n var node = editor.renderer.placeholderNode;\n if (!showPlaceholder && node) {\n editor.renderer.scroller.removeChild(editor.renderer.placeholderNode);\n editor.renderer.placeholderNode = null;\n }\n else if (showPlaceholder && !node) {\n node = editor.renderer.placeholderNode = document.createElement(\"div\");\n node.textContent = placeholder || \"\";\n node.className = \"ace_comment ace_placeholder\";\n node.style.padding = \"0 9px\";\n node.style.position = \"absolute\";\n node.style.zIndex = \"3\";\n editor.renderer.scroller.appendChild(node);\n }\n else if (showPlaceholder && node) {\n node.textContent = placeholder;\n }\n };\n ReactAce.prototype.updateRef = function (item) {\n this.refEditor = item;\n };\n ReactAce.prototype.render = function () {\n var _a = this.props, name = _a.name, width = _a.width, height = _a.height, style = _a.style;\n var divStyle = __assign({ width: width, height: height }, style);\n return React.createElement(\"div\", { ref: this.updateRef, id: name, style: divStyle });\n };\n ReactAce.propTypes = {\n mode: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n focus: PropTypes.bool,\n theme: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n height: PropTypes.string,\n width: PropTypes.string,\n fontSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n showGutter: PropTypes.bool,\n onChange: PropTypes.func,\n onCopy: PropTypes.func,\n onPaste: PropTypes.func,\n onFocus: PropTypes.func,\n onInput: PropTypes.func,\n onBlur: PropTypes.func,\n onScroll: PropTypes.func,\n value: PropTypes.string,\n defaultValue: PropTypes.string,\n onLoad: PropTypes.func,\n onSelectionChange: PropTypes.func,\n onCursorChange: PropTypes.func,\n onBeforeLoad: PropTypes.func,\n onValidate: PropTypes.func,\n minLines: PropTypes.number,\n maxLines: PropTypes.number,\n readOnly: PropTypes.bool,\n highlightActiveLine: PropTypes.bool,\n tabSize: PropTypes.number,\n showPrintMargin: PropTypes.bool,\n cursorStart: PropTypes.number,\n debounceChangePeriod: PropTypes.number,\n editorProps: PropTypes.object,\n setOptions: PropTypes.object,\n style: PropTypes.object,\n scrollMargin: PropTypes.array,\n annotations: PropTypes.array,\n markers: PropTypes.array,\n keyboardHandler: PropTypes.string,\n wrapEnabled: PropTypes.bool,\n enableSnippets: PropTypes.bool,\n enableBasicAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n enableLiveAutocompletion: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.array\n ]),\n navigateToFileEnd: PropTypes.bool,\n commands: PropTypes.array,\n placeholder: PropTypes.string\n };\n ReactAce.defaultProps = {\n name: \"ace-editor\",\n focus: false,\n mode: \"\",\n theme: \"\",\n height: \"500px\",\n width: \"500px\",\n fontSize: 12,\n enableSnippets: false,\n showGutter: true,\n onChange: null,\n onPaste: null,\n onLoad: null,\n onScroll: null,\n minLines: null,\n maxLines: null,\n readOnly: false,\n highlightActiveLine: true,\n showPrintMargin: true,\n tabSize: 4,\n cursorStart: 1,\n editorProps: {},\n style: {},\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n wrapEnabled: false,\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false,\n placeholder: null,\n navigateToFileEnd: true\n };\n return ReactAce;\n}(React.Component));\nexports.default = ReactAce;\n//# sourceMappingURL=ace.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar PropTypes = require(\"prop-types\");\nvar React = require(\"react\");\nvar split_1 = require(\"./split\");\nvar DiffMatchPatch = require(\"diff-match-patch\");\nvar DiffComponent = /** @class */ (function (_super) {\n __extends(DiffComponent, _super);\n function DiffComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n value: _this.props.value\n };\n _this.onChange = _this.onChange.bind(_this);\n _this.diff = _this.diff.bind(_this);\n return _this;\n }\n DiffComponent.prototype.componentDidUpdate = function () {\n var value = this.props.value;\n if (value !== this.state.value) {\n this.setState({ value: value });\n }\n };\n DiffComponent.prototype.onChange = function (value) {\n this.setState({\n value: value\n });\n if (this.props.onChange) {\n this.props.onChange(value);\n }\n };\n DiffComponent.prototype.diff = function () {\n var dmp = new DiffMatchPatch();\n var lhString = this.state.value[0];\n var rhString = this.state.value[1];\n if (lhString.length === 0 && rhString.length === 0) {\n return [];\n }\n var diff = dmp.diff_main(lhString, rhString);\n dmp.diff_cleanupSemantic(diff);\n var diffedLines = this.generateDiffedLines(diff);\n var codeEditorSettings = this.setCodeMarkers(diffedLines);\n return codeEditorSettings;\n };\n DiffComponent.prototype.generateDiffedLines = function (diff) {\n var C = {\n DIFF_EQUAL: 0,\n DIFF_DELETE: -1,\n DIFF_INSERT: 1\n };\n var diffedLines = {\n left: [],\n right: []\n };\n var cursor = {\n left: 1,\n right: 1\n };\n diff.forEach(function (chunk) {\n var chunkType = chunk[0];\n var text = chunk[1];\n var lines = text.split(\"\\n\").length - 1;\n // diff-match-patch sometimes returns empty strings at random\n if (text.length === 0) {\n return;\n }\n var firstChar = text[0];\n var lastChar = text[text.length - 1];\n var linesToHighlight = 0;\n switch (chunkType) {\n case C.DIFF_EQUAL:\n cursor.left += lines;\n cursor.right += lines;\n break;\n case C.DIFF_DELETE:\n // If the deletion starts with a newline, push the cursor down to that line\n if (firstChar === \"\\n\") {\n cursor.left++;\n lines--;\n }\n linesToHighlight = lines;\n // If the deletion does not include a newline, highlight the same line on the right\n if (linesToHighlight === 0) {\n diffedLines.right.push({\n startLine: cursor.right,\n endLine: cursor.right\n });\n }\n // If the last character is a newline, we don't want to highlight that line\n if (lastChar === \"\\n\") {\n linesToHighlight -= 1;\n }\n diffedLines.left.push({\n startLine: cursor.left,\n endLine: cursor.left + linesToHighlight\n });\n cursor.left += lines;\n break;\n case C.DIFF_INSERT:\n // If the insertion starts with a newline, push the cursor down to that line\n if (firstChar === \"\\n\") {\n cursor.right++;\n lines--;\n }\n linesToHighlight = lines;\n // If the insertion does not include a newline, highlight the same line on the left\n if (linesToHighlight === 0) {\n diffedLines.left.push({\n startLine: cursor.left,\n endLine: cursor.left\n });\n }\n // If the last character is a newline, we don't want to highlight that line\n if (lastChar === \"\\n\") {\n linesToHighlight -= 1;\n }\n diffedLines.right.push({\n startLine: cursor.right,\n endLine: cursor.right + linesToHighlight\n });\n cursor.right += lines;\n break;\n default:\n throw new Error(\"Diff type was not defined.\");\n }\n });\n return diffedLines;\n };\n // Receives a collection of line numbers and iterates through them to highlight appropriately\n // Returns an object that tells the render() method how to display the code editors\n DiffComponent.prototype.setCodeMarkers = function (diffedLines) {\n if (diffedLines === void 0) { diffedLines = { left: [], right: [] }; }\n var codeEditorSettings = [];\n var newMarkerSet = {\n left: [],\n right: []\n };\n for (var i = 0; i < diffedLines.left.length; i++) {\n var markerObj = {\n startRow: diffedLines.left[i].startLine - 1,\n endRow: diffedLines.left[i].endLine,\n type: \"text\",\n className: \"codeMarker\"\n };\n newMarkerSet.left.push(markerObj);\n }\n for (var i = 0; i < diffedLines.right.length; i++) {\n var markerObj = {\n startRow: diffedLines.right[i].startLine - 1,\n endRow: diffedLines.right[i].endLine,\n type: \"text\",\n className: \"codeMarker\"\n };\n newMarkerSet.right.push(markerObj);\n }\n codeEditorSettings[0] = newMarkerSet.left;\n codeEditorSettings[1] = newMarkerSet.right;\n return codeEditorSettings;\n };\n DiffComponent.prototype.render = function () {\n var markers = this.diff();\n return (React.createElement(split_1.default, { name: this.props.name, className: this.props.className, focus: this.props.focus, orientation: this.props.orientation, splits: this.props.splits, mode: this.props.mode, theme: this.props.theme, height: this.props.height, width: this.props.width, fontSize: this.props.fontSize, showGutter: this.props.showGutter, onChange: this.onChange, onPaste: this.props.onPaste, onLoad: this.props.onLoad, onScroll: this.props.onScroll, minLines: this.props.minLines, maxLines: this.props.maxLines, readOnly: this.props.readOnly, highlightActiveLine: this.props.highlightActiveLine, showPrintMargin: this.props.showPrintMargin, tabSize: this.props.tabSize, cursorStart: this.props.cursorStart, editorProps: this.props.editorProps, style: this.props.style, scrollMargin: this.props.scrollMargin, setOptions: this.props.setOptions, wrapEnabled: this.props.wrapEnabled, enableBasicAutocompletion: this.props.enableBasicAutocompletion, enableLiveAutocompletion: this.props.enableLiveAutocompletion, value: this.state.value, markers: markers }));\n };\n DiffComponent.propTypes = {\n cursorStart: PropTypes.number,\n editorProps: PropTypes.object,\n enableBasicAutocompletion: PropTypes.bool,\n enableLiveAutocompletion: PropTypes.bool,\n focus: PropTypes.bool,\n fontSize: PropTypes.number,\n height: PropTypes.string,\n highlightActiveLine: PropTypes.bool,\n maxLines: PropTypes.number,\n minLines: PropTypes.number,\n mode: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n onLoad: PropTypes.func,\n onPaste: PropTypes.func,\n onScroll: PropTypes.func,\n onChange: PropTypes.func,\n orientation: PropTypes.string,\n readOnly: PropTypes.bool,\n scrollMargin: PropTypes.array,\n setOptions: PropTypes.object,\n showGutter: PropTypes.bool,\n showPrintMargin: PropTypes.bool,\n splits: PropTypes.number,\n style: PropTypes.object,\n tabSize: PropTypes.number,\n theme: PropTypes.string,\n value: PropTypes.array,\n width: PropTypes.string,\n wrapEnabled: PropTypes.bool\n };\n DiffComponent.defaultProps = {\n cursorStart: 1,\n editorProps: {},\n enableBasicAutocompletion: false,\n enableLiveAutocompletion: false,\n focus: false,\n fontSize: 12,\n height: \"500px\",\n highlightActiveLine: true,\n maxLines: null,\n minLines: null,\n mode: \"\",\n name: \"ace-editor\",\n onLoad: null,\n onScroll: null,\n onPaste: null,\n onChange: null,\n orientation: \"beside\",\n readOnly: false,\n scrollMargin: [0, 0, 0, 0],\n setOptions: {},\n showGutter: true,\n showPrintMargin: true,\n splits: 2,\n style: {},\n tabSize: 4,\n theme: \"github\",\n value: [\"\", \"\"],\n width: \"500px\",\n wrapEnabled: true\n };\n return DiffComponent;\n}(React.Component));\nexports.default = DiffComponent;\n//# sourceMappingURL=diff.js.map","ace.define(\"ace/split\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/editor\",\"ace/virtual_renderer\",\"ace/edit_session\"], function(require, exports, module) {\n\"use strict\";\n\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\nvar Editor = require(\"./editor\").Editor;\nvar Renderer = require(\"./virtual_renderer\").VirtualRenderer;\nvar EditSession = require(\"./edit_session\").EditSession;\n\n\nvar Split = function(container, theme, splits) {\n this.BELOW = 1;\n this.BESIDE = 0;\n\n this.$container = container;\n this.$theme = theme;\n this.$splits = 0;\n this.$editorCSS = \"\";\n this.$editors = [];\n this.$orientation = this.BESIDE;\n\n this.setSplits(splits || 1);\n this.$cEditor = this.$editors[0];\n\n\n this.on(\"focus\", function(editor) {\n this.$cEditor = editor;\n }.bind(this));\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$createEditor = function() {\n var el = document.createElement(\"div\");\n el.className = this.$editorCSS;\n el.style.cssText = \"position: absolute; top:0px; bottom:0px\";\n this.$container.appendChild(el);\n var editor = new Editor(new Renderer(el, this.$theme));\n\n editor.on(\"focus\", function() {\n this._emit(\"focus\", editor);\n }.bind(this));\n\n this.$editors.push(editor);\n editor.setFontSize(this.$fontSize);\n return editor;\n };\n\n this.setSplits = function(splits) {\n var editor;\n if (splits < 1) {\n throw \"The number of splits have to be > 0!\";\n }\n\n if (splits == this.$splits) {\n return;\n } else if (splits > this.$splits) {\n while (this.$splits < this.$editors.length && this.$splits < splits) {\n editor = this.$editors[this.$splits];\n this.$container.appendChild(editor.container);\n editor.setFontSize(this.$fontSize);\n this.$splits ++;\n }\n while (this.$splits < splits) {\n this.$createEditor();\n this.$splits ++;\n }\n } else {\n while (this.$splits > splits) {\n editor = this.$editors[this.$splits - 1];\n this.$container.removeChild(editor.container);\n this.$splits --;\n }\n }\n this.resize();\n };\n this.getSplits = function() {\n return this.$splits;\n };\n this.getEditor = function(idx) {\n return this.$editors[idx];\n };\n this.getCurrentEditor = function() {\n return this.$cEditor;\n };\n this.focus = function() {\n this.$cEditor.focus();\n };\n this.blur = function() {\n this.$cEditor.blur();\n };\n this.setTheme = function(theme) {\n this.$editors.forEach(function(editor) {\n editor.setTheme(theme);\n });\n };\n this.setKeyboardHandler = function(keybinding) {\n this.$editors.forEach(function(editor) {\n editor.setKeyboardHandler(keybinding);\n });\n };\n this.forEach = function(callback, scope) {\n this.$editors.forEach(callback, scope);\n };\n\n\n this.$fontSize = \"\";\n this.setFontSize = function(size) {\n this.$fontSize = size;\n this.forEach(function(editor) {\n editor.setFontSize(size);\n });\n };\n\n this.$cloneSession = function(session) {\n var s = new EditSession(session.getDocument(), session.getMode());\n\n var undoManager = session.getUndoManager();\n s.setUndoManager(undoManager);\n s.setTabSize(session.getTabSize());\n s.setUseSoftTabs(session.getUseSoftTabs());\n s.setOverwrite(session.getOverwrite());\n s.setBreakpoints(session.getBreakpoints());\n s.setUseWrapMode(session.getUseWrapMode());\n s.setUseWorker(session.getUseWorker());\n s.setWrapLimitRange(session.$wrapLimitRange.min,\n session.$wrapLimitRange.max);\n s.$foldData = session.$cloneFoldData();\n\n return s;\n };\n this.setSession = function(session, idx) {\n var editor;\n if (idx == null) {\n editor = this.$cEditor;\n } else {\n editor = this.$editors[idx];\n }\n var isUsed = this.$editors.some(function(editor) {\n return editor.session === session;\n });\n\n if (isUsed) {\n session = this.$cloneSession(session);\n }\n editor.setSession(session);\n return session;\n };\n this.getOrientation = function() {\n return this.$orientation;\n };\n this.setOrientation = function(orientation) {\n if (this.$orientation == orientation) {\n return;\n }\n this.$orientation = orientation;\n this.resize();\n };\n this.resize = function() {\n var width = this.$container.clientWidth;\n var height = this.$container.clientHeight;\n var editor;\n\n if (this.$orientation == this.BESIDE) {\n var editorWidth = width / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = editorWidth + \"px\";\n editor.container.style.top = \"0px\";\n editor.container.style.left = i * editorWidth + \"px\";\n editor.container.style.height = height + \"px\";\n editor.resize();\n }\n } else {\n var editorHeight = height / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = width + \"px\";\n editor.container.style.top = i * editorHeight + \"px\";\n editor.container.style.left = \"0px\";\n editor.container.style.height = editorHeight + \"px\";\n editor.resize();\n }\n }\n };\n\n}).call(Split.prototype);\n\nexports.Split = Split;\n});\n\nace.define(\"ace/ext/split\",[\"require\",\"exports\",\"module\",\"ace/split\"], function(require, exports, module) {\n\"use strict\";\nmodule.exports = require(\"../split\");\n\n}); (function() {\n ace.require([\"ace/ext/split\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * Diff Match and Patch\n * Copyright 2018 The diff-match-patch Authors.\n * https://github.com/google/diff-match-patch\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Computes the difference between two texts to create a patch.\n * Applies the patch onto another text, allowing for errors.\n * @author fraser@google.com (Neil Fraser)\n */\n\n/**\n * Class containing the diff, match and patch methods.\n * @constructor\n */\nvar diff_match_patch = function() {\n\n // Defaults.\n // Redefine these in your program to override the defaults.\n\n // Number of seconds to map a diff before giving up (0 for infinity).\n this.Diff_Timeout = 1.0;\n // Cost of an empty edit operation in terms of edit characters.\n this.Diff_EditCost = 4;\n // At what point is no match declared (0.0 = perfection, 1.0 = very loose).\n this.Match_Threshold = 0.5;\n // How far to search for a match (0 = exact location, 1000+ = broad match).\n // A match this many characters away from the expected location will add\n // 1.0 to the score (0.0 is a perfect match).\n this.Match_Distance = 1000;\n // When deleting a large block of text (over ~64 characters), how close do\n // the contents have to be to match the expected contents. (0.0 = perfection,\n // 1.0 = very loose). Note that Match_Threshold controls how closely the\n // end points of a delete need to match.\n this.Patch_DeleteThreshold = 0.5;\n // Chunk size for context length.\n this.Patch_Margin = 4;\n\n // The number of bits in an int.\n this.Match_MaxBits = 32;\n};\n\n\n// DIFF FUNCTIONS\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Class representing one diff tuple.\n * ~Attempts to look like a two-element array (which is what this used to be).~\n * Constructor returns an actual two-element array, to allow destructing @JackuB\n * See https://github.com/JackuB/diff-match-patch/issues/14 for details\n * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.\n * @param {string} text Text to be deleted, inserted, or retained.\n * @constructor\n */\ndiff_match_patch.Diff = function(op, text) {\n return [op, text];\n};\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean=} opt_checklines Optional speedup flag. If present and false,\n * then don't run a line-level diff first to identify the changed areas.\n * Defaults to true, which does a faster, slightly less optimal diff.\n * @param {number=} opt_deadline Optional time when the diff should be complete\n * by. Used internally for recursive calls. Users should set DiffTimeout\n * instead.\n * @return {!Array.} Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,\n opt_deadline) {\n // Set a deadline by which time the diff must be complete.\n if (typeof opt_deadline == 'undefined') {\n if (this.Diff_Timeout <= 0) {\n opt_deadline = Number.MAX_VALUE;\n } else {\n opt_deadline = (new Date).getTime() + this.Diff_Timeout * 1000;\n }\n }\n var deadline = opt_deadline;\n\n // Check for null inputs.\n if (text1 == null || text2 == null) {\n throw new Error('Null input. (diff_main)');\n }\n\n // Check for equality (speedup).\n if (text1 == text2) {\n if (text1) {\n return [new diff_match_patch.Diff(DIFF_EQUAL, text1)];\n }\n return [];\n }\n\n if (typeof opt_checklines == 'undefined') {\n opt_checklines = true;\n }\n var checklines = opt_checklines;\n\n // Trim off common prefix (speedup).\n var commonlength = this.diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = this.diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = this.diff_compute_(text1, text2, checklines, deadline);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, commonprefix));\n }\n if (commonsuffix) {\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, commonsuffix));\n }\n this.diff_cleanupMerge(diffs);\n return diffs;\n};\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean} checklines Speedup flag. If false, then don't run a\n * line-level diff first to identify the changed areas.\n * If true, then run a faster, slightly less optimal diff.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,\n deadline) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [new diff_match_patch.Diff(DIFF_DELETE, text1)];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i != -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [new diff_match_patch.Diff(DIFF_INSERT, longtext.substring(0, i)),\n new diff_match_patch.Diff(DIFF_EQUAL, shorttext),\n new diff_match_patch.Diff(DIFF_INSERT,\n longtext.substring(i + shorttext.length))];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length == 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n // Check to see if the problem can be split in two.\n var hm = this.diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = this.diff_main(text1_a, text2_a, checklines, deadline);\n var diffs_b = this.diff_main(text1_b, text2_b, checklines, deadline);\n // Merge the results.\n return diffs_a.concat([new diff_match_patch.Diff(DIFF_EQUAL, mid_common)],\n diffs_b);\n }\n\n if (checklines && text1.length > 100 && text2.length > 100) {\n return this.diff_lineMode_(text1, text2, deadline);\n }\n\n return this.diff_bisect_(text1, text2, deadline);\n};\n\n\n/**\n * Do a quick line-level diff on both strings, then rediff the parts for\n * greater accuracy.\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {\n // Scan the text on a line-by-line basis first.\n var a = this.diff_linesToChars_(text1, text2);\n text1 = a.chars1;\n text2 = a.chars2;\n var linearray = a.lineArray;\n\n var diffs = this.diff_main(text1, text2, false, deadline);\n\n // Convert the diff back to original text.\n this.diff_charsToLines_(diffs, linearray);\n // Eliminate freak matches (e.g. blank lines)\n this.diff_cleanupSemantic(diffs);\n\n // Rediff any replacement blocks, this time character-by-character.\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete >= 1 && count_insert >= 1) {\n // Delete the offending records and add the merged ones.\n diffs.splice(pointer - count_delete - count_insert,\n count_delete + count_insert);\n pointer = pointer - count_delete - count_insert;\n var subDiff =\n this.diff_main(text_delete, text_insert, false, deadline);\n for (var j = subDiff.length - 1; j >= 0; j--) {\n diffs.splice(pointer, 0, subDiff[j]);\n }\n pointer = pointer + subDiff.length;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n pointer++;\n }\n diffs.pop(); // Remove the dummy entry at the end.\n\n return diffs;\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisect_ = function(text1, text2, deadline) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = (delta % 2 != 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Bail out if deadline is reached.\n if ((new Date()).getTime() > deadline) {\n break;\n }\n\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) == text2.charAt(y1)) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ==\n text2.charAt(text2_length - y2 - 1)) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisectSplit_ = function(text1, text2, x, y,\n deadline) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = this.diff_main(text1a, text2a, false, deadline);\n var diffsb = this.diff_main(text1b, text2b, false, deadline);\n\n return diffs.concat(diffsb);\n};\n\n\n/**\n * Split two texts into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {{chars1: string, chars2: string, lineArray: !Array.}}\n * An object containing the encoded text1, the encoded text2 and\n * the array of unique strings.\n * The zeroth element of the array of unique strings is intentionally blank.\n * @private\n */\ndiff_match_patch.prototype.diff_linesToChars_ = function(text1, text2) {\n var lineArray = []; // e.g. lineArray[4] == 'Hello\\n'\n var lineHash = {}; // e.g. lineHash['Hello\\n'] == 4\n\n // '\\x00' is a valid character, but various debuggers don't like it.\n // So we'll insert a junk entry to avoid generating a null character.\n lineArray[0] = '';\n\n /**\n * Split a text into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * Modifies linearray and linehash through being a closure.\n * @param {string} text String to encode.\n * @return {string} Encoded string.\n * @private\n */\n function diff_linesToCharsMunge_(text) {\n var chars = '';\n // Walk the text, pulling out a substring for each line.\n // text.split('\\n') would would temporarily double our memory footprint.\n // Modifying text would create many large strings to garbage collect.\n var lineStart = 0;\n var lineEnd = -1;\n // Keeping our own length variable is faster than looking it up.\n var lineArrayLength = lineArray.length;\n while (lineEnd < text.length - 1) {\n lineEnd = text.indexOf('\\n', lineStart);\n if (lineEnd == -1) {\n lineEnd = text.length - 1;\n }\n var line = text.substring(lineStart, lineEnd + 1);\n\n if (lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) :\n (lineHash[line] !== undefined)) {\n chars += String.fromCharCode(lineHash[line]);\n } else {\n if (lineArrayLength == maxLines) {\n // Bail out at 65535 because\n // String.fromCharCode(65536) == String.fromCharCode(0)\n line = text.substring(lineStart);\n lineEnd = text.length;\n }\n chars += String.fromCharCode(lineArrayLength);\n lineHash[line] = lineArrayLength;\n lineArray[lineArrayLength++] = line;\n }\n lineStart = lineEnd + 1;\n }\n return chars;\n }\n // Allocate 2/3rds of the space for text1, the rest for text2.\n var maxLines = 40000;\n var chars1 = diff_linesToCharsMunge_(text1);\n maxLines = 65535;\n var chars2 = diff_linesToCharsMunge_(text2);\n return {chars1: chars1, chars2: chars2, lineArray: lineArray};\n};\n\n\n/**\n * Rehydrate the text in a diff from a string of line hashes to real lines of\n * text.\n * @param {!Array.} diffs Array of diff tuples.\n * @param {!Array.} lineArray Array of unique strings.\n * @private\n */\ndiff_match_patch.prototype.diff_charsToLines_ = function(diffs, lineArray) {\n for (var i = 0; i < diffs.length; i++) {\n var chars = diffs[i][1];\n var text = [];\n for (var j = 0; j < chars.length; j++) {\n text[j] = lineArray[chars.charCodeAt(j)];\n }\n diffs[i][1] = text.join('');\n }\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\ndiff_match_patch.prototype.diff_commonPrefix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\ndiff_match_patch.prototype.diff_commonSuffix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 ||\n text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\ndiff_match_patch.prototype.diff_commonOverlap_ = function(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: https://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (found == 0 || text1.substring(text_length - length) ==\n text2.substring(0, length)) {\n best = length;\n length++;\n }\n }\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n * @private\n */\ndiff_match_patch.prototype.diff_halfMatch_ = function(text1, text2) {\n if (this.Diff_Timeout <= 0) {\n // Don't risk returning a non-optimal diff if we have unlimited time.\n return null;\n }\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = '';\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n var prefixLength = dmp.diff_commonPrefix(longtext.substring(i),\n shorttext.substring(j));\n var suffixLength = dmp.diff_commonSuffix(longtext.substring(0, i),\n shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 2));\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = diffs[pointer][1];\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (lastEquality && (lastEquality.length <=\n Math.max(length_insertions1, length_deletions1)) &&\n (lastEquality.length <= Math.max(length_insertions2,\n length_deletions2))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n this.diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = this.diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = this.diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n insertion.substring(0, overlap_length1)));\n diffs[pointer - 1][1] =\n deletion.substring(0, deletion.length - overlap_length1);\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n deletion.substring(0, overlap_length2)));\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] =\n insertion.substring(0, insertion.length - overlap_length2);\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] =\n deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n};\n\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemanticLossless = function(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(diff_match_patch.nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(diff_match_patch.nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 &&\n char1.match(diff_match_patch.whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 &&\n char2.match(diff_match_patch.whitespaceRegex_);\n var lineBreak1 = whitespace1 &&\n char1.match(diff_match_patch.linebreakRegex_);\n var lineBreak2 = whitespace2 &&\n char2.match(diff_match_patch.linebreakRegex_);\n var blankLine1 = lineBreak1 &&\n one.match(diff_match_patch.blanklineEndRegex_);\n var blankLine2 = lineBreak2 &&\n two.match(diff_match_patch.blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = this.diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n};\n\n// Define some regex patterns for matching boundaries.\ndiff_match_patch.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\ndiff_match_patch.whitespaceRegex_ = /\\s/;\ndiff_match_patch.linebreakRegex_ = /[\\r\\n]/;\ndiff_match_patch.blanklineEndRegex_ = /\\n\\r?\\n$/;\ndiff_match_patch.blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Reduce the number of edits by eliminating operationally trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupEfficiency = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Is there an insertion operation before the last equality.\n var pre_ins = false;\n // Is there a deletion operation before the last equality.\n var pre_del = false;\n // Is there an insertion operation after the last equality.\n var post_ins = false;\n // Is there a deletion operation after the last equality.\n var post_del = false;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n if (diffs[pointer][1].length < this.Diff_EditCost &&\n (post_ins || post_del)) {\n // Candidate found.\n equalities[equalitiesLength++] = pointer;\n pre_ins = post_ins;\n pre_del = post_del;\n lastEquality = diffs[pointer][1];\n } else {\n // Not a candidate, and can never become one.\n equalitiesLength = 0;\n lastEquality = null;\n }\n post_ins = post_del = false;\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_DELETE) {\n post_del = true;\n } else {\n post_ins = true;\n }\n /*\n * Five types to be split:\n * ABXYCD\n * AXCD\n * ABXC\n * AXCD\n * ABXC\n */\n if (lastEquality && ((pre_ins && pre_del && post_ins && post_del) ||\n ((lastEquality.length < this.Diff_EditCost / 2) &&\n (pre_ins + pre_del + post_ins + post_del) == 3))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n equalitiesLength--; // Throw away the equality we just deleted;\n lastEquality = null;\n if (pre_ins && pre_del) {\n // No changes made which could affect previous entry, keep going.\n post_ins = post_del = true;\n equalitiesLength = 0;\n } else {\n equalitiesLength--; // Throw away the previous equality.\n pointer = equalitiesLength > 0 ?\n equalities[equalitiesLength - 1] : -1;\n post_ins = post_del = false;\n }\n changes = true;\n }\n }\n pointer++;\n }\n\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupMerge = function(diffs) {\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n var commonlength;\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete + count_insert > 1) {\n if (count_delete !== 0 && count_insert !== 0) {\n // Factor out any common prefixies.\n commonlength = this.diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if ((pointer - count_delete - count_insert) > 0 &&\n diffs[pointer - count_delete - count_insert - 1][0] ==\n DIFF_EQUAL) {\n diffs[pointer - count_delete - count_insert - 1][1] +=\n text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n text_insert.substring(0, commonlength)));\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixies.\n commonlength = this.diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] = text_insert.substring(text_insert.length -\n commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length -\n commonlength);\n text_delete = text_delete.substring(0, text_delete.length -\n commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n pointer -= count_delete + count_insert;\n diffs.splice(pointer, count_delete + count_insert);\n if (text_delete.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_DELETE, text_delete));\n pointer++;\n }\n if (text_insert.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_INSERT, text_insert));\n pointer++;\n }\n pointer++;\n } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * loc is a location in text1, compute and return the equivalent location in\n * text2.\n * e.g. 'The cat' vs 'The big cat', 1->1, 5->8\n * @param {!Array.} diffs Array of diff tuples.\n * @param {number} loc Location within text1.\n * @return {number} Location within text2.\n */\ndiff_match_patch.prototype.diff_xIndex = function(diffs, loc) {\n var chars1 = 0;\n var chars2 = 0;\n var last_chars1 = 0;\n var last_chars2 = 0;\n var x;\n for (x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) { // Equality or deletion.\n chars1 += diffs[x][1].length;\n }\n if (diffs[x][0] !== DIFF_DELETE) { // Equality or insertion.\n chars2 += diffs[x][1].length;\n }\n if (chars1 > loc) { // Overshot the location.\n break;\n }\n last_chars1 = chars1;\n last_chars2 = chars2;\n }\n // Was the location was deleted?\n if (diffs.length != x && diffs[x][0] === DIFF_DELETE) {\n return last_chars2;\n }\n // Add the remaining character length.\n return last_chars2 + (loc - last_chars1);\n};\n\n\n/**\n * Convert a diff array into a pretty HTML report.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} HTML representation.\n */\ndiff_match_patch.prototype.diff_prettyHtml = function(diffs) {\n var html = [];\n var pattern_amp = /&/g;\n var pattern_lt = //g;\n var pattern_para = /\\n/g;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0]; // Operation (insert, delete, equal)\n var data = diffs[x][1]; // Text of change.\n var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')\n .replace(pattern_gt, '>').replace(pattern_para, '¶
');\n switch (op) {\n case DIFF_INSERT:\n html[x] = '' + text + '';\n break;\n case DIFF_DELETE:\n html[x] = '' + text + '';\n break;\n case DIFF_EQUAL:\n html[x] = '' + text + '';\n break;\n }\n }\n return html.join('');\n};\n\n\n/**\n * Compute and return the source text (all equalities and deletions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Source text.\n */\ndiff_match_patch.prototype.diff_text1 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute and return the destination text (all equalities and insertions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Destination text.\n */\ndiff_match_patch.prototype.diff_text2 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_DELETE) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute the Levenshtein distance; the number of inserted, deleted or\n * substituted characters.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {number} Number of changes.\n */\ndiff_match_patch.prototype.diff_levenshtein = function(diffs) {\n var levenshtein = 0;\n var insertions = 0;\n var deletions = 0;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0];\n var data = diffs[x][1];\n switch (op) {\n case DIFF_INSERT:\n insertions += data.length;\n break;\n case DIFF_DELETE:\n deletions += data.length;\n break;\n case DIFF_EQUAL:\n // A deletion and an insertion is one substitution.\n levenshtein += Math.max(insertions, deletions);\n insertions = 0;\n deletions = 0;\n break;\n }\n }\n levenshtein += Math.max(insertions, deletions);\n return levenshtein;\n};\n\n\n/**\n * Crush the diff into an encoded string which describes the operations\n * required to transform text1 into text2.\n * E.g. =3\\t-2\\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'.\n * Operations are tab-separated. Inserted text is escaped using %xx notation.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Delta text.\n */\ndiff_match_patch.prototype.diff_toDelta = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n switch (diffs[x][0]) {\n case DIFF_INSERT:\n text[x] = '+' + encodeURI(diffs[x][1]);\n break;\n case DIFF_DELETE:\n text[x] = '-' + diffs[x][1].length;\n break;\n case DIFF_EQUAL:\n text[x] = '=' + diffs[x][1].length;\n break;\n }\n }\n return text.join('\\t').replace(/%20/g, ' ');\n};\n\n\n/**\n * Given the original text1, and an encoded string which describes the\n * operations required to transform text1 into text2, compute the full diff.\n * @param {string} text1 Source string for the diff.\n * @param {string} delta Delta text.\n * @return {!Array.} Array of diff tuples.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.diff_fromDelta = function(text1, delta) {\n var diffs = [];\n var diffsLength = 0; // Keeping our own length var is faster in JS.\n var pointer = 0; // Cursor in text1\n var tokens = delta.split(/\\t/g);\n for (var x = 0; x < tokens.length; x++) {\n // Each token begins with a one character parameter which specifies the\n // operation of this token (delete, insert, equality).\n var param = tokens[x].substring(1);\n switch (tokens[x].charAt(0)) {\n case '+':\n try {\n diffs[diffsLength++] =\n new diff_match_patch.Diff(DIFF_INSERT, decodeURI(param));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in diff_fromDelta: ' + param);\n }\n break;\n case '-':\n // Fall through.\n case '=':\n var n = parseInt(param, 10);\n if (isNaN(n) || n < 0) {\n throw new Error('Invalid number in diff_fromDelta: ' + param);\n }\n var text = text1.substring(pointer, pointer += n);\n if (tokens[x].charAt(0) == '=') {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_EQUAL, text);\n } else {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_DELETE, text);\n }\n break;\n default:\n // Blank tokens are ok (from a trailing \\t).\n // Anything else is an error.\n if (tokens[x]) {\n throw new Error('Invalid diff operation in diff_fromDelta: ' +\n tokens[x]);\n }\n }\n }\n if (pointer != text1.length) {\n throw new Error('Delta length (' + pointer +\n ') does not equal source text length (' + text1.length + ').');\n }\n return diffs;\n};\n\n\n// MATCH FUNCTIONS\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc'.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n */\ndiff_match_patch.prototype.match_main = function(text, pattern, loc) {\n // Check for null inputs.\n if (text == null || pattern == null || loc == null) {\n throw new Error('Null input. (match_main)');\n }\n\n loc = Math.max(0, Math.min(loc, text.length));\n if (text == pattern) {\n // Shortcut (potentially not guaranteed by the algorithm)\n return 0;\n } else if (!text.length) {\n // Nothing to match.\n return -1;\n } else if (text.substring(loc, loc + pattern.length) == pattern) {\n // Perfect match at the perfect spot! (Includes case of null pattern)\n return loc;\n } else {\n // Do a fuzzy compare.\n return this.match_bitap_(text, pattern, loc);\n }\n};\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc' using the\n * Bitap algorithm.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n * @private\n */\ndiff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {\n if (pattern.length > this.Match_MaxBits) {\n throw new Error('Pattern too long for this browser.');\n }\n\n // Initialise the alphabet.\n var s = this.match_alphabet_(pattern);\n\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Compute and return the score for a match with e errors and x location.\n * Accesses loc and pattern through being a closure.\n * @param {number} e Number of errors in match.\n * @param {number} x Location of match.\n * @return {number} Overall score for match (0.0 = good, 1.0 = bad).\n * @private\n */\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length;\n var proximity = Math.abs(loc - x);\n if (!dmp.Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy;\n }\n return accuracy + (proximity / dmp.Match_Distance);\n }\n\n // Highest score beyond which we give up.\n var score_threshold = this.Match_Threshold;\n // Is there a nearby exact match? (speedup)\n var best_loc = text.indexOf(pattern, loc);\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length);\n if (best_loc != -1) {\n score_threshold =\n Math.min(match_bitapScore_(0, best_loc), score_threshold);\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1);\n best_loc = -1;\n\n var bin_min, bin_mid;\n var bin_max = pattern.length + text.length;\n var last_rd;\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0;\n bin_mid = bin_max;\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid;\n } else {\n bin_max = bin_mid;\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid;\n var start = Math.max(1, loc - bin_mid + 1);\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length;\n\n var rd = Array(finish + 2);\n rd[finish + 1] = (1 << d) - 1;\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)];\n if (d === 0) { // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;\n } else { // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) |\n (((last_rd[j + 1] | last_rd[j]) << 1) | 1) |\n last_rd[j + 1];\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1);\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score;\n best_loc = j - 1;\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc);\n } else {\n // Already passed loc, downhill from here on in.\n break;\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break;\n }\n last_rd = rd;\n }\n return best_loc;\n};\n\n\n/**\n * Initialise the alphabet for the Bitap algorithm.\n * @param {string} pattern The text to encode.\n * @return {!Object} Hash of character locations.\n * @private\n */\ndiff_match_patch.prototype.match_alphabet_ = function(pattern) {\n var s = {};\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] = 0;\n }\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] |= 1 << (pattern.length - i - 1);\n }\n return s;\n};\n\n\n// PATCH FUNCTIONS\n\n\n/**\n * Increase the context until it is unique,\n * but don't let the pattern expand beyond Match_MaxBits.\n * @param {!diff_match_patch.patch_obj} patch The patch to grow.\n * @param {string} text Source text.\n * @private\n */\ndiff_match_patch.prototype.patch_addContext_ = function(patch, text) {\n if (text.length == 0) {\n return;\n }\n if (patch.start2 === null) {\n throw Error('patch not initialized');\n }\n var pattern = text.substring(patch.start2, patch.start2 + patch.length1);\n var padding = 0;\n\n // Look for the first and last matches of pattern in text. If two different\n // matches are found, increase the pattern length.\n while (text.indexOf(pattern) != text.lastIndexOf(pattern) &&\n pattern.length < this.Match_MaxBits - this.Patch_Margin -\n this.Patch_Margin) {\n padding += this.Patch_Margin;\n pattern = text.substring(patch.start2 - padding,\n patch.start2 + patch.length1 + padding);\n }\n // Add one chunk for good luck.\n padding += this.Patch_Margin;\n\n // Add the prefix.\n var prefix = text.substring(patch.start2 - padding, patch.start2);\n if (prefix) {\n patch.diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, prefix));\n }\n // Add the suffix.\n var suffix = text.substring(patch.start2 + patch.length1,\n patch.start2 + patch.length1 + padding);\n if (suffix) {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, suffix));\n }\n\n // Roll back the start points.\n patch.start1 -= prefix.length;\n patch.start2 -= prefix.length;\n // Extend the lengths.\n patch.length1 += prefix.length + suffix.length;\n patch.length2 += prefix.length + suffix.length;\n};\n\n\n/**\n * Compute a list of patches to turn text1 into text2.\n * Use diffs if provided, otherwise compute it ourselves.\n * There are four ways to call this function, depending on what data is\n * available to the caller:\n * Method 1:\n * a = text1, b = text2\n * Method 2:\n * a = diffs\n * Method 3 (optimal):\n * a = text1, b = diffs\n * Method 4 (deprecated, use method 3):\n * a = text1, b = text2, c = diffs\n *\n * @param {string|!Array.} a text1 (methods 1,3,4) or\n * Array of diff tuples for text1 to text2 (method 2).\n * @param {string|!Array.=} opt_b text2 (methods 1,4) or\n * Array of diff tuples for text1 to text2 (method 3) or undefined (method 2).\n * @param {string|!Array.=} opt_c Array of diff tuples\n * for text1 to text2 (method 4) or undefined (methods 1,2,3).\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_make = function(a, opt_b, opt_c) {\n var text1, diffs;\n if (typeof a == 'string' && typeof opt_b == 'string' &&\n typeof opt_c == 'undefined') {\n // Method 1: text1, text2\n // Compute diffs from text1 and text2.\n text1 = /** @type {string} */(a);\n diffs = this.diff_main(text1, /** @type {string} */(opt_b), true);\n if (diffs.length > 2) {\n this.diff_cleanupSemantic(diffs);\n this.diff_cleanupEfficiency(diffs);\n }\n } else if (a && typeof a == 'object' && typeof opt_b == 'undefined' &&\n typeof opt_c == 'undefined') {\n // Method 2: diffs\n // Compute text1 from diffs.\n diffs = /** @type {!Array.} */(a);\n text1 = this.diff_text1(diffs);\n } else if (typeof a == 'string' && opt_b && typeof opt_b == 'object' &&\n typeof opt_c == 'undefined') {\n // Method 3: text1, diffs\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_b);\n } else if (typeof a == 'string' && typeof opt_b == 'string' &&\n opt_c && typeof opt_c == 'object') {\n // Method 4: text1, text2, diffs\n // text2 is not used.\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_c);\n } else {\n throw new Error('Unknown call format to patch_make.');\n }\n\n if (diffs.length === 0) {\n return []; // Get rid of the null case.\n }\n var patches = [];\n var patch = new diff_match_patch.patch_obj();\n var patchDiffLength = 0; // Keeping our own length var is faster in JS.\n var char_count1 = 0; // Number of characters into the text1 string.\n var char_count2 = 0; // Number of characters into the text2 string.\n // Start with text1 (prepatch_text) and apply the diffs until we arrive at\n // text2 (postpatch_text). We recreate the patches one by one to determine\n // context info.\n var prepatch_text = text1;\n var postpatch_text = text1;\n for (var x = 0; x < diffs.length; x++) {\n var diff_type = diffs[x][0];\n var diff_text = diffs[x][1];\n\n if (!patchDiffLength && diff_type !== DIFF_EQUAL) {\n // A new patch starts here.\n patch.start1 = char_count1;\n patch.start2 = char_count2;\n }\n\n switch (diff_type) {\n case DIFF_INSERT:\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length2 += diff_text.length;\n postpatch_text = postpatch_text.substring(0, char_count2) + diff_text +\n postpatch_text.substring(char_count2);\n break;\n case DIFF_DELETE:\n patch.length1 += diff_text.length;\n patch.diffs[patchDiffLength++] = diffs[x];\n postpatch_text = postpatch_text.substring(0, char_count2) +\n postpatch_text.substring(char_count2 +\n diff_text.length);\n break;\n case DIFF_EQUAL:\n if (diff_text.length <= 2 * this.Patch_Margin &&\n patchDiffLength && diffs.length != x + 1) {\n // Small equality inside a patch.\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length1 += diff_text.length;\n patch.length2 += diff_text.length;\n } else if (diff_text.length >= 2 * this.Patch_Margin) {\n // Time for a new patch.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n patch = new diff_match_patch.patch_obj();\n patchDiffLength = 0;\n // Unlike Unidiff, our patch lists have a rolling context.\n // https://github.com/google/diff-match-patch/wiki/Unidiff\n // Update prepatch text & pos to reflect the application of the\n // just completed patch.\n prepatch_text = postpatch_text;\n char_count1 = char_count2;\n }\n }\n break;\n }\n\n // Update the current character count.\n if (diff_type !== DIFF_INSERT) {\n char_count1 += diff_text.length;\n }\n if (diff_type !== DIFF_DELETE) {\n char_count2 += diff_text.length;\n }\n }\n // Pick up the leftover patch if not empty.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n }\n\n return patches;\n};\n\n\n/**\n * Given an array of patches, return another array that is identical.\n * @param {!Array.} patches Array of Patch objects.\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_deepCopy = function(patches) {\n // Making deep copies is hard in JavaScript.\n var patchesCopy = [];\n for (var x = 0; x < patches.length; x++) {\n var patch = patches[x];\n var patchCopy = new diff_match_patch.patch_obj();\n patchCopy.diffs = [];\n for (var y = 0; y < patch.diffs.length; y++) {\n patchCopy.diffs[y] =\n new diff_match_patch.Diff(patch.diffs[y][0], patch.diffs[y][1]);\n }\n patchCopy.start1 = patch.start1;\n patchCopy.start2 = patch.start2;\n patchCopy.length1 = patch.length1;\n patchCopy.length2 = patch.length2;\n patchesCopy[x] = patchCopy;\n }\n return patchesCopy;\n};\n\n\n/**\n * Merge a set of patches onto the text. Return a patched text, as well\n * as a list of true/false values indicating which patches were applied.\n * @param {!Array.} patches Array of Patch objects.\n * @param {string} text Old text.\n * @return {!Array.>} Two element Array, containing the\n * new text and an array of boolean values.\n */\ndiff_match_patch.prototype.patch_apply = function(patches, text) {\n if (patches.length == 0) {\n return [text, []];\n }\n\n // Deep copy the patches so that no changes are made to originals.\n patches = this.patch_deepCopy(patches);\n\n var nullPadding = this.patch_addPadding(patches);\n text = nullPadding + text + nullPadding;\n\n this.patch_splitMax(patches);\n // delta keeps track of the offset between the expected and actual location\n // of the previous patch. If there are patches expected at positions 10 and\n // 20, but the first patch was found at 12, delta is 2 and the second patch\n // has an effective expected position of 22.\n var delta = 0;\n var results = [];\n for (var x = 0; x < patches.length; x++) {\n var expected_loc = patches[x].start2 + delta;\n var text1 = this.diff_text1(patches[x].diffs);\n var start_loc;\n var end_loc = -1;\n if (text1.length > this.Match_MaxBits) {\n // patch_splitMax will only provide an oversized pattern in the case of\n // a monster delete.\n start_loc = this.match_main(text, text1.substring(0, this.Match_MaxBits),\n expected_loc);\n if (start_loc != -1) {\n end_loc = this.match_main(text,\n text1.substring(text1.length - this.Match_MaxBits),\n expected_loc + text1.length - this.Match_MaxBits);\n if (end_loc == -1 || start_loc >= end_loc) {\n // Can't find valid trailing context. Drop this patch.\n start_loc = -1;\n }\n }\n } else {\n start_loc = this.match_main(text, text1, expected_loc);\n }\n if (start_loc == -1) {\n // No match found. :(\n results[x] = false;\n // Subtract the delta for this failed patch from subsequent patches.\n delta -= patches[x].length2 - patches[x].length1;\n } else {\n // Found a match. :)\n results[x] = true;\n delta = start_loc - expected_loc;\n var text2;\n if (end_loc == -1) {\n text2 = text.substring(start_loc, start_loc + text1.length);\n } else {\n text2 = text.substring(start_loc, end_loc + this.Match_MaxBits);\n }\n if (text1 == text2) {\n // Perfect match, just shove the replacement text in.\n text = text.substring(0, start_loc) +\n this.diff_text2(patches[x].diffs) +\n text.substring(start_loc + text1.length);\n } else {\n // Imperfect match. Run a diff to get a framework of equivalent\n // indices.\n var diffs = this.diff_main(text1, text2, false);\n if (text1.length > this.Match_MaxBits &&\n this.diff_levenshtein(diffs) / text1.length >\n this.Patch_DeleteThreshold) {\n // The end points match, but the content is unacceptably bad.\n results[x] = false;\n } else {\n this.diff_cleanupSemanticLossless(diffs);\n var index1 = 0;\n var index2;\n for (var y = 0; y < patches[x].diffs.length; y++) {\n var mod = patches[x].diffs[y];\n if (mod[0] !== DIFF_EQUAL) {\n index2 = this.diff_xIndex(diffs, index1);\n }\n if (mod[0] === DIFF_INSERT) { // Insertion\n text = text.substring(0, start_loc + index2) + mod[1] +\n text.substring(start_loc + index2);\n } else if (mod[0] === DIFF_DELETE) { // Deletion\n text = text.substring(0, start_loc + index2) +\n text.substring(start_loc + this.diff_xIndex(diffs,\n index1 + mod[1].length));\n }\n if (mod[0] !== DIFF_DELETE) {\n index1 += mod[1].length;\n }\n }\n }\n }\n }\n }\n // Strip the padding off.\n text = text.substring(nullPadding.length, text.length - nullPadding.length);\n return [text, results];\n};\n\n\n/**\n * Add some padding on text start and end so that edges can match something.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} The padding string added to each side.\n */\ndiff_match_patch.prototype.patch_addPadding = function(patches) {\n var paddingLength = this.Patch_Margin;\n var nullPadding = '';\n for (var x = 1; x <= paddingLength; x++) {\n nullPadding += String.fromCharCode(x);\n }\n\n // Bump all the patches forward.\n for (var x = 0; x < patches.length; x++) {\n patches[x].start1 += paddingLength;\n patches[x].start2 += paddingLength;\n }\n\n // Add some padding on start of first diff.\n var patch = patches[0];\n var diffs = patch.diffs;\n if (diffs.length == 0 || diffs[0][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.start1 -= paddingLength; // Should be 0.\n patch.start2 -= paddingLength; // Should be 0.\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[0][1].length) {\n // Grow first equality.\n var extraLength = paddingLength - diffs[0][1].length;\n diffs[0][1] = nullPadding.substring(diffs[0][1].length) + diffs[0][1];\n patch.start1 -= extraLength;\n patch.start2 -= extraLength;\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n // Add some padding on end of last diff.\n patch = patches[patches.length - 1];\n diffs = patch.diffs;\n if (diffs.length == 0 || diffs[diffs.length - 1][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[diffs.length - 1][1].length) {\n // Grow last equality.\n var extraLength = paddingLength - diffs[diffs.length - 1][1].length;\n diffs[diffs.length - 1][1] += nullPadding.substring(0, extraLength);\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n return nullPadding;\n};\n\n\n/**\n * Look through the patches and break up any which are longer than the maximum\n * limit of the match algorithm.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_splitMax = function(patches) {\n var patch_size = this.Match_MaxBits;\n for (var x = 0; x < patches.length; x++) {\n if (patches[x].length1 <= patch_size) {\n continue;\n }\n var bigpatch = patches[x];\n // Remove the big old patch.\n patches.splice(x--, 1);\n var start1 = bigpatch.start1;\n var start2 = bigpatch.start2;\n var precontext = '';\n while (bigpatch.diffs.length !== 0) {\n // Create one of several smaller patches.\n var patch = new diff_match_patch.patch_obj();\n var empty = true;\n patch.start1 = start1 - precontext.length;\n patch.start2 = start2 - precontext.length;\n if (precontext !== '') {\n patch.length1 = patch.length2 = precontext.length;\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, precontext));\n }\n while (bigpatch.diffs.length !== 0 &&\n patch.length1 < patch_size - this.Patch_Margin) {\n var diff_type = bigpatch.diffs[0][0];\n var diff_text = bigpatch.diffs[0][1];\n if (diff_type === DIFF_INSERT) {\n // Insertions are harmless.\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n patch.diffs.push(bigpatch.diffs.shift());\n empty = false;\n } else if (diff_type === DIFF_DELETE && patch.diffs.length == 1 &&\n patch.diffs[0][0] == DIFF_EQUAL &&\n diff_text.length > 2 * patch_size) {\n // This is a large deletion. Let it pass in one chunk.\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n empty = false;\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n bigpatch.diffs.shift();\n } else {\n // Deletion or equality. Only take as much as we can stomach.\n diff_text = diff_text.substring(0,\n patch_size - patch.length1 - this.Patch_Margin);\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n if (diff_type === DIFF_EQUAL) {\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n } else {\n empty = false;\n }\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n if (diff_text == bigpatch.diffs[0][1]) {\n bigpatch.diffs.shift();\n } else {\n bigpatch.diffs[0][1] =\n bigpatch.diffs[0][1].substring(diff_text.length);\n }\n }\n }\n // Compute the head context for the next patch.\n precontext = this.diff_text2(patch.diffs);\n precontext =\n precontext.substring(precontext.length - this.Patch_Margin);\n // Append the end context for this patch.\n var postcontext = this.diff_text1(bigpatch.diffs)\n .substring(0, this.Patch_Margin);\n if (postcontext !== '') {\n patch.length1 += postcontext.length;\n patch.length2 += postcontext.length;\n if (patch.diffs.length !== 0 &&\n patch.diffs[patch.diffs.length - 1][0] === DIFF_EQUAL) {\n patch.diffs[patch.diffs.length - 1][1] += postcontext;\n } else {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, postcontext));\n }\n }\n if (!empty) {\n patches.splice(++x, 0, patch);\n }\n }\n }\n};\n\n\n/**\n * Take a list of patches and return a textual representation.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} Text representation of patches.\n */\ndiff_match_patch.prototype.patch_toText = function(patches) {\n var text = [];\n for (var x = 0; x < patches.length; x++) {\n text[x] = patches[x];\n }\n return text.join('');\n};\n\n\n/**\n * Parse a textual representation of patches and return a list of Patch objects.\n * @param {string} textline Text representation of patches.\n * @return {!Array.} Array of Patch objects.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.patch_fromText = function(textline) {\n var patches = [];\n if (!textline) {\n return patches;\n }\n var text = textline.split('\\n');\n var textPointer = 0;\n var patchHeader = /^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$/;\n while (textPointer < text.length) {\n var m = text[textPointer].match(patchHeader);\n if (!m) {\n throw new Error('Invalid patch string: ' + text[textPointer]);\n }\n var patch = new diff_match_patch.patch_obj();\n patches.push(patch);\n patch.start1 = parseInt(m[1], 10);\n if (m[2] === '') {\n patch.start1--;\n patch.length1 = 1;\n } else if (m[2] == '0') {\n patch.length1 = 0;\n } else {\n patch.start1--;\n patch.length1 = parseInt(m[2], 10);\n }\n\n patch.start2 = parseInt(m[3], 10);\n if (m[4] === '') {\n patch.start2--;\n patch.length2 = 1;\n } else if (m[4] == '0') {\n patch.length2 = 0;\n } else {\n patch.start2--;\n patch.length2 = parseInt(m[4], 10);\n }\n textPointer++;\n\n while (textPointer < text.length) {\n var sign = text[textPointer].charAt(0);\n try {\n var line = decodeURI(text[textPointer].substring(1));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in patch_fromText: ' + line);\n }\n if (sign == '-') {\n // Deletion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_DELETE, line));\n } else if (sign == '+') {\n // Insertion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_INSERT, line));\n } else if (sign == ' ') {\n // Minor equality.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, line));\n } else if (sign == '@') {\n // Start of next patch.\n break;\n } else if (sign === '') {\n // Blank line? Whatever.\n } else {\n // WTF?\n throw new Error('Invalid patch mode \"' + sign + '\" in: ' + line);\n }\n textPointer++;\n }\n }\n return patches;\n};\n\n\n/**\n * Class representing one patch operation.\n * @constructor\n */\ndiff_match_patch.patch_obj = function() {\n /** @type {!Array.} */\n this.diffs = [];\n /** @type {?number} */\n this.start1 = null;\n /** @type {?number} */\n this.start2 = null;\n /** @type {number} */\n this.length1 = 0;\n /** @type {number} */\n this.length2 = 0;\n};\n\n\n/**\n * Emulate GNU diff's format.\n * Header: @@ -382,8 +481,9 @@\n * Indices are printed as 1-based, not 0-based.\n * @return {string} The GNU diff string.\n */\ndiff_match_patch.patch_obj.prototype.toString = function() {\n var coords1, coords2;\n if (this.length1 === 0) {\n coords1 = this.start1 + ',0';\n } else if (this.length1 == 1) {\n coords1 = this.start1 + 1;\n } else {\n coords1 = (this.start1 + 1) + ',' + this.length1;\n }\n if (this.length2 === 0) {\n coords2 = this.start2 + ',0';\n } else if (this.length2 == 1) {\n coords2 = this.start2 + 1;\n } else {\n coords2 = (this.start2 + 1) + ',' + this.length2;\n }\n var text = ['@@ -' + coords1 + ' +' + coords2 + ' @@\\n'];\n var op;\n // Escape the body of the patch with %xx notation.\n for (var x = 0; x < this.diffs.length; x++) {\n switch (this.diffs[x][0]) {\n case DIFF_INSERT:\n op = '+';\n break;\n case DIFF_DELETE:\n op = '-';\n break;\n case DIFF_EQUAL:\n op = ' ';\n break;\n }\n text[x + 1] = op + encodeURI(this.diffs[x][1]) + '\\n';\n }\n return text.join('').replace(/%20/g, ' ');\n};\n\n\n// The following export code was added by @ForbesLindesay\nmodule.exports = diff_match_patch;\nmodule.exports['diff_match_patch'] = diff_match_patch;\nmodule.exports['DIFF_DELETE'] = DIFF_DELETE;\nmodule.exports['DIFF_INSERT'] = DIFF_INSERT;\nmodule.exports['DIFF_EQUAL'] = DIFF_EQUAL;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","var purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","var deepPurple = {\n 50: '#ede7f6',\n 100: '#d1c4e9',\n 200: '#b39ddb',\n 300: '#9575cd',\n 400: '#7e57c2',\n 500: '#673ab7',\n 600: '#5e35b1',\n 700: '#512da8',\n 800: '#4527a0',\n 900: '#311b92',\n A100: '#b388ff',\n A200: '#7c4dff',\n A400: '#651fff',\n A700: '#6200ea'\n};\nexport default deepPurple;","var lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","var cyan = {\n 50: '#e0f7fa',\n 100: '#b2ebf2',\n 200: '#80deea',\n 300: '#4dd0e1',\n 400: '#26c6da',\n 500: '#00bcd4',\n 600: '#00acc1',\n 700: '#0097a7',\n 800: '#00838f',\n 900: '#006064',\n A100: '#84ffff',\n A200: '#18ffff',\n A400: '#00e5ff',\n A700: '#00b8d4'\n};\nexport default cyan;","var teal = {\n 50: '#e0f2f1',\n 100: '#b2dfdb',\n 200: '#80cbc4',\n 300: '#4db6ac',\n 400: '#26a69a',\n 500: '#009688',\n 600: '#00897b',\n 700: '#00796b',\n 800: '#00695c',\n 900: '#004d40',\n A100: '#a7ffeb',\n A200: '#64ffda',\n A400: '#1de9b6',\n A700: '#00bfa5'\n};\nexport default teal;","var lightGreen = {\n 50: '#f1f8e9',\n 100: '#dcedc8',\n 200: '#c5e1a5',\n 300: '#aed581',\n 400: '#9ccc65',\n 500: '#8bc34a',\n 600: '#7cb342',\n 700: '#689f38',\n 800: '#558b2f',\n 900: '#33691e',\n A100: '#ccff90',\n A200: '#b2ff59',\n A400: '#76ff03',\n A700: '#64dd17'\n};\nexport default lightGreen;","var lime = {\n 50: '#f9fbe7',\n 100: '#f0f4c3',\n 200: '#e6ee9c',\n 300: '#dce775',\n 400: '#d4e157',\n 500: '#cddc39',\n 600: '#c0ca33',\n 700: '#afb42b',\n 800: '#9e9d24',\n 900: '#827717',\n A100: '#f4ff81',\n A200: '#eeff41',\n A400: '#c6ff00',\n A700: '#aeea00'\n};\nexport default lime;","var yellow = {\n 50: '#fffde7',\n 100: '#fff9c4',\n 200: '#fff59d',\n 300: '#fff176',\n 400: '#ffee58',\n 500: '#ffeb3b',\n 600: '#fdd835',\n 700: '#fbc02d',\n 800: '#f9a825',\n 900: '#f57f17',\n A100: '#ffff8d',\n A200: '#ffff00',\n A400: '#ffea00',\n A700: '#ffd600'\n};\nexport default yellow;","var amber = {\n 50: '#fff8e1',\n 100: '#ffecb3',\n 200: '#ffe082',\n 300: '#ffd54f',\n 400: '#ffca28',\n 500: '#ffc107',\n 600: '#ffb300',\n 700: '#ffa000',\n 800: '#ff8f00',\n 900: '#ff6f00',\n A100: '#ffe57f',\n A200: '#ffd740',\n A400: '#ffc400',\n A700: '#ffab00'\n};\nexport default amber;","var deepOrange = {\n 50: '#fbe9e7',\n 100: '#ffccbc',\n 200: '#ffab91',\n 300: '#ff8a65',\n 400: '#ff7043',\n 500: '#ff5722',\n 600: '#f4511e',\n 700: '#e64a19',\n 800: '#d84315',\n 900: '#bf360c',\n A100: '#ff9e80',\n A200: '#ff6e40',\n A400: '#ff3d00',\n A700: '#dd2c00'\n};\nexport default deepOrange;","var brown = {\n 50: '#efebe9',\n 100: '#d7ccc8',\n 200: '#bcaaa4',\n 300: '#a1887f',\n 400: '#8d6e63',\n 500: '#795548',\n 600: '#6d4c41',\n 700: '#5d4037',\n 800: '#4e342e',\n 900: '#3e2723',\n A100: '#d7ccc8',\n A200: '#bcaaa4',\n A400: '#8d6e63',\n A700: '#5d4037'\n};\nexport default brown;","var blueGrey = {\n 50: '#eceff1',\n 100: '#cfd8dc',\n 200: '#b0bec5',\n 300: '#90a4ae',\n 400: '#78909c',\n 500: '#607d8b',\n 600: '#546e7a',\n 700: '#455a64',\n 800: '#37474f',\n 900: '#263238',\n A100: '#cfd8dc',\n A200: '#b0bec5',\n A400: '#78909c',\n A700: '#455a64'\n};\nexport default blueGrey;","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar AccordionContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n AccordionContext.displayName = 'AccordionContext';\n}\n\nexport default AccordionContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from './AccordionContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar Accordion = /*#__PURE__*/React.forwardRef(function Accordion(props, ref) {\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'Accordion',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(AccordionContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Accordion.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The Accordion doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the accordion by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the accordion will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the accordion.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordion'\n})(Accordion);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionActions'\n})(AccordionActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionDetails'\n})(AccordionDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from '../Accordion/AccordionContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused, &$focusVisible': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focused: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$IconButtonProp = props.IconButtonProps,\n IconButtonProps = _props$IconButtonProp === void 0 ? {} : _props$IconButtonProp,\n onClick = props.onClick,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"focusVisibleClassName\", \"IconButtonProps\", \"onClick\"]);\n\n var _React$useContext = React.useContext(AccordionContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded),\n focusVisibleClassName: clsx(classes.focusVisible, classes.focused, focusVisibleClassName),\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n // Guard against when generation of classes is disabled in the stylesheets (`disableGeneration`).\n // For `disableGeneration` we don't have an accurate warning but `disableGeneration` is an advanced use case anyway.\n if (props.classes.focused !== undefined && props.classes.focused.indexOf(' ') !== -1) {\n return new Error(['Material-UI: The `classes.focused` key is deprecated.', 'Use `classes.focusVisible` instead.', 'The name of the pseudo-class was changed for consistency.'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionSummary'\n})(AccordionSummary);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport Person from '../internal/svg-icons/Person';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 40,\n height: 40,\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(20),\n lineHeight: 1,\n borderRadius: '50%',\n overflow: 'hidden',\n userSelect: 'none'\n },\n\n /* Styles applied to the root element if not `src` or `srcSet`. */\n colorDefault: {\n color: theme.palette.background.default,\n backgroundColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `variant=\"circle\"`. */\n circle: {},\n\n /* Styles applied to the root element if `variant=\"circular\"`. */\n circular: {},\n\n /* Styles applied to the root element if `variant=\"rounded\"`. */\n rounded: {\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"square\"`. */\n square: {\n borderRadius: 0\n },\n\n /* Styles applied to the img element if either `src` or `srcSet` is defined. */\n img: {\n width: '100%',\n height: '100%',\n textAlign: 'center',\n // Handle non-square image. The property isn't supported by IE 11.\n objectFit: 'cover',\n // Hide alt text.\n color: 'transparent',\n // Hide the image broken icon, only works on Chrome.\n textIndent: 10000\n },\n\n /* Styles applied to the fallback icon */\n fallback: {\n width: '75%',\n height: '75%'\n }\n };\n};\n\nfunction useLoaded(_ref) {\n var src = _ref.src,\n srcSet = _ref.srcSet;\n\n var _React$useState = React.useState(false),\n loaded = _React$useState[0],\n setLoaded = _React$useState[1];\n\n React.useEffect(function () {\n if (!src && !srcSet) {\n return undefined;\n }\n\n setLoaded(false);\n var active = true;\n var image = new Image();\n image.src = src;\n image.srcSet = srcSet;\n\n image.onload = function () {\n if (!active) {\n return;\n }\n\n setLoaded('loaded');\n };\n\n image.onerror = function () {\n if (!active) {\n return;\n }\n\n setLoaded('error');\n };\n\n return function () {\n active = false;\n };\n }, [src, srcSet]);\n return loaded;\n}\n\nvar Avatar = /*#__PURE__*/React.forwardRef(function Avatar(props, ref) {\n var alt = props.alt,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n imgProps = props.imgProps,\n sizes = props.sizes,\n src = props.src,\n srcSet = props.srcSet,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circular' : _props$variant,\n other = _objectWithoutProperties(props, [\"alt\", \"children\", \"classes\", \"className\", \"component\", \"imgProps\", \"sizes\", \"src\", \"srcSet\", \"variant\"]);\n\n var children = null; // Use a hook instead of onError on the img element to support server-side rendering.\n\n var loaded = useLoaded({\n src: src,\n srcSet: srcSet\n });\n var hasImg = src || srcSet;\n var hasImgNotFailing = hasImg && loaded !== 'error';\n\n if (hasImgNotFailing) {\n children = /*#__PURE__*/React.createElement(\"img\", _extends({\n alt: alt,\n src: src,\n srcSet: srcSet,\n sizes: sizes,\n className: classes.img\n }, imgProps));\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n children = alt[0];\n } else {\n children = /*#__PURE__*/React.createElement(Person, {\n className: classes.fallback\n });\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes.system, classes[variant], className, !hasImgNotFailing && classes.colorDefault),\n ref: ref\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? Avatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Used in combination with `src` or `srcSet` to\n * provide an alt attribute for the rendered `img` element.\n */\n alt: PropTypes.string,\n\n /**\n * Used to render icon or text elements inside the Avatar if `src` is not set.\n * This can be an element, or just a string.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n var classes = props.classes;\n\n if (classes == null) {\n return null;\n }\n\n if (classes.circle != null && // 2 classnames? one from withStyles the other must be custom\n classes.circle.split(' ').length > 1) {\n throw new Error(\"Material-UI: The `circle` class is deprecated. Use `circular` instead.\");\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Attributes applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps: PropTypes.object,\n\n /**\n * The `sizes` attribute for the `img` element.\n */\n sizes: PropTypes.string,\n\n /**\n * The `src` attribute for the `img` element.\n */\n src: PropTypes.string,\n\n /**\n * The `srcSet` attribute for the `img` element.\n * Use this attribute for responsive image display.\n */\n srcSet: PropTypes.string,\n\n /**\n * The shape of the avatar.\n */\n variant: chainPropTypes(PropTypes.oneOf(['circle', 'circular', 'rounded', 'square']), function (props) {\n var variant = props.variant;\n\n if (variant === 'circle') {\n throw new Error('Material-UI: `variant=\"circle\"` is deprecated. Use `variant=\"circular\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAvatar'\n})(Avatar);","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar RADIUS_STANDARD = 10;\nvar RADIUS_DOT = 4;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'inline-flex',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n flexShrink: 0\n },\n\n /* Styles applied to the badge `span` element. */\n badge: {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n boxSizing: 'border-box',\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(12),\n minWidth: RADIUS_STANDARD * 2,\n lineHeight: 1,\n padding: '0 6px',\n height: RADIUS_STANDARD * 2,\n borderRadius: RADIUS_STANDARD,\n zIndex: 1,\n // Render the badge on top of potential ripples.\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.enteringScreen\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.error.contrastText\n },\n\n /* Styles applied to the root element if `variant=\"dot\"`. */\n dot: {\n borderRadius: RADIUS_DOT,\n height: RADIUS_DOT * 2,\n minWidth: RADIUS_DOT * 2,\n padding: 0\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginTopRightRectangle: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangular\"`. */\n anchorOriginTopRightRectangular: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginBottomRightRectangle: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangular\"`. */\n anchorOriginBottomRightRectangular: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginTopLeftRectangle: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangular\"`. */\n anchorOriginTopLeftRectangular: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginBottomLeftRectangle: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangular\"`. */\n anchorOriginBottomLeftRectangular: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circle\"`. */\n anchorOriginTopRightCircle: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circular\"`. */\n anchorOriginTopRightCircular: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circle\"`. */\n anchorOriginBottomRightCircle: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circular\"`. */\n anchorOriginBottomRightCircular: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circle\"`. */\n anchorOriginTopLeftCircle: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circular\"`. */\n anchorOriginTopLeftCircular: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circle\"`. */\n anchorOriginBottomLeftCircle: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circular\"`. */\n anchorOriginBottomLeftCircular: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Pseudo-class to the badge `span` element if `invisible={true}`. */\n invisible: {\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.leavingScreen\n })\n }\n };\n};\nvar Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {\n var _props$anchorOrigin = props.anchorOrigin,\n anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'top',\n horizontal: 'right'\n } : _props$anchorOrigin,\n badgeContent = props.badgeContent,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n ComponentProp = _props$component === void 0 ? 'span' : _props$component,\n invisibleProp = props.invisible,\n _props$max = props.max,\n max = _props$max === void 0 ? 99 : _props$max,\n _props$overlap = props.overlap,\n overlap = _props$overlap === void 0 ? 'rectangle' : _props$overlap,\n _props$showZero = props.showZero,\n showZero = _props$showZero === void 0 ? false : _props$showZero,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchorOrigin\", \"badgeContent\", \"children\", \"classes\", \"className\", \"color\", \"component\", \"invisible\", \"max\", \"overlap\", \"showZero\", \"variant\"]);\n\n var invisible = invisibleProp;\n\n if (invisibleProp == null && (badgeContent === 0 && !showZero || badgeContent == null && variant !== 'dot')) {\n invisible = true;\n }\n\n var displayValue = '';\n\n if (variant !== 'dot') {\n displayValue = badgeContent > max ? \"\".concat(max, \"+\") : badgeContent;\n }\n\n return /*#__PURE__*/React.createElement(ComponentProp, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), children, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.badge, classes[\"\".concat(anchorOrigin.horizontal).concat(capitalize(anchorOrigin.vertical), \"}\")], classes[\"anchorOrigin\".concat(capitalize(anchorOrigin.vertical)).concat(capitalize(anchorOrigin.horizontal)).concat(capitalize(overlap))], color !== 'default' && classes[\"color\".concat(capitalize(color))], invisible && classes.invisible, variant === 'dot' && classes.dot)\n }, displayValue));\n});\nprocess.env.NODE_ENV !== \"production\" ? Badge.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The anchor of the badge.\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The content rendered within the badge.\n */\n badgeContent: PropTypes.node,\n\n /**\n * The badge will be added relative to this node.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n var classes = props.classes;\n\n if (classes == null) {\n return null;\n }\n\n [['anchorOriginTopRightRectangle', 'anchorOriginTopRightRectangular'], ['anchorOriginBottomRightRectangle', 'anchorOriginBottomRightRectangular'], ['anchorOriginTopLeftRectangle', 'anchorOriginTopLeftRectangular'], ['anchorOriginBottomLeftRectangle', 'anchorOriginBottomLeftRectangular'], ['anchorOriginTopRightCircle', 'anchorOriginTopRightCircular'], ['anchorOriginBottomRightCircle', 'anchorOriginBottomRightCircular'], ['anchorOriginTopLeftCircle', 'anchorOriginTopLeftCircular']].forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n deprecatedClassKey = _ref2[0],\n newClassKey = _ref2[1];\n\n if (classes[deprecatedClassKey] != null && // 2 classnames? one from withStyles the other must be custom\n classes[deprecatedClassKey].split(' ').length > 1) {\n throw new Error(\"Material-UI: The `\".concat(deprecatedClassKey, \"` class was deprecated. Use `\").concat(newClassKey, \"` instead.\"));\n }\n });\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'error', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the badge will be invisible.\n */\n invisible: PropTypes.bool,\n\n /**\n * Max count to show.\n */\n max: PropTypes.number,\n\n /**\n * Wrapped shape the badge should overlap.\n */\n overlap: chainPropTypes(PropTypes.oneOf(['circle', 'rectangle', 'circular', 'rectangular']), function (props) {\n var overlap = props.overlap;\n\n if (overlap === 'rectangle') {\n throw new Error('Material-UI: `overlap=\"rectangle\"` was deprecated. Use `overlap=\"rectangular\"` instead.');\n }\n\n if (overlap === 'circle') {\n throw new Error('Material-UI: `overlap=\"circle\"` was deprecated. Use `overlap=\"circular\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Controls whether the badge is hidden when `badgeContent` is zero.\n */\n showZero: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['dot', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBadge'\n})(Badge);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n justifyContent: 'center',\n height: 56,\n backgroundColor: theme.palette.background.paper\n }\n };\n};\nvar BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n onChange = props.onChange,\n _props$showLabels = props.showLabels,\n showLabels = _props$showLabels === void 0 ? false : _props$showLabels,\n value = props.value,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"onChange\", \"showLabels\", \"value\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), React.Children.map(children, function (child, childIndex) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The BottomNavigation component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n return /*#__PURE__*/React.cloneElement(child, {\n selected: childValue === value,\n showLabel: child.props.showLabel !== undefined ? child.props.showLabel : showLabels,\n value: childValue,\n onChange: onChange\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? BottomNavigation.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback.\n * @param {any} value We default to the index of the child.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, all `BottomNavigationAction`s will show their labels.\n * By default, only the selected `BottomNavigationAction` will show its label.\n */\n showLabels: PropTypes.bool,\n\n /**\n * The value of the currently selected `BottomNavigationAction`.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBottomNavigation'\n})(BottomNavigation);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport unsupportedProp from '../utils/unsupportedProp';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n transition: theme.transitions.create(['color', 'padding-top'], {\n duration: theme.transitions.duration.short\n }),\n padding: '6px 12px 8px',\n minWidth: 80,\n maxWidth: 168,\n color: theme.palette.text.secondary,\n flex: '1',\n '&$iconOnly': {\n paddingTop: 16\n },\n '&$selected': {\n paddingTop: 6,\n color: theme.palette.primary.main\n }\n },\n\n /* Pseudo-class applied to the root element if selected. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `showLabel={false}` and not selected. */\n iconOnly: {},\n\n /* Styles applied to the span element that wraps the icon and label. */\n wrapper: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n flexDirection: 'column'\n },\n\n /* Styles applied to the label's span element. */\n label: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(12),\n opacity: 1,\n transition: 'font-size 0.2s, opacity 0.2s',\n transitionDelay: '0.1s',\n '&$iconOnly': {\n opacity: 0,\n transitionDelay: '0s'\n },\n '&$selected': {\n fontSize: theme.typography.pxToRem(14)\n }\n }\n };\n};\nvar BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavigationAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n icon = props.icon,\n label = props.label,\n onChange = props.onChange,\n onClick = props.onClick,\n selected = props.selected,\n showLabel = props.showLabel,\n value = props.value,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"icon\", \"label\", \"onChange\", \"onClick\", \"selected\", \"showLabel\", \"value\"]);\n\n var handleChange = function handleChange(event) {\n if (onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n ref: ref,\n className: clsx(classes.root, className, selected ? classes.selected : !showLabel && classes.iconOnly),\n focusRipple: true,\n onClick: handleChange\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.wrapper\n }, icon, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.label, selected ? classes.selected : !showLabel && classes.iconOnly)\n }, label)));\n});\nprocess.env.NODE_ENV !== \"production\" ? BottomNavigationAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon element.\n */\n icon: PropTypes.node,\n\n /**\n * The label element.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n selected: PropTypes.bool,\n\n /**\n * If `true`, the `BottomNavigationAction` will show its label.\n * By default, only the selected `BottomNavigationAction`\n * inside `BottomNavigation` will show its label.\n */\n showLabel: PropTypes.bool,\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBottomNavigationAction'\n})(BottomNavigationAction);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'MoreHoriz');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport { emphasize } from '../styles/colorManipulator';\nimport MoreHorizIcon from '../internal/svg-icons/MoreHoriz';\nimport ButtonBase from '../ButtonBase';\n\nvar styles = function styles(theme) {\n return {\n root: {\n display: 'flex',\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n backgroundColor: theme.palette.grey[100],\n color: theme.palette.grey[700],\n borderRadius: 2,\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: theme.palette.grey[200]\n },\n '&:active': {\n boxShadow: theme.shadows[0],\n backgroundColor: emphasize(theme.palette.grey[200], 0.12)\n }\n },\n icon: {\n width: 24,\n height: 16\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction BreadcrumbCollapsed(props) {\n var classes = props.classes,\n other = _objectWithoutProperties(props, [\"classes\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"li\",\n className: classes.root,\n focusRipple: true\n }, other), /*#__PURE__*/React.createElement(MoreHorizIcon, {\n className: classes.icon\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? BreadcrumbCollapsed.propTypes = {\n /**\n * @ignore\n */\n classes: PropTypes.object.isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateBreadcrumbCollapsed'\n})(BreadcrumbCollapsed);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport BreadcrumbCollapsed from './BreadcrumbCollapsed';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the ol element. */\n ol: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n padding: 0,\n margin: 0,\n listStyle: 'none'\n },\n\n /* Styles applied to the li element. */\n li: {},\n\n /* Styles applied to the separator element. */\n separator: {\n display: 'flex',\n userSelect: 'none',\n marginLeft: 8,\n marginRight: 8\n }\n};\n\nfunction insertSeparators(items, className, separator) {\n return items.reduce(function (acc, current, index) {\n if (index < items.length - 1) {\n acc = acc.concat(current, /*#__PURE__*/React.createElement(\"li\", {\n \"aria-hidden\": true,\n key: \"separator-\".concat(index),\n className: className\n }, separator));\n } else {\n acc.push(current);\n }\n\n return acc;\n }, []);\n}\n\nvar Breadcrumbs = /*#__PURE__*/React.forwardRef(function Breadcrumbs(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'nav' : _props$component,\n _props$expandText = props.expandText,\n expandText = _props$expandText === void 0 ? 'Show path' : _props$expandText,\n _props$itemsAfterColl = props.itemsAfterCollapse,\n itemsAfterCollapse = _props$itemsAfterColl === void 0 ? 1 : _props$itemsAfterColl,\n _props$itemsBeforeCol = props.itemsBeforeCollapse,\n itemsBeforeCollapse = _props$itemsBeforeCol === void 0 ? 1 : _props$itemsBeforeCol,\n _props$maxItems = props.maxItems,\n maxItems = _props$maxItems === void 0 ? 8 : _props$maxItems,\n _props$separator = props.separator,\n separator = _props$separator === void 0 ? '/' : _props$separator,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"expandText\", \"itemsAfterCollapse\", \"itemsBeforeCollapse\", \"maxItems\", \"separator\"]);\n\n var _React$useState = React.useState(false),\n expanded = _React$useState[0],\n setExpanded = _React$useState[1];\n\n var renderItemsBeforeAndAfter = function renderItemsBeforeAndAfter(allItems) {\n var handleClickExpand = function handleClickExpand(event) {\n setExpanded(true); // The clicked element received the focus but gets removed from the DOM.\n // Let's keep the focus in the component after expanding.\n\n var focusable = event.currentTarget.parentNode.querySelector('a[href],button,[tabindex]');\n\n if (focusable) {\n focusable.focus();\n }\n }; // This defends against someone passing weird input, to ensure that if all\n // items would be shown anyway, we just show all items without the EllipsisItem\n\n\n if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['Material-UI: You have provided an invalid combination of props to the Breadcrumbs.', \"itemsAfterCollapse={\".concat(itemsAfterCollapse, \"} + itemsBeforeCollapse={\").concat(itemsBeforeCollapse, \"} >= maxItems={\").concat(maxItems, \"}\")].join('\\n'));\n }\n\n return allItems;\n }\n\n return [].concat(_toConsumableArray(allItems.slice(0, itemsBeforeCollapse)), [/*#__PURE__*/React.createElement(BreadcrumbCollapsed, {\n \"aria-label\": expandText,\n key: \"ellipsis\",\n onClick: handleClickExpand\n })], _toConsumableArray(allItems.slice(allItems.length - itemsAfterCollapse, allItems.length)));\n };\n\n var allItems = React.Children.toArray(children).filter(function (child) {\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Breadcrumbs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.isValidElement(child);\n }).map(function (child, index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n className: classes.li,\n key: \"child-\".concat(index)\n }, child);\n });\n return /*#__PURE__*/React.createElement(Typography, _extends({\n ref: ref,\n component: Component,\n color: \"textSecondary\",\n className: clsx(classes.root, className)\n }, other), /*#__PURE__*/React.createElement(\"ol\", {\n className: classes.ol\n }, insertSeparators(expanded || maxItems && allItems.length <= maxItems ? allItems : renderItemsBeforeAndAfter(allItems), classes.separator, separator)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Breadcrumbs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The breadcrumb children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default label for the expand button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n expandText: PropTypes.string,\n\n /**\n * If max items is exceeded, the number of items to show after the ellipsis.\n */\n itemsAfterCollapse: PropTypes.number,\n\n /**\n * If max items is exceeded, the number of items to show before the ellipsis.\n */\n itemsBeforeCollapse: PropTypes.number,\n\n /**\n * Specifies the maximum number of breadcrumbs to display. When there are more\n * than the maximum number, only the first `itemsBeforeCollapse` and last `itemsAfterCollapse`\n * will be shown, with an ellipsis in between.\n */\n maxItems: PropTypes.number,\n\n /**\n * Custom separator node.\n */\n separator: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBreadcrumbs'\n})(Breadcrumbs);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport { alpha } from '../styles/colorManipulator';\nimport withStyles from '../styles/withStyles';\nimport Button from '../Button'; // Force a side effect so we don't have any override priority issue.\n// eslint-disable-next-line no-unused-expressions\n\nButton.styles;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n boxShadow: theme.shadows[2]\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none'\n },\n\n /* Pseudo-class applied to child elements if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the children. */\n grouped: {\n minWidth: 40\n },\n\n /* Styles applied to the children if `orientation=\"horizontal\"`. */\n groupedHorizontal: {\n '&:not(:first-child)': {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n }\n },\n\n /* Styles applied to the children if `orientation=\"vertical\"`. */\n groupedVertical: {\n '&:not(:first-child)': {\n borderTopRightRadius: 0,\n borderTopLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"`. */\n groupedText: {},\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"horizontal\"`. */\n groupedTextHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"vertical\"`. */\n groupedTextVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"primary\"`. */\n groupedTextPrimary: {\n '&:not(:last-child)': {\n borderColor: alpha(theme.palette.primary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"secondary\"`. */\n groupedTextSecondary: {\n '&:not(:last-child)': {\n borderColor: alpha(theme.palette.secondary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"`. */\n groupedOutlined: {},\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"horizontal\"`. */\n groupedOutlinedHorizontal: {\n '&:not(:first-child)': {\n marginLeft: -1\n },\n '&:not(:last-child)': {\n borderRightColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"vertical\"`. */\n groupedOutlinedVertical: {\n '&:not(:first-child)': {\n marginTop: -1\n },\n '&:not(:last-child)': {\n borderBottomColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"primary\"`. */\n groupedOutlinedPrimary: {\n '&:hover': {\n borderColor: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"secondary\"`. */\n groupedOutlinedSecondary: {\n '&:hover': {\n borderColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"`. */\n groupedContained: {\n boxShadow: 'none'\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"horizontal\"`. */\n groupedContainedHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderRight: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"vertical\"`. */\n groupedContainedVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderBottom: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"primary\"`. */\n groupedContainedPrimary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.primary.dark\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"secondary\"`. */\n groupedContainedSecondary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.secondary.dark\n }\n }\n };\n};\nvar ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'outlined' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"disableRipple\", \"fullWidth\", \"orientation\", \"size\", \"variant\"]);\n\n var buttonClassName = clsx(classes.grouped, classes[\"grouped\".concat(capitalize(orientation))], classes[\"grouped\".concat(capitalize(variant))], classes[\"grouped\".concat(capitalize(variant)).concat(capitalize(orientation))], classes[\"grouped\".concat(capitalize(variant)).concat(color !== 'default' ? capitalize(color) : '')], disabled && classes.disabled);\n return /*#__PURE__*/React.createElement(Component, _extends({\n role: \"group\",\n className: clsx(classes.root, className, fullWidth && classes.fullWidth, disableElevation && classes.disableElevation, variant === 'contained' && classes.contained, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The ButtonGroup component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.cloneElement(child, {\n className: clsx(buttonClassName, child.props.className),\n color: child.props.color || color,\n disabled: child.props.disabled || disabled,\n disableElevation: child.props.disableElevation || disableElevation,\n disableFocusRipple: disableFocusRipple,\n disableRipple: disableRipple,\n fullWidth: fullWidth,\n size: child.props.size || size,\n variant: child.props.variant || variant\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ButtonGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button group.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the buttons will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the button keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the button ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If `true`, the buttons will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The group orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButtonGroup'\n})(ButtonGroup);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden'\n }\n};\nvar Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$raised = props.raised,\n raised = _props$raised === void 0 ? false : _props$raised,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"raised\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className),\n elevation: raised ? 8 : 1,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Card.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the card will use raised styling.\n */\n raised: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCard'\n})(Card);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n textAlign: 'inherit',\n width: '100%',\n '&:hover $focusHighlight': {\n opacity: theme.palette.action.hoverOpacity\n },\n '&$focusVisible $focusHighlight': {\n opacity: 0.12\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the action area is keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the overlay that covers the action area when it is keyboard focused. */\n focusHighlight: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n opacity: 0,\n backgroundColor: 'currentcolor',\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.short\n })\n }\n };\n};\nvar CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n focusVisibleClassName = props.focusVisibleClassName,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"focusVisibleClassName\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className),\n focusVisibleClassName: clsx(focusVisibleClassName, classes.focusVisible),\n ref: ref\n }, other), children, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.focusHighlight\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActionArea.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActionArea'\n})(CardActionArea);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar CardActions = /*#__PURE__*/React.forwardRef(function CardActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActions'\n})(CardActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n padding: 16,\n '&:last-child': {\n paddingBottom: 24\n }\n }\n};\nvar CardContent = /*#__PURE__*/React.forwardRef(function CardContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardContent'\n})(CardContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 16\n },\n\n /* Styles applied to the avatar element. */\n avatar: {\n flex: '0 0 auto',\n marginRight: 16\n },\n\n /* Styles applied to the action element. */\n action: {\n flex: '0 0 auto',\n alignSelf: 'flex-start',\n marginTop: -8,\n marginRight: -8\n },\n\n /* Styles applied to the content wrapper element. */\n content: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the title Typography element. */\n title: {},\n\n /* Styles applied to the subheader Typography element. */\n subheader: {}\n};\nvar CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader(props, ref) {\n var action = props.action,\n avatar = props.avatar,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n subheaderProp = props.subheader,\n subheaderTypographyProps = props.subheaderTypographyProps,\n titleProp = props.title,\n titleTypographyProps = props.titleTypographyProps,\n other = _objectWithoutProperties(props, [\"action\", \"avatar\", \"classes\", \"className\", \"component\", \"disableTypography\", \"subheader\", \"subheaderTypographyProps\", \"title\", \"titleTypographyProps\"]);\n\n var title = titleProp;\n\n if (title != null && title.type !== Typography && !disableTypography) {\n title = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: avatar ? 'body2' : 'h5',\n className: classes.title,\n component: \"span\",\n display: \"block\"\n }, titleTypographyProps), title);\n }\n\n var subheader = subheaderProp;\n\n if (subheader != null && subheader.type !== Typography && !disableTypography) {\n subheader = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: avatar ? 'body2' : 'body1',\n className: classes.subheader,\n color: \"textSecondary\",\n component: \"span\",\n display: \"block\"\n }, subheaderTypographyProps), subheader);\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), avatar && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.avatar\n }, avatar), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.content\n }, title, subheader), action && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.action\n }, action));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardHeader.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display in the card header.\n */\n action: PropTypes.node,\n\n /**\n * The Avatar for the Card Header.\n */\n avatar: PropTypes.node,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, `subheader` and `title` won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `title` text, and optional `subheader` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n subheader: PropTypes.node,\n\n /**\n * These props will be forwarded to the subheader\n * (as long as disableTypography is not `true`).\n */\n subheaderTypographyProps: PropTypes.object,\n\n /**\n * The content of the Card Title.\n */\n title: PropTypes.node,\n\n /**\n * These props will be forwarded to the title\n * (as long as disableTypography is not `true`).\n */\n titleTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardHeader'\n})(CardHeader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { chainPropTypes } from '@material-ui/utils';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'center'\n },\n\n /* Styles applied to the root element if `component=\"video, audio, picture, iframe, or img\"`. */\n media: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `component=\"picture or img\"`. */\n img: {\n // ⚠️ object-fit is not supported by IE 11.\n objectFit: 'cover'\n }\n};\nvar MEDIA_COMPONENTS = ['video', 'audio', 'picture', 'iframe', 'img'];\nvar CardMedia = /*#__PURE__*/React.forwardRef(function CardMedia(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n image = props.image,\n src = props.src,\n style = props.style,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"image\", \"src\", \"style\"]);\n\n var isMediaComponent = MEDIA_COMPONENTS.indexOf(Component) !== -1;\n var composedStyle = !isMediaComponent && image ? _extends({\n backgroundImage: \"url(\\\"\".concat(image, \"\\\")\")\n }, style) : style;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, isMediaComponent && classes.media, \"picture img\".indexOf(Component) !== -1 && classes.img),\n ref: ref,\n style: composedStyle,\n src: isMediaComponent ? image || src : undefined\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? CardMedia.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n if (!props.children && !props.image && !props.src && !props.component) {\n return new Error('Material-UI: Either `children`, `image`, `src` or `component` prop must be specified.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Image to be displayed as a background image.\n * Either `image` or `src` prop must be specified.\n * Note that caller must specify height otherwise the image will not be visible.\n */\n image: PropTypes.string,\n\n /**\n * An alias for `image` property.\n * Available only with media components.\n * Media components: `video`, `audio`, `picture`, `iframe`, `img`.\n */\n src: PropTypes.string,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardMedia'\n})(CardMedia);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport CancelIcon from '../internal/svg-icons/Cancel';\nimport withStyles from '../styles/withStyles';\nimport { emphasize, alpha } from '../styles/colorManipulator';\nimport useForkRef from '../utils/useForkRef';\nimport unsupportedProp from '../utils/unsupportedProp';\nimport capitalize from '../utils/capitalize';\nimport ButtonBase from '../ButtonBase';\nexport var styles = function styles(theme) {\n var backgroundColor = theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700];\n var deleteIconColor = alpha(theme.palette.text.primary, 0.26);\n return {\n /* Styles applied to the root element. */\n root: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(13),\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32,\n color: theme.palette.getContrastText(backgroundColor),\n backgroundColor: backgroundColor,\n borderRadius: 32 / 2,\n whiteSpace: 'nowrap',\n transition: theme.transitions.create(['background-color', 'box-shadow']),\n // label will inherit this from root, then `clickable` class overrides this for both\n cursor: 'default',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n textDecoration: 'none',\n border: 'none',\n // Remove `button` border\n padding: 0,\n // Remove `button` padding\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n '&$disabled': {\n opacity: 0.5,\n pointerEvents: 'none'\n },\n '& $avatar': {\n marginLeft: 5,\n marginRight: -6,\n width: 24,\n height: 24,\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n fontSize: theme.typography.pxToRem(12)\n },\n '& $avatarColorPrimary': {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.dark\n },\n '& $avatarColorSecondary': {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.dark\n },\n '& $avatarSmall': {\n marginLeft: 4,\n marginRight: -4,\n width: 18,\n height: 18,\n fontSize: theme.typography.pxToRem(10)\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n height: 24\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */\n clickable: {\n userSelect: 'none',\n WebkitTapHighlightColor: 'transparent',\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: emphasize(backgroundColor, 0.08)\n },\n '&:active': {\n boxShadow: theme.shadows[1]\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"primary\"` is defined or `clickable={true}`. */\n clickableColorPrimary: {\n '&:hover, &:focus': {\n backgroundColor: emphasize(theme.palette.primary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"secondary\"` is defined or `clickable={true}`. */\n clickableColorSecondary: {\n '&:hover, &:focus': {\n backgroundColor: emphasize(theme.palette.secondary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` is defined. */\n deletable: {\n '&:focus': {\n backgroundColor: emphasize(backgroundColor, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"primary\"` is defined. */\n deletableColorPrimary: {\n '&:focus': {\n backgroundColor: emphasize(theme.palette.primary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"secondary\"` is defined. */\n deletableColorSecondary: {\n '&:focus': {\n backgroundColor: emphasize(theme.palette.secondary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n backgroundColor: 'transparent',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity)\n },\n '& $avatar': {\n marginLeft: 4\n },\n '& $avatarSmall': {\n marginLeft: 2\n },\n '& $icon': {\n marginLeft: 4\n },\n '& $iconSmall': {\n marginLeft: 2\n },\n '& $deleteIcon': {\n marginRight: 5\n },\n '& $deleteIconSmall': {\n marginRight: 3\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(theme.palette.primary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(theme.palette.secondary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity)\n }\n },\n // TODO v5: remove\n\n /* Styles applied to the `avatar` element. */\n avatar: {},\n\n /* Styles applied to the `avatar` element if `size=\"small\"`. */\n avatarSmall: {},\n\n /* Styles applied to the `avatar` element if `color=\"primary\"`. */\n avatarColorPrimary: {},\n\n /* Styles applied to the `avatar` element if `color=\"secondary\"`. */\n avatarColorSecondary: {},\n\n /* Styles applied to the `icon` element. */\n icon: {\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n marginLeft: 5,\n marginRight: -6\n },\n\n /* Styles applied to the `icon` element if `size=\"small\"`. */\n iconSmall: {\n width: 18,\n height: 18,\n marginLeft: 4,\n marginRight: -4\n },\n\n /* Styles applied to the `icon` element if `color=\"primary\"`. */\n iconColorPrimary: {\n color: 'inherit'\n },\n\n /* Styles applied to the `icon` element if `color=\"secondary\"`. */\n iconColorSecondary: {\n color: 'inherit'\n },\n\n /* Styles applied to the label `span` element. */\n label: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingLeft: 12,\n paddingRight: 12,\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the label `span` element if `size=\"small\"`. */\n labelSmall: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the `deleteIcon` element. */\n deleteIcon: {\n WebkitTapHighlightColor: 'transparent',\n color: deleteIconColor,\n height: 22,\n width: 22,\n cursor: 'pointer',\n margin: '0 5px 0 -6px',\n '&:hover': {\n color: alpha(deleteIconColor, 0.4)\n }\n },\n\n /* Styles applied to the `deleteIcon` element if `size=\"small\"`. */\n deleteIconSmall: {\n height: 16,\n width: 16,\n marginRight: 4,\n marginLeft: -4\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"default\"`. */\n deleteIconColorPrimary: {\n color: alpha(theme.palette.primary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"default\"`. */\n deleteIconColorSecondary: {\n color: alpha(theme.palette.secondary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorPrimary: {\n color: alpha(theme.palette.primary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorSecondary: {\n color: alpha(theme.palette.secondary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.main\n }\n }\n };\n};\n\nfunction isDeleteKeyboardEvent(keyboardEvent) {\n return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';\n}\n/**\n * Chips represent complex entities in small blocks, such as a contact.\n */\n\n\nvar Chip = /*#__PURE__*/React.forwardRef(function Chip(props, ref) {\n var avatarProp = props.avatar,\n classes = props.classes,\n className = props.className,\n clickableProp = props.clickable,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n ComponentProp = props.component,\n deleteIconProp = props.deleteIcon,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n iconProp = props.icon,\n label = props.label,\n onClick = props.onClick,\n onDelete = props.onDelete,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'default' : _props$variant,\n other = _objectWithoutProperties(props, [\"avatar\", \"classes\", \"className\", \"clickable\", \"color\", \"component\", \"deleteIcon\", \"disabled\", \"icon\", \"label\", \"onClick\", \"onDelete\", \"onKeyDown\", \"onKeyUp\", \"size\", \"variant\"]);\n\n var chipRef = React.useRef(null);\n var handleRef = useForkRef(chipRef, ref);\n\n var handleDeleteIconClick = function handleDeleteIconClick(event) {\n // Stop the event from bubbling up to the `Chip`\n event.stopPropagation();\n\n if (onDelete) {\n onDelete(event);\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {\n // will be handled in keyUp, otherwise some browsers\n // might init navigation\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n var handleKeyUp = function handleKeyUp(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target) {\n if (onDelete && isDeleteKeyboardEvent(event)) {\n onDelete(event);\n } else if (event.key === 'Escape' && chipRef.current) {\n chipRef.current.blur();\n }\n }\n\n if (onKeyUp) {\n onKeyUp(event);\n }\n };\n\n var clickable = clickableProp !== false && onClick ? true : clickableProp;\n var small = size === 'small';\n var Component = ComponentProp || (clickable ? ButtonBase : 'div');\n var moreProps = Component === ButtonBase ? {\n component: 'div'\n } : {};\n var deleteIcon = null;\n\n if (onDelete) {\n var customClasses = clsx(color !== 'default' && (variant === \"default\" ? classes[\"deleteIconColor\".concat(capitalize(color))] : classes[\"deleteIconOutlinedColor\".concat(capitalize(color))]), small && classes.deleteIconSmall);\n deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? /*#__PURE__*/React.cloneElement(deleteIconProp, {\n className: clsx(deleteIconProp.props.className, classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n }) : /*#__PURE__*/React.createElement(CancelIcon, {\n className: clsx(classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n });\n }\n\n var avatar = null;\n\n if (avatarProp && /*#__PURE__*/React.isValidElement(avatarProp)) {\n avatar = /*#__PURE__*/React.cloneElement(avatarProp, {\n className: clsx(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes[\"avatarColor\".concat(capitalize(color))])\n });\n }\n\n var icon = null;\n\n if (iconProp && /*#__PURE__*/React.isValidElement(iconProp)) {\n icon = /*#__PURE__*/React.cloneElement(iconProp, {\n className: clsx(classes.icon, iconProp.props.className, small && classes.iconSmall, color !== 'default' && classes[\"iconColor\".concat(capitalize(color))])\n });\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (avatar && icon) {\n console.error('Material-UI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n role: clickable || onDelete ? 'button' : undefined,\n className: clsx(classes.root, className, color !== 'default' && [classes[\"color\".concat(capitalize(color))], clickable && classes[\"clickableColor\".concat(capitalize(color))], onDelete && classes[\"deletableColor\".concat(capitalize(color))]], variant !== \"default\" && [classes.outlined, {\n 'primary': classes.outlinedPrimary,\n 'secondary': classes.outlinedSecondary\n }[color]], disabled && classes.disabled, small && classes.sizeSmall, clickable && classes.clickable, onDelete && classes.deletable),\n \"aria-disabled\": disabled ? true : undefined,\n tabIndex: clickable || onDelete ? 0 : undefined,\n onClick: onClick,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n ref: handleRef\n }, moreProps, other), avatar || icon, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.label, small && classes.labelSmall)\n }, label), deleteIcon);\n});\nprocess.env.NODE_ENV !== \"production\" ? Chip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Avatar element.\n */\n avatar: PropTypes.element,\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the chip will appear clickable, and will raise when pressed,\n * even if the onClick prop is not defined.\n * If false, the chip will not be clickable, even if onClick prop is defined.\n * This can be used, for example,\n * along with the component prop to indicate an anchor Chip is clickable.\n */\n clickable: PropTypes.bool,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default delete icon element. Shown only if `onDelete` is set.\n */\n deleteIcon: PropTypes.element,\n\n /**\n * If `true`, the chip should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * Icon element.\n */\n icon: PropTypes.element,\n\n /**\n * The content of the label.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * Callback function fired when the delete icon is clicked.\n * If set, the delete icon will be shown.\n */\n onDelete: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The size of the chip.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['default', 'outlined'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiChip'\n})(Chip);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar SIZE = 44;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-block'\n },\n\n /* Styles applied to the root element if `variant=\"static\"`. */\n static: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {\n animation: '$circular-rotate 1.4s linear infinite'\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the `svg` element. */\n svg: {\n display: 'block' // Keeps the progress centered\n\n },\n\n /* Styles applied to the `circle` svg path. */\n circle: {\n stroke: 'currentColor' // Use butt to follow the specification, by chance, it's already the default CSS value.\n // strokeLinecap: 'butt',\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"static\"`. */\n circleStatic: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"indeterminate\"`. */\n circleIndeterminate: {\n animation: '$circular-dash 1.4s ease-in-out infinite',\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: '0px' // Add the unit to fix a Edge 16 and below bug.\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"determinate\"`. */\n circleDeterminate: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n '@keyframes circular-rotate': {\n '0%': {\n // Fix IE 11 wobbly\n transformOrigin: '50% 50%'\n },\n '100%': {\n transform: 'rotate(360deg)'\n }\n },\n '@keyframes circular-dash': {\n '0%': {\n strokeDasharray: '1px, 200px',\n strokeDashoffset: '0px'\n },\n '50%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-15px'\n },\n '100%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-125px'\n }\n },\n\n /* Styles applied to the `circle` svg path if `disableShrink={true}`. */\n circleDisableShrink: {\n animation: 'none'\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$disableShrink = props.disableShrink,\n disableShrink = _props$disableShrink === void 0 ? false : _props$disableShrink,\n _props$size = props.size,\n size = _props$size === void 0 ? 40 : _props$size,\n style = props.style,\n _props$thickness = props.thickness,\n thickness = _props$thickness === void 0 ? 3.6 : _props$thickness,\n _props$value = props.value,\n value = _props$value === void 0 ? 0 : _props$value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"disableShrink\", \"size\", \"style\", \"thickness\", \"value\", \"variant\"]);\n\n var circleStyle = {};\n var rootStyle = {};\n var rootProps = {};\n\n if (variant === 'determinate' || variant === 'static') {\n var circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = \"\".concat(((100 - value) / 100 * circumference).toFixed(3), \"px\");\n rootStyle.transform = 'rotate(-90deg)';\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'static': classes.static\n }[variant]),\n style: _extends({\n width: size,\n height: size\n }, rootStyle, style),\n ref: ref,\n role: \"progressbar\"\n }, rootProps, other), /*#__PURE__*/React.createElement(\"svg\", {\n className: classes.svg,\n viewBox: \"\".concat(SIZE / 2, \" \").concat(SIZE / 2, \" \").concat(SIZE, \" \").concat(SIZE)\n }, /*#__PURE__*/React.createElement(\"circle\", {\n className: clsx(classes.circle, disableShrink && classes.circleDisableShrink, {\n 'determinate': classes.circleDeterminate,\n 'indeterminate': classes.circleIndeterminate,\n 'static': classes.circleStatic\n }[variant]),\n style: circleStyle,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n */\n disableShrink: chainPropTypes(PropTypes.bool, function (props) {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('Material-UI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n\n return null;\n }),\n\n /**\n * The size of the circle.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, e.g '3rem'.\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The thickness of the circle.\n */\n thickness: PropTypes.number,\n\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n */\n variant: chainPropTypes(PropTypes.oneOf(['determinate', 'indeterminate', 'static']), function (props) {\n var variant = props.variant;\n\n if (variant === 'static') {\n throw new Error('Material-UI: `variant=\"static\"` was deprecated. Use `variant=\"determinate\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCircularProgress',\n flip: false\n})(CircularProgress);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _defineProperty({\n width: '100%',\n marginLeft: 'auto',\n boxSizing: 'border-box',\n marginRight: 'auto',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n display: 'block'\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `disableGutters={true}`. */\n disableGutters: {\n paddingLeft: 0,\n paddingRight: 0\n },\n\n /* Styles applied to the root element if `fixed={true}`. */\n fixed: Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {\n var value = theme.breakpoints.values[breakpoint];\n\n if (value !== 0) {\n acc[theme.breakpoints.up(breakpoint)] = {\n maxWidth: value\n };\n }\n\n return acc;\n }, {}),\n\n /* Styles applied to the root element if `maxWidth=\"xs\"`. */\n maxWidthXs: _defineProperty({}, theme.breakpoints.up('xs'), {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444)\n }),\n\n /* Styles applied to the root element if `maxWidth=\"sm\"`. */\n maxWidthSm: _defineProperty({}, theme.breakpoints.up('sm'), {\n maxWidth: theme.breakpoints.values.sm\n }),\n\n /* Styles applied to the root element if `maxWidth=\"md\"`. */\n maxWidthMd: _defineProperty({}, theme.breakpoints.up('md'), {\n maxWidth: theme.breakpoints.values.md\n }),\n\n /* Styles applied to the root element if `maxWidth=\"lg\"`. */\n maxWidthLg: _defineProperty({}, theme.breakpoints.up('lg'), {\n maxWidth: theme.breakpoints.values.lg\n }),\n\n /* Styles applied to the root element if `maxWidth=\"xl\"`. */\n maxWidthXl: _defineProperty({}, theme.breakpoints.up('xl'), {\n maxWidth: theme.breakpoints.values.xl\n })\n };\n};\nvar Container = /*#__PURE__*/React.forwardRef(function Container(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$fixed = props.fixed,\n fixed = _props$fixed === void 0 ? false : _props$fixed,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"fixed\", \"maxWidth\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, fixed && classes.fixed, disableGutters && classes.disableGutters, maxWidth !== false && classes[\"maxWidth\".concat(capitalize(String(maxWidth)))]),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Container.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * Set the max-width to match the min-width of the current breakpoint.\n * This is useful if you'd prefer to design for a fixed set of sizes\n * instead of trying to accommodate a fully fluid viewport.\n * It's fluid by default.\n */\n fixed: PropTypes.bool,\n\n /**\n * Determine the max-width of the container.\n * The container width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiContainer'\n})(Container);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport { exactProp } from '@material-ui/utils';\nexport var html = {\n WebkitFontSmoothing: 'antialiased',\n // Antialiasing.\n MozOsxFontSmoothing: 'grayscale',\n // Antialiasing.\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: 'border-box'\n};\nexport var body = function body(theme) {\n return _extends({\n color: theme.palette.text.primary\n }, theme.typography.body2, {\n backgroundColor: theme.palette.background.default,\n '@media print': {\n // Save printer ink.\n backgroundColor: theme.palette.common.white\n }\n });\n};\nexport var styles = function styles(theme) {\n return {\n '@global': {\n html: html,\n '*, *::before, *::after': {\n boxSizing: 'inherit'\n },\n 'strong, b': {\n fontWeight: theme.typography.fontWeightBold\n },\n body: _extends({\n margin: 0\n }, body(theme), {\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n '&::backdrop': {\n backgroundColor: theme.palette.background.default\n }\n })\n }\n };\n};\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n */\n\nfunction CssBaseline(props) {\n /* eslint-disable no-unused-vars */\n var _props$children = props.children,\n children = _props$children === void 0 ? null : _props$children,\n classes = props.classes;\n /* eslint-enable no-unused-vars */\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? CssBaseline.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n CssBaseline['propTypes' + ''] = exactProp(CssBaseline.propTypes);\n}\n\nexport default withStyles(styles, {\n name: 'MuiCssBaseline'\n})(CssBaseline);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 1,\n margin: 0,\n // Reset browser default style.\n border: 'none',\n flexShrink: 0,\n backgroundColor: theme.palette.divider\n },\n\n /* Styles applied to the root element if `absolute={true}`. */\n absolute: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n },\n\n /* Styles applied to the root element if `variant=\"inset\"`. */\n inset: {\n marginLeft: 72\n },\n\n /* Styles applied to the root element if `light={true}`. */\n light: {\n backgroundColor: alpha(theme.palette.divider, 0.08)\n },\n\n /* Styles applied to the root element if `variant=\"middle\"`. */\n middle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n height: '100%',\n width: 1\n },\n\n /* Styles applied to the root element if `flexItem={true}`. */\n flexItem: {\n alignSelf: 'stretch',\n height: 'auto'\n }\n };\n};\nvar Divider = /*#__PURE__*/React.forwardRef(function Divider(props, ref) {\n var _props$absolute = props.absolute,\n absolute = _props$absolute === void 0 ? false : _props$absolute,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'hr' : _props$component,\n _props$flexItem = props.flexItem,\n flexItem = _props$flexItem === void 0 ? false : _props$flexItem,\n _props$light = props.light,\n light = _props$light === void 0 ? false : _props$light,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$role = props.role,\n role = _props$role === void 0 ? Component !== 'hr' ? 'separator' : undefined : _props$role,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'fullWidth' : _props$variant,\n other = _objectWithoutProperties(props, [\"absolute\", \"classes\", \"className\", \"component\", \"flexItem\", \"light\", \"orientation\", \"role\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, variant !== 'fullWidth' && classes[variant], absolute && classes.absolute, flexItem && classes.flexItem, light && classes.light, orientation === 'vertical' && classes.vertical),\n role: role,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Absolutely position the element.\n */\n absolute: PropTypes.bool,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n */\n flexItem: PropTypes.bool,\n\n /**\n * If `true`, the divider will have a lighter color.\n */\n light: PropTypes.bool,\n\n /**\n * The divider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * @ignore\n */\n role: PropTypes.string,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['fullWidth', 'inset', 'middle'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDivider'\n})(Divider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Modal from '../Modal';\nimport Backdrop from '../Backdrop';\nimport withStyles from '../styles/withStyles';\nimport Slide from '../Slide';\nimport Paper from '../Paper';\nimport capitalize from '../utils/capitalize';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `variant=\"permanent or persistent\"`. */\n docked: {\n flex: '0 0 auto'\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n flex: '1 0 auto',\n zIndex: theme.zIndex.drawer,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n // temporary style\n position: 'fixed',\n top: 0,\n // We disable the focus ring for mouse, touch and keyboard users.\n // At some point, it would be better to keep it for keyboard users.\n // :focus-ring CSS pseudo-class will help.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"`. */\n paperAnchorLeft: {\n left: 0,\n right: 'auto'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"`. */\n paperAnchorRight: {\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"`. */\n paperAnchorTop: {\n top: 0,\n left: 0,\n bottom: 'auto',\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"`. */\n paperAnchorBottom: {\n top: 'auto',\n left: 0,\n bottom: 0,\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"` and `variant` is not \"temporary\". */\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"` and `variant` is not \"temporary\". */\n paperAnchorDockedTop: {\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"` and `variant` is not \"temporary\". */\n paperAnchorDockedRight: {\n borderLeft: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"` and `variant` is not \"temporary\". */\n paperAnchorDockedBottom: {\n borderTop: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Modal` component. */\n modal: {}\n };\n};\nvar oppositeDirection = {\n left: 'right',\n right: 'left',\n top: 'down',\n bottom: 'up'\n};\nexport function isHorizontal(anchor) {\n return ['left', 'right'].indexOf(anchor) !== -1;\n}\nexport function getAnchor(theme, anchor) {\n return theme.direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor;\n}\nvar defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The props of the [Modal](/api/modal/) component are available\n * when `variant=\"temporary\"` is set.\n */\n\nvar Drawer = /*#__PURE__*/React.forwardRef(function Drawer(props, ref) {\n var _props$anchor = props.anchor,\n anchorProp = _props$anchor === void 0 ? 'left' : _props$anchor,\n BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 16 : _props$elevation,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropPropsProp = _props$ModalProps.BackdropProps,\n ModalProps = _objectWithoutProperties(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n _props$open = props.open,\n open = _props$open === void 0 ? false : _props$open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SlideProps = props.SlideProps,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Slide : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchor\", \"BackdropProps\", \"children\", \"classes\", \"className\", \"elevation\", \"ModalProps\", \"onClose\", \"open\", \"PaperProps\", \"SlideProps\", \"TransitionComponent\", \"transitionDuration\", \"variant\"]);\n\n var theme = useTheme(); // Let's assume that the Drawer will always be rendered on user space.\n // We use this state is order to skip the appear transition during the\n // initial mount of the component.\n\n var mounted = React.useRef(false);\n React.useEffect(function () {\n mounted.current = true;\n }, []);\n var anchor = getAnchor(theme, anchorProp);\n var drawer = /*#__PURE__*/React.createElement(Paper, _extends({\n elevation: variant === 'temporary' ? elevation : 0,\n square: true\n }, PaperProps, {\n className: clsx(classes.paper, classes[\"paperAnchor\".concat(capitalize(anchor))], PaperProps.className, variant !== 'temporary' && classes[\"paperAnchorDocked\".concat(capitalize(anchor))])\n }), children);\n\n if (variant === 'permanent') {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes.docked, className),\n ref: ref\n }, other), drawer);\n }\n\n var slidingDrawer = /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: open,\n direction: oppositeDirection[anchor],\n timeout: transitionDuration,\n appear: mounted.current\n }, SlideProps), drawer);\n\n if (variant === 'persistent') {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes.docked, className),\n ref: ref\n }, other), slidingDrawer);\n } // variant === temporary\n\n\n return /*#__PURE__*/React.createElement(Modal, _extends({\n BackdropProps: _extends({}, BackdropProps, BackdropPropsProp, {\n transitionDuration: transitionDuration\n }),\n BackdropComponent: Backdrop,\n className: clsx(classes.root, classes.modal, className),\n open: open,\n onClose: onClose,\n ref: ref\n }, other, ModalProps), slidingDrawer);\n});\nprocess.env.NODE_ENV !== \"production\" ? Drawer.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Side from which the drawer will appear.\n */\n anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * The contents of the drawer.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The elevation of the drawer.\n */\n elevation: PropTypes.number,\n\n /**\n * Props applied to the [`Modal`](/api/modal/) element.\n */\n ModalProps: PropTypes.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the drawer is open.\n */\n open: PropTypes.bool,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Props applied to the [`Slide`](/api/slide/) element.\n */\n SlideProps: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDrawer',\n flip: false\n})(Drawer);","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar ExpansionPanelContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ExpansionPanelContext.displayName = 'ExpansionPanelContext';\n}\n\nexport default ExpansionPanelContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport ExpansionPanelContext from './ExpansionPanelContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanel component was renamed to Accordion to use a more common naming convention.\n *\n * You should use `import { Accordion } from '@material-ui/core'`\n * or `import Accordion from '@material-ui/core/Accordion'`.\n */\n\nvar ExpansionPanel = /*#__PURE__*/React.forwardRef(function ExpansionPanel(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanel component was renamed to Accordion to use a more common naming convention.', '', \"You should use `import { Accordion } from '@material-ui/core'`\", \"or `import Accordion from '@material-ui/core/Accordion'`\"].join('\\n'));\n }\n }\n\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'ExpansionPanel',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(ExpansionPanelContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The ExpansionPanel doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of ExpansionPanel to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the panel by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the panel will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the panel, otherwise collapse it.\n * Setting this prop enables control over the panel.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the panel.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanel'\n})(ExpansionPanel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.\n *\n * You should use `import { AccordionActions } from '@material-ui/core'`\n * or `import AccordionActions from '@material-ui/core/AccordionActions'`.\n */\n\nvar ExpansionPanelActions = /*#__PURE__*/React.forwardRef(function ExpansionPanelActions(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.', '', \"You should use `import { AccordionActions } from '@material-ui/core'`\", \"or `import AccordionActions from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelActions'\n})(ExpansionPanelActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.\n *\n * You should use `import { AccordionDetails } from '@material-ui/core'`\n * or `import AccordionDetails from '@material-ui/core/AccordionDetails'`.\n */\n\nvar ExpansionPanelDetails = /*#__PURE__*/React.forwardRef(function ExpansionPanelDetails(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.', '', \"You should use `import { AccordionDetails } from '@material-ui/core'`\", \"or `import AccordionDetails from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelDetails'\n})(ExpansionPanelDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport ExpansionPanelContext from '../ExpansionPanel/ExpansionPanelContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.\n *\n * You should use `import { AccordionSummary } from '@material-ui/core'`\n * or `import AccordionSummary from '@material-ui/core/AccordionSummary'`.\n */\n\nvar ExpansionPanelSummary = /*#__PURE__*/React.forwardRef(function ExpansionPanelSummary(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.', '', \"You should use `import { AccordionSummary } from '@material-ui/core'`\", \"or `import AccordionSummary from '@material-ui/core/AccordionSummary'`\"].join('\\n'));\n }\n }\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n IconButtonProps = props.IconButtonProps,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocusVisible = props.onFocusVisible,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"IconButtonProps\", \"onBlur\", \"onClick\", \"onFocusVisible\"]);\n\n var _React$useState = React.useState(false),\n focusedState = _React$useState[0],\n setFocusedState = _React$useState[1];\n\n var handleFocusVisible = function handleFocusVisible(event) {\n setFocusedState(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n setFocusedState(false);\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var _React$useContext = React.useContext(ExpansionPanelContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded, focusedState && classes.focused),\n onFocusVisible: handleFocusVisible,\n onBlur: handleBlur,\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelSummary'\n})(ExpansionPanelSummary);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'wrap'\n },\n\n /* Styles applied to the root element if `row={true}`. */\n row: {\n flexDirection: 'row'\n }\n};\n/**\n * `FormGroup` wraps controls such as `Checkbox` and `Switch`.\n * It provides compact row layout.\n * For the `Radio`, you should be using the `RadioGroup` component instead of this one.\n */\n\nvar FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$row = props.row,\n row = _props$row === void 0 ? false : _props$row,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"row\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, row && classes.row),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display group of elements in a compact row.\n */\n row: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormGroup'\n})(FormGroup);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.\n *\n * You should use `import { ImageList } from '@material-ui/core'`\n * or `import ImageList from '@material-ui/core/ImageList'`.\n */\n\nvar GridList = /*#__PURE__*/React.forwardRef(function GridList(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridList component was renamed to ImageList to align with the current Material Design naming.', '', \"You should use `import { ImageList } from '@material-ui/core'`\", \"or `import ImageList from '@material-ui/core/ImageList'`.\"].join('\\n'));\n }\n }\n\n var _props$cellHeight = props.cellHeight,\n cellHeight = _props$cellHeight === void 0 ? 180 : _props$cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? 4 : _props$spacing,\n style = props.style,\n other = _objectWithoutProperties(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"spacing\", \"style\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n style: _extends({\n margin: -spacing / 2\n }, style)\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The GridList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/React.cloneElement(child, {\n style: _extends({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: cellHeight === 'auto' ? 'auto' : cellHeight * childRows + spacing,\n padding: spacing / 2\n }, child.props.style)\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridList.propTypes = {\n /**\n * Number of px for one cell height.\n * You can set `'auto'` if you want to let the children determine the height.\n */\n cellHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]),\n\n /**\n * Grid Tiles that will be in Grid List.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Number of columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Number of px for the spacing between tiles.\n */\n spacing: PropTypes.number,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridList'\n})(GridList);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport debounce from '../utils/debounce';\nimport withStyles from '../styles/withStyles';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n tile: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, _toConsumableArray(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, _toConsumableArray(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, _toConsumableArray(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, _toConsumableArray(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar warnedOnce = false;\n/**\n * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.\n *\n * You should use `import { ImageListItem } from '@material-ui/core'`\n * or `import ImageListItem from '@material-ui/core/ImageListItem'`.\n */\n\nvar GridListTile = /*#__PURE__*/React.forwardRef(function GridListTile(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridListTile component was renamed to ImageListItem to align with the current Material Design naming.', '', \"You should use `import { ImageListItem } from '@material-ui/core'`\", \"or `import ImageListItem from '@material-ui/core/ImageListItem'`.\"].join('\\n'));\n }\n } // cols rows default values are for docs only\n\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = React.useRef(null);\n React.useEffect(function () {\n ensureImageCover(imgRef.current, classes);\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.tile\n }, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTile.propTypes = {\n /**\n * Theoretically you can pass any node as children, but the main use case is to pass an img,\n * in which case GridListTile takes care of making the image \"cover\" available space\n * (similar to `background-size: cover` or to `object-fit: cover`).\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Width of the tile in number of grid cells.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the tile in number of grid cells.\n */\n rows: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTile'\n})(GridListTile);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `titlePosition=\"bottom\"`. */\n titlePositionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `titlePosition=\"top\"`. */\n titlePositionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.\n *\n * You should use `import { ImageListItemBar } from '@material-ui/core'`\n * or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.\n */\n\nvar GridListTileBar = /*#__PURE__*/React.forwardRef(function GridListTileBar(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.', '', \"You should use `import { ImageListItemBar } from '@material-ui/core'`\", \"or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.\"].join('\\n'));\n }\n }\n\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$titlePosition = props.titlePosition,\n titlePosition = _props$titlePosition === void 0 ? 'bottom' : _props$titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"titlePosition\"]);\n\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, titlePosition === 'top' ? classes.titlePositionTop : classes.titlePositionBottom, subtitle && classes.rootSubtitle),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTileBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the tile itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on tile.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n */\n titlePosition: PropTypes.oneOf(['bottom', 'top'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTileBar'\n})(GridListTileBar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { getThemeProps, useTheme } from '@material-ui/styles';\nexport default function useMediaQuery(queryInput) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var theme = useTheme();\n var props = getThemeProps({\n theme: theme,\n name: 'MuiUseMediaQuery',\n props: {}\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['Material-UI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n var query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, ''); // Wait for jsdom to support the match media feature.\n // All the browsers Material-UI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n\n var supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n\n var _props$options = _extends({}, props, options),\n _props$options$defaul = _props$options.defaultMatches,\n defaultMatches = _props$options$defaul === void 0 ? false : _props$options$defaul,\n _props$options$matchM = _props$options.matchMedia,\n matchMedia = _props$options$matchM === void 0 ? supportMatchMedia ? window.matchMedia : null : _props$options$matchM,\n _props$options$noSsr = _props$options.noSsr,\n noSsr = _props$options$noSsr === void 0 ? false : _props$options$noSsr,\n _props$options$ssrMat = _props$options.ssrMatchMedia,\n ssrMatchMedia = _props$options$ssrMat === void 0 ? null : _props$options$ssrMat;\n\n var _React$useState = React.useState(function () {\n if (noSsr && supportMatchMedia) {\n return matchMedia(query).matches;\n }\n\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n } // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n\n\n return defaultMatches;\n }),\n match = _React$useState[0],\n setMatch = _React$useState[1];\n\n React.useEffect(function () {\n var active = true;\n\n if (!supportMatchMedia) {\n return undefined;\n }\n\n var queryList = matchMedia(query);\n\n var updateMatch = function updateMatch() {\n // Workaround Safari wrong implementation of matchMedia\n // TODO can we remove it?\n // https://github.com/mui-org/material-ui/pull/17315#issuecomment-528286677\n if (active) {\n setMatch(queryList.matches);\n }\n };\n\n updateMatch();\n queryList.addListener(updateMatch);\n return function () {\n active = false;\n queryList.removeListener(updateMatch);\n };\n }, [query, matchMedia, supportMatchMedia]);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue({\n query: query,\n match: match\n });\n }\n\n return match;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { getDisplayName } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport useTheme from '../styles/useTheme';\nimport { keys as breakpointKeys } from '../styles/createBreakpoints';\nimport useMediaQuery from '../useMediaQuery'; // By default, returns true if screen width is the same or greater than the given breakpoint.\n\nexport var isWidthUp = function isWidthUp(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return breakpointKeys.indexOf(breakpoint) <= breakpointKeys.indexOf(width);\n }\n\n return breakpointKeys.indexOf(breakpoint) < breakpointKeys.indexOf(width);\n}; // By default, returns true if screen width is the same or less than the given breakpoint.\n\nexport var isWidthDown = function isWidthDown(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return breakpointKeys.indexOf(width) <= breakpointKeys.indexOf(breakpoint);\n }\n\n return breakpointKeys.indexOf(width) < breakpointKeys.indexOf(breakpoint);\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nvar withWidth = function withWidth() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (Component) {\n var _options$withTheme = options.withTheme,\n withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme,\n _options$noSSR = options.noSSR,\n noSSR = _options$noSSR === void 0 ? false : _options$noSSR,\n initialWidthOption = options.initialWidth;\n\n function WithWidth(props) {\n var contextTheme = useTheme();\n var theme = props.theme || contextTheme;\n\n var _getThemeProps = getThemeProps({\n theme: theme,\n name: 'MuiWithWidth',\n props: _extends({}, props)\n }),\n initialWidth = _getThemeProps.initialWidth,\n width = _getThemeProps.width,\n other = _objectWithoutProperties(_getThemeProps, [\"initialWidth\", \"width\"]);\n\n var _React$useState = React.useState(false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n setMountedState(true);\n }, []);\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n var keys = theme.breakpoints.keys.slice().reverse();\n var widthComputed = keys.reduce(function (output, key) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var matches = useMediaQuery(theme.breakpoints.up(key));\n return !output && matches ? key : output;\n }, null);\n\n var more = _extends({\n width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption\n }, withThemeOption ? {\n theme: theme\n } : {}, other); // When rendering the component on the server,\n // we have no idea about the client browser screen width.\n // In order to prevent blinks and help the reconciliation of the React tree\n // we are not rendering the child component.\n //\n // An alternative is to use the `initialWidth` property.\n\n\n if (more.width === undefined) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(Component, more);\n }\n\n process.env.NODE_ENV !== \"production\" ? WithWidth.propTypes = {\n /**\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * @ignore\n */\n theme: PropTypes.object,\n\n /**\n * Bypass the width calculation logic.\n */\n width: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithWidth.displayName = \"WithWidth(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithWidth, Component);\n return WithWidth;\n };\n};\n\nexport default withWidth;","import PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport withWidth, { isWidthDown, isWidthUp } from '../withWidth';\nimport useTheme from '../styles/useTheme';\n/**\n * @ignore - internal component.\n */\n\nfunction HiddenJs(props) {\n var children = props.children,\n only = props.only,\n width = props.width;\n var theme = useTheme();\n var visible = true; // `only` check is faster to get out sooner if used.\n\n if (only) {\n if (Array.isArray(only)) {\n for (var i = 0; i < only.length; i += 1) {\n var breakpoint = only[i];\n\n if (width === breakpoint) {\n visible = false;\n break;\n }\n }\n } else if (only && width === only) {\n visible = false;\n }\n } // Allow `only` to be combined with other props. If already hidden, no need to check others.\n\n\n if (visible) {\n // determine visibility based on the smallest size up\n for (var _i = 0; _i < theme.breakpoints.keys.length; _i += 1) {\n var _breakpoint = theme.breakpoints.keys[_i];\n var breakpointUp = props[\"\".concat(_breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(_breakpoint, \"Down\")];\n\n if (breakpointUp && isWidthUp(_breakpoint, width) || breakpointDown && isWidthDown(_breakpoint, width)) {\n visible = false;\n break;\n }\n }\n }\n\n if (!visible) {\n return null;\n }\n\n return children;\n}\n\nHiddenJs.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * @ignore\n * width prop provided by withWidth decorator.\n */\n width: PropTypes.string.isRequired,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n};\n\nif (process.env.NODE_ENV !== 'production') {\n HiddenJs.propTypes = exactProp(HiddenJs.propTypes);\n}\n\nexport default withWidth()(HiddenJs);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\n\nvar styles = function styles(theme) {\n var hidden = {\n display: 'none'\n };\n return theme.breakpoints.keys.reduce(function (acc, key) {\n acc[\"only\".concat(capitalize(key))] = _defineProperty({}, theme.breakpoints.only(key), hidden);\n acc[\"\".concat(key, \"Up\")] = _defineProperty({}, theme.breakpoints.up(key), hidden);\n acc[\"\".concat(key, \"Down\")] = _defineProperty({}, theme.breakpoints.down(key), hidden);\n return acc;\n }, {});\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction HiddenCss(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n only = props.only,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"only\"]);\n\n var theme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n var unknownProps = Object.keys(other).filter(function (propName) {\n var isUndeclaredBreakpoint = !theme.breakpoints.keys.some(function (breakpoint) {\n return \"\".concat(breakpoint, \"Up\") === propName || \"\".concat(breakpoint, \"Down\") === propName;\n });\n return isUndeclaredBreakpoint;\n });\n\n if (unknownProps.length > 0) {\n console.error(\"Material-UI: Unsupported props received by ``: \".concat(unknownProps.join(', '), \". Did you forget to wrap this component in a ThemeProvider declaring these breakpoints?\"));\n }\n }\n\n var clsx = [];\n\n if (className) {\n clsx.push(className);\n }\n\n for (var i = 0; i < theme.breakpoints.keys.length; i += 1) {\n var breakpoint = theme.breakpoints.keys[i];\n var breakpointUp = props[\"\".concat(breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(breakpoint, \"Down\")];\n\n if (breakpointUp) {\n clsx.push(classes[\"\".concat(breakpoint, \"Up\")]);\n }\n\n if (breakpointDown) {\n clsx.push(classes[\"\".concat(breakpoint, \"Down\")]);\n }\n }\n\n if (only) {\n var onlyBreakpoints = Array.isArray(only) ? only : [only];\n onlyBreakpoints.forEach(function (breakpoint) {\n clsx.push(classes[\"only\".concat(capitalize(breakpoint))]);\n });\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: clsx.join(' ')\n }, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? HiddenCss.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateHiddenCss'\n})(HiddenCss);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport HiddenJs from './HiddenJs';\nimport HiddenCss from './HiddenCss';\n/**\n * Responsively hides children based on the selected implementation.\n */\n\nfunction Hidden(props) {\n var _props$implementation = props.implementation,\n implementation = _props$implementation === void 0 ? 'js' : _props$implementation,\n _props$lgDown = props.lgDown,\n lgDown = _props$lgDown === void 0 ? false : _props$lgDown,\n _props$lgUp = props.lgUp,\n lgUp = _props$lgUp === void 0 ? false : _props$lgUp,\n _props$mdDown = props.mdDown,\n mdDown = _props$mdDown === void 0 ? false : _props$mdDown,\n _props$mdUp = props.mdUp,\n mdUp = _props$mdUp === void 0 ? false : _props$mdUp,\n _props$smDown = props.smDown,\n smDown = _props$smDown === void 0 ? false : _props$smDown,\n _props$smUp = props.smUp,\n smUp = _props$smUp === void 0 ? false : _props$smUp,\n _props$xlDown = props.xlDown,\n xlDown = _props$xlDown === void 0 ? false : _props$xlDown,\n _props$xlUp = props.xlUp,\n xlUp = _props$xlUp === void 0 ? false : _props$xlUp,\n _props$xsDown = props.xsDown,\n xsDown = _props$xsDown === void 0 ? false : _props$xsDown,\n _props$xsUp = props.xsUp,\n xsUp = _props$xsUp === void 0 ? false : _props$xsUp,\n other = _objectWithoutProperties(props, [\"implementation\", \"lgDown\", \"lgUp\", \"mdDown\", \"mdUp\", \"smDown\", \"smUp\", \"xlDown\", \"xlUp\", \"xsDown\", \"xsUp\"]);\n\n if (implementation === 'js') {\n return /*#__PURE__*/React.createElement(HiddenJs, _extends({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n }\n\n return /*#__PURE__*/React.createElement(HiddenCss, _extends({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Hidden.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n} : void 0;\nexport default Hidden;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n fontSize: theme.typography.pxToRem(24),\n width: '1em',\n height: '1em',\n // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541\n // To remove at some point.\n overflow: 'hidden',\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(36)\n }\n };\n};\nvar Icon = /*#__PURE__*/React.forwardRef(function Icon(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"fontSize\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx('material-icons', classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n \"aria-hidden\": true,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Icon.propTypes = {\n /**\n * The name of the icon font ligature.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nIcon.muiName = 'Icon';\nexport default withStyles(styles, {\n name: 'MuiIcon'\n})(Icon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar ImageList = /*#__PURE__*/React.forwardRef(function ImageList(props, ref) {\n var cellHeight = props.cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$gap = props.gap,\n gapProp = _props$gap === void 0 ? 4 : _props$gap,\n _props$rowHeight = props.rowHeight,\n rowHeightProp = _props$rowHeight === void 0 ? 180 : _props$rowHeight,\n spacing = props.spacing,\n style = props.style,\n other = _objectWithoutProperties(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"gap\", \"rowHeight\", \"spacing\", \"style\"]);\n\n var gap = spacing || gapProp;\n var rowHeight = cellHeight || rowHeightProp;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n style: _extends({\n margin: -gap / 2\n }, style)\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The ImageList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/React.cloneElement(child, {\n style: _extends({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: rowHeight === 'auto' ? 'auto' : rowHeight * childRows + gap,\n padding: gap / 2\n }, child.props.style)\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageList.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Cell height in `px`.\n * Set to `'auto'` to let the children determine the height.\n * @deprecated Use rowHeight instead.\n */\n cellHeight: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]), 'Use the `rowHeight` prop instead.'),\n\n /**\n * Items that will be in the image list.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Number of columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The gap between items in `px`.\n */\n gap: PropTypes.number,\n\n /**\n * The height of one row in `px`.\n */\n rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n\n /**\n * The spacing between items in `px`.\n * @deprecated Use gap instead.\n */\n spacing: deprecatedPropType(PropTypes.number, 'Use the `gap` prop instead.'),\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageList'\n})(ImageList);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport debounce from '../utils/debounce';\nimport withStyles from '../styles/withStyles';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n item: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the item. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the item. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, _toConsumableArray(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, _toConsumableArray(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, _toConsumableArray(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, _toConsumableArray(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(props, ref) {\n // cols rows default values are for docs only\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = React.useRef(null);\n React.useEffect(function () {\n ensureImageCover(imgRef.current, classes);\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.item\n }, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItem.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * While you can pass any node as children, the main use case is for an img.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Width of the item in number of grid columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the item in number of grid rows.\n */\n rows: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageListItem'\n})(ImageListItem);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar ImageListItemBar = /*#__PURE__*/React.forwardRef(function ImageListItemBar(props, ref) {\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$position = props.position,\n positionProp = _props$position === void 0 ? 'bottom' : _props$position,\n titlePosition = props.titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"position\", \"titlePosition\"]);\n\n var position = titlePosition || positionProp;\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, subtitle && classes.rootSubtitle, {\n 'bottom': classes.positionBottom,\n 'top': classes.positionTop\n }[position]),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItemBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the item itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Position of the title bar.\n */\n position: PropTypes.oneOf(['bottom', 'top']),\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on item.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n * @deprecated Use position instead.\n */\n titlePosition: deprecatedPropType(PropTypes.oneOf(['bottom', 'top']), 'Use the `position` prop instead.')\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageListItemBar'\n})(ImageListItemBar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { darken, lighten } from '../styles/colorManipulator';\nimport useTheme from '../styles/useTheme';\nvar TRANSITION_DURATION = 4; // seconds\n\nexport var styles = function styles(theme) {\n var getColor = function getColor(color) {\n return theme.palette.type === 'light' ? lighten(color, 0.62) : darken(color, 0.5);\n };\n\n var backgroundPrimary = getColor(theme.palette.primary.main);\n var backgroundSecondary = getColor(theme.palette.secondary.main);\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n overflow: 'hidden',\n height: 4,\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root and bar2 element if `color=\"primary\"`; bar2 if `variant=\"buffer\"`. */\n colorPrimary: {\n backgroundColor: backgroundPrimary\n },\n\n /* Styles applied to the root and bar2 elements if `color=\"secondary\"`; bar2 if `variant=\"buffer\"`. */\n colorSecondary: {\n backgroundColor: backgroundSecondary\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {},\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `variant=\"buffer\"`. */\n buffer: {\n backgroundColor: 'transparent'\n },\n\n /* Styles applied to the root element if `variant=\"query\"`. */\n query: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"`. */\n dashed: {\n position: 'absolute',\n marginTop: 0,\n height: '100%',\n width: '100%',\n animation: '$buffer 3s infinite linear'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"primary\"`. */\n dashedColorPrimary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundPrimary, \" 0%, \").concat(backgroundPrimary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"secondary\"`. */\n dashedColorSecondary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundSecondary, \" 0%, \").concat(backgroundSecondary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the layered bar1 and bar2 elements. */\n bar: {\n width: '100%',\n position: 'absolute',\n left: 0,\n bottom: 0,\n top: 0,\n transition: 'transform 0.2s linear',\n transformOrigin: 'left'\n },\n\n /* Styles applied to the bar elements if `color=\"primary\"`; bar2 if `variant` not \"buffer\". */\n barColorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the bar elements if `color=\"secondary\"`; bar2 if `variant` not \"buffer\". */\n barColorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n\n /* Styles applied to the bar1 element if `variant=\"indeterminate or query\"`. */\n bar1Indeterminate: {\n width: 'auto',\n animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite'\n },\n\n /* Styles applied to the bar1 element if `variant=\"determinate\"`. */\n bar1Determinate: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar1 element if `variant=\"buffer\"`. */\n bar1Buffer: {\n zIndex: 1,\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar2 element if `variant=\"indeterminate or query\"`. */\n bar2Indeterminate: {\n width: 'auto',\n animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite'\n },\n\n /* Styles applied to the bar2 element if `variant=\"buffer\"`. */\n bar2Buffer: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n // Legends:\n // || represents the viewport\n // - represents a light background\n // x represents a dark background\n '@keyframes indeterminate1': {\n // |-----|---x-||-----||-----|\n '0%': {\n left: '-35%',\n right: '100%'\n },\n // |-----|-----||-----||xxxx-|\n '60%': {\n left: '100%',\n right: '-90%'\n },\n '100%': {\n left: '100%',\n right: '-90%'\n }\n },\n '@keyframes indeterminate2': {\n // |xxxxx|xxxxx||-----||-----|\n '0%': {\n left: '-200%',\n right: '100%'\n },\n // |-----|-----||-----||-x----|\n '60%': {\n left: '107%',\n right: '-8%'\n },\n '100%': {\n left: '107%',\n right: '-8%'\n }\n },\n '@keyframes buffer': {\n '0%': {\n opacity: 1,\n backgroundPosition: '0 -23px'\n },\n '50%': {\n opacity: 0,\n backgroundPosition: '0 -23px'\n },\n '100%': {\n opacity: 1,\n backgroundPosition: '-200px -23px'\n }\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n value = props.value,\n valueBuffer = props.valueBuffer,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"value\", \"valueBuffer\", \"variant\"]);\n\n var theme = useTheme();\n var rootProps = {};\n var inlineStyles = {\n bar1: {},\n bar2: {}\n };\n\n if (variant === 'determinate' || variant === 'buffer') {\n if (value !== undefined) {\n rootProps['aria-valuenow'] = Math.round(value);\n rootProps['aria-valuemin'] = 0;\n rootProps['aria-valuemax'] = 100;\n var transform = value - 100;\n\n if (theme.direction === 'rtl') {\n transform = -transform;\n }\n\n inlineStyles.bar1.transform = \"translateX(\".concat(transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');\n }\n }\n\n if (variant === 'buffer') {\n if (valueBuffer !== undefined) {\n var _transform = (valueBuffer || 0) - 100;\n\n if (theme.direction === 'rtl') {\n _transform = -_transform;\n }\n\n inlineStyles.bar2.transform = \"translateX(\".concat(_transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');\n }\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'buffer': classes.buffer,\n 'query': classes.query\n }[variant]),\n role: \"progressbar\"\n }, rootProps, {\n ref: ref\n }, other), variant === 'buffer' ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.dashed, classes[\"dashedColor\".concat(capitalize(color))])\n }) : null, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, classes[\"barColor\".concat(capitalize(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, {\n 'determinate': classes.bar1Determinate,\n 'buffer': classes.bar1Buffer\n }[variant]),\n style: inlineStyles.bar1\n }), variant === 'determinate' ? null : /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes[\"color\".concat(capitalize(color))], classes.bar2Buffer] : classes[\"barColor\".concat(capitalize(color))]),\n style: inlineStyles.bar2\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? LinearProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The value of the progress indicator for the determinate and buffer variants.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The value for the buffer variant.\n * Value between 0 and 100.\n */\n valueBuffer: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate or query when there is no progress value.\n */\n variant: PropTypes.oneOf(['buffer', 'determinate', 'indeterminate', 'query'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLinearProgress'\n})(LinearProgress);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useForkRef from '../utils/useForkRef';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `underline=\"none\"`. */\n underlineNone: {\n textDecoration: 'none'\n },\n\n /* Styles applied to the root element if `underline=\"hover\"`. */\n underlineHover: {\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline'\n }\n },\n\n /* Styles applied to the root element if `underline=\"always\"`. */\n underlineAlways: {\n textDecoration: 'underline'\n },\n // Same reset as ButtonBase.root\n\n /* Styles applied to the root element if `component=\"button\"`. */\n button: {\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$focusVisible': {\n outline: 'auto'\n }\n },\n\n /* Pseudo-class applied to the root element if the link is keyboard focused. */\n focusVisible: {}\n};\nvar Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'a' : _props$component,\n onBlur = props.onBlur,\n onFocus = props.onFocus,\n TypographyClasses = props.TypographyClasses,\n _props$underline = props.underline,\n underline = _props$underline === void 0 ? 'hover' : _props$underline,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'inherit' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"onBlur\", \"onFocus\", \"TypographyClasses\", \"underline\", \"variant\"]);\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n var handlerRef = useForkRef(ref, focusVisibleRef);\n\n var handleBlur = function handleBlur(event) {\n if (focusVisible) {\n onBlurVisible();\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var handleFocus = function handleFocus(event) {\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(Typography, _extends({\n className: clsx(classes.root, classes[\"underline\".concat(capitalize(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button),\n classes: TypographyClasses,\n color: color,\n component: component,\n onBlur: handleBlur,\n onFocus: handleFocus,\n ref: handlerRef,\n variant: variant\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n /**\n * The content of the link.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the link.\n */\n color: PropTypes.oneOf(['initial', 'inherit', 'primary', 'secondary', 'textPrimary', 'textSecondary', 'error']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * `classes` prop applied to the [`Typography`](/api/typography/) element.\n */\n TypographyClasses: PropTypes.object,\n\n /**\n * Controls when the link should have an underline.\n */\n underline: PropTypes.oneOf(['none', 'hover', 'always']),\n\n /**\n * Applies the theme typography styles.\n */\n variant: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLink'\n})(Link);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n flexShrink: 0\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n};\n/**\n * A simple wrapper to apply `List` styles to an `Avatar`.\n */\n\nvar ListItemAvatar = /*#__PURE__*/React.forwardRef(function ListItemAvatar(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n var context = React.useContext(ListContext);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemAvatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component – normally `Avatar`.\n */\n children: PropTypes.element.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemAvatar'\n})(ListItemAvatar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from '../List/ListContext';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n };\n};\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nvar ListItemIcon = /*#__PURE__*/React.forwardRef(function ListItemIcon(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n var context = React.useContext(ListContext);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@material-ui/icons` SVG icon element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemIcon'\n})(ListItemIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n right: 16,\n top: '50%',\n transform: 'translateY(-50%)'\n }\n};\n/**\n * Must be used as the last child of ListItem to function properly.\n */\n\nvar ListItemSecondaryAction = /*#__PURE__*/React.forwardRef(function ListItemSecondaryAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemSecondaryAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally an `IconButton` or selection control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nListItemSecondaryAction.muiName = 'ListItemSecondaryAction';\nexport default withStyles(styles, {\n name: 'MuiListItemSecondaryAction'\n})(ListItemSecondaryAction);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n },\n\n /* Styles applied to the `Typography` components if primary and secondary are set. */\n multiline: {\n marginTop: 6,\n marginBottom: 6\n },\n\n /* Styles applied to the `Typography` components if dense. */\n dense: {},\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 56\n },\n\n /* Styles applied to the primary `Typography` component. */\n primary: {},\n\n /* Styles applied to the secondary `Typography` component. */\n secondary: {}\n};\nvar ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n primaryProp = props.primary,\n primaryTypographyProps = props.primaryTypographyProps,\n secondaryProp = props.secondary,\n secondaryTypographyProps = props.secondaryTypographyProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"]);\n\n var _React$useContext = React.useContext(ListContext),\n dense = _React$useContext.dense;\n\n var primary = primaryProp != null ? primaryProp : children;\n\n if (primary != null && primary.type !== Typography && !disableTypography) {\n primary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps), primary);\n }\n\n var secondary = secondaryProp;\n\n if (secondary != null && secondary.type !== Typography && !disableTypography) {\n secondary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: \"body2\",\n className: classes.secondary,\n color: \"textSecondary\",\n display: \"block\"\n }, secondaryTypographyProps), secondary);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline),\n ref: ref\n }, other), primary, secondary);\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * If `true`, the children will be indented.\n * This should be used if there is no left avatar or left icon.\n */\n inset: PropTypes.bool,\n\n /**\n * The main content element.\n */\n primary: PropTypes.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: PropTypes.object,\n\n /**\n * The secondary content element.\n */\n secondary: PropTypes.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemText'\n})(ListItemText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n lineHeight: '48px',\n listStyle: 'none',\n color: theme.palette.text.secondary,\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(14)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the inner `component` element if `disableGutters={false}`. */\n gutters: {\n paddingLeft: 16,\n paddingRight: 16\n },\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 72\n },\n\n /* Styles applied to the root element if `disableSticky={false}`. */\n sticky: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n backgroundColor: 'inherit'\n }\n };\n};\nvar ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$disableSticky = props.disableSticky,\n disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"disableGutters\", \"disableSticky\", \"inset\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListSubheader.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'inherit']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the List Subheader will not have gutters.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will not stick to the top during scroll.\n */\n disableSticky: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will be indented.\n */\n inset: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListSubheader'\n})(ListSubheader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Paper from '../Paper';\nimport capitalize from '../utils/capitalize';\nimport LinearProgress from '../LinearProgress';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n background: theme.palette.background.default,\n padding: 8\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n position: 'fixed',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {},\n\n /* Styles applied to the dots container if `variant=\"dots\"`. */\n dots: {\n display: 'flex',\n flexDirection: 'row'\n },\n\n /* Styles applied to each dot if `variant=\"dots\"`. */\n dot: {\n backgroundColor: theme.palette.action.disabled,\n borderRadius: '50%',\n width: 8,\n height: 8,\n margin: '0 2px'\n },\n\n /* Styles applied to a dot if `variant=\"dots\"` and this is the active step. */\n dotActive: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the Linear Progress component if `variant=\"progress\"`. */\n progress: {\n width: '50%'\n }\n };\n};\nvar MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n backButton = props.backButton,\n classes = props.classes,\n className = props.className,\n LinearProgressProps = props.LinearProgressProps,\n nextButton = props.nextButton,\n _props$position = props.position,\n position = _props$position === void 0 ? 'bottom' : _props$position,\n steps = props.steps,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'dots' : _props$variant,\n other = _objectWithoutProperties(props, [\"activeStep\", \"backButton\", \"classes\", \"className\", \"LinearProgressProps\", \"nextButton\", \"position\", \"steps\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[\"position\".concat(capitalize(position))], className),\n ref: ref\n }, other), backButton, variant === 'text' && /*#__PURE__*/React.createElement(React.Fragment, null, activeStep + 1, \" / \", steps), variant === 'dots' && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.dots\n }, _toConsumableArray(new Array(steps)).map(function (_, index) {\n return /*#__PURE__*/React.createElement(\"div\", {\n key: index,\n className: clsx(classes.dot, index === activeStep && classes.dotActive)\n });\n })), variant === 'progress' && /*#__PURE__*/React.createElement(LinearProgress, _extends({\n className: classes.progress,\n variant: \"determinate\",\n value: Math.ceil(activeStep / (steps - 1) * 100)\n }, LinearProgressProps)), nextButton);\n});\nprocess.env.NODE_ENV !== \"production\" ? MobileStepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Defines which dot is highlighted when the variant is 'dots'.\n */\n activeStep: PropTypes.number,\n\n /**\n * A back button element. For instance, it can be a `Button` or an `IconButton`.\n */\n backButton: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Props applied to the `LinearProgress` element.\n */\n LinearProgressProps: PropTypes.object,\n\n /**\n * A next button element. For instance, it can be a `Button` or an `IconButton`.\n */\n nextButton: PropTypes.node,\n\n /**\n * Set the positioning type.\n */\n position: PropTypes.oneOf(['bottom', 'static', 'top']),\n\n /**\n * The total steps.\n */\n steps: PropTypes.number.isRequired,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['dots', 'progress', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiMobileStepper'\n})(MobileStepper);","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nvar useEnhancedEffect = typeof window !== 'undefined' && process.env.NODE_ENV !== 'test' ? React.useLayoutEffect : React.useEffect;\n/**\n * NoSsr purposely removes components from the subject of Server Side Rendering (SSR).\n *\n * This component can be useful in a variety of situations:\n * - Escape hatch for broken dependencies not supporting SSR.\n * - Improve the time-to-first paint on the client by only rendering above the fold.\n * - Reduce the rendering time on the server.\n * - Under too heavy server load, you can turn on service degradation.\n */\n\nfunction NoSsr(props) {\n var children = props.children,\n _props$defer = props.defer,\n defer = _props$defer === void 0 ? false : _props$defer,\n _props$fallback = props.fallback,\n fallback = _props$fallback === void 0 ? null : _props$fallback;\n\n var _React$useState = React.useState(false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n if (!defer) {\n setMountedState(true);\n }\n }, [defer]);\n React.useEffect(function () {\n if (defer) {\n setMountedState(true);\n }\n }, [defer]); // We need the Fragment here to force react-docgen to recognise NoSsr as a component.\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, mountedState ? children : fallback);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? NoSsr.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n\n /**\n * If `true`, the component will not only prevent server-side rendering.\n * It will also defer the rendering of the children into a different screen frame.\n */\n defer: PropTypes.bool,\n\n /**\n * The fallback content to display.\n */\n fallback: PropTypes.node\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n NoSsr['propTypes' + ''] = exactProp(NoSsr.propTypes);\n}\n\nexport default NoSsr;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'RadioButtonUnchecked');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z\"\n}), 'RadioButtonChecked');","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport RadioButtonUncheckedIcon from '../internal/svg-icons/RadioButtonUnchecked';\nimport RadioButtonCheckedIcon from '../internal/svg-icons/RadioButtonChecked';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'relative',\n display: 'flex',\n '&$checked $layer': {\n transform: 'scale(1)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.shortest\n })\n }\n },\n layer: {\n left: 0,\n position: 'absolute',\n transform: 'scale(0)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeIn,\n duration: theme.transitions.duration.shortest\n })\n },\n checked: {}\n };\n};\n/**\n * @ignore - internal component.\n */\n\nfunction RadioButtonIcon(props) {\n var checked = props.checked,\n classes = props.classes,\n fontSize = props.fontSize;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.root, checked && classes.checked)\n }, /*#__PURE__*/React.createElement(RadioButtonUncheckedIcon, {\n fontSize: fontSize\n }), /*#__PURE__*/React.createElement(RadioButtonCheckedIcon, {\n fontSize: fontSize,\n className: classes.layer\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? RadioButtonIcon.propTypes = {\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n fontSize: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateRadioButtonIcon'\n})(RadioButtonIcon);","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nvar RadioGroupContext = React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n RadioGroupContext.displayName = 'RadioGroupContext';\n}\n\nexport default RadioGroupContext;","import * as React from 'react';\nimport RadioGroupContext from './RadioGroupContext';\nexport default function useRadioGroup() {\n return React.useContext(RadioGroupContext);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport RadioButtonIcon from './RadioButtonIcon';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport withStyles from '../styles/withStyles';\nimport useRadioGroup from '../RadioGroup/useRadioGroup';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, {\n checked: true\n});\nvar defaultIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, null);\nvar Radio = /*#__PURE__*/React.forwardRef(function Radio(props, ref) {\n var checkedProp = props.checked,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n nameProp = props.name,\n onChangeProp = props.onChange,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checked\", \"classes\", \"color\", \"name\", \"onChange\", \"size\"]);\n\n var radioGroup = useRadioGroup();\n var checked = checkedProp;\n var onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);\n var name = nameProp;\n\n if (radioGroup) {\n if (typeof checked === 'undefined') {\n checked = radioGroup.value === props.value;\n }\n\n if (typeof name === 'undefined') {\n name = radioGroup.name;\n }\n }\n\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n color: color,\n type: \"radio\",\n icon: /*#__PURE__*/React.cloneElement(defaultIcon, {\n fontSize: size === 'small' ? 'small' : 'medium'\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(defaultCheckedIcon, {\n fontSize: size === 'small' ? 'small' : 'medium'\n }),\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))]),\n checked: classes.checked,\n disabled: classes.disabled\n },\n name: name,\n checked: checked,\n onChange: onChange,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Radio.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the radio will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiRadio'\n})(Radio);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport FormGroup from '../FormGroup';\nimport useForkRef from '../utils/useForkRef';\nimport useControlled from '../utils/useControlled';\nimport RadioGroupContext from './RadioGroupContext';\nimport useId from '../utils/unstable_useId';\nvar RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {\n var actions = props.actions,\n children = props.children,\n nameProp = props.name,\n valueProp = props.value,\n onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"actions\", \"children\", \"name\", \"value\", \"onChange\"]);\n\n var rootRef = React.useRef(null);\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: props.defaultValue,\n name: 'RadioGroup'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n value = _useControlled2[0],\n setValue = _useControlled2[1];\n\n React.useImperativeHandle(actions, function () {\n return {\n focus: function focus() {\n var input = rootRef.current.querySelector('input:not(:disabled):checked');\n\n if (!input) {\n input = rootRef.current.querySelector('input:not(:disabled)');\n }\n\n if (input) {\n input.focus();\n }\n }\n };\n }, []);\n var handleRef = useForkRef(ref, rootRef);\n\n var handleChange = function handleChange(event) {\n setValue(event.target.value);\n\n if (onChange) {\n onChange(event, event.target.value);\n }\n };\n\n var name = useId(nameProp);\n return /*#__PURE__*/React.createElement(RadioGroupContext.Provider, {\n value: {\n name: name,\n onChange: handleChange,\n value: value\n }\n }, /*#__PURE__*/React.createElement(FormGroup, _extends({\n role: \"radiogroup\",\n ref: handleRef\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? RadioGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string]),\n\n /**\n * The name used to reference the value of the control.\n * If you don't provide this prop, it falls back to a randomly generated name.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when a radio button is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * Value of the selected radio button. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default RadioGroup;","import _typeof from \"@babel/runtime/helpers/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, refType } from '@material-ui/utils';\nimport setRef from '../utils/setRef';\nvar warnedOnce = false;\n/**\n * ⚠️⚠️⚠️\n * If you want the DOM element of a Material-UI component check out\n * [FAQ: How can I access the DOM element?](/getting-started/faq/#how-can-i-access-the-dom-element)\n * first.\n *\n * This component uses `findDOMNode` which is deprecated in React.StrictMode.\n *\n * Helper component to allow attaching a ref to a\n * wrapped element to access the underlying DOM element.\n *\n * It's highly inspired by https://github.com/facebook/react/issues/11401#issuecomment-340543801.\n * For example:\n * ```jsx\n * import React from 'react';\n * import RootRef from '@material-ui/core/RootRef';\n *\n * function MyComponent() {\n * const domRef = React.useRef();\n *\n * React.useEffect(() => {\n * console.log(domRef.current); // DOM node\n * }, []);\n *\n * return (\n * \n * \n * \n * );\n * }\n * ```\n *\n * @deprecated\n */\n\nvar RootRef = /*#__PURE__*/function (_React$Component) {\n _inherits(RootRef, _React$Component);\n\n var _super = _createSuper(RootRef);\n\n function RootRef() {\n _classCallCheck(this, RootRef);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(RootRef, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ref = ReactDOM.findDOMNode(this);\n setRef(this.props.rootRef, this.ref);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var ref = ReactDOM.findDOMNode(this);\n\n if (prevProps.rootRef !== this.props.rootRef || this.ref !== ref) {\n if (prevProps.rootRef !== this.props.rootRef) {\n setRef(prevProps.rootRef, null);\n }\n\n this.ref = ref;\n setRef(this.props.rootRef, this.ref);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.ref = null;\n setRef(this.props.rootRef, null);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn(['Material-UI: The RootRef component is deprecated.', 'The component relies on the ReactDOM.findDOMNode API which is deprecated in React.StrictMode.', 'Instead, you can get a reference to the underlying DOM node of the components via the `ref` prop.'].join('/n'));\n }\n }\n\n return this.props.children;\n }\n }]);\n\n return RootRef;\n}(React.Component);\n\nprocess.env.NODE_ENV !== \"production\" ? RootRef.propTypes = {\n /**\n * The wrapped element.\n */\n children: PropTypes.element.isRequired,\n\n /**\n * A ref that points to the first DOM node of the wrapped element.\n */\n rootRef: refType.isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? RootRef.propTypes = exactProp(RootRef.propTypes) : void 0;\n}\n\nexport default RootRef;","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\n\nvar styles = function styles(theme) {\n return {\n thumb: {\n '&$open': {\n '& $offset': {\n transform: 'scale(1) translateY(-10px)'\n }\n }\n },\n open: {},\n offset: _extends({\n zIndex: 1\n }, theme.typography.body2, {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1.2,\n transition: theme.transitions.create(['transform'], {\n duration: theme.transitions.duration.shortest\n }),\n top: -34,\n transformOrigin: 'bottom center',\n transform: 'scale(0)',\n position: 'absolute'\n }),\n circle: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 32,\n height: 32,\n borderRadius: '50% 50% 50% 0',\n backgroundColor: 'currentColor',\n transform: 'rotate(-45deg)'\n },\n label: {\n color: theme.palette.primary.contrastText,\n transform: 'rotate(45deg)'\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction ValueLabel(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n open = props.open,\n value = props.value,\n valueLabelDisplay = props.valueLabelDisplay;\n\n if (valueLabelDisplay === 'off') {\n return children;\n }\n\n return /*#__PURE__*/React.cloneElement(children, {\n className: clsx(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.offset, className)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.circle\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, value))));\n}\n\nexport default withStyles(styles, {\n name: 'PrivateValueLabel'\n})(ValueLabel);","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\nimport { alpha, lighten, darken } from '../styles/colorManipulator';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport capitalize from '../utils/capitalize';\nimport useControlled from '../utils/useControlled';\nimport ValueLabel from './ValueLabel';\n\nfunction asc(a, b) {\n return a - b;\n}\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(min, value), max);\n}\n\nfunction findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n\n return closestIndex;\n}\n\nfunction trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n\n return false;\n }\n\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\n\nfunction valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\n\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\n\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\nfunction roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\n\nfunction setValueIndex(_ref) {\n var values = _ref.values,\n source = _ref.source,\n newValue = _ref.newValue,\n index = _ref.index;\n\n // Performance shortcut\n if (values[index] === newValue) {\n return source;\n }\n\n var output = values.slice();\n output[index] = newValue;\n return output;\n}\n\nfunction focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n\n if (!sliderRef.current.contains(document.activeElement) || Number(document.activeElement.getAttribute('data-index')) !== activeIndex) {\n sliderRef.current.querySelector(\"[role=\\\"slider\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\")).focus();\n }\n\n if (setActive) {\n setActive(activeIndex);\n }\n}\n\nvar axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\n\nvar Identity = function Identity(x) {\n return x;\n};\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 2,\n width: '100%',\n boxSizing: 'content-box',\n padding: '13px 0',\n display: 'inline-block',\n position: 'relative',\n cursor: 'pointer',\n touchAction: 'none',\n color: theme.palette.primary.main,\n WebkitTapHighlightColor: 'transparent',\n '&$disabled': {\n pointerEvents: 'none',\n cursor: 'default',\n color: theme.palette.grey[400]\n },\n '&$vertical': {\n width: 2,\n height: '100%',\n padding: '0 13px'\n },\n // The primary input mechanism of the device includes a pointing device of limited accuracy.\n '@media (pointer: coarse)': {\n // Reach 42px touch target, about ~8mm on screen.\n padding: '20px 0',\n '&$vertical': {\n padding: '0 20px'\n }\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `marks` is provided with at least one label. */\n marked: {\n marginBottom: 20,\n '&$vertical': {\n marginBottom: 'auto',\n marginRight: 20\n }\n },\n\n /* Pseudo-class applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Pseudo-class applied to the root and thumb element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the rail element. */\n rail: {\n display: 'block',\n position: 'absolute',\n width: '100%',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n opacity: 0.38,\n '$vertical &': {\n height: '100%',\n width: 2\n }\n },\n\n /* Styles applied to the track element. */\n track: {\n display: 'block',\n position: 'absolute',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n '$vertical &': {\n width: 2\n }\n },\n\n /* Styles applied to the track element if `track={false}`. */\n trackFalse: {\n '& $track': {\n display: 'none'\n }\n },\n\n /* Styles applied to the track element if `track=\"inverted\"`. */\n trackInverted: {\n '& $track': {\n backgroundColor: // Same logic as the LinearProgress track color\n theme.palette.type === 'light' ? lighten(theme.palette.primary.main, 0.62) : darken(theme.palette.primary.main, 0.5)\n },\n '& $rail': {\n opacity: 1\n }\n },\n\n /* Styles applied to the thumb element. */\n thumb: {\n position: 'absolute',\n width: 12,\n height: 12,\n marginLeft: -6,\n marginTop: -5,\n boxSizing: 'border-box',\n borderRadius: '50%',\n outline: 0,\n backgroundColor: 'currentColor',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: theme.transitions.create(['box-shadow'], {\n duration: theme.transitions.duration.shortest\n }),\n '&::after': {\n position: 'absolute',\n content: '\"\"',\n borderRadius: '50%',\n // reach 42px hit target (2 * 15 + thumb diameter)\n left: -15,\n top: -15,\n right: -15,\n bottom: -15\n },\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.primary.main, 0.16)),\n '@media (hover: none)': {\n boxShadow: 'none'\n }\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.primary.main, 0.16))\n },\n '&$disabled': {\n width: 8,\n height: 8,\n marginLeft: -4,\n marginTop: -3,\n '&:hover': {\n boxShadow: 'none'\n }\n },\n '$vertical &': {\n marginLeft: -5,\n marginBottom: -6\n },\n '$vertical &$disabled': {\n marginLeft: -3,\n marginBottom: -4\n }\n },\n\n /* Styles applied to the thumb element if `color=\"primary\"`. */\n thumbColorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the thumb element if `color=\"secondary\"`. */\n thumbColorSecondary: {\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.secondary.main, 0.16))\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.secondary.main, 0.16))\n }\n },\n\n /* Pseudo-class applied to the thumb element if it's active. */\n active: {},\n\n /* Pseudo-class applied to the thumb element if keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the thumb label element. */\n valueLabel: {\n // IE 11 centering bug, to remove from the customization demos once no longer supported\n left: 'calc(-50% - 4px)'\n },\n\n /* Styles applied to the mark element. */\n mark: {\n position: 'absolute',\n width: 2,\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the mark element if active (depending on the value). */\n markActive: {\n backgroundColor: theme.palette.background.paper,\n opacity: 0.8\n },\n\n /* Styles applied to the mark label element. */\n markLabel: _extends({}, theme.typography.body2, {\n color: theme.palette.text.secondary,\n position: 'absolute',\n top: 26,\n transform: 'translateX(-50%)',\n whiteSpace: 'nowrap',\n '$vertical &': {\n top: 'auto',\n left: 26,\n transform: 'translateY(50%)'\n },\n '@media (pointer: coarse)': {\n top: 40,\n '$vertical &': {\n left: 31\n }\n }\n }),\n\n /* Styles applied to the mark label element if active (depending on the value). */\n markLabelActive: {\n color: theme.palette.text.primary\n }\n };\n};\nvar Slider = /*#__PURE__*/React.forwardRef(function Slider(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledby = props['aria-labelledby'],\n ariaValuetext = props['aria-valuetext'],\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n defaultValue = props.defaultValue,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n getAriaLabel = props.getAriaLabel,\n getAriaValueText = props.getAriaValueText,\n _props$marks = props.marks,\n marksProp = _props$marks === void 0 ? false : _props$marks,\n _props$max = props.max,\n max = _props$max === void 0 ? 100 : _props$max,\n _props$min = props.min,\n min = _props$min === void 0 ? 0 : _props$min,\n name = props.name,\n onChange = props.onChange,\n onChangeCommitted = props.onChangeCommitted,\n onMouseDown = props.onMouseDown,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$scale = props.scale,\n scale = _props$scale === void 0 ? Identity : _props$scale,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n _props$ThumbComponent = props.ThumbComponent,\n ThumbComponent = _props$ThumbComponent === void 0 ? 'span' : _props$ThumbComponent,\n _props$track = props.track,\n track = _props$track === void 0 ? 'normal' : _props$track,\n valueProp = props.value,\n _props$ValueLabelComp = props.ValueLabelComponent,\n ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel : _props$ValueLabelComp,\n _props$valueLabelDisp = props.valueLabelDisplay,\n valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp,\n _props$valueLabelForm = props.valueLabelFormat,\n valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"aria-valuetext\", \"classes\", \"className\", \"color\", \"component\", \"defaultValue\", \"disabled\", \"getAriaLabel\", \"getAriaValueText\", \"marks\", \"max\", \"min\", \"name\", \"onChange\", \"onChangeCommitted\", \"onMouseDown\", \"orientation\", \"scale\", \"step\", \"ThumbComponent\", \"track\", \"value\", \"ValueLabelComponent\", \"valueLabelDisplay\", \"valueLabelFormat\"]);\n\n var theme = useTheme();\n var touchId = React.useRef(); // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transfered when inversing a range slider.\n\n var _React$useState = React.useState(-1),\n active = _React$useState[0],\n setActive = _React$useState[1];\n\n var _React$useState2 = React.useState(-1),\n open = _React$useState2[0],\n setOpen = _React$useState2[1];\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Slider'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n valueDerived = _useControlled2[0],\n setValueState = _useControlled2[1];\n\n var range = Array.isArray(valueDerived);\n var values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(function (value) {\n return clamp(value, min, max);\n });\n var marks = marksProp === true && step !== null ? _toConsumableArray(Array(Math.floor((max - min) / step) + 1)).map(function (_, index) {\n return {\n value: min + step * index\n };\n }) : marksProp || [];\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(-1),\n focusVisible = _React$useState3[0],\n setFocusVisible = _React$useState3[1];\n\n var sliderRef = React.useRef();\n var handleFocusRef = useForkRef(focusVisibleRef, sliderRef);\n var handleRef = useForkRef(ref, handleFocusRef);\n var handleFocus = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n\n if (isFocusVisible(event)) {\n setFocusVisible(index);\n }\n\n setOpen(index);\n });\n var handleBlur = useEventCallback(function () {\n if (focusVisible !== -1) {\n setFocusVisible(-1);\n onBlurVisible();\n }\n\n setOpen(-1);\n });\n var handleMouseOver = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n });\n var handleMouseLeave = useEventCallback(function () {\n setOpen(-1);\n });\n var isRtl = theme.direction === 'rtl';\n var handleKeyDown = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n var value = values[index];\n var tenPercents = (max - min) / 10;\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var marksIndex = marksValues.indexOf(value);\n var newValue;\n var increaseKey = isRtl ? 'ArrowLeft' : 'ArrowRight';\n var decreaseKey = isRtl ? 'ArrowRight' : 'ArrowLeft';\n\n switch (event.key) {\n case 'Home':\n newValue = min;\n break;\n\n case 'End':\n newValue = max;\n break;\n\n case 'PageUp':\n if (step) {\n newValue = value + tenPercents;\n }\n\n break;\n\n case 'PageDown':\n if (step) {\n newValue = value - tenPercents;\n }\n\n break;\n\n case increaseKey:\n case 'ArrowUp':\n if (step) {\n newValue = value + step;\n } else {\n newValue = marksValues[marksIndex + 1] || marksValues[marksValues.length - 1];\n }\n\n break;\n\n case decreaseKey:\n case 'ArrowDown':\n if (step) {\n newValue = value - step;\n } else {\n newValue = marksValues[marksIndex - 1] || marksValues[0];\n }\n\n break;\n\n default:\n return;\n } // Prevent scroll of the page\n\n\n event.preventDefault();\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n }\n\n newValue = clamp(newValue, min, max);\n\n if (range) {\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values,\n source: valueDerived,\n newValue: newValue,\n index: index\n }).sort(asc);\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: newValue.indexOf(previousValue)\n });\n }\n\n setValueState(newValue);\n setFocusVisible(index);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n });\n var previousIndex = React.useRef();\n var axis = orientation;\n\n if (isRtl && orientation !== \"vertical\") {\n axis += '-reverse';\n }\n\n var getFingerNewValue = function getFingerNewValue(_ref3) {\n var finger = _ref3.finger,\n _ref3$move = _ref3.move,\n move = _ref3$move === void 0 ? false : _ref3$move,\n values2 = _ref3.values,\n source = _ref3.source;\n var slider = sliderRef.current;\n\n var _slider$getBoundingCl = slider.getBoundingClientRect(),\n width = _slider$getBoundingCl.width,\n height = _slider$getBoundingCl.height,\n bottom = _slider$getBoundingCl.bottom,\n left = _slider$getBoundingCl.left;\n\n var percent;\n\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n\n var newValue;\n newValue = percentToValue(percent, min, max);\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n\n newValue = clamp(newValue, min, max);\n var activeIndex = 0;\n\n if (range) {\n if (!move) {\n activeIndex = findClosest(values2, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values2,\n source: source,\n newValue: newValue,\n index: activeIndex\n }).sort(asc);\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n\n return {\n newValue: newValue,\n activeIndex: activeIndex\n };\n };\n\n var handleTouchMove = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue = getFingerNewValue({\n finger: finger,\n move: true,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue.newValue,\n activeIndex = _getFingerNewValue.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n });\n var handleTouchEnd = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue2 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue2.newValue;\n\n setActive(-1);\n\n if (event.type === 'touchend') {\n setOpen(-1);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n\n touchId.current = undefined;\n var doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n });\n var handleTouchStart = useEventCallback(function (event) {\n // Workaround as Safari has partial support for touchAction: 'none'.\n event.preventDefault();\n var touch = event.changedTouches[0];\n\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue3 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue3.newValue,\n activeIndex = _getFingerNewValue3.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n React.useEffect(function () {\n var slider = sliderRef.current;\n slider.addEventListener('touchstart', handleTouchStart);\n var doc = ownerDocument(slider);\n return function () {\n slider.removeEventListener('touchstart', handleTouchStart);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n };\n }, [handleTouchEnd, handleTouchMove, handleTouchStart]);\n var handleMouseDown = useEventCallback(function (event) {\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n event.preventDefault();\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue4 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue4.newValue,\n activeIndex = _getFingerNewValue4.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove);\n doc.addEventListener('mouseup', handleTouchEnd);\n });\n var trackOffset = valueToPercent(range ? values[0] : min, min, max);\n var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n\n var trackStyle = _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: handleRef,\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, disabled && classes.disabled, marks.length > 0 && marks.some(function (mark) {\n return mark.label;\n }) && classes.marked, track === false && classes.trackFalse, orientation === 'vertical' && classes.vertical, track === 'inverted' && classes.trackInverted),\n onMouseDown: handleMouseDown\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.rail\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track,\n style: trackStyle\n }), /*#__PURE__*/React.createElement(\"input\", {\n value: values.join(','),\n name: name,\n type: \"hidden\"\n }), marks.map(function (mark, index) {\n var percent = valueToPercent(mark.value, min, max);\n var style = axisProps[axis].offset(percent);\n var markActive;\n\n if (track === false) {\n markActive = values.indexOf(mark.value) !== -1;\n } else {\n markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: mark.value\n }, /*#__PURE__*/React.createElement(\"span\", {\n style: style,\n \"data-index\": index,\n className: clsx(classes.mark, markActive && classes.markActive)\n }), mark.label != null ? /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true,\n \"data-index\": index,\n style: style,\n className: clsx(classes.markLabel, markActive && classes.markLabelActive)\n }, mark.label) : null);\n }), values.map(function (value, index) {\n var percent = valueToPercent(value, min, max);\n var style = axisProps[axis].offset(percent);\n return /*#__PURE__*/React.createElement(ValueLabelComponent, {\n key: index,\n valueLabelFormat: valueLabelFormat,\n valueLabelDisplay: valueLabelDisplay,\n className: classes.valueLabel,\n value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,\n index: index,\n open: open === index || active === index || valueLabelDisplay === 'on',\n disabled: disabled\n }, /*#__PURE__*/React.createElement(ThumbComponent, {\n className: clsx(classes.thumb, classes[\"thumbColor\".concat(capitalize(color))], active === index && classes.active, disabled && classes.disabled, focusVisible === index && classes.focusVisible),\n tabIndex: disabled ? null : 0,\n role: \"slider\",\n style: style,\n \"data-index\": index,\n \"aria-label\": getAriaLabel ? getAriaLabel(index) : ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-orientation\": orientation,\n \"aria-valuemax\": scale(max),\n \"aria-valuemin\": scale(min),\n \"aria-valuenow\": scale(value),\n \"aria-valuetext\": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n }));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Slider.propTypes = {\n /**\n * The label of the slider.\n */\n 'aria-label': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-label'] != null) {\n return new Error('Material-UI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * The id of the element containing a label for the slider.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * A string value that provides a user-friendly name for the current value of the slider.\n */\n 'aria-valuetext': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-valuetext'] != null) {\n return new Error('Material-UI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * If `true`, the slider will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.\n *\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaLabel: PropTypes.func,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.\n *\n * @param {number} value The thumb label's value to format.\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaValueText: PropTypes.func,\n\n /**\n * Marks indicate predetermined values to which the user can move the slider.\n * If `true` the marks will be spaced according the value of the `step` prop.\n * If an array, it should contain objects with `value` and an optional `label` keys.\n */\n marks: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),\n\n /**\n * The maximum allowed value of the slider.\n * Should not be equal to min.\n */\n max: PropTypes.number,\n\n /**\n * The minimum allowed value of the slider.\n * Should not be equal to max.\n */\n min: PropTypes.number,\n\n /**\n * Name attribute of the hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChange: PropTypes.func,\n\n /**\n * Callback function that is fired when the `mouseup` is triggered.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChangeCommitted: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n\n /**\n * The slider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * A transformation function, to change the scale of the slider.\n */\n scale: PropTypes.func,\n\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.)\n * The `min` prop serves as the origin for the valid values.\n * We recommend (max - min) to be evenly divisible by the step.\n *\n * When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.\n */\n step: PropTypes.number,\n\n /**\n * The component used to display the value label.\n */\n ThumbComponent: PropTypes.elementType,\n\n /**\n * The track presentation:\n *\n * - `normal` the track will render a bar representing the slider value.\n * - `inverted` the track will render a bar representing the remaining slider value.\n * - `false` the track will render without a bar.\n */\n track: PropTypes.oneOf(['normal', false, 'inverted']),\n\n /**\n * The value of the slider.\n * For ranged sliders, provide an array with two values.\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * The value label component.\n */\n ValueLabelComponent: PropTypes.elementType,\n\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n */\n valueLabelDisplay: PropTypes.oneOf(['on', 'auto', 'off']),\n\n /**\n * The format function the value label's value.\n *\n * When a function is provided, it should have the following signature:\n *\n * - {number} value The value label's value to format\n * - {number} index The value label's index to format\n */\n valueLabelFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSlider'\n})(Slider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n flex: 1,\n position: 'relative'\n },\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {}\n};\nvar Step = /*#__PURE__*/React.forwardRef(function Step(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n connectorProp = props.connector,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$expanded = props.expanded,\n expanded = _props$expanded === void 0 ? false : _props$expanded,\n index = props.index,\n last = props.last,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"connector\", \"disabled\", \"expanded\", \"index\", \"last\", \"orientation\"]);\n\n var connector = connectorProp ? /*#__PURE__*/React.cloneElement(connectorProp, {\n orientation: orientation,\n alternativeLabel: alternativeLabel,\n index: index,\n active: active,\n completed: completed,\n disabled: disabled\n }) : null;\n var newChildren = /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, completed && classes.completed),\n ref: ref\n }, other), connector && alternativeLabel && index !== 0 ? connector : null, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Step component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.cloneElement(child, _extends({\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n expanded: expanded,\n last: last,\n icon: index + 1,\n orientation: orientation\n }, child.props));\n }));\n\n if (connector && !alternativeLabel && index !== 0) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, connector, newChildren);\n }\n\n return newChildren;\n});\nprocess.env.NODE_ENV !== \"production\" ? Step.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Sets the step as active. Is passed to child components.\n */\n active: PropTypes.bool,\n\n /**\n * Should be `Step` sub-components such as `StepLabel`, `StepContent`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: PropTypes.bool,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepButton` is a child of `Step`. Is passed to child components.\n */\n disabled: PropTypes.bool,\n\n /**\n * Expand the step.\n */\n expanded: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStep'\n})(Step);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z\"\n}), 'CheckCircle');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"\n}), 'Warning');","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport CheckCircle from '../internal/svg-icons/CheckCircle';\nimport Warning from '../internal/svg-icons/Warning';\nimport withStyles from '../styles/withStyles';\nimport SvgIcon from '../SvgIcon';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n color: theme.palette.text.disabled,\n '&$completed': {\n color: theme.palette.primary.main\n },\n '&$active': {\n color: theme.palette.primary.main\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Styles applied to the SVG text element. */\n text: {\n fill: theme.palette.primary.contrastText,\n fontSize: theme.typography.caption.fontSize,\n fontFamily: theme.typography.fontFamily\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {}\n };\n};\n\nvar _ref = /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"12\"\n});\n\nvar StepIcon = /*#__PURE__*/React.forwardRef(function StepIcon(props, ref) {\n var _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n icon = props.icon,\n _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n classes = props.classes;\n\n if (typeof icon === 'number' || typeof icon === 'string') {\n var className = clsx(classes.root, active && classes.active, error && classes.error, completed && classes.completed);\n\n if (error) {\n return /*#__PURE__*/React.createElement(Warning, {\n className: className,\n ref: ref\n });\n }\n\n if (completed) {\n return /*#__PURE__*/React.createElement(CheckCircle, {\n className: className,\n ref: ref\n });\n }\n\n return /*#__PURE__*/React.createElement(SvgIcon, {\n className: className,\n ref: ref\n }, _ref, /*#__PURE__*/React.createElement(\"text\", {\n className: classes.text,\n x: \"12\",\n y: \"16\",\n textAnchor: \"middle\"\n }, icon));\n }\n\n return icon;\n});\nprocess.env.NODE_ENV !== \"production\" ? StepIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Whether this step is active.\n */\n active: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: PropTypes.bool,\n\n /**\n * Mark the step as failed.\n */\n error: PropTypes.bool,\n\n /**\n * The label displayed in the step icon.\n */\n icon: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepIcon'\n})(StepIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport StepIcon from '../StepIcon';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n '&$alternativeLabel': {\n flexDirection: 'column'\n },\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the `Typography` component which wraps `children`. */\n label: {\n color: theme.palette.text.secondary,\n '&$active': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$completed': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$alternativeLabel': {\n textAlign: 'center',\n marginTop: 16\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Pseudo-class applied to the `Typography` component if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the `Typography` component if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the `icon` container element. */\n iconContainer: {\n flexShrink: 0,\n // Fix IE 11 issue\n display: 'flex',\n paddingRight: 8,\n '&$alternativeLabel': {\n paddingRight: 0\n }\n },\n\n /* Pseudo-class applied to the root and icon container and `Typography` if `alternativeLabel={true}`. */\n alternativeLabel: {},\n\n /* Styles applied to the container element which wraps `Typography` and `optional`. */\n labelContainer: {\n width: '100%'\n }\n };\n};\nvar StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n StepIconComponentProp = props.StepIconComponent,\n StepIconProps = props.StepIconProps,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"error\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\", \"StepIconComponent\", \"StepIconProps\"]);\n\n var StepIconComponent = StepIconComponentProp;\n\n if (icon && !StepIconComponent) {\n StepIconComponent = StepIcon;\n }\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[orientation], className, disabled && classes.disabled, alternativeLabel && classes.alternativeLabel, error && classes.error),\n ref: ref\n }, other), icon || StepIconComponent ? /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.iconContainer, alternativeLabel && classes.alternativeLabel)\n }, /*#__PURE__*/React.createElement(StepIconComponent, _extends({\n completed: completed,\n active: active,\n error: error,\n icon: icon\n }, StepIconProps))) : null, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.labelContainer\n }, children ? /*#__PURE__*/React.createElement(Typography, {\n variant: \"body2\",\n component: \"span\",\n display: \"block\",\n className: clsx(classes.label, alternativeLabel && classes.alternativeLabel, completed && classes.completed, active && classes.active, error && classes.error)\n }, children) : null, optional));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * In most cases will simply be a string containing a title for the label.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepLabelButton` is a child of `StepLabel`. Is passed to child components.\n */\n disabled: PropTypes.bool,\n\n /**\n * Mark the step as failed.\n */\n error: PropTypes.bool,\n\n /**\n * Override the default label of the step icon.\n */\n icon: PropTypes.node,\n\n /**\n * The optional node to display.\n */\n optional: PropTypes.node,\n\n /**\n * The component to render in place of the [`StepIcon`](/api/step-icon/).\n */\n StepIconComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`StepIcon`](/api/step-icon/) element.\n */\n StepIconProps: PropTypes.object\n} : void 0;\nStepLabel.muiName = 'StepLabel';\nexport default withStyles(styles, {\n name: 'MuiStepLabel'\n})(StepLabel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport StepLabel from '../StepLabel';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n padding: '24px 16px',\n margin: '-24px -16px',\n boxSizing: 'content-box'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n justifyContent: 'flex-start',\n padding: '8px',\n margin: '-8px'\n },\n\n /* Styles applied to the `ButtonBase` touch-ripple. */\n touchRipple: {\n color: 'rgba(0, 0, 0, 0.3)'\n }\n};\nvar StepButton = /*#__PURE__*/React.forwardRef(function StepButton(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\"]);\n\n var childProps = {\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n icon: icon,\n optional: optional,\n orientation: orientation\n };\n var child = isMuiElement(children, ['StepLabel']) ? /*#__PURE__*/React.cloneElement(children, childProps) : /*#__PURE__*/React.createElement(StepLabel, childProps, children);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: true,\n disabled: disabled,\n TouchRippleProps: {\n className: classes.touchRipple\n },\n className: clsx(classes.root, classes[orientation], className),\n ref: ref\n }, other), child);\n});\nprocess.env.NODE_ENV !== \"production\" ? StepButton.propTypes = {\n /**\n * @ignore\n * Passed in via `Step` - passed through to `StepLabel`.\n */\n active: PropTypes.bool,\n\n /**\n * @ignore\n * Set internally by Stepper when it's supplied with the alternativeLabel property.\n */\n alternativeLabel: PropTypes.bool,\n\n /**\n * Can be a `StepLabel` or a node to place inside `StepLabel` as children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * Sets completed styling. Is passed to StepLabel.\n */\n completed: PropTypes.bool,\n\n /**\n * @ignore\n * Disables the button and sets disabled styling. Is passed to StepLabel.\n */\n disabled: PropTypes.bool,\n\n /**\n * @ignore\n * potentially passed from parent `Step`\n */\n expanded: PropTypes.bool,\n\n /**\n * The icon displayed by the step label.\n */\n icon: PropTypes.node,\n\n /**\n * @ignore\n */\n last: PropTypes.bool,\n\n /**\n * The optional node to display.\n */\n optional: PropTypes.node,\n\n /**\n * @ignore\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepButton'\n})(StepButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n marginLeft: 12,\n // half icon\n padding: '0 0 8px'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n position: 'absolute',\n top: 8 + 4,\n left: 'calc(-50% + 20px)',\n right: 'calc(50% + 20px)'\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the line element. */\n line: {\n display: 'block',\n borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n lineHorizontal: {\n borderTopStyle: 'solid',\n borderTopWidth: 1\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n lineVertical: {\n borderLeftStyle: 'solid',\n borderLeftWidth: 1,\n minHeight: 24\n }\n };\n};\nvar StepConnector = /*#__PURE__*/React.forwardRef(function StepConnector(props, ref) {\n var active = props.active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n index = props.index,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"classes\", \"className\", \"completed\", \"disabled\", \"index\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, active && classes.active, completed && classes.completed, disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.line, {\n 'horizontal': classes.lineHorizontal,\n 'vertical': classes.lineVertical\n }[orientation])\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepConnector.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepConnector'\n})(StepConnector);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Collapse from '../Collapse';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n marginTop: 8,\n marginLeft: 12,\n // half icon\n paddingLeft: 8 + 12,\n // margin + half icon\n paddingRight: 8,\n borderLeft: \"1px solid \".concat(theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])\n },\n\n /* Styles applied to the root element if `last={true}` (controlled by `Step`). */\n last: {\n borderLeft: 'none'\n },\n\n /* Styles applied to the Transition component. */\n transition: {}\n };\n};\nvar StepContent = /*#__PURE__*/React.forwardRef(function StepContent(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n expanded = props.expanded,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"expanded\", \"last\", \"optional\", \"orientation\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (orientation !== 'vertical') {\n console.error('Material-UI: is only designed for use with the vertical stepper.');\n }\n }\n\n var transitionDuration = transitionDurationProp;\n\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, last && classes.last),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: active || expanded,\n className: classes.transition,\n timeout: transitionDuration,\n unmountOnExit: true\n }, TransitionProps), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Step content.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Adjust the duration of the content expand transition.\n * Passed as a prop to the transition component.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepContent'\n})(StepContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Paper from '../Paper';\nimport StepConnector from '../StepConnector';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: 24\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n alignItems: 'flex-start'\n }\n};\nvar defaultConnector = /*#__PURE__*/React.createElement(StepConnector, null);\nvar Stepper = /*#__PURE__*/React.forwardRef(function Stepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$connector = props.connector,\n connectorProp = _props$connector === void 0 ? defaultConnector : _props$connector,\n _props$nonLinear = props.nonLinear,\n nonLinear = _props$nonLinear === void 0 ? false : _props$nonLinear,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = _objectWithoutProperties(props, [\"activeStep\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"connector\", \"nonLinear\", \"orientation\"]);\n\n var connector = /*#__PURE__*/React.isValidElement(connectorProp) ? /*#__PURE__*/React.cloneElement(connectorProp, {\n orientation: orientation\n }) : null;\n var childrenArray = React.Children.toArray(children);\n var steps = childrenArray.map(function (step, index) {\n var state = {\n index: index,\n active: false,\n completed: false,\n disabled: false\n };\n\n if (activeStep === index) {\n state.active = true;\n } else if (!nonLinear && activeStep > index) {\n state.completed = true;\n } else if (!nonLinear && activeStep < index) {\n state.disabled = true;\n }\n\n return /*#__PURE__*/React.cloneElement(step, _extends({\n alternativeLabel: alternativeLabel,\n connector: connector,\n last: index + 1 === childrenArray.length,\n orientation: orientation\n }, state, step.props));\n });\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel),\n ref: ref\n }, other), steps);\n});\nprocess.env.NODE_ENV !== \"production\" ? Stepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Set to -1 to disable all the steps.\n */\n activeStep: PropTypes.number,\n\n /**\n * If set to 'true' and orientation is horizontal,\n * then the step label will be positioned under the icon.\n */\n alternativeLabel: PropTypes.bool,\n\n /**\n * Two or more `` components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * An element to be placed between each step.\n */\n connector: PropTypes.element,\n\n /**\n * If set the `Stepper` will not assist in controlling steps for linear flow.\n */\n nonLinear: PropTypes.bool,\n\n /**\n * The stepper orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepper'\n})(Stepper);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport { isHorizontal } from '../Drawer/Drawer';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'fixed',\n top: 0,\n left: 0,\n bottom: 0,\n zIndex: theme.zIndex.drawer - 1\n },\n anchorLeft: {\n right: 'auto'\n },\n anchorRight: {\n left: 'auto',\n right: 0\n },\n anchorTop: {\n bottom: 'auto',\n right: 0\n },\n anchorBottom: {\n top: 'auto',\n bottom: 0,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwipeArea = /*#__PURE__*/React.forwardRef(function SwipeArea(props, ref) {\n var anchor = props.anchor,\n classes = props.classes,\n className = props.className,\n width = props.width,\n other = _objectWithoutProperties(props, [\"anchor\", \"classes\", \"className\", \"width\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"anchor\".concat(capitalize(anchor))], className),\n ref: ref,\n style: _defineProperty({}, isHorizontal(anchor) ? 'width' : 'height', width)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeArea.propTypes = {\n /**\n * Side on which to attach the discovery area.\n */\n anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']).isRequired,\n\n /**\n * @ignore\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n width: PropTypes.number.isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwipeArea'\n})(SwipeArea);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps } from '../transitions/utils';\nimport NoSsr from '../NoSsr';\nimport SwipeArea from './SwipeArea'; // This value is closed to what browsers are using internally to\n// trigger a native scroll.\n\nvar UNCERTAINTY_THRESHOLD = 3; // px\n// We can only have one node at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\n\nvar nodeThatClaimedTheSwipe = null; // Exported for test purposes.\n\nexport function reset() {\n nodeThatClaimedTheSwipe = null;\n}\n\nfunction calculateCurrentX(anchor, touches) {\n return anchor === 'right' ? document.body.offsetWidth - touches[0].pageX : touches[0].pageX;\n}\n\nfunction calculateCurrentY(anchor, touches) {\n return anchor === 'bottom' ? window.innerHeight - touches[0].clientY : touches[0].clientY;\n}\n\nfunction getMaxTranslate(horizontalSwipe, paperInstance) {\n return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight;\n}\n\nfunction getTranslate(currentTranslate, startLocation, open, maxTranslate) {\n return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate);\n}\n\nfunction getDomTreeShapes(element, rootNode) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129\n var domTreeShapes = [];\n\n while (element && element !== rootNode) {\n var style = window.getComputedStyle(element);\n\n if ( // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n domTreeShapes = [];\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push(element);\n }\n\n element = element.parentElement;\n }\n\n return domTreeShapes;\n}\n\nfunction findNativeHandler(_ref) {\n var domTreeShapes = _ref.domTreeShapes,\n start = _ref.start,\n current = _ref.current,\n anchor = _ref.anchor;\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175\n var axisProperties = {\n scrollPosition: {\n x: 'scrollLeft',\n y: 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n y: 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n y: 'clientHeight'\n }\n };\n return domTreeShapes.some(function (shape) {\n // Determine if we are going backward or forward.\n var goingForward = current >= start;\n\n if (anchor === 'top' || anchor === 'left') {\n goingForward = !goingForward;\n }\n\n var axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y';\n var scrollPosition = shape[axisProperties.scrollPosition[axis]];\n var areNotAtStart = scrollPosition > 0;\n var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n return shape;\n }\n\n return null;\n });\n}\n\nvar iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);\nvar transitionDurationDefault = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {\n var theme = useTheme();\n var props = getThemeProps({\n name: 'MuiSwipeableDrawer',\n props: _extends({}, inProps),\n theme: theme\n });\n var _props$anchor = props.anchor,\n anchor = _props$anchor === void 0 ? 'left' : _props$anchor,\n _props$disableBackdro = props.disableBackdropTransition,\n disableBackdropTransition = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableDiscove = props.disableDiscovery,\n disableDiscovery = _props$disableDiscove === void 0 ? false : _props$disableDiscove,\n _props$disableSwipeTo = props.disableSwipeToOpen,\n disableSwipeToOpen = _props$disableSwipeTo === void 0 ? iOS : _props$disableSwipeTo,\n hideBackdrop = props.hideBackdrop,\n _props$hysteresis = props.hysteresis,\n hysteresis = _props$hysteresis === void 0 ? 0.52 : _props$hysteresis,\n _props$minFlingVeloci = props.minFlingVelocity,\n minFlingVelocity = _props$minFlingVeloci === void 0 ? 450 : _props$minFlingVeloci,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropProps = _props$ModalProps.BackdropProps,\n ModalPropsProp = _objectWithoutProperties(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n onOpen = props.onOpen,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SwipeAreaProps = props.SwipeAreaProps,\n _props$swipeAreaWidth = props.swipeAreaWidth,\n swipeAreaWidth = _props$swipeAreaWidth === void 0 ? 20 : _props$swipeAreaWidth,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? transitionDurationDefault : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchor\", \"disableBackdropTransition\", \"disableDiscovery\", \"disableSwipeToOpen\", \"hideBackdrop\", \"hysteresis\", \"minFlingVelocity\", \"ModalProps\", \"onClose\", \"onOpen\", \"open\", \"PaperProps\", \"SwipeAreaProps\", \"swipeAreaWidth\", \"transitionDuration\", \"variant\"]);\n\n var _React$useState = React.useState(false),\n maybeSwiping = _React$useState[0],\n setMaybeSwiping = _React$useState[1];\n\n var swipeInstance = React.useRef({\n isSwiping: null\n });\n var swipeAreaRef = React.useRef();\n var backdropRef = React.useRef();\n var paperRef = React.useRef();\n var touchDetected = React.useRef(false); // Ref for transition duration based on / to match swipe speed\n\n var calculatedDurationRef = React.useRef(); // Use a ref so the open value used is always up to date inside useCallback.\n\n useEnhancedEffect(function () {\n calculatedDurationRef.current = null;\n }, [open]);\n var setPosition = React.useCallback(function (translate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$mode = options.mode,\n mode = _options$mode === void 0 ? null : _options$mode,\n _options$changeTransi = options.changeTransition,\n changeTransition = _options$changeTransi === void 0 ? true : _options$changeTransi;\n var anchorRtl = getAnchor(theme, anchor);\n var rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1;\n var horizontalSwipe = isHorizontal(anchor);\n var transform = horizontalSwipe ? \"translate(\".concat(rtlTranslateMultiplier * translate, \"px, 0)\") : \"translate(0, \".concat(rtlTranslateMultiplier * translate, \"px)\");\n var drawerStyle = paperRef.current.style;\n drawerStyle.webkitTransform = transform;\n drawerStyle.transform = transform;\n var transition = '';\n\n if (mode) {\n transition = theme.transitions.create('all', getTransitionProps({\n timeout: transitionDuration\n }, {\n mode: mode\n }));\n }\n\n if (changeTransition) {\n drawerStyle.webkitTransition = transition;\n drawerStyle.transition = transition;\n }\n\n if (!disableBackdropTransition && !hideBackdrop) {\n var backdropStyle = backdropRef.current.style;\n backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current);\n\n if (changeTransition) {\n backdropStyle.webkitTransition = transition;\n backdropStyle.transition = transition;\n }\n }\n }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);\n var handleBodyTouchEnd = useEventCallback(function (event) {\n if (!touchDetected.current) {\n return;\n }\n\n nodeThatClaimedTheSwipe = null;\n touchDetected.current = false;\n setMaybeSwiping(false); // The swipe wasn't started.\n\n if (!swipeInstance.current.isSwiping) {\n swipeInstance.current.isSwiping = null;\n return;\n }\n\n swipeInstance.current.isSwiping = null;\n var anchorRtl = getAnchor(theme, anchor);\n var horizontal = isHorizontal(anchor);\n var current;\n\n if (horizontal) {\n current = calculateCurrentX(anchorRtl, event.changedTouches);\n } else {\n current = calculateCurrentY(anchorRtl, event.changedTouches);\n }\n\n var startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY;\n var maxTranslate = getMaxTranslate(horizontal, paperRef.current);\n var currentTranslate = getTranslate(current, startLocation, open, maxTranslate);\n var translateRatio = currentTranslate / maxTranslate;\n\n if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) {\n // Calculate transition duration to match swipe speed\n calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000;\n }\n\n if (open) {\n if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) {\n onClose();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(0, {\n mode: 'exit'\n });\n }\n\n return;\n }\n\n if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) {\n onOpen();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(getMaxTranslate(horizontal, paperRef.current), {\n mode: 'enter'\n });\n }\n });\n var handleBodyTouchMove = useEventCallback(function (event) {\n // the ref may be null when a parent component updates while swiping\n if (!paperRef.current || !touchDetected.current) {\n return;\n } // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer\n\n\n if (nodeThatClaimedTheSwipe != null && nodeThatClaimedTheSwipe !== swipeInstance.current) {\n return;\n }\n\n var anchorRtl = getAnchor(theme, anchor);\n var horizontalSwipe = isHorizontal(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (open && paperRef.current.contains(event.target) && nodeThatClaimedTheSwipe == null) {\n var domTreeShapes = getDomTreeShapes(event.target, paperRef.current);\n var nativeHandler = findNativeHandler({\n domTreeShapes: domTreeShapes,\n start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY,\n current: horizontalSwipe ? currentX : currentY,\n anchor: anchor\n });\n\n if (nativeHandler) {\n nodeThatClaimedTheSwipe = nativeHandler;\n return;\n }\n\n nodeThatClaimedTheSwipe = swipeInstance.current;\n } // We don't know yet.\n\n\n if (swipeInstance.current.isSwiping == null) {\n var dx = Math.abs(currentX - swipeInstance.current.startX);\n var dy = Math.abs(currentY - swipeInstance.current.startY); // We are likely to be swiping, let's prevent the scroll event on iOS.\n\n if (dx > dy) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n\n var definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD;\n\n if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) {\n swipeInstance.current.isSwiping = definitelySwiping;\n\n if (!definitelySwiping) {\n handleBodyTouchEnd(event);\n return;\n } // Shift the starting point.\n\n\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY; // Compensate for the part of the drawer displayed on touch start.\n\n if (!disableDiscovery && !open) {\n if (horizontalSwipe) {\n swipeInstance.current.startX -= swipeAreaWidth;\n } else {\n swipeInstance.current.startY -= swipeAreaWidth;\n }\n }\n }\n }\n\n if (!swipeInstance.current.isSwiping) {\n return;\n }\n\n var maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current);\n var startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY;\n\n if (open && !swipeInstance.current.paperHit) {\n startLocation = Math.min(startLocation, maxTranslate);\n }\n\n var translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate);\n\n if (open) {\n if (!swipeInstance.current.paperHit) {\n var paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate;\n\n if (paperHit) {\n swipeInstance.current.paperHit = true;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n } else {\n return;\n }\n } else if (translate === 0) {\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n }\n }\n\n if (swipeInstance.current.lastTranslate === null) {\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now() + 1;\n }\n\n var velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3; // Low Pass filter.\n\n swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6;\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now(); // We are swiping, let's prevent the scroll event on iOS.\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n setPosition(translate);\n });\n var handleBodyTouchStart = useEventCallback(function (event) {\n // We are not supposed to handle this touch move.\n // Example of use case: ignore the event if there is a Slider.\n if (event.defaultPrevented) {\n return;\n } // We can only have one node at the time claiming ownership for handling the swipe.\n\n\n if (event.muiHandled) {\n return;\n } // At least one element clogs the drawer interaction zone.\n\n\n if (open && !backdropRef.current.contains(event.target) && !paperRef.current.contains(event.target)) {\n return;\n }\n\n var anchorRtl = getAnchor(theme, anchor);\n var horizontalSwipe = isHorizontal(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (!open) {\n if (disableSwipeToOpen || event.target !== swipeAreaRef.current) {\n return;\n }\n\n if (horizontalSwipe) {\n if (currentX > swipeAreaWidth) {\n return;\n }\n } else if (currentY > swipeAreaWidth) {\n return;\n }\n }\n\n event.muiHandled = true;\n nodeThatClaimedTheSwipe = null;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n setMaybeSwiping(true);\n\n if (!open && paperRef.current) {\n // The ref may be null when a parent component updates while swiping.\n setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 20 : -swipeAreaWidth), {\n changeTransition: false\n });\n }\n\n swipeInstance.current.velocity = 0;\n swipeInstance.current.lastTime = null;\n swipeInstance.current.lastTranslate = null;\n swipeInstance.current.paperHit = false;\n touchDetected.current = true;\n });\n React.useEffect(function () {\n if (variant === 'temporary') {\n var doc = ownerDocument(paperRef.current);\n doc.addEventListener('touchstart', handleBodyTouchStart);\n doc.addEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.addEventListener('touchend', handleBodyTouchEnd);\n return function () {\n doc.removeEventListener('touchstart', handleBodyTouchStart);\n doc.removeEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.removeEventListener('touchend', handleBodyTouchEnd);\n };\n }\n\n return undefined;\n }, [variant, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]);\n React.useEffect(function () {\n return function () {\n // We need to release the lock.\n if (nodeThatClaimedTheSwipe === swipeInstance.current) {\n nodeThatClaimedTheSwipe = null;\n }\n };\n }, []);\n React.useEffect(function () {\n if (!open) {\n setMaybeSwiping(false);\n }\n }, [open]);\n var handleBackdropRef = React.useCallback(function (instance) {\n // #StrictMode ready\n backdropRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, _extends({\n open: variant === 'temporary' && maybeSwiping ? true : open,\n variant: variant,\n ModalProps: _extends({\n BackdropProps: _extends({}, BackdropProps, {\n ref: handleBackdropRef\n })\n }, ModalPropsProp),\n PaperProps: _extends({}, PaperProps, {\n style: _extends({\n pointerEvents: variant === 'temporary' && !open ? 'none' : ''\n }, PaperProps.style),\n ref: paperRef\n }),\n anchor: anchor,\n transitionDuration: calculatedDurationRef.current || transitionDuration,\n onClose: onClose,\n ref: ref\n }, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/React.createElement(NoSsr, null, /*#__PURE__*/React.createElement(SwipeArea, _extends({\n anchor: anchor,\n ref: swipeAreaRef,\n width: swipeAreaWidth\n }, SwipeAreaProps))));\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeableDrawer.propTypes = {\n /**\n * @ignore\n */\n anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Disable the backdrop transition.\n * This can improve the FPS on low-end devices.\n */\n disableBackdropTransition: PropTypes.bool,\n\n /**\n * If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit\n * to promote accidental discovery of the swipe gesture.\n */\n disableDiscovery: PropTypes.bool,\n\n /**\n * If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers\n * navigation actions. Swipe to open is disabled on iOS browsers by default.\n */\n disableSwipeToOpen: PropTypes.bool,\n\n /**\n * @ignore\n */\n hideBackdrop: PropTypes.bool,\n\n /**\n * Affects how far the drawer must be opened/closed to change his state.\n * Specified as percent (0-1) of the width of the drawer\n */\n hysteresis: PropTypes.number,\n\n /**\n * Defines, from which (average) velocity on, the swipe is\n * defined as complete although hysteresis isn't reached.\n * Good threshold is between 250 - 1000 px/s\n */\n minFlingVelocity: PropTypes.number,\n\n /**\n * @ignore\n */\n ModalProps: PropTypes.shape({\n BackdropProps: PropTypes.shape({\n component: elementTypeAcceptingRef\n })\n }),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the component requests to be opened.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func.isRequired,\n\n /**\n * If `true`, the drawer is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: PropTypes.shape({\n component: elementTypeAcceptingRef,\n style: PropTypes.object\n }),\n\n /**\n * The element is used to intercept the touch events on the edge.\n */\n SwipeAreaProps: PropTypes.object,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n swipeAreaWidth: PropTypes.number,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * @ignore\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default SwipeableDrawer;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// @inheritedComponent IconButton\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport SwitchBase from '../internal/SwitchBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -8\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -8\n },\n\n /* Styles applied to the internal `SwitchBase` component's `root` class. */\n switchBase: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400],\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n '&$checked': {\n transform: 'translateX(20px)'\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n opacity: 0.5\n },\n '&$disabled + $track': {\n opacity: theme.palette.type === 'light' ? 0.12 : 0.1\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.primary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.secondary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n width: 40,\n height: 24,\n padding: 7,\n '& $thumb': {\n width: 16,\n height: 16\n },\n '& $switchBase': {\n padding: 4,\n '&$checked': {\n transform: 'translateX(16px)'\n }\n }\n },\n\n /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */\n checked: {},\n\n /* Pseudo-class applied to the internal SwitchBase component's disabled class. */\n disabled: {},\n\n /* Styles applied to the internal SwitchBase component's input element. */\n input: {\n left: '-100%',\n width: '300%'\n },\n\n /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */\n thumb: {\n boxShadow: theme.shadows[1],\n backgroundColor: 'currentColor',\n width: 20,\n height: 20,\n borderRadius: '50%'\n },\n\n /* Styles applied to the track element. */\n track: {\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,\n opacity: theme.palette.type === 'light' ? 0.38 : 0.3\n }\n };\n};\nvar Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"edge\", \"size\"]);\n\n var icon = /*#__PURE__*/React.createElement(\"span\", {\n className: classes.thumb\n });\n return /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.root, className, {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge], size === \"small\" && classes[\"size\".concat(capitalize(size))])\n }, /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n classes: {\n root: clsx(classes.switchBase, classes[\"color\".concat(capitalize(color))]),\n input: classes.input,\n checked: classes.checked,\n disabled: classes.disabled\n },\n ref: ref\n }, other)), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the switch.\n * `small` is equivalent to the dense switch styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSwitch'\n})(Switch);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n overflowX: 'auto'\n }\n};\nvar TableContainer = /*#__PURE__*/React.forwardRef(function TableContainer(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableContainer.propTypes = {\n /**\n * The table itself, normally ``\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableContainer'\n})(TableContainer);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-footer-group'\n }\n};\nvar tablelvl2 = {\n variant: 'footer'\n};\nvar defaultComponent = 'tfoot';\nvar TableFooter = /*#__PURE__*/React.forwardRef(function TableFooter(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableFooter.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableFooter'\n})(TableFooter);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport useTheme from '../styles/useTheme';\nimport IconButton from '../IconButton';\n/**\n * @ignore - internal component.\n */\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowRight, null);\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowLeft, null);\n\nvar _ref3 = /*#__PURE__*/React.createElement(KeyboardArrowLeft, null);\n\nvar _ref4 = /*#__PURE__*/React.createElement(KeyboardArrowRight, null);\n\nvar TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {\n var backIconButtonProps = props.backIconButtonProps,\n count = props.count,\n nextIconButtonProps = props.nextIconButtonProps,\n _props$onChangePage = props.onChangePage,\n onChangePage = _props$onChangePage === void 0 ? function () {} : _props$onChangePage,\n _props$onPageChange = props.onPageChange,\n onPageChange = _props$onPageChange === void 0 ? function () {} : _props$onPageChange,\n page = props.page,\n rowsPerPage = props.rowsPerPage,\n other = _objectWithoutProperties(props, [\"backIconButtonProps\", \"count\", \"nextIconButtonProps\", \"onChangePage\", \"onPageChange\", \"page\", \"rowsPerPage\"]);\n\n var theme = useTheme();\n\n var handleBackButtonClick = function handleBackButtonClick(event) {\n onChangePage(event, page - 1);\n onPageChange(event, page - 1);\n };\n\n var handleNextButtonClick = function handleNextButtonClick(event) {\n onChangePage(event, page + 1);\n onPageChange(event, page + 1);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref\n }, other), /*#__PURE__*/React.createElement(IconButton, _extends({\n onClick: handleBackButtonClick,\n disabled: page === 0,\n color: \"inherit\"\n }, backIconButtonProps), theme.direction === 'rtl' ? _ref : _ref2), /*#__PURE__*/React.createElement(IconButton, _extends({\n onClick: handleNextButtonClick,\n disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false,\n color: \"inherit\"\n }, nextIconButtonProps), theme.direction === 'rtl' ? _ref3 : _ref4));\n});\nprocess.env.NODE_ENV !== \"production\" ? TablePaginationActions.propTypes = {\n /**\n * Props applied to the back arrow [`IconButton`](/api/icon-button/) element.\n */\n backIconButtonProps: PropTypes.object,\n\n /**\n * The total number of rows.\n */\n count: PropTypes.number.isRequired,\n\n /**\n * Props applied to the next arrow [`IconButton`](/api/icon-button/) element.\n */\n nextIconButtonProps: PropTypes.object,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onChangePage: PropTypes.func,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onPageChange: PropTypes.func,\n\n /**\n * The zero-based index of the current page.\n */\n page: PropTypes.number.isRequired,\n\n /**\n * The number of rows per page.\n */\n rowsPerPage: PropTypes.number.isRequired\n} : void 0;\nexport default TablePaginationActions;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@material-ui/utils';\nimport clsx from 'clsx';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport InputBase from '../InputBase';\nimport MenuItem from '../MenuItem';\nimport Select from '../Select';\nimport TableCell from '../TableCell';\nimport Toolbar from '../Toolbar';\nimport Typography from '../Typography';\nimport TablePaginationActions from './TablePaginationActions';\nimport useId from '../utils/unstable_useId';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.primary,\n fontSize: theme.typography.pxToRem(14),\n overflow: 'auto',\n // Increase the specificity to override TableCell.\n '&:last-child': {\n padding: 0\n }\n },\n\n /* Styles applied to the Toolbar component. */\n toolbar: {\n minHeight: 52,\n paddingRight: 2\n },\n\n /* Styles applied to the spacer element. */\n spacer: {\n flex: '1 1 100%'\n },\n\n /* Styles applied to the caption Typography components if `variant=\"caption\"`. */\n caption: {\n flexShrink: 0\n },\n // TODO v5: `.selectRoot` should be merged with `.input`\n\n /* Styles applied to the Select component root element. */\n selectRoot: {\n marginRight: 32,\n marginLeft: 8\n },\n\n /* Styles applied to the Select component `select` class. */\n select: {\n paddingLeft: 8,\n paddingRight: 24,\n textAlign: 'right',\n textAlignLast: 'right' // Align children such as `TableCell`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n */\n hover: PropTypes.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n */\n selected: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableRow'\n})(TableRow);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: 40,\n flexShrink: 0,\n opacity: 0.8,\n '&$disabled': {\n opacity: 0\n }\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n width: '100%',\n height: 40,\n '& svg': {\n transform: 'rotate(90deg)'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {}\n};\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowLeft, {\n fontSize: \"small\"\n});\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowRight, {\n fontSize: \"small\"\n});\n\nvar TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(props, ref) {\n var classes = props.classes,\n classNameProp = props.className,\n direction = props.direction,\n orientation = props.orientation,\n disabled = props.disabled,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"direction\", \"orientation\", \"disabled\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"div\",\n className: clsx(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),\n ref: ref,\n role: null,\n tabIndex: null\n }, other), direction === 'left' ? _ref : _ref2);\n});\nprocess.env.NODE_ENV !== \"production\" ? TabScrollButton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Which direction should the button indicate?\n */\n direction: PropTypes.oneOf(['left', 'right']).isRequired,\n\n /**\n * If `true`, the element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabScrollButton'\n})(TabScrollButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { deepmerge, elementAcceptingRef } from '@material-ui/utils';\nimport { alpha } from '../styles/colorManipulator';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport Grow from '../Grow';\nimport Popper from '../Popper';\nimport useForkRef from '../utils/useForkRef';\nimport useId from '../utils/unstable_useId';\nimport setRef from '../utils/setRef';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useControlled from '../utils/useControlled';\nimport useTheme from '../styles/useTheme';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nfunction arrowGenerator() {\n return {\n '&[x-placement*=\"bottom\"] $arrow': {\n top: 0,\n left: 0,\n marginTop: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n '&[x-placement*=\"top\"] $arrow': {\n bottom: 0,\n left: 0,\n marginBottom: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n '&[x-placement*=\"right\"] $arrow': {\n left: 0,\n marginLeft: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n '&[x-placement*=\"left\"] $arrow': {\n right: 0,\n marginRight: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n };\n}\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the Popper component. */\n popper: {\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none' // disable jss-rtl plugin\n\n },\n\n /* Styles applied to the Popper component if `interactive={true}`. */\n popperInteractive: {\n pointerEvents: 'auto'\n },\n\n /* Styles applied to the Popper component if `arrow={true}`. */\n popperArrow: arrowGenerator(),\n\n /* Styles applied to the tooltip (label wrapper) element. */\n tooltip: {\n backgroundColor: alpha(theme.palette.grey[700], 0.9),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(10),\n lineHeight: \"\".concat(round(14 / 10), \"em\"),\n maxWidth: 300,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */\n tooltipArrow: {\n position: 'relative',\n margin: '0'\n },\n\n /* Styles applied to the arrow element. */\n arrow: {\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n },\n\n /* Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */\n touch: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: \"\".concat(round(16 / 14), \"em\"),\n fontWeight: theme.typography.fontWeightRegular\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"left\". */\n tooltipPlacementLeft: _defineProperty({\n transformOrigin: 'right center',\n margin: '0 24px '\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"right\". */\n tooltipPlacementRight: _defineProperty({\n transformOrigin: 'left center',\n margin: '0 24px'\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"top\". */\n tooltipPlacementTop: _defineProperty({\n transformOrigin: 'center bottom',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"bottom\". */\n tooltipPlacementBottom: _defineProperty({\n transformOrigin: 'center top',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n })\n };\n};\nvar hystersisOpen = false;\nvar hystersisTimer = null;\nexport function testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\nvar Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {\n var _props$arrow = props.arrow,\n arrow = _props$arrow === void 0 ? false : _props$arrow,\n children = props.children,\n classes = props.classes,\n _props$disableFocusLi = props.disableFocusListener,\n disableFocusListener = _props$disableFocusLi === void 0 ? false : _props$disableFocusLi,\n _props$disableHoverLi = props.disableHoverListener,\n disableHoverListener = _props$disableHoverLi === void 0 ? false : _props$disableHoverLi,\n _props$disableTouchLi = props.disableTouchListener,\n disableTouchListener = _props$disableTouchLi === void 0 ? false : _props$disableTouchLi,\n _props$enterDelay = props.enterDelay,\n enterDelay = _props$enterDelay === void 0 ? 100 : _props$enterDelay,\n _props$enterNextDelay = props.enterNextDelay,\n enterNextDelay = _props$enterNextDelay === void 0 ? 0 : _props$enterNextDelay,\n _props$enterTouchDela = props.enterTouchDelay,\n enterTouchDelay = _props$enterTouchDela === void 0 ? 700 : _props$enterTouchDela,\n idProp = props.id,\n _props$interactive = props.interactive,\n interactive = _props$interactive === void 0 ? false : _props$interactive,\n _props$leaveDelay = props.leaveDelay,\n leaveDelay = _props$leaveDelay === void 0 ? 0 : _props$leaveDelay,\n _props$leaveTouchDela = props.leaveTouchDelay,\n leaveTouchDelay = _props$leaveTouchDela === void 0 ? 1500 : _props$leaveTouchDela,\n onClose = props.onClose,\n onOpen = props.onOpen,\n openProp = props.open,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'bottom' : _props$placement,\n _props$PopperComponen = props.PopperComponent,\n PopperComponent = _props$PopperComponen === void 0 ? Popper : _props$PopperComponen,\n PopperProps = props.PopperProps,\n title = props.title,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"arrow\", \"children\", \"classes\", \"disableFocusListener\", \"disableHoverListener\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"id\", \"interactive\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var theme = useTheme();\n\n var _React$useState = React.useState(),\n childNode = _React$useState[0],\n setChildNode = _React$useState[1];\n\n var _React$useState2 = React.useState(null),\n arrowRef = _React$useState2[0],\n setArrowRef = _React$useState2[1];\n\n var ignoreNonTouchEvents = React.useRef(false);\n var closeTimer = React.useRef();\n var enterTimer = React.useRef();\n var leaveTimer = React.useRef();\n var touchTimer = React.useRef();\n\n var _useControlled = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n openState = _useControlled2[0],\n setOpenState = _useControlled2[1];\n\n var open = openState;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var _React$useRef = React.useRef(openProp !== undefined),\n isControlled = _React$useRef.current; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n\n React.useEffect(function () {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n var id = useId(idProp);\n React.useEffect(function () {\n return function () {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n clearTimeout(touchTimer.current);\n };\n }, []);\n\n var handleOpen = function handleOpen(event) {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen) {\n onOpen(event);\n }\n };\n\n var handleEnter = function handleEnter() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'mouseover' && childrenProps.onMouseOver && forward) {\n childrenProps.onMouseOver(event);\n }\n\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n event.persist();\n enterTimer.current = setTimeout(function () {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n };\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(false),\n childIsFocusVisible = _React$useState3[0],\n setChildIsFocusVisible = _React$useState3[1];\n\n var handleBlur = function handleBlur() {\n if (childIsFocusVisible) {\n setChildIsFocusVisible(false);\n onBlurVisible();\n }\n };\n\n var handleFocus = function handleFocus() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n if (isFocusVisible(event)) {\n setChildIsFocusVisible(true);\n handleEnter()(event);\n }\n\n var childrenProps = children.props;\n\n if (childrenProps.onFocus && forward) {\n childrenProps.onFocus(event);\n }\n };\n };\n\n var handleClose = function handleClose(event) {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(function () {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(function () {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n };\n\n var handleLeave = function handleLeave() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'blur') {\n if (childrenProps.onBlur && forward) {\n childrenProps.onBlur(event);\n }\n\n handleBlur();\n }\n\n if (event.type === 'mouseleave' && childrenProps.onMouseLeave && event.currentTarget === childNode) {\n childrenProps.onMouseLeave(event);\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveDelay);\n };\n };\n\n var detectTouchStart = function detectTouchStart(event) {\n ignoreNonTouchEvents.current = true;\n var childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n var handleTouchStart = function handleTouchStart(event) {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n clearTimeout(touchTimer.current);\n event.persist();\n touchTimer.current = setTimeout(function () {\n handleEnter()(event);\n }, enterTouchDelay);\n };\n\n var handleTouchEnd = function handleTouchEnd(event) {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n var handleUseRef = useForkRef(setChildNode, ref);\n var handleFocusRef = useForkRef(focusVisibleRef, handleUseRef); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n setRef(handleFocusRef, ReactDOM.findDOMNode(instance));\n }, [handleFocusRef]);\n var handleRef = useForkRef(children.ref, handleOwnRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n } // For accessibility and SEO concerns, we render the title to the DOM node when\n // the tooltip is hidden. However, we have made a tradeoff when\n // `disableHoverListener` is set. This title logic is disabled.\n // It's allowing us to keep the implementation size minimal.\n // We are open to change the tradeoff.\n\n\n var shouldShowNativeTitle = !open && !disableHoverListener;\n\n var childrenProps = _extends({\n 'aria-describedby': open ? id : null,\n title: shouldShowNativeTitle && typeof title === 'string' ? title : null\n }, other, children.props, {\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n });\n\n var interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = handleEnter();\n childrenProps.onMouseLeave = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onMouseOver = handleEnter(false);\n interactiveWrapperListeners.onMouseLeave = handleLeave(false);\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = handleFocus();\n childrenProps.onBlur = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onFocus = handleFocus(false);\n interactiveWrapperListeners.onBlur = handleLeave(false);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', \"Remove this title prop `\".concat(children.props.title, \"` or the Tooltip component.\")].join('\\n'));\n }\n }\n\n var mergedPopperProps = React.useMemo(function () {\n return deepmerge({\n popperOptions: {\n modifiers: {\n arrow: {\n enabled: Boolean(arrowRef),\n element: arrowRef\n }\n }\n }\n }, PopperProps);\n }, [arrowRef, PopperProps]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/React.createElement(PopperComponent, _extends({\n className: clsx(classes.popper, interactive && classes.popperInteractive, arrow && classes.popperArrow),\n placement: placement,\n anchorEl: childNode,\n open: childNode ? open : false,\n id: childrenProps['aria-describedby'],\n transition: true\n }, interactiveWrapperListeners, mergedPopperProps), function (_ref) {\n var placementInner = _ref.placement,\n TransitionPropsInner = _ref.TransitionProps;\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.tooltip, classes[\"tooltipPlacement\".concat(capitalize(placementInner.split('-')[0]))], ignoreNonTouchEvents.current && classes.touch, arrow && classes.tooltipArrow)\n }, title, arrow ? /*#__PURE__*/React.createElement(\"span\", {\n className: classes.arrow,\n ref: setArrowRef\n }) : null));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n */\n arrow: PropTypes.bool,\n\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Do not respond to focus events.\n */\n disableFocusListener: PropTypes.bool,\n\n /**\n * Do not respond to hover events.\n */\n disableHoverListener: PropTypes.bool,\n\n /**\n * Do not respond to long press touch events.\n */\n disableTouchListener: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n */\n enterDelay: PropTypes.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n */\n enterNextDelay: PropTypes.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n */\n enterTouchDelay: PropTypes.number,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n\n /**\n * Makes a tooltip interactive, i.e. will not close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n */\n interactive: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n */\n leaveDelay: PropTypes.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n */\n leaveTouchDelay: PropTypes.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n\n /**\n * If `true`, the tooltip is shown.\n */\n open: PropTypes.bool,\n\n /**\n * Tooltip placement.\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n */\n PopperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTooltip',\n flip: false\n})(Tooltip);","// Source from https://github.com/alitaheri/normalize-scroll-left\nvar cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.\n *\n * Type | <- Most Left | Most Right -> | Initial\n * ---------------- | ------------ | ------------- | -------\n * default | 0 | 100 | 100\n * negative (spec*) | -100 | 0 | 0\n * reverse | 100 | 0 | 0\n *\n * Edge 85: default\n * Safari 14: negative\n * Chrome 85: negative\n * Firefox 81: negative\n * IE 11: reverse\n *\n * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll\n */\n\nexport function detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n\n var dummy = document.createElement('div');\n var container = document.createElement('div');\n container.style.width = '10px';\n container.style.height = '1px';\n dummy.appendChild(container);\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n\n document.body.removeChild(dummy);\n return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nexport function getNormalizedScrollLeft(element, direction) {\n var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior\n\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n var type = detectScrollType();\n\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n\n default:\n return scrollLeft;\n }\n}","function easeInOutSin(time) {\n return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};\n var _options$ease = options.ease,\n ease = _options$ease === void 0 ? easeInOutSin : _options$ease,\n _options$duration = options.duration,\n duration = _options$duration === void 0 ? 300 : _options$duration;\n var start = null;\n var from = element[property];\n var cancelled = false;\n\n var cancel = function cancel() {\n cancelled = true;\n };\n\n var step = function step(timestamp) {\n if (cancelled) {\n cb(new Error('Animation cancelled'));\n return;\n }\n\n if (start === null) {\n start = timestamp;\n }\n\n var time = Math.min(1, (timestamp - start) / duration);\n element[property] = ease(time) * (to - from) + from;\n\n if (time >= 1) {\n requestAnimationFrame(function () {\n cb(null);\n });\n return;\n }\n\n requestAnimationFrame(step);\n };\n\n if (from === to) {\n cb(new Error('Element already at target position'));\n return cancel;\n }\n\n requestAnimationFrame(step);\n return cancel;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nvar styles = {\n width: 99,\n height: 99,\n position: 'absolute',\n top: -9999,\n overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nexport default function ScrollbarSize(props) {\n var onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"onChange\"]);\n\n var scrollbarHeight = React.useRef();\n var nodeRef = React.useRef(null);\n\n var setMeasurements = function setMeasurements() {\n scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n };\n\n React.useEffect(function () {\n var handleResize = debounce(function () {\n var prevHeight = scrollbarHeight.current;\n setMeasurements();\n\n if (prevHeight !== scrollbarHeight.current) {\n onChange(scrollbarHeight.current);\n }\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [onChange]);\n React.useEffect(function () {\n setMeasurements();\n onChange(scrollbarHeight.current);\n }, [onChange]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n style: styles,\n ref: nodeRef\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? ScrollbarSize.propTypes = {\n onChange: PropTypes.func.isRequired\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'absolute',\n height: 2,\n bottom: 0,\n width: '100%',\n transition: theme.transitions.create()\n },\n colorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n vertical: {\n height: '100%',\n width: 2,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar TabIndicator = /*#__PURE__*/React.forwardRef(function TabIndicator(props, ref) {\n var classes = props.classes,\n className = props.className,\n color = props.color,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TabIndicator.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * The color of the tab indicator.\n */\n color: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateTabIndicator'\n})(TabIndicator);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport debounce from '../utils/debounce';\nimport ownerWindow from '../utils/ownerWindow';\nimport { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';\nimport animate from '../internal/animate';\nimport ScrollbarSize from './ScrollbarSize';\nimport withStyles from '../styles/withStyles';\nimport TabIndicator from './TabIndicator';\nimport TabScrollButton from '../TabScrollButton';\nimport useEventCallback from '../utils/useEventCallback';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n minHeight: 48,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n display: 'flex'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element. */\n flexContainer: {\n display: 'flex'\n },\n\n /* Styles applied to the flex container element if `orientation=\"vertical\"`. */\n flexContainerVertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element if `centered={true}` & `!variant=\"scrollable\"`. */\n centered: {\n justifyContent: 'center'\n },\n\n /* Styles applied to the tablist element. */\n scroller: {\n position: 'relative',\n display: 'inline-block',\n flex: '1 1 auto',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the tablist element if `!variant=\"scrollable\"`\b\b\b. */\n fixed: {\n overflowX: 'hidden',\n width: '100%'\n },\n\n /* Styles applied to the tablist element if `variant=\"scrollable\"`. */\n scrollable: {\n overflowX: 'scroll',\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n },\n\n /* Styles applied to the `ScrollButtonComponent` component. */\n scrollButtons: {},\n\n /* Styles applied to the `ScrollButtonComponent` component if `scrollButtons=\"auto\"` or scrollButtons=\"desktop\"`. */\n scrollButtonsDesktop: _defineProperty({}, theme.breakpoints.down('xs'), {\n display: 'none'\n }),\n\n /* Styles applied to the `TabIndicator` component. */\n indicator: {}\n };\n};\nvar Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledBy = props['aria-labelledby'],\n action = props.action,\n _props$centered = props.centered,\n centered = _props$centered === void 0 ? false : _props$centered,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$indicatorColor = props.indicatorColor,\n indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,\n onChange = props.onChange,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$ScrollButtonCo = props.ScrollButtonComponent,\n ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton : _props$ScrollButtonCo,\n _props$scrollButtons = props.scrollButtons,\n scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,\n selectionFollowsFocus = props.selectionFollowsFocus,\n _props$TabIndicatorPr = props.TabIndicatorProps,\n TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,\n TabScrollButtonProps = props.TabScrollButtonProps,\n _props$textColor = props.textColor,\n textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n value = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"classes\", \"className\", \"component\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\"]);\n\n var theme = useTheme();\n var scrollable = variant === 'scrollable';\n var isRtl = theme.direction === 'rtl';\n var vertical = orientation === 'vertical';\n var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n var start = vertical ? 'top' : 'left';\n var end = vertical ? 'bottom' : 'right';\n var clientSize = vertical ? 'clientHeight' : 'clientWidth';\n var size = vertical ? 'height' : 'width';\n\n if (process.env.NODE_ENV !== 'production') {\n if (centered && scrollable) {\n console.error('Material-UI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n }\n }\n\n var _React$useState = React.useState(false),\n mounted = _React$useState[0],\n setMounted = _React$useState[1];\n\n var _React$useState2 = React.useState({}),\n indicatorStyle = _React$useState2[0],\n setIndicatorStyle = _React$useState2[1];\n\n var _React$useState3 = React.useState({\n start: false,\n end: false\n }),\n displayScroll = _React$useState3[0],\n setDisplayScroll = _React$useState3[1];\n\n var _React$useState4 = React.useState({\n overflow: 'hidden',\n marginBottom: null\n }),\n scrollerStyle = _React$useState4[0],\n setScrollerStyle = _React$useState4[1];\n\n var valueToIndex = new Map();\n var tabsRef = React.useRef(null);\n var tabListRef = React.useRef(null);\n\n var getTabsMeta = function getTabsMeta() {\n var tabsNode = tabsRef.current;\n var tabsMeta;\n\n if (tabsNode) {\n var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n tabsMeta = {\n clientWidth: tabsNode.clientWidth,\n scrollLeft: tabsNode.scrollLeft,\n scrollTop: tabsNode.scrollTop,\n scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),\n scrollWidth: tabsNode.scrollWidth,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right\n };\n }\n\n var tabMeta;\n\n if (tabsNode && value !== false) {\n var _children = tabListRef.current.children;\n\n if (_children.length > 0) {\n var tab = _children[valueToIndex.get(value)];\n\n if (process.env.NODE_ENV !== 'production') {\n if (!tab) {\n console.error([\"Material-UI: The value provided to the Tabs component is invalid.\", \"None of the Tabs' children match with `\".concat(value, \"`.\"), valueToIndex.keys ? \"You can provide one of the following values: \".concat(Array.from(valueToIndex.keys()).join(', '), \".\") : null].join('\\n'));\n }\n }\n\n tabMeta = tab ? tab.getBoundingClientRect() : null;\n }\n }\n\n return {\n tabsMeta: tabsMeta,\n tabMeta: tabMeta\n };\n };\n\n var updateIndicatorState = useEventCallback(function () {\n var _newIndicatorStyle;\n\n var _getTabsMeta = getTabsMeta(),\n tabsMeta = _getTabsMeta.tabsMeta,\n tabMeta = _getTabsMeta.tabMeta;\n\n var startValue = 0;\n\n if (tabMeta && tabsMeta) {\n if (vertical) {\n startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n } else {\n var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n startValue = tabMeta.left - tabsMeta.left + correction;\n }\n }\n\n var newIndicatorStyle = (_newIndicatorStyle = {}, _defineProperty(_newIndicatorStyle, start, startValue), _defineProperty(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle);\n\n if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) {\n setIndicatorStyle(newIndicatorStyle);\n } else {\n var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);\n var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n if (dStart >= 1 || dSize >= 1) {\n setIndicatorStyle(newIndicatorStyle);\n }\n }\n });\n\n var scroll = function scroll(scrollValue) {\n animate(scrollStart, tabsRef.current, scrollValue);\n };\n\n var moveTabsScroll = function moveTabsScroll(delta) {\n var scrollValue = tabsRef.current[scrollStart];\n\n if (vertical) {\n scrollValue += delta;\n } else {\n scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;\n }\n\n scroll(scrollValue);\n };\n\n var handleStartScrollClick = function handleStartScrollClick() {\n moveTabsScroll(-tabsRef.current[clientSize]);\n };\n\n var handleEndScrollClick = function handleEndScrollClick() {\n moveTabsScroll(tabsRef.current[clientSize]);\n };\n\n var handleScrollbarSizeChange = React.useCallback(function (scrollbarHeight) {\n setScrollerStyle({\n overflow: null,\n marginBottom: -scrollbarHeight\n });\n }, []);\n\n var getConditionalElements = function getConditionalElements() {\n var conditionalElements = {};\n conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/React.createElement(ScrollbarSize, {\n className: classes.scrollable,\n onChange: handleScrollbarSizeChange\n }) : null;\n var scrollButtonsActive = displayScroll.start || displayScroll.end;\n var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');\n conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'right' : 'left',\n onClick: handleStartScrollClick,\n disabled: !displayScroll.start,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'left' : 'right',\n onClick: handleEndScrollClick,\n disabled: !displayScroll.end,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n return conditionalElements;\n };\n\n var scrollSelectedIntoView = useEventCallback(function () {\n var _getTabsMeta2 = getTabsMeta(),\n tabsMeta = _getTabsMeta2.tabsMeta,\n tabMeta = _getTabsMeta2.tabMeta;\n\n if (!tabMeta || !tabsMeta) {\n return;\n }\n\n if (tabMeta[start] < tabsMeta[start]) {\n // left side of button is out of view\n var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n scroll(nextScrollStart);\n } else if (tabMeta[end] > tabsMeta[end]) {\n // right side of button is out of view\n var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n\n scroll(_nextScrollStart);\n }\n });\n var updateScrollButtonState = useEventCallback(function () {\n if (scrollable && scrollButtons !== 'off') {\n var _tabsRef$current = tabsRef.current,\n scrollTop = _tabsRef$current.scrollTop,\n scrollHeight = _tabsRef$current.scrollHeight,\n clientHeight = _tabsRef$current.clientHeight,\n scrollWidth = _tabsRef$current.scrollWidth,\n clientWidth = _tabsRef$current.clientWidth;\n var showStartScroll;\n var showEndScroll;\n\n if (vertical) {\n showStartScroll = scrollTop > 1;\n showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n } else {\n var scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n }\n\n if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n setDisplayScroll({\n start: showStartScroll,\n end: showEndScroll\n });\n }\n }\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n var win = ownerWindow(tabsRef.current);\n win.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n win.removeEventListener('resize', handleResize);\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var handleTabsScroll = React.useCallback(debounce(function () {\n updateScrollButtonState();\n }));\n React.useEffect(function () {\n return function () {\n handleTabsScroll.clear();\n };\n }, [handleTabsScroll]);\n React.useEffect(function () {\n setMounted(true);\n }, []);\n React.useEffect(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n React.useEffect(function () {\n scrollSelectedIntoView();\n }, [scrollSelectedIntoView, indicatorStyle]);\n React.useImperativeHandle(action, function () {\n return {\n updateIndicator: updateIndicatorState,\n updateScrollButtons: updateScrollButtonState\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var indicator = /*#__PURE__*/React.createElement(TabIndicator, _extends({\n className: classes.indicator,\n orientation: orientation,\n color: indicatorColor\n }, TabIndicatorProps, {\n style: _extends({}, indicatorStyle, TabIndicatorProps.style)\n }));\n var childIndex = 0;\n var children = React.Children.map(childrenProp, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n valueToIndex.set(childValue, childIndex);\n var selected = childValue === value;\n childIndex += 1;\n return /*#__PURE__*/React.cloneElement(child, {\n fullWidth: variant === 'fullWidth',\n indicator: selected && !mounted && indicator,\n selected: selected,\n selectionFollowsFocus: selectionFollowsFocus,\n onChange: onChange,\n textColor: textColor,\n value: childValue\n });\n });\n\n var handleKeyDown = function handleKeyDown(event) {\n var target = event.target; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n // though we might warn in the future about nested, interactive elements\n // as a a11y violation\n\n var role = target.getAttribute('role');\n\n if (role !== 'tab') {\n return;\n }\n\n var newFocusTarget = null;\n var previousItemKey = orientation !== \"vertical\" ? 'ArrowLeft' : 'ArrowUp';\n var nextItemKey = orientation !== \"vertical\" ? 'ArrowRight' : 'ArrowDown';\n\n if (orientation !== \"vertical\" && theme.direction === 'rtl') {\n // swap previousItemKey with nextItemKey\n previousItemKey = 'ArrowRight';\n nextItemKey = 'ArrowLeft';\n }\n\n switch (event.key) {\n case previousItemKey:\n newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild;\n break;\n\n case nextItemKey:\n newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild;\n break;\n\n case 'Home':\n newFocusTarget = tabListRef.current.firstChild;\n break;\n\n case 'End':\n newFocusTarget = tabListRef.current.lastChild;\n break;\n\n default:\n break;\n }\n\n if (newFocusTarget !== null) {\n newFocusTarget.focus();\n event.preventDefault();\n }\n };\n\n var conditionalElements = getConditionalElements();\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, vertical && classes.vertical),\n ref: ref\n }, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.scroller, scrollable ? classes.scrollable : classes.fixed),\n style: scrollerStyle,\n ref: tabsRef,\n onScroll: handleTabsScroll\n }, /*#__PURE__*/React.createElement(\"div\", {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n className: clsx(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),\n onKeyDown: handleKeyDown,\n ref: tabListRef,\n role: \"tablist\"\n }, children), mounted && indicator), conditionalElements.scrollButtonEnd);\n});\nprocess.env.NODE_ENV !== \"production\" ? Tabs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Callback fired when the component mounts.\n * This is useful when you want to trigger an action programmatically.\n * It supports two actions: `updateIndicator()` and `updateScrollButtons()`\n *\n * @param {object} actions This object contains all possible actions\n * that can be triggered programmatically.\n */\n action: refType,\n\n /**\n * The label for the Tabs as a string.\n */\n 'aria-label': PropTypes.string,\n\n /**\n * An id or list of ids separated by a space that label the Tabs.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * If `true`, the tabs will be centered.\n * This property is intended for large views.\n */\n centered: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Determines the color of the indicator.\n */\n indicatorColor: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback\n * @param {any} value We default to the index of the child (number)\n */\n onChange: PropTypes.func,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The component used to render the scroll buttons.\n */\n ScrollButtonComponent: PropTypes.elementType,\n\n /**\n * Determine behavior of scroll buttons when tabs are set to scroll:\n *\n * - `auto` will only present them when not all the items are visible.\n * - `desktop` will only present them on medium and larger viewports.\n * - `on` will always present them.\n * - `off` will never present them.\n */\n scrollButtons: PropTypes.oneOf(['auto', 'desktop', 'off', 'on']),\n\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: PropTypes.bool,\n\n /**\n * Props applied to the tab indicator element.\n */\n TabIndicatorProps: PropTypes.object,\n\n /**\n * Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.\n */\n TabScrollButtonProps: PropTypes.object,\n\n /**\n * Determines the color of the `Tab`.\n */\n textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this property to `false`.\n */\n value: PropTypes.any,\n\n /**\n * Determines additional display behavior of the tabs:\n *\n * - `scrollable` will invoke scrolling properties and allow for horizontally\n * scrolling (or swiping) of the tab bar.\n * -`fullWidth` will make the tabs grow to use all the available space,\n * which should be used for small views, like on mobile.\n * - `standard` will render the default state.\n */\n variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabs'\n})(Tabs);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport CheckBoxOutlineBlankIcon from '../internal/svg-icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '../internal/svg-icons/CheckBox';\nimport { alpha } from '../styles/colorManipulator';\nimport IndeterminateCheckBoxIcon from '../internal/svg-icons/IndeterminateCheckBox';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `indeterminate={true}`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(CheckBoxIcon, null);\nvar defaultIcon = /*#__PURE__*/React.createElement(CheckBoxOutlineBlankIcon, null);\nvar defaultIndeterminateIcon = /*#__PURE__*/React.createElement(IndeterminateCheckBoxIcon, null);\nvar Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {\n var _props$checkedIcon = props.checkedIcon,\n checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$icon = props.icon,\n iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$indeterminateI = props.indeterminateIcon,\n indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI,\n inputProps = props.inputProps,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checkedIcon\", \"classes\", \"color\", \"icon\", \"indeterminate\", \"indeterminateIcon\", \"inputProps\", \"size\"]);\n\n var icon = indeterminate ? indeterminateIconProp : iconProp;\n var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))], indeterminate && classes.indeterminate),\n checked: classes.checked,\n disabled: classes.disabled\n },\n color: color,\n inputProps: _extends({\n 'data-indeterminate': indeterminate\n }, inputProps),\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize === undefined && size === \"small\" ? size : icon.props.fontSize\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize === undefined && size === \"small\" ? size : indeterminateIcon.props.fontSize\n }),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the checkbox will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the input.\n */\n indeterminate: PropTypes.bool,\n\n /**\n * The icon to display when the component is indeterminate.\n */\n indeterminateIcon: PropTypes.node,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the checkbox.\n * `small` is equivalent to the dense checkbox styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCheckbox'\n})(Checkbox);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"\n}), 'ArrowDownward');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ArrowDownwardIcon from '../internal/svg-icons/ArrowDownward';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'flex-start',\n flexDirection: 'inherit',\n alignItems: 'center',\n '&:focus': {\n color: theme.palette.text.secondary\n },\n '&:hover': {\n color: theme.palette.text.secondary,\n '& $icon': {\n opacity: 0.5\n }\n },\n '&$active': {\n color: theme.palette.text.primary,\n // && instead of & is a workaround for https://github.com/cssinjs/jss/issues/1045\n '&& $icon': {\n opacity: 1,\n color: theme.palette.text.secondary\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Styles applied to the icon component. */\n icon: {\n fontSize: 18,\n marginRight: 4,\n marginLeft: 4,\n opacity: 0,\n transition: theme.transitions.create(['opacity', 'transform'], {\n duration: theme.transitions.duration.shorter\n }),\n userSelect: 'none'\n },\n\n /* Styles applied to the icon component if `direction=\"desc\"`. */\n iconDirectionDesc: {\n transform: 'rotate(0deg)'\n },\n\n /* Styles applied to the icon component if `direction=\"asc\"`. */\n iconDirectionAsc: {\n transform: 'rotate(180deg)'\n }\n };\n};\n/**\n * A button based label for placing inside `TableCell` for column sorting.\n */\n\nvar TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'asc' : _props$direction,\n _props$hideSortIcon = props.hideSortIcon,\n hideSortIcon = _props$hideSortIcon === void 0 ? false : _props$hideSortIcon,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? ArrowDownwardIcon : _props$IconComponent,\n other = _objectWithoutProperties(props, [\"active\", \"children\", \"classes\", \"className\", \"direction\", \"hideSortIcon\", \"IconComponent\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, active && classes.active),\n component: \"span\",\n disableRipple: true,\n ref: ref\n }, other), children, hideSortIcon && !active ? null : /*#__PURE__*/React.createElement(IconComponent, {\n className: clsx(classes.icon, classes[\"iconDirection\".concat(capitalize(direction))])\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableSortLabel.propTypes = {\n /**\n * If `true`, the label will have the active styling (should be true for the sorted column).\n */\n active: PropTypes.bool,\n\n /**\n * Label contents, the arrow will be appended automatically.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The current sort direction.\n */\n direction: PropTypes.oneOf(['asc', 'desc']),\n\n /**\n * Hide sort icon when active is false.\n */\n hideSortIcon: PropTypes.bool,\n\n /**\n * Sort icon to use.\n */\n IconComponent: PropTypes.elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableSortLabel'\n})(TableSortLabel);"],"sourceRoot":""} \ No newline at end of file diff --git a/src/build/static/js/2.f425d7e3.chunk.js b/src/build/static/js/2.f425d7e3.chunk.js new file mode 100644 index 0000000..2a18f03 --- /dev/null +++ b/src/build/static/js/2.f425d7e3.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.f425d7e3.chunk.js.LICENSE.txt */ +(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(344)},function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){e.exports=n(352)()},function(e,t,n){"use strict";var r=n(1),o=n(430),i=n(56);t.a=function(e,t){return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return u}));var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function u(){for(var e=[],t=0;t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){if(0===e.indexOf("#"))return e;var t=c(e).values;return"#".concat(t.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))}function s(e){var t=(e=c(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),l({type:s,values:u})}function c(e){if(e.type)return e;if("#"===e.charAt(0))return c(i(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var o=e.substring(t+1,e.length-1).split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)}))}}function l(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function u(e,t){var n=d(e),r=d(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function d(e){var t="hsl"===(e=c(e)).type?c(s(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return d(e)>.5?m(e,t):g(e,t)}function h(e,t){return p(e,t)}function p(e,t){return e=c(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,l(e)}function m(e,t){if(e=c(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function g(e,t){if(e=c(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return l(e)}},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.r(t),n.d(t,"chainPropTypes",(function(){return r})),n.d(t,"deepmerge",(function(){return o.a})),n.d(t,"elementAcceptingRef",(function(){return c})),n.d(t,"elementTypeAcceptingRef",(function(){return l})),n.d(t,"exactProp",(function(){return u})),n.d(t,"formatMuiErrorMessage",(function(){return d.a})),n.d(t,"getDisplayName",(function(){return b})),n.d(t,"HTMLElementType",(function(){return y})),n.d(t,"ponyfillGlobal",(function(){return _})),n.d(t,"refType",(function(){return w}));var o=n(159),i=n(4),a=n.n(i);var s=(a.a.element,function(){return null});s.isRequired=(a.a.element.isRequired,function(){return null});var c=s;var l=(i.elementType,function(){return null});n(12),n(1);function u(e){return e}var d=n(129),f=n(52),h=n(40),p=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function m(e){var t="".concat(e).match(p);return t&&t[1]||""}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||m(e)||t}function v(e,t,n){var r=g(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function b(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return g(e,"Component");if("object"===Object(f.a)(e))switch(e.$$typeof){case h.ForwardRef:return v(e,e.render,"ForwardRef");case h.Memo:return v(e,e.type,"memo");default:return}}}function y(e,t,n,r,o){return null}var _="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w=a.a.oneOfType([a.a.func,a.a.object])},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(c.a)(t,["attached"]),o=p(r).linebreak,i="",a=0;a0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=ce(),n=0;nn?n:t},he=function(){function e(e){this.getPropertyValue=oe,this.setProperty=ie,this.removeProperty=ae,this.setSelector=se,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=ue();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=le(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.breakpoints,r=void 0===n?["sm","md","lg"]:n,o=t.disableAlign,i=void 0!==o&&o,a=t.factor,s=void 0===a?2:a,c=t.variants,d=void 0===c?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:c,h=Object(l.a)({},e);h.typography=Object(l.a)({},h.typography);var b=h.typography,y=p(b.htmlFontSize),_=r.map((function(e){return h.breakpoints.values[e]}));return d.forEach((function(e){var t=b[e],n=parseFloat(y(t.fontSize,"rem"));if(!(n<=1)){var r=n,o=1+(r-1)/s,a=t.lineHeight;if(!f(a)&&!i)throw new Error(Object(u.a)(6));f(a)||(a=parseFloat(y(a,"rem"))/parseFloat(n));var c=null;i||(c=function(e){return m({size:e,grid:g({pixels:4,lineHeight:a,htmlFontSize:b.htmlFontSize})})}),b[e]=Object(l.a)({},t,v({cssProperty:"fontSize",min:o,max:r,unit:"rem",breakpoints:_,transform:c}))}})),h}var y=n(155),_=n(22),w=n(17),S=n(5),k=n(149),x=n(56),O=Object(k.b)({defaultTheme:x.a}),C=n(336),E=n(341),j=n(455),R=n(117),T=n(456)},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=r.createContext({});t.a=o},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"i",(function(){return h})),n.d(t,"h",(function(){return g})),n.d(t,"g",(function(){return y})),n.d(t,"c",(function(){return _})),n.d(t,"b",(function(){return w}));var r=n(6),o=n(221),i=n(26),a=n(314),s=n(166),c=n(82);function l(e,t,n){if(t in e){var r=e[t],o=n(r);if("function"===typeof o)try{d(o,r)}catch(i){}e[t]=o}}function u(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function d(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,u(e,"__sentry_original__",t)}function f(e){return e.__sentry_original__}function h(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function p(e){if(Object(i.d)(e)){var t=e,n={message:t.message,name:t.name,stack:t.stack};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}if(Object(i.f)(e)){var a=e,s={};s.type=a.type;try{s.target=Object(i.c)(a.target)?Object(o.b)(a.target):Object.prototype.toString.call(a.target)}catch(l){s.target=""}try{s.currentTarget=Object(i.c)(a.currentTarget)?Object(o.b)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(l){s.currentTarget=""}for(var c in"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(s.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c]);return s}return e}function m(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}function g(e,t,n){void 0===t&&(t=3),void 0===n&&(n=102400);var r=y(e,t);return m(r)>n?g(e,t-1,n):r}function v(t,n){return"domain"===n&&t&&"object"===typeof t&&t._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!==typeof e&&t===e?"[Global]":"undefined"!==typeof window&&t===window?"[Window]":"undefined"!==typeof document&&t===document?"[Document]":Object(i.l)(t)?"[SyntheticEvent]":"number"===typeof t&&t!==t?"[NaN]":void 0===t?"[undefined]":"function"===typeof t?"[Function: "+Object(s.a)(t)+"]":"symbol"===typeof t?"["+String(t)+"]":"bigint"===typeof t?"[BigInt: "+String(t)+"]":t}function b(e,t,n,r){if(void 0===n&&(n=1/0),void 0===r&&(r=Object(a.a)()),0===n)return function(e){if("string"===typeof e)return e;var t=Object.prototype.toString.call(e);if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var n=v(e);return Object(i.i)(n)?n:t}(t);if(null!==t&&void 0!==t&&"function"===typeof t.toJSON)return t.toJSON();var o=v(t,e);if(Object(i.i)(o))return o;var s=p(t),c=Array.isArray(t)?[]:{};if(r[0](t))return"[Circular ~]";for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(c[l]=b(l,s[l],n-1,r));return r[1](t),c}function y(e,t){try{return JSON.parse(JSON.stringify(e,(function(e,n){return b(e,n,t)})))}catch(n){return"**non-serializable**"}}function _(e,t){void 0===t&&(t=40);var n=Object.keys(p(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(c.d)(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:Object(c.d)(o,t)}return""}function w(e){var t,n;if(Object(i.h)(e)){var o=e,a={};try{for(var s=Object(r.g)(Object.keys(o)),c=s.next();!c.done;c=s.next()){var l=c.value;"undefined"!==typeof o[l]&&(a[l]=w(o[l]))}}catch(u){t={error:u}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}return Array.isArray(e)?e.map(w):e}}).call(this,n(69))},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(1),o=n(3),i=["xs","sm","md","lg","xl"];function a(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,a=e.unit,s=void 0===a?"px":a,c=e.step,l=void 0===c?5:c,u=Object(o.a)(e,["values","unit","step"]);function d(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function f(e,t){var r=i.indexOf(t);return r===i.length-1?d(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[i[r+1]]?n[i[r+1]]:t)-l/100).concat(s,")")}return Object(r.a)({keys:i,values:n,up:d,down:function(e){var t=i.indexOf(e)+1,r=n[i[t]];return t===i.length?d("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-l/100).concat(s,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},u)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(0),o=n(16),i=!0,a=!1,s=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!c[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function h(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function p(){return{isFocusVisible:f,onBlurVisible:h,ref:r.useCallback((function(e){var t,n=o.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[])}}},function(e,t,n){"use strict";var r=n(349),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;ge.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&e<11.25?"N":e>=11.25&&e<33.75?"NNE":e>=33.75&&e<56.25?"NE":e>=56.25&&e<78.75?"ENE":e>=78.75&&e<101.25?"E":e>=101.25&&e<123.75?"ESE":e>=123.75&&e<146.25?"SE":e>=146.25&&e<168.75?"SSE":e>=168.75&&e<191.25?"S":e>=191.25&&e<213.75?"SSW":e>=213.75&&e<236.25?"SW":e>=236.25&&e<258.75?"WSW":e>=258.75&&e<281.25?"W":e>=281.25&&e<303.75?"WNW":e>=303.75&&e<326.25?"NW":e>=326.25&&e<348.75?"NNW":e>=348.75?"N":void 0}},{key:"padding",value:function(e){return"string"===typeof e?e.length<2?"0"+e:e:e<10?"0"+e:e}},{key:"setDataFormat",value:function(t){t&&(e.dateFormat=t.toUpperCase().split(/[.-/]/),e.dateFormat.splice(e.dateFormat.indexOf("YYYY"),1))}},{key:"date2string",value:function(t){if("string"===typeof t){if(!(t=t.trim()))return"";if(t.match(/^[\w\s]+$/))return t;var n=t.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);if(n){var r=[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10)],i=r.find((function(e){return e>31}));r.splice(r.indexOf(i),1);var a=r.find((function(e){return e>12}));a?(r.splice(r.indexOf(a),1),t=new Date(i,r[0]-1,a)):"M"===e.dateFormat[0][0]&&"D"===e.dateFormat[1][0]?(t=new Date(i,r[0]-1,r[1]),Math.abs(t.getTime-Date.now())>864e6&&(t=new Date(i,r[1]-1,r[0]))):"D"===e.dateFormat[0][0]&&"M"===e.dateFormat[1][0]?(t=new Date(i,r[1]-1,r[0]),Math.abs(t.getTime-Date.now())>864e6&&(t=new Date(i,r[0]-1,r[1]))):t=new Date(t)}else t=new Date(t)}else t=new Date(t);var s=o.default.t("ra_dow_"+f[t.getDay()]).replace("ra_dow_","");return s+=". "+t.getDate()+" "+o.default.t("ra_month_"+h[t.getMonth()]).replace("ra_month_","")}},{key:"renderTextWithA",value:function(e){var t=e.match(/|/);if(t){var n=[],o=1;do{var i=e.split(t[0]);if(i[0]&&n.push(r.default.createElement("span",{key:"a"+o++},i[0])),t[0].startsWith("([^<]*)|/))||i[1]&&n.push(r.default.createElement("span",{key:"a"+o++},i[1]))}while(t);return n}return e}},{key:"getSmartName",value:function(e,t,n,r){return t?r?e[t]&&e[t].common&&e[t].common.custom&&e[t].common.custom[n]&&e[t].common.custom[n].smartName||null:e[t].common.smartName:r?e&&!e.common?e.smartName:e&&e.common&&e.common.custom&&e.common.custom[n]?e.common.custom[n].smartName:void 0:e.common?e&&!e.common?e.smartName:e.common.smartName:e.smartName}},{key:"getSmartNameFromObj",value:function(e,t,n){return n?e&&!e.common?e.smartName:e&&e.common&&e.common.custom&&e.common.custom[t]?e.common.custom[t].smartName:void 0:e.common?e&&!e.common?e.smartName:e.common.smartName:e.smartName}},{key:"enableSmartName",value:function(e,t,n){n?(e.common.custom=e.common.custom||{},e.common.custom[t]=e.common.custom[t]||{},e.common.custom[t].smartName={}):e.common.smartName={}}},{key:"removeSmartName",value:function(e,t,n){n?e.common&&e.common.custom&&e.common.custom[t]&&(e.common.custom[t]=null):e.common.smartName=null}},{key:"updateSmartName",value:function(e,t,n,r,i,a){var s,l=o.default.getLanguage();if("string"===typeof e.common.smartName){var u=e.common.smartName;e.common.smartName={},e.common.smartName[l]=u}if(e.native&&e.native.byON){delete e.native.byON;var d=e.common.smartName;d&&"object"===c(d)||((d={en:d})[l]=d.en),e.common.smartName=d}if(void 0!==r&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},r?e.common.custom[i].smartName.smartType=r:delete e.common.custom[i].smartName.smartType):(e.common.smartName=e.common.smartName||{},r?e.common.smartName.smartType=r:delete e.common.smartName.smartType)),void 0!==n&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},e.common.custom[i].smartName.byON=n):(e.common.smartName=e.common.smartName||{},e.common.smartName.byON=n)),void 0!==t&&(a?(e.common.custom=e.common.custom||{},e.common.custom[i]=e.common.custom[i]||{},e.common.custom[i].smartName=e.common.custom[i].smartName||{},s=e.common.custom[i].smartName):(e.common.smartName=e.common.smartName||{},s=e.common.smartName),s[l]=t,s&&(!s[l]||s[l]===e.common.name&&(!e.common.role||e.common.role.indexOf("button")>=0)))){delete s[l];var f=!0;for(var h in s)if(s.hasOwnProperty(h)){f=!1;break}f&&(a?void 0===e.common.custom[i].smartName.byON?delete e.common.custom[i]:(delete e.common.custom[i].en,delete e.common.custom[i].de,delete e.common.custom[i].ru,delete e.common.custom[i].nl,delete e.common.custom[i].pl,delete e.common.custom[i].it,delete e.common.custom[i].fr,delete e.common.custom[i].pt,delete e.common.custom[i].es,delete e.common.custom[i]["zh-cn"]):void 0!==e.common.smartName.byON?(delete e.common.smartName.en,delete e.common.smartName.de,delete e.common.smartName.ru,delete e.common.smartName.nl,delete e.common.smartName.pl,delete e.common.smartName.it,delete e.common.smartName.fr,delete e.common.smartName.pt,delete e.common.smartName.es,delete e.common.smartName["zh-cn"]):e.common.smartName=null)}}},{key:"disableSmartName",value:function(e,t,n){n?(e.common.custom=e.common.custom||{},e.common.custom[t]=e.common.custom[t]||{},e.common.custom[t].smartName=!1):e.common.smartName=!1}},{key:"copyToClipboard",value:function(e,t){var n=window.document.createElement("textarea");n.value=e,window.document.body.appendChild(n),n.select(),window.document.execCommand("copy"),window.document.body.removeChild(n),console.log(e),t&&t.stopPropagation(),t&&t.preventDefault()}},{key:"getFileExtension",value:function(e){var t=(e||"").lastIndexOf(".");return-1!==t?e.substring(t+1).toLowerCase():null}},{key:"formatBytes",value:function(e){if(Math.abs(e)<1024)return e+" B";var t=["KB","MB","GB"],n=-1;do{e/=1024,++n}while(Math.abs(e)>=1024&&n186?"#000000":"#FFFFFF":(o=(255-o).toString(16),i=(255-i).toString(16),a=(255-a).toString(16),"#"+o.padStart(2,"0")+i.padStart(2,"0")+a.padStart(2,"0"))}},{key:"_toVal",value:function(t){var n,r,o="";if("string"===typeof t||"number"===typeof t)o+=t;else if("object"===c(t))if(Array.isArray(t))for(n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?window.vendorPrefix:e||(window.localStorage&&window.localStorage.getItem("App.themeName")?window.localStorage.getItem("App.themeName"):window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"colored")}},{key:"getThemeType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?"light":"dark"===(e=e||window.localStorage&&window.localStorage.getItem("App.themeName"))||"blue"===e?"dark":"light"}},{key:"setThemeName",value:function(e){window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix||(window.localStorage.setItem("App.themeName",e),window.localStorage.setItem("App.theme","dark"===e||"blue"===e?"dark":"light"))}},{key:"toggleTheme",value:function(t){if(window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix)return window.vendorPrefix;t=t||window.localStorage&&window.localStorage.getItem("App.themeName");var n,r=e.getThemeNames(),o=r.indexOf(t);return n=-1!==o?r[(o+1)%r.length]:r[0],e.setThemeName(n),n}},{key:"getThemeNames",value:function(){return window.vendorPrefix&&"@@vendorPrefix@@"!==window.vendorPrefix?[window.vendorPrefix]:["light","dark","blue","colored"]}},{key:"parseQuery",value:function(e){e=(e||"").toString().replace(/^\?/,"");var t={};return e.split("&").forEach((function(e){if(e=e.trim()){var n=e.split("="),r=decodeURIComponent(n[0]).trim();if(n.length>1)if(t[r]=decodeURIComponent(n[1]),"true"===t[r])t[r]=!0;else if("false"===t[r])t[r]=!1;else{var o=parseFloat(t[r]);o.toString()===t[r]&&(t[r]=o)}else t[r]=!0}})),t}},{key:"getParentId",value:function(e){var t=(e||"").toString().split(".");return t.length>1?(t.pop(),t.join(".")):null}},{key:"formatDate",value:function(e,t){if(!e)return"";var n,r=e.getMonth()+1;r<10&&(r="0"+r);var o=e.getDate();o<10&&(o="0"+o),n="MM/DD/YYYY"===t?r+"/"+o+"/"+e.getFullYear():e.getFullYear()+"-"+r+"-"+o;var i=e.getHours();return n+=i<10?" 0"+i:" "+i,n+=(i=e.getMinutes())<10?":0"+i:":"+i,n+=(i=e.getSeconds())<10?":0"+i:":"+i,n+=(i=e.getMilliseconds())<10?".00"+i:i<100?".0"+i:"."+i}},{key:"formatTime",value:function(e){if(e){e=Math.round(e);var t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60;return t?"".concat(t,".").concat(n.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):n?"".concat(n,":").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):"0:".concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))}return"0:00:00"}},{key:"MDtext2link",value:function(e){var t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Z\u0430-\u044f\u0410-\u042f0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}},{key:"openLink",value:function(e,t){"this"===t?window.location=e:window.open(e,t||"_blank")}},{key:"MDgetTitle",value:function(t){var n=e.extractHeader(t),r=n.body,o=n.header;if(o.title)return o.title;for(var i=(r=(r=r.replace(/{[^}]*}/g,"")).trim()).replace(/\r/g,"").split("\n"),a=0;a>16).toString(16).toUpperCase()),t}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"getStates",value:function(e){var t,n=null===e||void 0===e||null===(t=e.common)||void 0===t?void 0:t.states;if(n)if("string"===typeof n&&"{"===n[0])try{n=JSON.parse(n)}catch(s){console.error("Cannot parse states: ".concat(n)),n=null}else if("string"===typeof n){var r=n.split(";");n={};for(var o=0;o=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_NO_DEBUG__&&!__SENTRY_BROWSER_BUNDLE__}function o(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),Object(s.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(s.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(o={minHeight:56},Object(r.a)(o,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(o,e.up("sm"),{minHeight:64}),o)},n)}var l=n(129),u=n(78),d=n(92),f=n(93),h=n(94),p=n(95),m=n(96),g=n(97),v=n(98),b=n(10),y={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.a.white,default:d.a[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:u.a.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d.a[800],default:"#303030"},action:{active:u.a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(b.j)(e.main,o):"dark"===t&&(e.dark=Object(b.b)(e.main,i)))}function S(e){var t=e.primary,n=void 0===t?{light:f.a[300],main:f.a[500],dark:f.a[700]}:t,r=e.secondary,a=void 0===r?{light:h.a.A200,main:h.a.A400,dark:h.a.A700}:r,c=e.error,S=void 0===c?{light:p.a[300],main:p.a[500],dark:p.a[700]}:c,k=e.warning,x=void 0===k?{light:m.a[300],main:m.a[500],dark:m.a[700]}:k,O=e.info,C=void 0===O?{light:g.a[300],main:g.a[500],dark:g.a[700]}:O,E=e.success,j=void 0===E?{light:v.a[300],main:v.a[500],dark:v.a[700]}:E,R=e.type,T=void 0===R?"light":R,A=e.contrastThreshold,M=void 0===A?3:A,L=e.tonalOffset,$=void 0===L?.2:L,N=Object(o.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function D(e){return Object(b.f)(e,_.text.primary)>=M?_.text.primary:y.text.primary}var P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(s.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(l.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(l.a)(5,JSON.stringify(e.main)));return w(e,"light",n,$),w(e,"dark",r,$),e.contrastText||(e.contrastText=D(e.main)),e},I={dark:_,light:y};return Object(i.a)(Object(s.a)({common:u.a,type:T,primary:P(n),secondary:P(a,"A400","A200","A700"),error:P(S),warning:P(x),info:P(C),success:P(j),grey:d.a,contrastThreshold:M,getContrastText:D,augmentColor:P,tonalOffset:$},I[T]),N)}function k(e){return Math.round(1e5*e)/1e5}function x(e){return k(e)}var O={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function E(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,a=void 0===r?C:r,c=n.fontSize,l=void 0===c?14:c,u=n.fontWeightLight,d=void 0===u?300:u,f=n.fontWeightRegular,h=void 0===f?400:f,p=n.fontWeightMedium,m=void 0===p?500:p,g=n.fontWeightBold,v=void 0===g?700:g,b=n.htmlFontSize,y=void 0===b?16:b,_=n.allVariants,w=n.pxToRem,S=Object(o.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=l/14,j=w||function(e){return"".concat(e/y*E,"rem")},R=function(e,t,n,r,o){return Object(s.a)({fontFamily:a,fontWeight:e,fontSize:j(t),lineHeight:n},a===C?{letterSpacing:"".concat(k(r/t),"em")}:{},o,_)},T={h1:R(d,96,1.167,-1.5),h2:R(d,60,1.2,-.5),h3:R(h,48,1.167,0),h4:R(h,34,1.235,.25),h5:R(h,24,1.334,0),h6:R(m,20,1.6,.15),subtitle1:R(h,16,1.75,.15),subtitle2:R(m,14,1.57,.1),body1:R(h,16,1.5,.15),body2:R(h,14,1.43,.15),button:R(m,14,1.75,.4,O),caption:R(h,12,1.66,.4),overline:R(h,12,2.66,1,O)};return Object(i.a)(Object(s.a)({htmlFontSize:y,pxToRem:j,round:x,fontFamily:a,fontSize:l,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:m,fontWeightBold:v},T),S,{clone:!1})}function j(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var R=["none",j(0,2,1,-1,0,1,1,0,0,1,3,0),j(0,3,1,-2,0,2,2,0,0,1,5,0),j(0,3,3,-2,0,3,4,0,0,1,8,0),j(0,2,4,-1,0,4,5,0,0,1,10,0),j(0,3,5,-1,0,5,8,0,0,1,14,0),j(0,3,5,-1,0,6,10,0,0,1,18,0),j(0,4,5,-2,0,7,10,1,0,2,16,1),j(0,5,5,-3,0,8,10,1,0,3,14,2),j(0,5,6,-3,0,9,12,1,0,3,16,2),j(0,6,6,-3,0,10,14,1,0,4,18,3),j(0,6,7,-4,0,11,15,1,0,4,20,3),j(0,7,8,-4,0,12,17,2,0,5,22,4),j(0,7,8,-4,0,13,19,2,0,5,24,4),j(0,7,9,-4,0,14,21,2,0,5,26,4),j(0,8,9,-5,0,15,22,2,0,6,28,5),j(0,8,10,-5,0,16,24,2,0,6,30,5),j(0,8,11,-5,0,17,26,2,0,6,32,5),j(0,9,11,-5,0,18,28,2,0,7,34,6),j(0,9,12,-6,0,19,29,2,0,7,36,6),j(0,10,13,-6,0,20,31,3,0,8,38,7),j(0,10,13,-6,0,21,33,3,0,8,40,7),j(0,10,14,-6,0,22,35,3,0,8,42,7),j(0,11,14,-7,0,23,36,3,0,9,44,8),j(0,11,15,-7,0,24,38,3,0,9,46,8)],T={borderRadius:4},A=n(126);function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(A.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,s=void 0===r?{}:r,l=e.palette,u=void 0===l?{}:l,d=e.spacing,f=e.typography,h=void 0===f?{}:f,p=Object(o.a)(e,["breakpoints","mixins","palette","spacing","typography"]),m=S(u),g=Object(a.a)(n),v=M(d),b=Object(i.a)({breakpoints:g,direction:"ltr",mixins:c(g,v,s),overrides:{},palette:m,props:{},shadows:R,typography:E(m,h),spacing:v,shape:T,transitions:L.a,zIndex:$.a},p),y=arguments.length,_=new Array(y>1?y-1:0),w=1;w1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.default=a},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o="object"===("undefined"===typeof window?"undefined":r(window))&&"object"===("undefined"===typeof document?"undefined":r(document))&&9===document.nodeType;t.a=o},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(26);function o(e,t){return void 0===t&&(t=0),"string"!==typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i=0||(o[n]=e[n]);return o}var b=o.a.createContext(),y={root:{},anchorOriginTopCenter:{},anchorOriginBottomCenter:{},anchorOriginTopRight:{},anchorOriginBottomRight:{},anchorOriginTopLeft:{},anchorOriginBottomLeft:{}},_={containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}},w={default:20,dense:4},S={default:6,dense:2},k={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:s.a,transitionDuration:{enter:225,exit:195}},x=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},O=function(e){return Object.keys(e).filter((function(e){return!_[e]})).reduce((function(t,n){var r;return g({},t,((r={})[n]=e[n],r))}),{})},C={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},E=function(e){return"containerAnchorOrigin"+e},j=function(e){var t=e.vertical,n=e.horizontal;return"anchorOrigin"+x(t)+x(n)},R=function(e){return"variant"+x(e)},T=function(e){return!!e||0===e},A=function(e){return"number"===typeof e||null===e};function M(e,t,n){return void 0===e&&(e={}),void 0===t&&(t={}),void 0===n&&(n={}),g({},n,{},t,{},e)}var L=function(e){var t;return Object(c.a)({root:(t={display:"flex",flexWrap:"wrap",flexGrow:1},t[e.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t)})},$=Object(r.forwardRef)((function(e,t){var n=e.classes,r=e.className,i=v(e,["classes","className"]);return o.a.createElement("div",Object.assign({ref:t,className:Object(a.a)(n.root,r)},i))})),N=Object(l.a)(L)($),D={right:"left",left:"right",bottom:"up",top:"down"},P=function(e){return"center"!==e.horizontal?D[e.horizontal]:D[e.vertical]},I=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},F=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},z=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},W=function(e){return o.a.createElement(h.a,Object.assign({},e),o.a.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},B={fontSize:20,marginInlineEnd:8},H={default:void 0,success:o.a.createElement(I,{style:B}),warning:o.a.createElement(F,{style:B}),error:o.a.createElement(z,{style:B}),info:o.a.createElement(W,{style:B})};function U(e,t){return e.reduce((function(e,n){return null==n?e:function(){for(var r=arguments.length,o=new Array(r),i=0;i .MuiCollapse-container, & > .MuiCollapse-root",Q="& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper",Z=Object(d.a)((function(e){var t,n,r,o,i;return{root:(t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:e.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"},t[X]={pointerEvents:"all"},t[Q]={padding:S.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+2*w.default+"px)",t[e.breakpoints.down("xs")]={width:"100%",maxWidth:"calc(100% - 32px)"},t),rootDense:(n={},n[Q]={padding:S.dense+"px 0px"},n),top:{top:w.default-S.default,flexDirection:"column"},bottom:{bottom:w.default-S.default,flexDirection:"column-reverse"},left:(r={left:w.default},r[e.breakpoints.up("sm")]={alignItems:"flex-start"},r[e.breakpoints.down("xs")]={left:"16px"},r),right:(o={right:w.default},o[e.breakpoints.up("sm")]={alignItems:"flex-end"},o[e.breakpoints.down("xs")]={right:"16px"},o),center:(i={left:"50%",transform:"translateX(-50%)"},i[e.breakpoints.up("sm")]={alignItems:"center"},i)}})),ee=function(e){var t=Z(),n=e.className,r=e.anchorOrigin,i=e.dense,s=v(e,["className","anchorOrigin","dense"]),c=Object(a.a)(t[r.vertical],t[r.horizontal],t.root,n,i&&t.rootDense);return o.a.createElement("div",Object.assign({className:c},s))},te=o.a.memo(ee),ne=function(e){var t,n,r,s,c;function l(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){void 0===t&&(t={});var r=t,o=r.key,i=r.preventDuplicate,a=v(r,["key","preventDuplicate"]),s=T(o),c=s?o:(new Date).getTime()+Math.random(),l=function(e,t,n){return function(r){return"autoHideDuration"===r?A(e.autoHideDuration)?e.autoHideDuration:A(t.autoHideDuration)?t.autoHideDuration:k.autoHideDuration:e[r]||t[r]||n[r]}}(a,n.props,k),u=g({key:c},a,{message:e,open:!0,entered:!1,requestClose:!1,variant:l("variant"),anchorOrigin:l("anchorOrigin"),autoHideDuration:l("autoHideDuration")});return a.persist&&(u.autoHideDuration=void 0),n.setState((function(t){if(void 0===i&&n.props.preventDuplicate||i){var r=function(t){return s?t.key===o:t.message===e},a=t.queue.findIndex(r)>-1,c=t.snacks.findIndex(r)>-1;if(a||c)return t}return n.handleDisplaySnack(g({},t,{queue:[].concat(t.queue,[u])}))})),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?g({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some((function(e){return!e.open||e.requestClose})))return e;var t=!1,r=!1;e.snacks.reduce((function(e,t){return e+(t.open&&t.persist?1:0)}),0)===n.maxSnack&&(r=!0);var o=e.snacks.map((function(e){return t||e.persist&&!r?g({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,C.MAXSNACK,e.key),n.props.onClose&&n.props.onClose(null,C.MAXSNACK,e.key),g({},e,{open:!1})):g({},e,{requestClose:!0}))}));return g({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!T(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.key===r?g({},e,{entered:!0}):g({},e)}))}}))},n.handleCloseSnack=function(e,t,r){if(n.props.onClose&&n.props.onClose(e,t,r),t!==C.CLICKAWAY){var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.key===r?e.entered?g({},e,{open:!1}):g({},e,{requestClose:!0}):g({},e)})),queue:n.filter((function(e){return e.key!==r}))}}))}},n.closeSnackbar=function(e){var t=n.state.snacks.find((function(t){return t.key===e}));T(e)&&t&&t.onClose&&t.onClose(null,C.INSTRUCTED,e),n.handleCloseSnack(null,C.INSTRUCTED,e)},n.handleExitedSnack=function(e,t,r){var o=t||r;if(!T(o))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var t=n.processQueue(g({},e,{snacks:e.snacks.filter((function(e){return e.key!==o}))}));return 0===t.queue.length?t:n.handleDismissOldest(t)}))},n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar,closeSnackbar:n.closeSnackbar}},n}return n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,l.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.iconVariant,s=n.dense,c=void 0===s?k.dense:s,l=n.hideIconVariant,u=void 0===l?k.hideIconVariant:l,d=n.domRoot,f=n.children,h=n.classes,p=void 0===h?{}:h,m=v(n,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),y=this.state.snacks.reduce((function(e,t){var n,r,o=(r=t.anchorOrigin,""+x(r.vertical)+x(r.horizontal)),i=e[o]||[];return g({},e,((n={})[o]=[].concat(i,[t]),n))}),{}),_=Object.keys(y).map((function(t){var n=y[t];return o.a.createElement(te,{key:t,dense:c,anchorOrigin:n[0].anchorOrigin,className:Object(a.a)(p.containerRoot,p[E(t)])},n.map((function(t){return o.a.createElement(J,Object.assign({},m,{key:t.key,snack:t,dense:c,iconVariant:r,hideIconVariant:u,classes:O(p),onClose:e.handleCloseSnack,onExited:U([e.handleExitedSnack,e.props.onExited]),onEntered:U([e.handleEnteredSnack,e.props.onEntered])}))})))}));return o.a.createElement(b.Provider,{value:t},f,d?Object(i.createPortal)(_,d):_)},r=l,(s=[{key:"maxSnack",get:function(){return this.props.maxSnack||k.maxSnack}}])&&m(r.prototype,s),c&&m(r,c),l}(r.Component),re=function(){return Object(r.useContext)(b)}},function(e,t,n){"use strict";t.a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"}},function(e,t,n){"use strict";t.a={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"}},function(e,t,n){"use strict";t.a={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"}},function(e,t,n){"use strict";t.a={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},function(e,t,n){"use strict";t.a={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},function(e,t,n){"use strict";t.a={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},function(e,t,n){"use strict";t.a={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(130);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r=n(1),o=n(18),i=n(3),a=n(0),s=n(2),c=n(37),l=n(41),u=n(5),d=n(216),f=a.forwardRef((function(e,t){var n=e.autoFocus,u=e.checked,f=e.checkedIcon,h=e.classes,p=e.className,m=e.defaultChecked,g=e.disabled,v=e.icon,b=e.id,y=e.inputProps,_=e.inputRef,w=e.name,S=e.onBlur,k=e.onChange,x=e.onFocus,O=e.readOnly,C=e.required,E=e.tabIndex,j=e.type,R=e.value,T=Object(i.a)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),A=Object(c.a)({controlled:u,default:Boolean(m),name:"SwitchBase",state:"checked"}),M=Object(o.a)(A,2),L=M[0],$=M[1],N=Object(l.a)(),D=g;N&&"undefined"===typeof D&&(D=N.disabled);var P="checkbox"===j||"radio"===j;return a.createElement(d.a,Object(r.a)({component:"span",className:Object(s.a)(h.root,p,L&&h.checked,D&&h.disabled),disabled:D,tabIndex:null,role:void 0,onFocus:function(e){x&&x(e),N&&N.onFocus&&N.onFocus(e)},onBlur:function(e){S&&S(e),N&&N.onBlur&&N.onBlur(e)},ref:t},T),a.createElement("input",Object(r.a)({autoFocus:n,checked:u,defaultChecked:m,className:h.input,disabled:D,id:P&&b,name:w,onChange:function(e){var t=e.target.checked;$(t),k&&k(e,t)},readOnly:O,ref:_,required:C,tabIndex:E,type:j,value:R},y)),L?f:v)}));t.a=Object(u.a)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(f)},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");t.default=a},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=o.a.createContext(null)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=n(8),l=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.color,d=void 0===u?"inherit":u,f=e.component,h=void 0===f?"svg":f,p=e.fontSize,m=void 0===p?"medium":p,g=e.htmlColor,v=e.titleAccess,b=e.viewBox,y=void 0===b?"0 0 24 24":b,_=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(h,Object(r.a)({className:Object(a.a)(s.root,l,"inherit"!==d&&s["color".concat(Object(c.a)(d))],"default"!==m&&"medium"!==m&&s["fontSize".concat(Object(c.a)(m))]),focusable:"false",viewBox:y,color:g,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},_),n,v?i.createElement("title",null,v):null)}));l.muiName="SvgIcon",t.a=Object(s.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n.n(i),s=n(16),c=n(2),l=n(14),u=n(19),d=n(5),f=n(54),h=n(23),p=n(66),m=n(76),g=n(77),v=n(102);function b(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(i.isValidElement)(e)?t(e):e}(e)})),n}function y(e,t,n){return null!=n[t]?n[t]:e.props[t]}function _(e,t,n){var r=b(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var c in t){if(o[c])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,s=void 0===i?a||t.pulsate:i,c=t.fakeElement,l=void 0!==c&&c;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var u,d,f,h=l?null:_.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(p.width/2),d=Math.round(p.height/2);else{var m=e.touches?e.touches[0]:e,g=m.clientX,S=m.clientY;u=Math.round(g-p.left),d=Math.round(S-p.top)}if(s)(f=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(f+=1);else{var k=2*Math.max(Math.abs((h?h.clientWidth:0)-u),u)+2,x=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(k,2)+Math.pow(x,2))}e.touches?null===y.current&&(y.current=function(){w({pulsate:o,rippleX:u,rippleY:d,rippleSize:f,cb:n})},b.current=setTimeout((function(){y.current&&(y.current(),y.current=null)}),80)):w({pulsate:o,rippleX:u,rippleY:d,rippleSize:f,cb:n})}}),[a,w]),x=i.useCallback((function(){S({},{pulsate:!0})}),[S]),C=i.useCallback((function(e,t){if(clearTimeout(b.current),"touchend"===e.type&&y.current)return e.persist(),y.current(),y.current=null,void(b.current=setTimeout((function(){C(e,t)})));y.current=null,p((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:x,start:S,stop:C}}),[x,S,C]),i.createElement("span",Object(r.a)({className:Object(c.a)(s.root,l),ref:_},u),i.createElement(k,{component:null,exit:!0},f))})),E=Object(d.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(C)),j=i.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,d=e.centerRipple,h=void 0!==d&&d,p=e.children,m=e.classes,g=e.className,v=e.component,b=void 0===v?"button":v,y=e.disabled,_=void 0!==y&&y,w=e.disableRipple,S=void 0!==w&&w,k=e.disableTouchRipple,x=void 0!==k&&k,O=e.focusRipple,C=void 0!==O&&O,j=e.focusVisibleClassName,R=e.onBlur,T=e.onClick,A=e.onFocus,M=e.onFocusVisible,L=e.onKeyDown,$=e.onKeyUp,N=e.onMouseDown,D=e.onMouseLeave,P=e.onMouseUp,I=e.onTouchEnd,F=e.onTouchMove,z=e.onTouchStart,W=e.onDragLeave,B=e.tabIndex,H=void 0===B?0:B,U=e.TouchRippleProps,V=e.type,G=void 0===V?"button":V,K=Object(o.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),q=i.useRef(null);var Y=i.useRef(null),J=i.useState(!1),X=J[0],Q=J[1];_&&X&&Q(!1);var Z=Object(f.a)(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;return Object(u.a)((function(r){return t&&t(r),!n&&Y.current&&Y.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){Q(!0),q.current.focus()}}}),[]),i.useEffect((function(){X&&C&&!S&&Y.current.pulsate()}),[S,C,X]);var oe=re("start",N),ie=re("stop",W),ae=re("stop",P),se=re("stop",(function(e){X&&e.preventDefault(),D&&D(e)})),ce=re("start",z),le=re("stop",I),ue=re("stop",F),de=re("stop",(function(e){X&&(te(e),Q(!1)),R&&R(e)}),!1),fe=Object(u.a)((function(e){q.current||(q.current=e.currentTarget),ee(e)&&(Q(!0),M&&M(e)),A&&A(e)})),he=function(){var e=s.findDOMNode(q.current);return b&&"button"!==b&&!("A"===e.tagName&&e.href)},pe=i.useRef(!1),me=Object(u.a)((function(e){C&&!pe.current&&X&&Y.current&&" "===e.key&&(pe.current=!0,e.persist(),Y.current.stop(e,(function(){Y.current.start(e)}))),e.target===e.currentTarget&&he()&&" "===e.key&&e.preventDefault(),L&&L(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&!_&&(e.preventDefault(),T&&T(e))})),ge=Object(u.a)((function(e){C&&" "===e.key&&Y.current&&X&&!e.defaultPrevented&&(pe.current=!1,e.persist(),Y.current.stop(e,(function(){Y.current.pulsate(e)}))),$&&$(e),T&&e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&T(e)})),ve=b;"button"===ve&&K.href&&(ve="a");var be={};"button"===ve?(be.type=G,be.disabled=_):("a"===ve&&K.href||(be.role="button"),be["aria-disabled"]=_);var ye=Object(l.a)(a,t),_e=Object(l.a)(ne,q),we=Object(l.a)(ye,_e),Se=i.useState(!1),ke=Se[0],xe=Se[1];i.useEffect((function(){xe(!0)}),[]);var Oe=ke&&!S&&!_;return i.createElement(ve,Object(r.a)({className:Object(c.a)(m.root,g,X&&[m.focusVisible,j],_&&m.disabled),onBlur:de,onClick:T,onFocus:fe,onKeyDown:me,onKeyUp:ge,onMouseDown:oe,onMouseLeave:se,onMouseUp:ae,onDragLeave:ie,onTouchEnd:le,onTouchMove:ue,onTouchStart:ce,ref:we,tabIndex:_?-1:H},be,K),p,Oe?i.createElement(E,Object(r.a)({ref:Y,center:h},U)):null)}));t.a=Object(d.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(j)},,,,,,,,function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e,t,n,r,o){return null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(301);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var r,o=n(1),i=n(3),a=n(0),s=n.n(a),c=n(336),l=n(31),u=n(341),d=Object(l.c)(Object(u.a)()),f=Object(c.a)(),h=new Map,p={disableGeneration:!1,generateClassName:f,jss:d,sheetsCache:null,sheetsManager:h,sheetsRegistry:null},m=s.a.createContext(p);function g(e){var t=e.children,n=e.injectFirst,a=void 0!==n&&n,c=e.disableGeneration,d=void 0!==c&&c,f=Object(i.a)(e,["children","injectFirst","disableGeneration"]),h=s.a.useContext(m),p=Object(o.a)({},h,{disableGeneration:d},f);if(!p.jss.options.insertionPoint&&a&&"undefined"!==typeof window){if(!r){var g=document.head;r=document.createComment("mui-inject-first"),g.insertBefore(r,g.firstChild)}p.jss=Object(l.c)({plugins:Object(u.a)().plugins,insertionPoint:r})}return s.a.createElement(m.Provider,{value:p},t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return f}));var r=n(9),o=n(29);function i(e){return"number"!==typeof e?e:"".concat(e,"px solid")}var a=Object(r.a)({prop:"border",themeKey:"borders",transform:i}),s=Object(r.a)({prop:"borderTop",themeKey:"borders",transform:i}),c=Object(r.a)({prop:"borderRight",themeKey:"borders",transform:i}),l=Object(r.a)({prop:"borderBottom",themeKey:"borders",transform:i}),u=Object(r.a)({prop:"borderLeft",themeKey:"borders",transform:i}),d=Object(r.a)({prop:"borderColor",themeKey:"palette"}),f=Object(r.a)({prop:"borderRadius",themeKey:"shape"}),h=Object(o.a)(a,s,c,l,u,d,f);t.h=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(23),o=n(1),i=n(63);function a(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function s(e){var t=function(t){var n=e(t);return t.css?Object(o.a)({},Object(i.a)(n,e(Object(o.a)({theme:t.theme},t.css))),a(t.css,[e.filterProps])):t.sx?Object(o.a)({},Object(i.a)(n,e(Object(o.a)({theme:t.theme},t.sx))),a(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat(Object(r.a)(e.filterProps)),t}function c(e){return s(e)}t.b=s},function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"k",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"n",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return v}));var r=n(9),o=n(29),i=Object(r.a)({prop:"flexBasis"}),a=Object(r.a)({prop:"flexDirection"}),s=Object(r.a)({prop:"flexWrap"}),c=Object(r.a)({prop:"justifyContent"}),l=Object(r.a)({prop:"alignItems"}),u=Object(r.a)({prop:"alignContent"}),d=Object(r.a)({prop:"order"}),f=Object(r.a)({prop:"flex"}),h=Object(r.a)({prop:"flexGrow"}),p=Object(r.a)({prop:"flexShrink"}),m=Object(r.a)({prop:"alignSelf"}),g=Object(r.a)({prop:"justifyItems"}),v=Object(r.a)({prop:"justifySelf"}),b=Object(o.a)(i,a,s,c,l,u,d,f,h,p,m,g,v);t.d=b},function(e,t,n){"use strict";n.d(t,"h",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"j",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return p})),n.d(t,"k",(function(){return m})),n.d(t,"b",(function(){return g}));var r=n(9),o=n(29),i=Object(r.a)({prop:"gridGap"}),a=Object(r.a)({prop:"gridColumnGap"}),s=Object(r.a)({prop:"gridRowGap"}),c=Object(r.a)({prop:"gridColumn"}),l=Object(r.a)({prop:"gridRow"}),u=Object(r.a)({prop:"gridAutoFlow"}),d=Object(r.a)({prop:"gridAutoColumns"}),f=Object(r.a)({prop:"gridAutoRows"}),h=Object(r.a)({prop:"gridTemplateColumns"}),p=Object(r.a)({prop:"gridTemplateRows"}),m=Object(r.a)({prop:"gridTemplateAreas"}),g=Object(r.a)({prop:"gridArea"}),v=Object(o.a)(i,a,s,c,l,u,d,f,h,p,m,g);t.a=v},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(9),o=n(29),i=Object(r.a)({prop:"color",themeKey:"palette"}),a=Object(r.a)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),s=Object(o.a)(i,a);t.c=s},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"c",(function(){return u}));var r=n(9),o=n(29),i=Object(r.a)({prop:"position"}),a=Object(r.a)({prop:"zIndex",themeKey:"zIndex"}),s=Object(r.a)({prop:"top"}),c=Object(r.a)({prop:"right"}),l=Object(r.a)({prop:"bottom"}),u=Object(r.a)({prop:"left"});t.b=Object(o.a)(i,a,s,c,l,u)},function(e,t,n){"use strict";n.d(t,"j",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(9),o=n(29);function i(e){return e<=1?"".concat(100*e,"%"):e}var a=Object(r.a)({prop:"width",transform:i}),s=Object(r.a)({prop:"maxWidth",transform:i}),c=Object(r.a)({prop:"minWidth",transform:i}),l=Object(r.a)({prop:"height",transform:i}),u=Object(r.a)({prop:"maxHeight",transform:i}),d=Object(r.a)({prop:"minHeight",transform:i}),f=Object(r.a)({prop:"size",cssProperty:"width",transform:i}),h=Object(r.a)({prop:"size",cssProperty:"height",transform:i}),p=Object(r.a)({prop:"boxSizing"}),m=Object(o.a)(a,s,c,l,u,d,p);t.b=m},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return d}));var r=n(9),o=n(29),i=Object(r.a)({prop:"fontFamily",themeKey:"typography"}),a=Object(r.a)({prop:"fontSize",themeKey:"typography"}),s=Object(r.a)({prop:"fontStyle",themeKey:"typography"}),c=Object(r.a)({prop:"fontWeight",themeKey:"typography"}),l=Object(r.a)({prop:"letterSpacing"}),u=Object(r.a)({prop:"lineHeight"}),d=Object(r.a)({prop:"textAlign"}),f=Object(o.a)(i,a,s,c,l,u,d);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(18),o=n(90),i=n(63);var a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},l=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!c[e])return[e];e=c[e]}var t=e.split(""),n=Object(r.a)(t,2),o=n[0],i=n[1],l=a[o],u=s[i]||"";return Array.isArray(u)?u.map((function(e){return l+e})):[l+u]})),u=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function d(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function f(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function h(e){var t=d(e.theme);return Object.keys(e).map((function(n){if(-1===u.indexOf(n))return null;var r=f(l(n),t),i=e[n];return Object(o.b)(e,i,r)})).reduce(i.a,{})}h.propTypes={},h.filterProps=u;t.b=h},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p}));var r=n(28),o=n(25),i=n(23),a=n(167),s=n(21),c=n(65);function l(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function u(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function d(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(i.a)(r)),s=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===s.indexOf(e.tagName)&&l(e,o)}))}function f(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function h(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(s.a)(e);return t.body===e?Object(c.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var l=Object(a.a)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(u(i)+l,"px"),n=Object(s.a)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(u(e)+l,"px")}))}var d=i.parentElement,f="HTML"===d.nodeName&&"scroll"===window.getComputedStyle(d)["overflow-y"]?d:i;r.push({value:f.style.overflow,key:"overflow",el:f}),f.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var p=function(){function e(){Object(r.a)(this,e),this.modals=[],this.containers=[]}return Object(o.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&l(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);d(t,e.mountNode,e.modalRef,r,!0);var o=f(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=f(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=h(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=f(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&l(e.modalRef,!0),d(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&l(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}()},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=function(e){var n=a.a.forwardRef((function(n,i){var s=n.innerRef,c=Object(o.a)(n,["innerRef"]),u=Object(l.a)()||t;return a.a.createElement(e,Object(r.a)({theme:u,ref:s||i},c))}));return c()(n,e),n};return n}var d=u();t.a=d},function(e,t,n){"use strict";n.r(t);var r=n(8);n.d(t,"capitalize",(function(){return r.a}));var o=n(42);n.d(t,"createChainedFunction",(function(){return o.a}));var i=n(20);n.d(t,"createSvgIcon",(function(){return i.a}));var a=n(32);n.d(t,"debounce",(function(){return a.a}));var s=n(39);n.d(t,"deprecatedPropType",(function(){return s.a}));var c=n(45);n.d(t,"isMuiElement",(function(){return c.a}));var l=n(21);n.d(t,"ownerDocument",(function(){return l.a}));var u=n(65);n.d(t,"ownerWindow",(function(){return u.a}));var d=n(210);n.d(t,"requirePropFactory",(function(){return d.a}));var f=n(30);n.d(t,"setRef",(function(){return f.a}));var h=n(115);n.d(t,"unsupportedProp",(function(){return h.a}));var p=n(37);n.d(t,"useControlled",(function(){return p.a}));var m=n(19);n.d(t,"useEventCallback",(function(){return m.a}));var g=n(14);n.d(t,"useForkRef",(function(){return g.a}));var v=n(62);n.d(t,"unstable_useId",(function(){return v.a}));var b=n(54);n.d(t,"useIsFocusVisible",(function(){return b.a}))},function(e,t,n){"use strict";n.r(t);var r=n(298);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.r(t);var r=n(300);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(211);n.d(t,"a",(function(){return r.b}))},function(e,t,n){(function(e){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,n,r){"string"===typeof t?(2==arguments.length&&(r=n),e.modules[t]||(e.payloads[t]=r,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var o=i(e,t);if(void 0!=o)return n&&n(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,c=t.length;s=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=i.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(i.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(i.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(i.split(" Edge/")[1])||void 0,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isAndroid=i.indexOf("Android")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(i)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r,o=e("./useragent");t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var i=[],a=0;a=1.5,o.isChromeOS&&(t.HI_DPI=!1),"undefined"!==typeof document){var c=document.createElement("div");t.HI_DPI&&void 0!==c.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||"undefined"===typeof c.style.animationName||(t.HAS_CSS_ANIMATION=!0),c=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./oop"),o=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,o),t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r,o=e("./keys"),i=e("./useragent"),a=null,s=0;function c(){return void 0==r&&function(){r=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){r={passive:!1}}})}catch(e){}}(),r}function l(e,t,n){this.elem=e,this.type=t,this.callback=n}l.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,r){e.addEventListener(t,n,c()),r&&r.$toDestroy.push(new l(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,c())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function o(e){t&&t(e),n&&n(e),d(r,"mousemove",t),d(r,"mouseup",o),d(r,"dragstart",o)}return u(r,"mousemove",t),u(r,"mouseup",o),u(r,"dragstart",o),o},t.addMouseWheelListener=function(e,t,n){"onmousewheel"in e?u(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)}),n):"onwheel"in e?u(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)}),n):u(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)}),n)},t.addMultiMouseDownListener=function(e,n,r,o,a){var s,c,l,d=0,f={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?d=0:e.detail>1?++d>4&&(d=1):d=1,i.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-c)>5;l&&!a||(d=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[d-1]||600),1==d&&(s=e.clientX,c=e.clientY)}if(e._clicks=d,r[o]("mousedown",e),d>4)d=0;else if(d>1)return r[o](f[d],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",h,a)}))};var f=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function h(e,t,n){var r=f(t);if(!i.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var c="location"in t?t.location:t.keyLocation;if(17===n&&1===c)1==a[n]&&(s=t.timeStamp);else if(18===n&&3===r&&2===c){t.timeStamp-s<50&&(a.altGr=!0)}}}if((n in o.MODIFIER_KEYS&&(n=-1),!r&&13===n)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,r,-n),t.defaultPrevented)))return;if(i.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,r,n)}function p(){a=Object.create(null)}if(t.getModifierString=function(e){return o.KEY_MODS[f(e)]},t.addCommandKeyListener=function(e,n,r){if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var o=null;u(e,"keydown",(function(e){o=e.keyCode}),r),u(e,"keypress",(function(e){return h(n,e,o)}),r)}else{var s=null;u(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=h(n,e,e.keyCode);return s=e.defaultPrevented,t}),r),u(e,"keypress",(function(e){s&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),s=null)}),r),u(e,"keyup",(function(e){a[e.keyCode]=null}),r),a||(p(),u(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!i.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++;u(n,"message",(function o(i){i.data==r&&(t.stopPropagation(i),d(n,"message",o),e())})),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var r=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var o={row:t+1,column:0};else if(this.start.row0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;nDate.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=e("../lib/dom"),a=e("../lib/lang"),s=e("../clipboard"),c=o.isChrome<18,l=o.isIE,u=o.isChrome>63,d=400,f=e("../lib/keys"),h=f.KEY_MODS,p=o.isIOS,m=p?/\s/:/\n/,g=o.isMobile;t.TextInput=function(e,t){var n=i.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var v=!1,b=!1,y=!1,_=!1,w="";g||(n.style.fontSize="1px");var S=!1,k=!1,x="",O=0,C=0,E=0;try{var j=document.activeElement===n}catch(G){}r.addListener(n,"blur",(function(e){k||(t.onBlur(e),j=!1)}),t),r.addListener(n,"focus",(function(e){if(!k){if(j=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(R):R()}}),t),this.$focusScroll=!1,this.focus=function(){if(w||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(G){return}var r=[];if(t)for(var o=n.parentElement;o&&1==o.nodeType;)r.push(o),o.setAttribute("ace_nocontext",!0),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;n.focus({preventScroll:!0}),t&&r.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return j},t.on("beforeEndOperation",(function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var o=r&&(e.docChanged||e.selectionChanged);y&&o&&(x=n.value="",z()),R()}}));var R=p?function(e){if(j&&(!v||e)&&!_){e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=x=r);var o=4+(e.length||(t.selection.isEmpty()?0:1));4==O&&C==o||n.setSelectionRange(4,o),O=4,C=o}}:function(){if(!y&&!_&&(j||A)){y=!0;var e=0,r=0,o="";if(t.session){var i=t.selection,a=i.getRange(),s=i.cursor.row;if(e=a.start.column,r=a.end.column,o=t.session.getLine(s),a.start.row!=s){var c=t.session.getLine(s-1);e=a.start.rows+1?l.length:r,r+=o.length+1,o=o+"\n"+l}else g&&s>0&&(o="\n"+o,r+=1,e+=1);o.length>d&&(e0&&x[f]==e[f];)f++,s--;for(l=l.slice(f),f=1;c>0&&x.length-f>O-1&&x[x.length-f]==e[e.length-f];)f++,c--;u-=f-1,d-=f-1;var h=l.length-f+1;if(h<0&&(s=-h,h=0),l=l.slice(0,h),!r&&!l&&!u&&!s&&!c&&!d)return"";_=!0;var p=!1;return o.isAndroid&&". "==l&&(l=" ",p=!0),l&&!s&&!c&&!u&&!d||S?t.onTextInput(l):t.onTextInput(l,{extendLeft:s,extendRight:c,restoreStart:u,restoreEnd:d}),_=!1,x=e,O=i,C=a,E=d,p?"\n":l},L=function(e){if(y)return F();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var r=n.value,o=M(r,!0);(r.length>500||m.test(o)||g&&O<1&&O==C)&&R()},$=function e(t,n,r){var o=t.clipboardData||window.clipboardData;if(o&&!c){var i=l||r?"Text":"text/plain";try{return n?!1!==o.setData(i,n):o.getData(i)}catch(t){if(!r)return e(t,n,!0)}}},N=function(e,o){var i=t.getCopyText();if(!i)return r.preventDefault(e);$(e,i)?(p&&(R(i),v=i,setTimeout((function(){v=!1}),10)),o?t.onCut():t.onCopy(),r.preventDefault(e)):(v=!0,n.value=i,n.select(),setTimeout((function(){v=!1,R(),o?t.onCut():t.onCopy()})))},D=function(e){N(e,!0)},P=function(e){N(e,!1)},I=function(e){var i=$(e);s.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),o.isIE&&setTimeout(R),r.preventDefault(e)):(n.value="",b=!0))};r.addCommandKeyListener(n,t.onCommandKey.bind(t),t),r.addListener(n,"select",(function(e){y||(v?v=!1:!function(e){return 0===e.selectionStart&&e.selectionEnd>=x.length&&e.value===x&&x&&e.selectionEnd!==C}(n)?g&&n.selectionStart!=O&&R():(t.selectAll(),R()))}),t),r.addListener(n,"input",L,t),r.addListener(n,"cut",D,t),r.addListener(n,"copy",P,t),r.addListener(n,"paste",I,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:P(e);break;case 86:I(e);break;case 88:D(e)}}),t);var F=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){if(S)return W();if(y.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;M(e),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+C-y.selectionStart+E)}}},z=function(e){t.onCompositionEnd&&!t.$readOnly&&(y=!1,t.onCompositionEnd(),t.off("mousedown",W),e&&L())};function W(){k=!0,n.blur(),n.focus(),k=!1}var B,H=a.delayedCall(F,50).schedule.bind(null,null);function U(){clearTimeout(B),B=setTimeout((function(){w&&(n.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",(function(e){if(!y&&t.onCompositionStart&&!t.$readOnly&&(y={},!S)){e.data&&(y.useTextareaForIME=!1),setTimeout(F,0),t._signal("compositionStart"),t.on("mousedown",W);var r=t.getSelectionRange();r.end.row=r.start.row,r.end.column=r.start.column,y.markerRange=r,y.selectionStart=O,t.onCompositionStart(y),y.useTextareaForIME?(x=n.value="",O=0,C=0):(n.msGetInputContext&&(y.context=n.msGetInputContext()),n.getInputContext&&(y.context=n.getInputContext()))}}),t),r.addListener(n,"compositionupdate",F,t),r.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.lengthC&&"\n"==x[i]?a=f.end:rC&&x.slice(0,i).split("\n").length>2?a=f.down:i>C&&" "==x[i-1]?(a=f.right,s=h.option):(i>C||i==C&&C!=O&&r==i)&&(a=f.right),r!==i&&(s|=h.shift),a){if(!t.onCommandKey({},s,a)&&t.commands){a=f.keyCodeToString(a);var c=t.commands.findKeyCommand(s,a);c&&t.execCommand(c)}O=r,C=i,R("")}}};document.addEventListener("selectionchange",i),t.on("destroy",(function(){document.removeEventListener("selectionchange",i)}))}(0,t,n)},t.$setUserAgentForTests=function(e,t){g=e,p=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/useragent");function o(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function i(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,i=e.getButton();return 0!==i?((o.getSelectionRange().isEmpty()||1==i)&&o.selection.moveToPosition(n),void(2==i&&(o.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var o=i(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](r.row,r.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==a&&s<=0)t=this.$clickSelection.end,o.end.row==r.row&&o.end.column==r.column||(r=o.start);else if(1==s&&a>=0)t=this.$clickSelection.start,o.start.row==r.row&&o.start.column==r.column||(r=o.end);else if(-1==a&&1==s)r=o.end,t=o.start;else{var c=i(this.$clickSelection,r);r=c.cursor,t=c.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,r,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),i=Date.now();(o>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,o=r-n.t,i=o?e.wheelX/o:n.vx,a=o?e.wheelY/o:n.vy;o<550&&(i=(i+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(i/a),c=!1;if(s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)n.allowed=r;else if(r-n.allowed<550){Math.abs(i)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(c=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=i,n.vy=a,c?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(o.prototype),t.DefaultHandlers=o})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,n){"use strict";e("./lib/oop");var r=e("./lib/dom");function o(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(o.prototype),t.Tooltip=o})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/oop"),i=e("../lib/event"),a=e("../tooltip").Tooltip;function s(e){a.call(this,e)}o.inherits(s,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),i=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+i>r&&(t-=20+i),a.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=function(e){var t,n,o,a=e.editor,c=a.renderer.$gutterLayer,l=new s(a.container);function u(){t&&(t=clearTimeout(t)),o&&(l.hide(),o=null,a._signal("hideGutterTooltip",l),a.off("mousewheel",u))}function d(e){l.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=c.getRegion(t)){var n=t.getDocumentPosition().row,r=a.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(i){var s=i.domEvent.target||i.domEvent.srcElement;if(r.hasCssClass(s,"ace_fold-widget"))return u();o&&e.$tooltipFollowsMouse&&d(i),n=i,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,r=c.$annotations[t];if(!r)return u();if(t==a.session.getLength()){var i=a.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(i>a.session.documentToScreenRow(s.row,s.column))return u()}if(o!=r)if(o=r.text.join("
"),l.setHtml(o),l.show(),a._signal("showGutterTooltip",l),a.on("mousewheel",u),e.$tooltipFollowsMouse)d(n);else{var f=n.domEvent.target.getBoundingClientRect(),h=l.getElement().style;h.left=f.right+"px",h.top=f.bottom+"px"}}():u()}),50))})),i.addListener(a.renderer.$gutter,"mouseout",(function(e){n=null,o&&!t&&(t=setTimeout((function(){t=null,u()}),50))}),a),a.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/event"),o=e("../lib/useragent"),i=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(i.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=e("../lib/event"),i=e("../lib/useragent");function a(e){var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var a,c,l,u,d,f,h,p,m,g,v,b=t.container,y=0;function _(){var e=f;(function(e,n){var r=Date.now(),o=!n||e.row!=n.row,i=!n||e.column!=n.column;!g||o||i?(t.moveCursorToPosition(e),g=r,v={x:c,y:l}):s(v.x,v.y,c,l)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(f=t.renderer.screenToTextCoordinates(c,l),e),function(e,n){var r=Date.now(),o=t.renderer.layerConfig.lineHeight,i=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:c-a.left,right:a.right-c},y:{top:l-a.top,bottom:a.bottom-l}},u=Math.min(s.x.left,s.x.right),d=Math.min(s.y.top,s.y.bottom),f={row:e.row,column:e.column};u/i<=2&&(f.column+=s.x.left=200&&t.renderer.scrollCursorIntoView(f):m=r:m=null}(f,e)}function w(){d=t.selection.toOrientedRange(),a=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),_(),u=setInterval(_,20),y=0,o.addListener(document,"mousemove",x)}function S(){clearInterval(u),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(d),t.isFocused()&&!p&&t.$resetCursorStyle(),d=null,f=null,y=0,m=null,g=null,o.removeListener(document,"mousemove",x)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var r=this;return setTimeout((function(){r.startSelect(),r.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),o.setDragImage&&o.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),o.clearData(),o.setData("Text",t.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,p=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&O(e.dataTransfer))return c=e.clientX,l=e.clientY,a||w(),y++,e.dataTransfer.dropEffect=h=C(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&O(e.dataTransfer))return c=e.clientX,l=e.clientY,a||(w(),y++),null!==k&&(k=null),e.dataTransfer.dropEffect=h=C(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&a)return S(),h=null,o.preventDefault(e)},this.onDrop=function(e){if(f){var n=e.dataTransfer;if(p)switch(h){case"move":d=d.contains(f.row,f.column)?{start:f,end:f}:t.moveText(d,f);break;case"copy":d=t.moveText(d,f,!0)}else{var r=n.getData("Text");d={start:f,end:t.session.insert(f,r)},t.focus(),h=null}return S(),o.preventDefault(e)}},o.addListener(b,"dragstart",this.onDragStart.bind(e),t),o.addListener(b,"dragend",this.onDragEnd.bind(e),t),o.addListener(b,"dragenter",this.onDragEnter.bind(e),t),o.addListener(b,"dragover",this.onDragOver.bind(e),t),o.addListener(b,"dragleave",this.onDragLeave.bind(e),t),o.addListener(b,"drop",this.onDrop.bind(e),t);var k=null;function x(){null==k&&(k=setTimeout((function(){null!=k&&a&&S()}),20))}function O(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function C(e){var t=["copy","copymove","all","uninitialized"],n=i.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(r)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?o="move":t.indexOf(r)>=0&&(o="copy"),o}}function s(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=i.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;i.isIE&&"dragReady"==this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(i.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,o=e("../lib/event"),i=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,c,l,u,d,f,h,p="scroll",m=0,g=0,v=0,b=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(r){var o=r.target.getAttribute("action");if("more"==o||!n)return n=!n,function(){var r=t.getCopyText(),o=t.session.getUndoManager().hasUndo();h.replaceChild(i.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),h.firstChild)}();"paste"==o?e.readText().then((function(e){t.execCommand(o,e)})):o&&("cut"!=o&&"copy"!=o||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),h.firstChild.style.display="none",n=!1,"openCommandPallete"!=o&&t.focus()};h=i.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){p="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),r(e)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function _(){h||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,i=t.container.getBoundingClientRect();h.style.top=n.pageY-i.top-3+"px",n.pageX-i.left1)return clearTimeout(l),l=null,s=-1,void(p="zoom");f=t.$mouseHandler.isMousePressed=!0;var i=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,h=e.timeStamp;c=h;var y=o[0],_=y.clientX,w=y.clientY;Math.abs(n-_)+Math.abs(a-w)>i&&(s=-1),n=e.clientX=_,a=e.clientY=w,v=b=0;var k=new r(e,t);if(d=k.getDocumentPosition(),h-s<500&&1==o.length&&!m)g++,e.preventDefault(),e.button=0,function(){l=null,clearTimeout(l),t.selection.moveToPosition(d);var e=g>=2?t.selection.getLineRange(d.row):t.session.getBracketRange(d);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),p="wait"}();else{g=0;var x=t.selection.cursor,O=t.selection.isEmpty()?x:t.selection.anchor,C=t.renderer.$cursorLayer.getPixelPosition(x,!0),E=t.renderer.$cursorLayer.getPixelPosition(O,!0),j=t.renderer.scroller.getBoundingClientRect(),R=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,A=function(e,t){return(e/=u)*e+(t=t/i-.75)*t};if(e.clientXL?"cursor":"anchor"),p=L<3.5?"anchor":M<3.5?"cursor":"scroll",l=setTimeout(S,450)}s=h}),t),o.addListener(e,"touchend",(function(e){f=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",m=0):l?(t.selection.moveToPosition(d),m=0,_()):"scroll"==p?(m+=60,u=setInterval((function(){m--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(b)<.01&&(b=0),m<20&&(v*=.9),m<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*b),e==t.session.getScrollTop()&&(m=0)}),10),w()):_(),clearTimeout(l),l=null}),t),o.addListener(e,"touchmove",(function(e){l&&(clearTimeout(l),l=null);var o=e.touches;if(!(o.length>1||"zoom"==p)){var i=o[0],s=n-i.clientX,u=a-i.clientY;if("wait"==p){if(!(s*s+u*u>4))return e.preventDefault();p="cursor"}n=i.clientX,a=i.clientY,e.clientX=i.clientX,e.clientY=i.clientY;var d=e.timeStamp,f=d-c;if(c=d,"scroll"==p){var h=new r(e,t);h.speed=1,h.wheelX=s,h.wheelY=u,10*Math.abs(s)1&&(o=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+o+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var o,a;Array.isArray(n)&&(a=n[0],n=n[1]);try{o=e(n)}catch(c){}if(o&&!t.$loading[n])return r&&r(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r),!(t.$loading[n].length>1)){var s=function(){e([n],(function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return s();i.loadScript(t.moduleUrl(n,a),s),u()}};var u=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};function d(o){if(c&&c.document){l.packaged=o||e.packaged||r.packaged||c.define&&n(307).packaged;for(var i,a={},s="",u=document.currentScript||document._currentScript,d=(u&&u.ownerDocument||document).getElementsByTagName("script"),f=0;f=e){for(i=d+1;i=e;)i++;for(s=d,c=i-1;s=t.length||2!=(c=n[o-1])&&3!=c||2!=(l=t[o+1])&&3!=l?4:(i&&(l=3),l==c?l:4);case 10:return 2==(c=o>0?n[o-1]:5)&&o+10&&2==n[o-1])return 2;if(i)return 4;for(h=o+1,f=t.length;h=1425&&m<=2303||64286==m;if(c=t[h],g&&(1==c||7==c))return 1}return o<1||5==(c=t[o-1])?4:n[o-1];case 5:return i=!1,a=!0,r;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:i=!1;case d:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:f[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var f=e.split(""),h=new Array(f.length),v=new Array(f.length),b=[];r=u?1:0,function(e,t,n,u){var d=r?l:c,f=null,h=null,p=null,v=0,b=null,y=-1,_=null,w=null,S=[];if(!u)for(_=0,u=[];_0)if(16==b){for(_=y;_-1){for(_=y;_=0&&8==u[k];k--)t[k]=r}}(f,b,f.length,n);for(var y=0;y7&&n[y]<13||4===n[y]||n[y]===d)?b[y]=t.ON_R:y>0&&"\u0644"===f[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(f[y])&&(b[y-1]=b[y]=t.R_H,y++);f[f.length-1]===t.DOT&&(b[f.length-1]=t.B),"\u202b"===f[0]&&(b[0]=t.RLE);for(y=0;y=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,o=r.getVisualFromLogicalIdx(n,this.bidiMap),i=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&i[o]%2!==0&&o++;for(var s=0;st&&i[o]%2===0&&(a+=this.charWidths[i[o]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},this.getSelections=function(e,t){var n,r=this.bidiMap,o=r.bidiLevels,i=[],a=0,s=Math.min(e,t)-this.wrapIndent,c=Math.max(e,t)-this.wrapIndent,l=!1,u=!1,d=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var f,h=0;h=s&&fn+i/2;){if(n+=i,r===o.length-1){i=0;break}i=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!==0&&o[r]%2===0?(e0&&o[r-1]%2===0&&o[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===i&&o[r-1]%2===0||!this.isRtlDir&&0===r&&o[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!==0&&0!==i&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/lang"),i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))};(function(){r.implement(this,i),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},this.$setSelection=function(e,t,n,r){if(!this.$silent){var o=this.$isEmpty,i=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||i)&&this._emit("changeSelection")}},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(r);return o?(r=o.start.row,n=o.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,o=e.column+t;return n<0&&(r=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var i=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var i=o.stringReverse(r),a=this.$shortWordEndIndex(i);return this.moveCursorTo(t,n-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var i=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&i.row===this.lead.row&&(i.column,this.lead.column),this.moveCursorTo(i.row,i.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(r){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";var r=e("./config"),o=2e3,i=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],o=0,i=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],c=0;c1?this.$applyToken:l.token),d>1&&(/\\\d/.test(l.regex)?u=l.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(d=1,u=this.removeCapturingGroups(l.regex)),l.splitRegex||"string"==typeof l.token||s.push(l)),i[o]=c,o+=d,r.push(u),l.onMatch||(l.onMatch=null)}}r.length||(i[0]=0,r.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var r=[],o=0,i=n.length;ou){var v=e.substring(u,g-m.length);f.type==h?f.value+=v:(f.type&&l.push(f),f={type:h,value:v})}for(var b=0;bo){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:l,state:n.length?n:r}},this.reportError=r.reportError}).call(i.prototype),t.Tokenizer=i})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(o.prototype),t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},f=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},h=function(e,t,n,r){var o=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}},p=function e(t){this.add("braces","insertion",(function(n,o,i,a,c){var l=i.getCursorPosition(),u=a.doc.getLine(l.row);if("{"==c){f(i);var d=i.getSelectionRange(),p=a.doc.getTextRange(d);if(""!==p&&"{"!==p&&i.getWrapBehavioursEnabled())return h(d,p,"{","}");if(e.isSaneInsertion(i,a))return/[\]\}\)]/.test(u[l.column])||i.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(i,a,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(i,a,"{"),{text:"{",selection:[1,1]})}else if("}"==c){if(f(i),"}"==u.substring(l.column,l.column+1))if(null!==a.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,u,c))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==c||"\r\n"==c){f(i);var m="";if(e.isMaybeInsertedClosing(l,u)&&(m=s.stringRepeat("}",r.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===u.substring(l.column,l.column+1)){var g=a.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!g)return null;var v=this.$getIndent(a.getLine(g.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+a.getTabString();return{text:"\n"+b+"\n"+v+m,selection:[1,b.length,1,b.length]}}e.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){if(f(n),"}"==o.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i;r.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,n,r,o,i){if("("==i){f(r);var a=r.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"(",")");if(e.isSaneInsertion(r,o))return e.recordAutoInsert(r,o,")"),{text:"()",selection:[1,1]}}else if(")"==i){f(r);var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if(")"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket(")",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,l,i))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i&&(f(n),")"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(t,n,r,o,i){if("["==i){f(r);var a=r.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&r.getWrapBehavioursEnabled())return h(a,s,"[","]");if(e.isSaneInsertion(r,o))return e.recordAutoInsert(r,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){f(r);var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if("]"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket("]",{column:c.column+1,row:c.row})&&e.isAutoInsertedClosing(c,l,i))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i&&(f(n),"]"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,r,o){var i=r.$mode.$quotes||d;if(1==o.length&&i[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;f(n);var a=o,s=n.getSelectionRange(),c=r.doc.getTextRange(s);if(!(""===c||1==c.length&&i[c])&&n.getWrapBehavioursEnabled())return h(s,c,a,a);if(!c){var l=n.getCursorPosition(),u=r.doc.getLine(l.row),p=u.substring(l.column-1,l.column),m=u.substring(l.column,l.column+1),g=r.getTokenAt(l.row,l.column),v=r.getTokenAt(l.row,l.column+1);if("\\"==p&&g&&/escape/.test(g.type))return null;var b,y=g&&/string|escape/.test(g.type),_=!v||/string|escape/.test(v.type);if(m==a)(b=y!==_)&&/string\.end/.test(v.type)&&(b=!1);else{if(y&&!_)return null;if(y&&_)return null;var w=r.$mode.tokenRe;w.lastIndex=0;var S=w.test(p);w.lastIndex=0;var k=w.test(p);if(S||k)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var x=u[l.column-2];if(p==a&&(x==a||w.test(x)))return null;b=!0}return{text:b?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,o){var i=r.$mode.$quotes||d,a=r.doc.getTextRange(o);if(!o.isMultiLine()&&i.hasOwnProperty(a)&&(f(n),r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==a))return o.end.column++,o}))};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(p,i),t.CstyleBehaviour=p})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,i=[],a=0;a2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,p=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(h)+")"),g=new RegExp("(?:"+c.escapeRegExp(p)+")\\s*$"),v=function(e,t){y(e,t)||i&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},p),o.insertInLine({row:t,column:s},h))},b=function(e,t){var n;(n=e.match(g))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&o.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var r=t.getTokens(n),o=0;oe.length&&(w=e.length)})),s==1/0&&(s=w,i=!1,a=!1),u&&s%l!=0&&(s=Math.floor(s/l)*l),_(a?b:v)},this.toggleBlockComment=function(e,t,n,r){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var i,a,s=(m=new l(t,r.row,r.column)).getCurrentToken(),c=(t.selection,t.selection.toOrientedRange());if(s&&/comment/.test(s.type)){for(var d,f;s&&/comment/.test(s.type);){if(-1!=(g=s.value.indexOf(o.start))){var h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;d=new u(h,p,h,p+o.start.length);break}s=m.stepBackward()}var m;for(s=(m=new l(t,r.row,r.column)).getCurrentToken();s&&/comment/.test(s.type);){var g;if(-1!=(g=s.value.indexOf(o.end))){h=m.getCurrentTokenRow(),p=m.getCurrentTokenColumn()+g;f=new u(h,p,h,p+o.end.length);break}s=m.stepForward()}f&&t.remove(f),d&&(t.remove(d),i=d.start.row,a=-o.start.length)}else a=o.start.length,i=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);c.start.row==i&&(c.start.column+=a),c.end.row==i&&(c.end.column+=a),t.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],o=n.prototype.$id,i=r.$modes[o];i||(r.$modes[o]=i=new n),r.$modes[t]||(r.$modes[t]=i),this.$embeds.push(t),this.$modes[t]=i}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=function(t,n,r){var o="insert"==t.action,i=(o?1:-1)*(t.end.row-t.start.row),a=(o?1:-1)*(t.end.column-t.start.column),s=t.start,c=o?s:t.end;if(e(n,s,r))return{row:n.row,column:n.column};if(e(c,n,!r))return{row:n.row+i,column:n.column+(n.row==c.row?a:0)};return{row:s.row,column:s.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var o={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:o,value:r})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(i.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./apply_delta").applyDelta,i=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,c=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),i<=r&&n.fireUpdateEvent(i,r)}}};(function(){r.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(i.prototype),t.BackgroundTokenizer=i})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),i=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,i){if(this.regExp)for(var a=i.firstRow,s=i.lastRow,c=a;c<=s;c++){var l=this.cache[c];null==l&&((l=r.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map((function(e){return new o(c,e.offset,c,e.offset+e.length)})),this.cache[c]=l.length?l:"");for(var u=l.length;u--;)t.drawSingleLineMarker(e,l[u].toScreenRange(n),this.clazz,i)}}}).call(i.prototype),t.SearchHighlight=i})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r,o,i=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var c=0;c0)){var c=r(e,a.start);return 0===s?t&&0!==c?-i-2:i:c>0||0===c&&!t?i:-i-1}}return-i-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort((function(e,t){return r(e.start,t.start)})))[0],i=1;i=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=r)break}if("insert"==e.action)for(var c=o-r,l=-t.column+n.column;ar)break;if(u.start.row==r&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=l,u.start.row+=c)),u.end.row==r&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&l>0&&au.start.column&&u.end.column==i[a+1].start.column&&(u.end.column-=l),u.end.column+=l,u.end.row+=c}}else for(c=r-o,l=t.column-n.column;ao)break;u.end.rowt.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=l,u.end.row+=c):u.end.row>o&&(u.end.row+=c),u.start.rowt.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=l,u.start.row+=c):u.start.row>o&&(u.start.row+=c)}if(0!=c&&a=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,o=0;o=t){s=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof i?n=e:(n=new i(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,c=n.start.column,l=n.end.row,u=n.end.column,d=this.getFoldAt(s,c,1),f=this.getFoldAt(l,u,-1);if(d&&f==d)return d.addSubFold(n);d&&!d.range.isStart(s,c)&&this.removeFold(d),f&&!f.range.isEnd(l,u)&&this.removeFold(f);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach((function(e){n.addSubFold(e)})));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e)n=new r(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach((function(e){o=o.concat(this.unfold(e))}),this),o;n=e}for(var i=o=this.getFoldsInRangeList(n);1==o.length&&r.comparePoints(o[0].start,n.start)<0&&r.comparePoints(o[0].end,n.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(o):this.expandFolds(o),i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,o){null==r&&(r=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var i=this.doc,a="";return e.walk((function(e,t,n,s){if(!(tu)break}while(i&&c.test(i.type));i=o.stepBackward()}else i=o.getCurrentToken();return l.end.row=o.getCurrentTokenRow(),l.end.column=o.getCurrentTokenColumn()+i.value.length-2,l}},this.foldAll=function(e,t,n,r){void 0==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var i=e=e||0;i=e&&(i=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),r=0;r=0;){var i=n[o];if(null==i&&(i=n[o]=this.getFoldWidget(o)),"start"==i){var a=this.getFoldWidgetRange(o);if(r||(r=a),a&&a.end.row>=e)break}o--}return{range:-1!==o&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),o="end"===n?-1:1,i=this.getFoldAt(e,-1===o?0:r.length,o);if(i)return t.children||t.all?this.removeFold(i):this.expandFold(i),i;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(i=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(i.range))return this.removeFold(i),i;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var c=s.range.start.row+1,l=s.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=a?a.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,i=n.charAt(e.column-1),a=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(a||(i=n.charAt(e.column),e={row:e.row,column:e.column+1},a=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=o.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=o.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(r||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!r)return null;var i=new o(e.row,e.column-1,e.row,e.column),a=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);return a?[i,new o(a.row,a.column,a.row,a.column+1)]:[i]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn()-2,l=s.value;;){for(;c>=0;){var u=l.charAt(c);if(u==o){if(0==(i-=1))return{row:a.getCurrentTokenRow(),column:c+a.getCurrentTokenColumn()}}else u==e&&(i+=1);c-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;c=(l=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],i=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn();;){for(var l=s.value,u=l.length;cn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var o=n+r>>1,i=e[o];if(t>i)n=o+1;else{if(!(t=t);i++);return(n=r[i])?(n.index=i,n.start=o-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var i=t;if(i>0){do{i--}while(i>=0&&n.charAt(i).match(o));i++}for(var a=t;ae&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,o=0,i=this.$foldData[o],a=i?i.start.row:1/0,s=t.length,c=0;ca){if((c=i.end.row+1)>=s)break;a=(i=this.$foldData[o++])?i.start.row:1/0}null==n[c]&&(n[c]=this.$getStringScreenWidth(t[c])[0]),n[c]>r&&(r=n[c])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(i.start.column+=l),i.end.row==e.end.row&&i.end.column>e.end.column&&(i.end.column+=l)),a&&i.start.row>=e.end.row&&(i.start.row+=a,i.end.row+=a)}if(i.end=this.insert(i.start,r),o.length){var s=e.start,c=i.start,l=(a=c.row-s.row,c.column-s.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=l),e.end.row==s.row&&(e.end.column+=l),e.start.row+=a,e.end.row+=a,e})))}return i},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var i=this.getLine(o);n.start.row=o,n.end.row=o;for(var a=0;a0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=o-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var i=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(i).map((function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e})),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,o=e.end,i=r.row,a=o.row,s=a-i,c=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(i,s);var l=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var u=0;if(m=this.getFoldLine(o.row)){m.addRemoveChars(o.row,o.column,r.column-o.column),m.shiftRow(-s);var d=this.getFoldLine(i);d&&d!==m&&(d.merge(m),m=d),u=l.indexOf(m)+1}for(;u=o.row&&m.shiftRow(-s)}a=i}else{var f=Array(s);f.unshift(i,0);var h=t?this.$wrapData:this.$rowLengthCache;h.splice.apply(h,f);l=this.$foldData,u=0;if(m=this.getFoldLine(i)){var p=m.range.compareInside(r.row,r.column);0==p?(m=m.split(r.row,r.column))&&(m.shiftRow(s),m.addRemoveChars(a,0,o.column-r.column)):-1==p&&(m.addRemoveChars(i,0,o.column-r.column),m.shiftRow(s)),u=l.indexOf(m)+1}for(;u=i&&m.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(c=this.getFoldsInRange(e),this.removeFolds(c),s=-s),(m=this.getFoldLine(i))&&m.addRemoveChars(i,r.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(i,a):this.$updateRowLengthCache(i,a),c},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,r){var o,i,a=this.doc.getAllLines(),s=this.getTabSize(),c=this.$wrapData,l=this.$wrapLimit,u=n;for(r=Math.min(r,a.length-1);u<=r;)(i=this.getFoldLine(u,i))?(o=[],i.walk(function(n,r,i,s){var c;if(null!=n){(c=this.$getDisplayTokens(n,o.length))[0]=e;for(var l=1;l=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(n,r,o){if(0==n.length)return[];var i=[],a=n.length,s=0,c=0,l=this.$wrapAsCode,u=this.$indentedSoftWrap,d=r<=Math.max(2*o,8)||!1===u?0:Math.floor(r/2);function f(e){for(var t=e-s,r=s;rr-h;){var p=s+r-h;if(n[p-1]>=10&&n[p]>=10)f(p);else if(n[p]!=e&&n[p]!=t){for(var m=Math.max(p-(r-(r>>2)),s-1);p>m&&n[p]m&&n[p]m&&9==n[p];)p--}else for(;p>m&&n[p]<10;)p--;p>m?f(++p):(2==n[p=s+r]&&p--,f(p-h))}else{for(;p!=s-1&&n[p]!=e;p--);if(p>s){f(p);continue}for(p=s+r;p39&&a<48||a>57&&a<64?o.push(9):a>=4352&&n(a)?o.push(1,2):o.push(1)}return o},this.$getStringScreenWidth=function(e,t,r){if(0==t)return[0,0];var o,i;for(null==t&&(t=1/0),r=r||0,i=0;i=4352&&n(o)?r+=2:r+=1,!(r>t));i++);return[r,i]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){s=l[u],i=this.$docRowCache[u];var f=e>l[d-1]}else f=!d;for(var h=this.getLength()-1,p=this.getNextFoldLine(i),m=p?p.start.row:1/0;s<=e&&!(s+(c=this.getRowLength(i))>e||i>=h);)s+=c,++i>m&&(i=p.end.row+1,m=(p=this.getNextFoldLine(i,p))?p.start.row:1/0),f&&(this.$docRowCache.push(i),this.$screenRowCache.push(s));if(p&&p.start.row<=i)r=this.getFoldDisplayLine(p),i=p.start.row;else{if(s+c<=e||i>h)return{row:h,column:this.getLine(h).length};r=this.getLine(i),p=null}var g=0,v=Math.floor(e-s);if(this.$useWrapMode){var b=this.$wrapData[i];b&&(o=b[v],v>0&&b.length&&(g=b.indent,a=b[v-1]||b[b.length-1],r=r.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+v,i,v)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=o&&(a=o-1),p?p.idxToPosition(a):{row:i,column:a}},this.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,o=0,i=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var a,s=0,c=this.$docRowCache,l=this.$getRowCacheIndex(c,e),u=c.length;if(u&&l>=0){s=c[l],o=this.$screenRowCache[l];var d=e>c[u-1]}else d=!u;for(var f=this.getNextFoldLine(s),h=f?f.start.row:1/0;s=h){if((a=f.end.row+1)>e)break;h=(f=this.getNextFoldLine(a,f))?f.start.row:1/0}else a=s+1;o+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(o))}var p="";f&&s>=h?(p=this.getFoldDisplayLine(f,e,t),i=f.start.row):(p=this.getLine(e).substring(0,t),i=e);var m=0;if(this.$useWrapMode){var g=this.$wrapData[i];if(g){for(var v=0;p.length>=g[v];)o++,v++;p=p.substring(g[v-1]||0,p.length),m=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(o+=this.lineWidgets[s].rowsAbove),{row:o,column:m+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,o=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);ro&&(r=t.end.row+1,o=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sn);i++);return[r,i]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},this.isFullWidth=n}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),a.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=p})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var r=e("./lib/lang"),o=e("./lib/oop"),i=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach((function(e,n,o,a){return r=new i(e,n,o,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)})),r},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var c,l=s.length,u=o.length-l;e:for(var d=s.offset||0;d<=u;d++){for(var f=0;fm||(a.push(c=new i(d,m,d+l-1,g)),l>2&&(d=d+l-2))}}else for(var v=0;vw&&a[f].end.row==n.end.row;)f--;for(a=a.slice(v,f+1),v=0,f=a.length;v=s;n--)if(d(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=c,s=a.row;n>=s;n--)if(d(n,Number.MAX_VALUE,e))return}};else l=function(e){var n=a.row;if(!d(n,a.column,e)){for(n+=1;n<=c;n++)if(d(n,0,e))return;if(0!=t.wrap)for(n=s,c=a.row;n<=c;n++)if(d(n,0,e))return}};if(t.$isMultiLine)var u=n.length,d=function(t,o,i){var a=r?t-u+1:t;if(!(a<0||a+u>e.getLength())){var s=e.getLine(a),c=s.search(n[0]);if(!(!r&&co))return!!i(a,c,a+u-1,d)||void 0}}};else if(r)d=function(t,r,o){var i,a=e.getLine(t),s=[],c=0;for(n.lastIndex=0;i=n.exec(a);){var l=i[0].length;if(c=i.index,!l){if(c>=a.length)break;n.lastIndex=c+=1}if(i.index+l>r)break;s.push(i.index,l)}for(var u=s.length-1;u>=0;u-=2){var d=s[u-1];if(o(t,d,t,d+(l=s[u])))return!0}};else d=function(t,r,o){var i,a,s=e.getLine(t);for(n.lastIndex=r;a=n.exec(s);){var c=a[0].length;if(o(t,i=a.index,t,i+c))return!0;if(!c&&(n.lastIndex=i+=1,i>=s.length))return!1}};return{forEach:l}}}).call(a.prototype),t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("../lib/keys"),o=e("../lib/useragent"),i=r.KEY_MODS;function a(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){a.call(this,e,t),this.$singleCommand=!1}s.prototype=a.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var o in r){var i=r[o];if(i==e)delete r[o];else if(Array.isArray(i)){var a=i.indexOf(e);-1!=a&&(i.splice(a,1),1==i.length&&(r[o]=i[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var r="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=i[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")}),this),r+=" "}var a=this.parseKeys(e),s=i[a.hashId]+a.key;this._addCommandToBinding(r+s,t,n)}),this)},this._addCommandToBinding=function(t,n,r){var o,i=this.commandKeyBinding;if(n)if(!i[t]||this.$singleCommand)i[t]=n;else{Array.isArray(i[t])?-1!=(o=i[t].indexOf(n))&&i[t].splice(o,1):i[t]=[i[t]],"number"!=typeof r&&(r=e(n));var a=i[t];for(o=0;or)break}a.splice(o,0,n)}else delete i[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),o=r[n];if(r.FUNCTION_KEYS[o])n=r.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var i=0,a=t.length;a--;){var s=r.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;i|=s}return{key:n,hashId:i}},this.findKeyCommand=function(e,t){var n=i[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,r){if(!(r<0)){var o=i[t]+n,a=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,a=this.commandKeyBinding[e.$keyChain]||a),!a||"chainKeys"!=a&&"chainKeys"!=a[a.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:a}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=s})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,i=e("../lib/event_emitter").EventEmitter,a=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};r.inherits(a,o),function(){r.implement(this,i),this.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(a.prototype),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var r=e("../lib/lang"),o=e("../config"),i=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("./ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,c=e.session.doc.getLine(n.row),l=n.row+1;l<=o.row+1;l++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));0!==u.length&&(u=" "+u),c+=u}o.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,o=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a=o.lastRow||r.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var i=this.selection.toJSON();this.curOp.selectionAfter=i,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(i),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=t.getMatchingBracketRanges(e.getCursorPosition());if(!n&&t.$mode.getMatching&&(n=t.$mode.getMatching(e.session)),n){var r="ace_bracket";Array.isArray(n)?1==n.length&&(r="ace_error_bracket"):n=[n],2==n.length&&(0==h.comparePoints(n[0].end,n[1].start)?n=[h.fromPoints(n[0].start,n[1].end)]:0==h.comparePoints(n[0].start,n[1].end)&&(n=[h.fromPoints(n[1].start,n[0].end)])),t.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return t.addMarker(e,r,"text")}))}}}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),r=new b(e.session,n.row,n.column),o=r.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1===o.type.indexOf("tag-open")||(o=r.stepForward())){var i=o.value,a=o.value,s=0,c=r.stepBackward();if("<"===c.value)do{c=o,(o=r.stepForward())&&(-1!==o.type.indexOf("tag-name")?i===(a=o.value)&&("<"===c.value?s++:""===o.value&&s--)}while(o&&s>=0);else{do{if(o=c,c=r.stepBackward(),o)if(-1!==o.type.indexOf("tag-name"))i===o.value&&("<"===c.value?s++:""===o.value){for(var l=0,u=c;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===i){s--;break}if("<"===u.value)break;u=r.stepBackward(),l++}for(var d=0;d1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new h(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,o=e.getLine(t.start.row),i=o.substring(n,r);if(!(i.length>5e3)&&/[\w\d]/.test(i)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:i}),s=o.substring(n-1,r+1);if(a.test(s))return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),o=0;os.search(/\S|$/)){var c=s.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+c)}}this.clearSelection();var l=o.column,u=n.getState(o.row),d=(s=n.getLine(o.row),r.checkOutdent(u,s,e));if(n.insert(o,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new h(o.row,l+i.selection[0],o.row,l+i.selection[1])):this.selection.setSelectionRange(new h(o.row+i.selection[0],i.selection[1],o.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(u,s.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},f)}d&&r.autoOutdent(u,n,o.row)}},this.autoIndent=function(){var e,t,n=this.session,r=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var o=this.getSelectionRange();e=o.start.row,t=o.end.row}for(var i,a,s,c="",l="",u="",d=n.getTabString(),f=e;f<=t;f++)f>0&&(c=n.getState(f-1),l=n.getLine(f-1),u=r.getNextLineIndent(c,l,d)),i=n.getLine(f),u!==(a=r.$getIndent(i))&&(a.length>0&&(s=new h(f,0,f,a.length),n.remove(s)),u.length>0&&n.insert({row:f,column:0},u)),r.autoOutdent(c,n,f)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),o=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var i=n.getTextRange(t);if("\n"==i[i.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,o=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var o=new h(0,0,0,0);for(r=e.first;r<=e.last;r++){var i=t.getLine(r);o.start.row=r,o.end.row=r,o.end.column=i.length,t.replace(o,n[r-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new h(t,n-1,t,n),o=this.session.getTextRange(r);if(!isNaN(parseFloat(o))&&isFinite(o)){var i=this.getNumberAt(t,n);if(i){var a=i.value.indexOf(".")>=0?i.start+i.value.indexOf(".")+1:i.end,s=i.start+i.value.length-a,c=parseFloat(i.value);c*=Math.pow(10,s),a!==i.end&&n=s&&a<=c&&(n=t,l.selection.clearSelection(),l.moveCursorTo(e,s+r),l.selection.selectTo(e,c+r)),s=c}));for(var u,d=this.$toggleWordPairs,f=0;fh+1)break;h=p.last}for(u--,s=this.session.$moveLines(f,h,t?0:e),t&&-1==e&&(d=u+1);d<=u;)a[d].moveBy(s,0),d++;t||(s=0),c+=s}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,o=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var i=n.scrollTop;n.scrollBy(0,o*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(i)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new b(this.session,n.row,n.column),o=r.getCurrentToken(),i=o||r.stepForward();if(i){var a,s,c=!1,l={},u=n.column-i.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(i.value.match(/[{}()\[\]]/g)){for(;u=0;--i)this.$tryReplace(n[i],e)&&r++;return this.selection.setSelectionRange(o),r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var i=this.$search.find(this.session);return t.preventScroll?i:i?(this.revealRange(i,n),i):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var i=this.on("changeSelection",(function(){r=!0})),a=this.renderer.on("beforeRender",(function(){r&&(t=n.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,i=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=i.top-a.offset;null!=(r=i.top>=0&&s+t.top<0||!(i.topwindow.innerHeight)&&null)&&(o.style.top=s+"px",o.style.left=i.left+"px",o.style.height=a.lineHeight+"px",o.scrollIntoView(r)),r=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",i),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var r=this;v.loadModule("./ext/prompt",(function(o){o.prompt(r,e,t,n)}))}}.call(_.prototype),v.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?w.attach(this):w.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var w={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=_})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var o=n[r][0];if(o.id<=e)break;o.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?s(e):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)}}).call(r.prototype);var o=e("./range").Range,i=o.comparePoints;o.comparePoints;function a(e){return{row:e.row,column:e.column}}function s(e){if(e=e||this,Array.isArray(e))return e.map(s).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(c).join("\n"):c(e.value)),e.start&&(t+=c(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function c(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function l(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)if(i(t.start,e.end)>=0)f(t,e,-1);else{if(!(i(t.start,e.start)<=0))return null;f(e,t,1)}else if(n&&!r)if(i(t.start,e.end)>=0)f(t,e,-1);else{if(!(i(t.end,e.start)<=0))return null;f(e,t,-1)}else if(!n&&r)if(i(t.start,e.start)>=0)f(t,e,1);else{if(!(i(t.start,e.start)<=0))return null;f(e,t,1)}else if(!n&&!r)if(i(t.start,e.start)>=0)f(t,e,1);else{if(!(i(t.end,e.start)<=0))return null;f(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var r=0;r=0?f(e,t,-1):(i(e.start,t.start)<=0||f(e,o.fromPoints(t.start,e.start),-1),f(t,e,1));else if(!n&&r)i(t.start,e.end)>=0?f(t,e,-1):(i(t.start,e.start)<=0||f(t,o.fromPoints(e.start,t.start),-1),f(e,t,1));else if(!n&&!r)if(i(t.start,e.end)>=0)f(t,e,-1);else{var a,s;if(!(i(t.end,e.start)<=0))return i(e.start,t.start)<0&&(a=e,e=p(e,t.start)),i(e.end,t.end)>0&&(s=p(e,t.end)),h(t.end,e.start,e.end,-1),s&&!a&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,a,s].filter(Boolean);f(e,t,-1)}return[t,e]}function f(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function p(e,t){var n=e.lines,r=e.end;e.end=a(t);var o=e.end.row-e.start.row,i=n.splice(o,n.length),s=o?t.column:t.column-e.start.column;return n.push(i[0].substring(0,s)),i[0]=i[0].substr(s),{start:a(t),end:r,lines:i,action:e.action}}function m(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var r=e[n],o=0;oi&&(c=o.end.row+1,i=(o=t.getNextFoldLine(c,o))?o.start.row:1/0),c>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}(a=this.$lines.get(++s))?a.row=c:(a=this.$lines.createCell(c,e,this.session,l),this.$lines.push(a)),this.$renderCell(a,e,o,c),c++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+r-1);var i=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(i+=a.left+a.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(r.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r0;o--)this.$lines.shift();if(r>n)for(o=this.session.getFoldedRowCount(n+1,r);o>0;o--)this.$lines.pop();e.firstRowr&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,n){for(var r=[],o=t,i=this.session.getNextFoldLine(o),a=i?i.start.row:1/0;o>a&&(o=i.end.row+1,a=(i=this.session.getNextFoldLine(o,i))?i.start.row:1/0),!(o>n);){var s=this.$lines.createCell(o,e,this.session,l);this.$renderCell(s,e,i,o),r.push(s),o++}return r},this.$renderCell=function(e,t,n,o){var i=e.element,a=this.session,s=i.childNodes[0],c=i.childNodes[1],l=a.$firstLineNumber,u=a.$breakpoints,d=a.$decorations,f=a.gutterRenderer||this.$renderer,h=this.$showFoldWidgets&&a.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o=p&&this.$cursorRow<=n.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[o]&&(m+=u[o]),d[o]&&(m+=d[o]),this.$annotations[o]&&(m+=this.$annotations[o].className),i.className!=m&&(i.className=m),h){var g=h[o];null==g&&(g=h[o]=a.getFoldWidget(o))}if(g){m="ace_fold-widget ace_"+g;"start"==g&&o==p&&on.right-t.right?"foldWidgets":void 0}}).call(c.prototype),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../range").Range,o=e("../lib/dom"),i=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var o=r.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),r.renderer){var i=this.$getTop(o.start.row,e),a=this.$padding+o.start.column*e.characterWidth;r.renderer(t,o,a,i,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,o,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,o,r.clazz,e):o.isMultiLine()?"text"==r.type?this.drawTextMarker(t,o,r.clazz,e):this.drawMultiLineMarker(t,o,r.clazz,e):this.drawSingleLineMarker(t,o,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.if?4:0)|(l==c?8:0)),o,l==c?0:1,i)},this.drawMultiLineMarker=function(e,t,n,r,o){var i=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),c=i+t.start.column*r.characterWidth;(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((l=t.clone()).end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,n+" ace_br1 ace_start",r,null,o)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+s+"px;left:"+c+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l;(l=t.clone()).start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,n+" ace_br12",r,null,o)}else{s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+u+"px;top:"+s+"px;left:"+i+"px;"+(o||""))}if(!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+a+"px;right:0;top:"+s+"px;left:"+i+"px;"+(o||""))}},this.drawSingleLineMarker=function(e,t,n,r,o,i){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,o,i);var a=r.lineHeight,s=(t.end.column+(o||0)-t.start.column)*r.characterWidth,c=this.$getTop(t.start.row,r),l=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+c+"px;left:"+l+"px;"+(i||""))},this.drawBidiSingleLineMarker=function(e,t,n,r,o,i){var a=r.lineHeight,s=this.$getTop(t.start.row,r),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+e.width+(o||0)+"px;top:"+s+"px;left:"+(c+e.left)+"px;"+(i||""))}),this)},this.drawFullLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-i),this.elt(n,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(o||""))},this.drawScreenLineMarker=function(e,t,n,r,o){var i=this.$getTop(t.start.row,r),a=r.lineHeight;this.elt(n,"height:"+a+"px;top:"+i+"px;left:0;right:0;"+(o||""))}}).call(i.prototype),t.Marker=i})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,c=function(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)};(function(){r.implement(this,s),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nu&&(s=c.end.row+1,u=(c=this.session.getNextFoldLine(s,c))?c.start.row:1/0),!(s>o);){var d=i[a++];if(d){this.dom.removeChildren(d),this.$renderLine(d,s,s==u&&c),l&&(d.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var f=e.lineHeight*this.session.getRowLength(s)+"px";d.style.height!=f&&(l=!0,d.style.height=f)}s++}if(l)for(;a0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var r=[],i=t,a=this.session.getNextFoldLine(i),s=a?a.start.row:1/0;i>s&&(i=a.end.row+1,s=(a=this.session.getNextFoldLine(i,a))?a.start.row:1/0),!(i>n);){var c=this.$lines.createCell(i,e,this.session),l=c.element;this.dom.removeChildren(l),o.setStyle(l.style,"height",this.$lines.computeLineHeight(i,e,this.session)+"px"),o.setStyle(l.style,"top",this.$lines.computeLineTop(i,e,this.session)+"px"),this.$renderLine(l,i,i==s&&a),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",r.push(c),i++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){for(var o,a=this,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,c=this.dom.createFragment(this.element),l=0;o=s.exec(r);){var u=o[1],d=o[2],f=o[3],h=o[4],p=o[5];if(a.showSpaces||!d){var m=l!=o.index?r.slice(l,o.index):"";if(l=o.index+o[0].length,m&&c.appendChild(this.dom.createTextNode(m,this.element)),u){var g=a.session.getScreenTabSize(t+o.index);c.appendChild(a.$tabStrings[g].cloneNode(!0)),t+=g-1}else if(d){if(a.showSpaces)(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",b.textContent=i.stringRepeat(a.SPACE_CHAR,d.length),c.appendChild(b);else c.appendChild(this.com.createTextNode(d,this.element))}else if(f){(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",b.textContent=i.stringRepeat(a.SPACE_CHAR,f.length),c.appendChild(b)}else if(h){t+=1,(b=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",b.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=a.showSpaces?a.SPACE_CHAR:h,c.appendChild(b)}else if(p){t+=1,(b=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",b.className="ace_cjk",b.textContent=p,c.appendChild(b)}}}if(c.appendChild(this.dom.createTextNode(l?r.slice(l):r,this.element)),this.$textToken[n.type])e.appendChild(c);else{var v="ace_"+n.type.replace(/\./g," ace_"),b=this.dom.createElement("span");"fold"==n.type&&(b.style.width=n.value.length*this.config.characterWidth+"px"),b.className=v,b.appendChild(c),e.appendChild(b)}return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var o=(r-=r%this.tabSize)/this.tabSize,i=0;i=a;)s=this.$renderToken(c,s,u,d.substring(0,a-r)),d=d.substring(a-r),r=a,c=this.$createLineElement(),e.appendChild(c),c.appendChild(this.dom.createTextNode(i.stringRepeat("\xa0",n.indent),this.element)),s=0,a=n[++o]||Number.MAX_VALUE;0!=d.length&&(r+=d.length,s=this.$renderToken(c,s,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(c,s,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],o=r.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(n=this.$renderToken(e,n,r,o));for(var i=1;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,o);n=this.$renderToken(e,n,r,o)}},this.$renderOverflowMessage=function(e,t,n,r,o){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var i=this.dom.createElement("span");i.className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=o?"":"",e.appendChild(i)},this.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var o=e;if(r.length){var i=this.session.getRowSplitData(t);if(i&&i.length){this.$renderWrappedLine(e,r,i);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,r)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(a)}},this.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var o=n.getTokens(e);return t.walk((function(e,t,i,a,s){null!=e?r.push({type:"fold",value:e}):(s&&(o=n.getTokens(t)),o.length&&function(e,t,n){for(var o=0,i=0;i+e[o].value.lengthn-t&&(a=a.substring(0,n-t)),r.push({type:e[o].type,value:a}),i=t+a.length,o+=1);in?r.push({type:e[o].type,value:a.substring(0,n-i)}):r.push(e[o]),i+=a.length,o+=1}}(o,a,i))}),t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(c.prototype),t.Text=c})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[o++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(r.setStyle(c,"display","block"),r.translate(s,a.left,a.top),r.setStyle(c,"width",Math.round(e.characterWidth)+"px"),r.setStyle(c,"height",e.lineHeight+"px")):r.setStyle(c,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=32768,c=function(e){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addListener(this.element,"scroll",this.onScroll.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)};(function(){r.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(c.prototype);var l=function(e,t){c.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=o.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};r.inherits(l,c),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>s?(this.coeff=s/e,e=s):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var u=function(e,t){c.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(u,c),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var r=e("./lib/event"),o=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(o.prototype),t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var r=e("../lib/oop"),o=e("../lib/dom"),i=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),c=e("../lib/event_emitter").EventEmitter,l=256,u="function"==typeof ResizeObserver,d=200,f=t.FontMetrics=function(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=i.stringRepeat("X",l),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){r.implement(this,c),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.textContent=i.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(d,0),e(0,d),e(d,d)],this.el)},this.transformCoordinates=function(e,t){e&&(e=i(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function i(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),c=a(this.els[1]),l=a(this.els[2]),u=a(this.els[3]),f=n(r(u,c),r(u,l),r(o(c,l),o(u,s))),h=i(1+f[0],r(c,s)),p=i(1+f[1],r(l,s));if(t){var m=t,g=f[0]*m[0]/d+f[1]*m[1]/d+1,v=o(i(m[0],h),i(m[1],p));return o(i(1/g/d,v),s)}var b=r(e,s),y=n(r(h,i(f[0],b)),r(p,i(f[1],b)),b);return i(d,y)}}).call(f.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(e,t,n){"use strict";var r=e("./lib/oop"),o=e("./lib/dom"),i=e("./config"),a=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,c=e("./layer/text").Text,l=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,f=e("./renderloop").RenderLoop,h=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',g=e("./lib/useragent"),v=g.isIE;o.importCssString(m,"ace_editor.css",!1);var b=function(e,t){var n=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==i.get("useStrictCSP")&&i.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new s(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),i.resetOptions(this),i._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;r||(r=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var i=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(i|this.$changes,!0):this.$loop.schedule(i|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(r&&(e||a.height!=r)&&(a.height=r,i|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){i|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var c=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",c),o.setStyle(this.scroller.style,"right",c),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(i|=this.CHANGE_FULL)}return a.$dirty=!n||!r,i&&this._signal("resize",s),i},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,i=n.top,a=n.left;i-=r.offset;var s=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(i<0||i>r.height-s)o.translate(this.textarea,0,0);else{var c=1,l=this.$size.height-s;if(t)if(t.useTextareaForIME){var u=this.textarea.value;c=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else i+=this.lineHeight+2;else i+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-c&&(a=this.$size.scrollerWidth-c),a+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",s+"px"),o.setStyle(e,"width",c+"px"),o.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-c),Math.min(i,l))}}}else o.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},this.setMargin=function(e,t,n,r){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|r,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var i=n.width+2*this.$padding+"px",a=n.minHeight+"px";o.setStyle(this.content.style,"width",i),o.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),i=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==i;a&&(this.$horizScroll=i,this.scrollBarH.setVisible(i));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=t.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=l;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+l<0||this.scrollTop>u.top),f=s!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var h,p,m=this.scrollTop%this.lineHeight,g=Math.ceil(c/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=v+g,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var _=e.getFoldLine(v);_&&(v=_.start.row),h=e.documentToScreenRow(v,0),p=e.getRowLength(v)*y,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(b)*y+p,m=this.scrollTop-h*y;var w=0;return(this.layerConfig.width!=o||a)&&(w=this.CHANGE_H_SCROLL),(a||f)&&(w|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:h,lastRow:b,lineHeight:y,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:m,gutterOffset:y?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),w},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),o=r.left,i=r.top,a=n&&n.top||0,s=n&&n.bottom||0,c=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;c+a>i?(t&&c+a>i+this.lineHeight&&(i-=t*this.$size.scrollerHeight),0===i&&(i=-this.scrollMargin.top),this.session.setScrollTop(i)):c+this.$size.scrollerHeight-so?(o=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(i):Math.round(i);return{row:a,column:s,side:i-s>0?1:-1,offsetX:o}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,i=o/this.characterWidth,a=this.$blockCursor?Math.floor(i):Math.round(i),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),o)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),i=r.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+i-this.scrollTop}},this.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(e,t,n,r){var o=this.session;o.bgTokenizer.lines[n]=null;var i={type:t,value:e},a=o.getTokens(n);if(null==r)a.push(i);else for(var s=0,c=0;c50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);t.UIWorkerClient=function(e,t,n){var r=null,o=!1,s=Object.create(i),l=[],u=new c({messageBuffer:l,terminate:function(){},postMessage:function(e){l.push(e),r&&(o?setTimeout(d):d())}});u.setEmitSync=function(e){o=e};var d=function(){var e=l.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){u.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(r=new e[n](s);l.length;)d()})),u},t.WorkerClient=c,t.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var r=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),a=function(e,t,n,r,o,i){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=i,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){i.implement(this,o),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new r(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)})),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,i=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(c=this.others[a]).row,column:c.column+i};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var c;s={row:(c=this.others[a]).row,column:c.column+i};this.doc.remove(new r(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var r=e("./range_list").RangeList,o=e("./range").Range,i=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),c=e("./lib/lang"),l=e("./commands/multi_select_commands");t.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=new(0,e("./search").Search);var d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,i).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],i=e.column0;)b--;if(b>0)for(var y=0;r[y].isEmpty();)y++;for(var _=b;_>=y;_--)r[_].isEmpty()&&r.splice(_,1)}return r}}.call(i.prototype);var f=e("./editor").Editor;function h(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(l.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}s.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),e),s.addListener(t,"keyup",r,e),s.addListener(t,"blur",r,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var o=t.indexOf(r);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,o=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,c=this.selection,l=c.rangeList,u=(o?c:l).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=c._eventRegistry;c._eventRegistry={};var f=new i(s);this.inVirtualSelectionMode=!0;for(var h=u.length;h--;){if(a)for(;h>0&&u[h].start.row==u[h-1].end.row;)h--;f.fromOrientedRange(u[h]),f.index=h,this.selection=s.selection=f;var p=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===p||(r=p),f.toOrientedRange(u[h])}f.detach(),this.selection=s.selection=c,this.inVirtualSelectionMode=!1,c._eventRegistry=d,c.mergeOverlappingRanges(),c.ranges[0]&&c.fromOrientedRange(c.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;ra&&(a=n.column),ru?e.insert(r,c.stringRepeat(" ",i-u)):e.remove(new o(r.row,r.column,r.row,r.column-i+u)),t.start.column=t.end.column=a,t.start.row=t.end.row=r.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,f=u.end.row,h=d==f;if(h){var p,m=this.session.getLength();do{p=this.session.getLine(f)}while(/[=:]/.test(p)&&++f0);d<0&&(d=0),f>=m&&(f=m-1)}var g=this.session.removeFullLines(d,f);g=this.$reAlignText(g,h),this.session.insert({row:d,column:0},g.join("\n")+"\n"),h||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,r,o,i=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,o=t[3].length,t):(n+r+o!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(i=!1),n>t[1].length&&(n=t[1].length),rt[3].length&&(o=t[3].length),t):[e]})).map(t?l:i?a?function(e){return e[2]?s(n+r-e[2].length)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:l:function(e){return e[2]?s(n)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return c.stringRepeat(" ",e)}function l(e){return e[2]?s(n)+e[2]+s(r-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(f.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=h,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(e){h(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,i=e.getLine(t),a=i.search(o);if(-1!=a){for(var s=n||i.length,c=e.getLength(),l=t,u=t;++tl){var h=e.getLine(u).length;return new r(l,s,u,h)}}},this.openingBracketBlock=function(e,t,n,o,i){var a={row:n,column:o+1},s=e.$findClosingBracket(t,a,i);if(s){var c=e.foldWidgets[s.row];return null==c&&(c=e.getFoldWidget(s.row)),"start"==c&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,o,i){var a={row:n,column:o},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(o.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var r=e("./lib/dom");function o(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,o=r.start.row,i=r.end.row,a="add"==e.action,s=o+1;st[n].column&&n++,i.unshift(n,0),t.splice.apply(t,i),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},this.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var o=1/0,i=0;i0&&!r[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=o;a<=i;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var c=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(c+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=c-n.offset+"px";var l=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(l-=t.scrollLeft),s.el.style.left=l+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}).call(o.prototype),t.LineWidgets=o})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var r=e("../line_widgets").LineWidgets,o=e("../lib/dom"),i=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,c=n.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];c?c.destroy():s-=t;var l,u=function(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(r.length){var o=function(e,t,n){for(var r=0,o=e.length-1;r<=o;){var i=r+o>>1,a=n(t,e[i]);if(a>0)r=i+1;else{if(!(a<0))return i;o=i-1}}return-(r+1)}(r,{row:t,column:-1},i.comparePoints);o<0&&(o=-o-1),o>=r.length?o=n>0?0:r.length-1:0===o&&n<0&&(o=r.length-1);var a=r[o];if(a&&n){if(a.row===t){do{a=r[o+=n]}while(a&&a.row===t);if(!a)return r.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=r[o+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,l=e.renderer.$gutterLayer.$annotations[a.row]}else{if(c)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var f={row:a.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},h=f.el.appendChild(o.createElement("div")),p=f.el.appendChild(o.createElement("div"));p.className="error_widget_arrow "+l.className;var m=e.renderer.$cursorLayer.getPixelPosition(a).left;p.style.left=m+e.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",h.className="error_widget "+l.className,h.innerHTML=l.text.join("
"),h.appendChild(o.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(f),e.off("changeSelection",f.destroy),e.off("changeSession",f.destroy),e.off("mouseup",f.destroy),e.off("change",f.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",f.destroy),e.on("changeSession",f.destroy),e.on("mouseup",f.destroy),e.on("change",f.destroy),e.session.widgetManager.addLineWidget(f),f.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},o.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),i=e("./lib/event"),a=e("./range").Range,s=e("./editor").Editor,c=e("./edit_session").EditSession,l=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.define=n(307),t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var c=e;a=c.value,e=o.createElement("pre"),c.parentNode.replaceChild(e,c)}else e&&(a=e.textContent,e.innerHTML="");var l=t.createEditSession(a),d=new s(new u(e),l,n),f={document:l,editor:d,onResize:d.resize.bind(d,null)};return c&&(f.textarea=c),i.addListener(window,"resize",f.onResize),d.on("destroy",(function(){i.removeListener(window,"resize",f.onResize),f.editor.container.env=null})),d.container.env=d.env=f,d},t.createEditSession=function(e,t){var n=new c(e,t);return n.setUndoManager(new l),n},t.Range=a,t.Editor=s,t.EditSession=c,t.UndoManager=l,t.VirtualRenderer=u,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))}).call(this,n(212)(e))},function(e,t,n){"use strict";var r=n(1),o=n(433),i=n(56);t.a=function(e){var t=Object(o.a)(e);return function(e,n){return t(e,Object(r.a)({defaultTheme:i.a},n))}}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(52),o=n(76);function i(e,t){if(t&&("object"===Object(r.a)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(o.a)(e)}},function(e,t,n){"use strict";var r=n(0),o=n.n(r).a.createContext(null);t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n(52);function i(e){return e&&"object"===Object(o.a)(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},o=n.clone?Object(r.a)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e?o[r]=a(e[r],t[r],n):o[r]=t[r])})),o}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(429);function o(e){return Object(r.a)(e)}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r="";function o(e){try{return e&&"function"===typeof e&&e.name||r}catch(t){return r}}},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=n(20);t.a=Object(o.a)(r.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(8),c=i.forwardRef((function(e,t){var n=e.classes,c=e.className,l=e.disabled,u=e.IconComponent,d=e.inputRef,f=e.variant,h=void 0===f?"standard":f,p=Object(o.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return i.createElement(i.Fragment,null,i.createElement("select",Object(r.a)({className:Object(a.a)(n.root,n.select,n[h],c,l&&n.disabled),disabled:l,ref:d||t},p)),e.multiple?null:i.createElement(u,{className:Object(a.a)(n.icon,n["icon".concat(Object(s.a)(h))],l&&n.disabled)}))}));t.a=c},function(e,t,n){"use strict";var r=n(0),o=r.createContext();t.a=o},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(16),s=n(135),c=n(431),l=n(21),u=n(434),d=n(42),f=n(14),h=n(19),p=n(163),m=n(128),g=n(457),v={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},b=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,c=Object(r.a)(e,["invisible","open"]);return s?i.createElement("div",Object(o.a)({"aria-hidden":!0,ref:t},c,{style:Object(o.a)({},v.root,a?v.invisible:{},c.style)})):null}));var y=new m.b,_=i.forwardRef((function(e,t){var n=Object(s.a)(),v=Object(c.a)({name:"MuiModal",props:Object(o.a)({},e),theme:n}),_=v.BackdropComponent,w=void 0===_?b:_,S=v.BackdropProps,k=v.children,x=v.closeAfterTransition,O=void 0!==x&&x,C=v.container,E=v.disableAutoFocus,j=void 0!==E&&E,R=v.disableBackdropClick,T=void 0!==R&&R,A=v.disableEnforceFocus,M=void 0!==A&&A,L=v.disableEscapeKeyDown,$=void 0!==L&&L,N=v.disablePortal,D=void 0!==N&&N,P=v.disableRestoreFocus,I=void 0!==P&&P,F=v.disableScrollLock,z=void 0!==F&&F,W=v.hideBackdrop,B=void 0!==W&&W,H=v.keepMounted,U=void 0!==H&&H,V=v.manager,G=void 0===V?y:V,K=v.onBackdropClick,q=v.onClose,Y=v.onEscapeKeyDown,J=v.onRendered,X=v.open,Q=Object(r.a)(v,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Z=i.useState(!0),ee=Z[0],te=Z[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=Object(f.a)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(v),se=function(){return Object(l.a)(re.current)},ce=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},le=function(){G.mount(ce(),{disableScrollLock:z}),oe.current.scrollTop=0},ue=Object(h.a)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(C)||se().body;G.add(ce(),e),oe.current&&le()})),de=i.useCallback((function(){return G.isTopModal(ce())}),[G]),fe=Object(h.a)((function(e){re.current=e,e&&(J&&J(),X&&de()?le():Object(m.a)(oe.current,!0))})),he=i.useCallback((function(){G.remove(ce())}),[G]);if(i.useEffect((function(){return function(){he()}}),[he]),i.useEffect((function(){X?ue():ae&&O||he()}),[X,he,ae,O,ue]),!U&&!X&&(!ae||ee))return null;var pe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:p.a}),me={};return void 0===k.props.tabIndex&&(me.tabIndex=k.props.tabIndex||"-1"),ae&&(me.onEnter=Object(d.a)((function(){te(!1)}),k.props.onEnter),me.onExited=Object(d.a)((function(){te(!0),O&&he()}),k.props.onExited)),i.createElement(u.a,{ref:fe,container:C,disablePortal:D},i.createElement("div",Object(o.a)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&de()&&(Y&&Y(e),$||(e.stopPropagation(),q&&q(e,"escapeKeyDown")))},role:"presentation"},Q,{style:Object(o.a)({},pe.root,!X&&ee?pe.hidden:{},Q.style)}),B?null:i.createElement(w,Object(o.a)({open:X,onClick:function(e){e.target===e.currentTarget&&(K&&K(e),!T&&q&&q(e,"backdropClick"))}},S)),i.createElement(g.a,{disableEnforceFocus:M,disableAutoFocus:j,disableRestoreFocus:I,getDoc:se,isEnabled:de,open:X},i.cloneElement(k,me))))}));t.a=_},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(2),s=n(5),c=i.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.component,l=void 0===c?"div":c,u=e.square,d=void 0!==u&&u,f=e.elevation,h=void 0===f?1:f,p=e.variant,m=void 0===p?"elevation":p,g=Object(r.a)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(l,Object(o.a)({className:Object(a.a)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(h)],!d&&n.rounded),ref:t},g))}));t.a=Object(s.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(o.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=n(8),l={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=i.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,f=e.color,h=void 0===f?"initial":f,p=e.component,m=e.display,g=void 0===m?"initial":m,v=e.gutterBottom,b=void 0!==v&&v,y=e.noWrap,_=void 0!==y&&y,w=e.paragraph,S=void 0!==w&&w,k=e.variant,x=void 0===k?"body1":k,O=e.variantMapping,C=void 0===O?l:O,E=Object(o.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),j=p||(S?"p":C[x]||l[x])||"span";return i.createElement(j,Object(r.a)({className:Object(a.a)(u.root,d,"inherit"!==x&&u[x],"initial"!==h&&u["color".concat(Object(c.a)(h))],_&&u.noWrap,b&&u.gutterBottom,S&&u.paragraph,"inherit"!==s&&u["align".concat(Object(c.a)(s))],"initial"!==g&&u["display".concat(Object(c.a)(g))]),ref:t},E))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},function(e,t,n){"use strict";var r=n(66),o=n(77),i=n(0),a=n.n(i),s=n(16),c=n.n(s),l=!1,u=n(102),d="unmounted",f="exited",h="entering",p="entered",m="exiting",g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=f,r.appearStatus=h):o=p:o=t.unmountOnExit||t.mountOnEnter?d:f,r.state={status:o},r.nextCallback=null,r}Object(o.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===d?{status:f}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==p&&(t=h):n!==h&&n!==p||(t=m)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===h?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===f&&this.setState({status:d})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[c.a.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||l?this.safeSetState({status:p},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:h},(function(){t.props.onEntering(i,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:p},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:c.a.findDOMNode(this);t&&!l?(this.props.onExit(r),this.safeSetState({status:m},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:f},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:f},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:c.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===d)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(u.a.Provider,{value:null},"function"===typeof n?n(e,o):a.a.cloneElement(a.a.Children.only(n),o))},t}(a.a.Component);function v(){}g.contextType=u.a,g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:v,onEntering:v,onEntered:v,onExit:v,onExiting:v,onExited:v},g.UNMOUNTED=d,g.EXITED=f,g.ENTERING=h,g.ENTERED=p,g.EXITING=m;t.a=g},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),l=1;l1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";var r=n(9),o=n(29),i=Object(r.a)({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),a=Object(r.a)({prop:"display"}),s=Object(r.a)({prop:"overflow"}),c=Object(r.a)({prop:"textOverflow"}),l=Object(r.a)({prop:"visibility"}),u=Object(r.a)({prop:"whiteSpace"});t.a=Object(o.a)(i,a,s,c,l,u)},function(e,t,n){"use strict";var r=n(9),o=Object(r.a)({prop:"boxShadow",themeKey:"shadows"});t.a=o},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=n(10),l=n(104),u=n(8),d=i.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,c=e.children,d=e.classes,f=e.className,h=e.color,p=void 0===h?"default":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.size,_=void 0===y?"medium":y,w=Object(o.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(l.a,Object(r.a)({className:Object(a.a)(d.root,f,"default"!==p&&d["color".concat(Object(u.a)(p))],g&&d.disabled,"small"===_&&d["size".concat(Object(u.a)(_))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!b,disabled:g,ref:t},w),i.createElement("span",{className:d.label},c))}));t.a=Object(s.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(c.a)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=n(48),i=(r=n(291))&&r.__esModule?r:{default:r};var a=11/23/100;function s(e){var t={r:0,g:0,b:0};if(7===e.length)t.r=parseInt(e.substr(1,2),16),t.g=parseInt(e.substr(3,2),16),t.b=parseInt(e.substr(5,2),16);else if(4===e.length){var n=e.substr(1,1),r=e.substr(2,1),o=e.substr(3,1);t.r=parseInt(n+n,16),t.g=parseInt(r+r,16),t.b=parseInt(o+o,16)}return t}function c(e,t,n){var r,o=s(e),i=s(t);return o.r+=i.r*(.05+a*(n-1)),o.g+=i.g*(.05+a*(n-1)),o.b+=i.b*(.05+a*(n-1)),r=o,"#"+Math.round(r.r).toString(16)+Math.round(r.g).toString(16)+Math.round(r.b).toString(16)}function l(e,t){for(var n={},r=1;r<=24;r++)n["elevation"+r]={backgroundColor:c(e,t,r)};return n}var u=function(e){var t;return(t="dark"===e?{name:e,palette:{type:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[200],"&:hover":{color:i.default[100]}}},MuiPaper:l("#121212","#fff")}}:"blue"===e?{name:e,palette:{type:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[200],"&:hover":{color:i.default[100]}}},MuiPaper:l("#151d21","#fff")}}:"colored"===e?{name:e,palette:{type:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:"PT"===e?{name:e,palette:{type:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:"DX"===e?{name:e,palette:{type:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}},overrides:{MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}:{name:e,palette:{type:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#14bb00"},overrides:{MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:i.default[400],"&:hover":{color:i.default[300]}}}}}).toolbar={height:48},t.saveToolbar={background:t.palette.primary.main,button:{borderRadius:3,height:32}},(0,o.createTheme)(t)};t.default=u},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),i=s(n(4)),a=s(n(208));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n ".length,c=void 0;n&&o++<5&&!("html"===(c=a(n,t))||o>1&&i+r.length*s+c.length>=80);)r.push(c),i+=c.length,n=n.parentNode;return r.reverse().join(" > ")}catch(l){return""}}function a(e,t){var n,r,i,a,s,c=e,l=[];if(!c||!c.tagName)return"";l.push(c.tagName.toLowerCase());var u=t&&t.length?t.filter((function(e){return c.getAttribute(e)})).map((function(e){return[e,c.getAttribute(e)]})):null;if(u&&u.length)u.forEach((function(e){l.push("["+e[0]+'="'+e[1]+'"]')}));else if(c.id&&l.push("#"+c.id),(n=c.className)&&Object(o.k)(n))for(r=n.split(/\s+/),s=0;s1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,s=t.Component,c=t.defaultTheme,l=void 0===c?g:c,f=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),p=m(e),S=n||i||"makeStyles";p.options={index:h(),name:n,meta:S,classNamePrefix:S};var k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(u.a)()||l,r=Object(o.a)({},a.a.useContext(d.a),f),i=a.a.useRef(),c=a.a.useRef();w((function(){var o={name:n,state:{},stylesCreator:p,stylesOptions:r,theme:t};return b(o,e),c.current=!1,i.current=o,function(){_(o)}}),[t,p]),a.a.useEffect((function(){c.current&&y(i.current,e),c.current=!0}));var h=v(i.current,e.classes,s);return h};return k}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};t.default=r},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(2),s=n(5),c=n(10),l=n(104),u=n(8),d=i.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,d=e.color,f=void 0===d?"default":d,h=e.component,p=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,v=e.disableElevation,b=void 0!==v&&v,y=e.disableFocusRipple,_=void 0!==y&&y,w=e.endIcon,S=e.focusVisibleClassName,k=e.fullWidth,x=void 0!==k&&k,O=e.size,C=void 0===O?"medium":O,E=e.startIcon,j=e.type,R=void 0===j?"button":j,T=e.variant,A=void 0===T?"text":T,M=Object(r.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),L=E&&i.createElement("span",{className:Object(a.a)(s.startIcon,s["iconSize".concat(Object(u.a)(C))])},E),$=w&&i.createElement("span",{className:Object(a.a)(s.endIcon,s["iconSize".concat(Object(u.a)(C))])},w);return i.createElement(l.a,Object(o.a)({className:Object(a.a)(s.root,s[A],c,"inherit"===f?s.colorInherit:"default"!==f&&s["".concat(A).concat(Object(u.a)(f))],"medium"!==C&&[s["".concat(A,"Size").concat(Object(u.a)(C))],s["size".concat(Object(u.a)(C))]],b&&s.disableElevation,g&&s.disabled,x&&s.fullWidth),component:p,disabled:g,focusRipple:!_,focusVisibleClassName:Object(a.a)(s.focusVisible,S),ref:t,type:R},M),i.createElement("span",{className:s.label},L,n,$))}));t.a=Object(s.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(c.a)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(c.a)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(c.a)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(c.a)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(c.a)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(12),a=n(0),s=n(2),c=n(5),l=n(8),u=n(171),d=n(435),f=n(338),h=n(22),p=n(172),m={enter:h.b.enteringScreen,exit:h.b.leavingScreen},g=a.forwardRef((function(e,t){var n=e.BackdropProps,i=e.children,c=e.classes,h=e.className,g=e.disableBackdropClick,v=void 0!==g&&g,b=e.disableEscapeKeyDown,y=void 0!==b&&b,_=e.fullScreen,w=void 0!==_&&_,S=e.fullWidth,k=void 0!==S&&S,x=e.maxWidth,O=void 0===x?"sm":x,C=e.onBackdropClick,E=e.onClose,j=e.onEnter,R=e.onEntered,T=e.onEntering,A=e.onEscapeKeyDown,M=e.onExit,L=e.onExited,$=e.onExiting,N=e.open,D=e.PaperComponent,P=void 0===D?p.a:D,I=e.PaperProps,F=void 0===I?{}:I,z=e.scroll,W=void 0===z?"paper":z,B=e.TransitionComponent,H=void 0===B?f.a:B,U=e.transitionDuration,V=void 0===U?m:U,G=e.TransitionProps,K=e["aria-describedby"],q=e["aria-labelledby"],Y=Object(o.a)(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),J=a.useRef();return a.createElement(u.a,Object(r.a)({className:Object(s.a)(c.root,h),BackdropComponent:d.a,BackdropProps:Object(r.a)({transitionDuration:V},n),closeAfterTransition:!0},v?{disableBackdropClick:v}:{},{disableEscapeKeyDown:y,onEscapeKeyDown:A,onClose:E,open:N,ref:t},Y),a.createElement(H,Object(r.a)({appear:!0,in:N,timeout:V,onEnter:j,onEntering:T,onEntered:R,onExit:M,onExiting:$,onExited:L,role:"none presentation"},G),a.createElement("div",{className:Object(s.a)(c.container,c["scroll".concat(Object(l.a)(W))]),onMouseUp:function(e){e.target===e.currentTarget&&e.target===J.current&&(J.current=null,C&&C(e),!v&&E&&E(e,"backdropClick"))},onMouseDown:function(e){J.current=e.target}},a.createElement(P,Object(r.a)({elevation:24,role:"dialog","aria-describedby":K,"aria-labelledby":q},F,{className:Object(s.a)(c.paper,c["paperScroll".concat(Object(l.a)(W))],c["paperWidth".concat(Object(l.a)(String(O)))],F.className,w&&c.paperFullScreen,k&&c.paperFullWidth)}),i))))}));t.a=Object(c.a)((function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":Object(i.a)({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}}),{name:"MuiDialog"})(g)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=i.forwardRef((function(e,t){var n=e.disableSpacing,s=void 0!==n&&n,c=e.classes,l=e.className,u=Object(o.a)(e,["disableSpacing","classes","className"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(c.root,l,!s&&c.spacing),ref:t},u))}));t.a=Object(s.a)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=i.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.dividers,l=void 0!==c&&c,u=Object(o.a)(e,["classes","className","dividers"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(n.root,s,l&&n.dividers),ref:t},u))}));t.a=Object(s.a)((function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}}),{name:"MuiDialogContent"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(0),i=n(5),a=n(173),s=o.forwardRef((function(e,t){return o.createElement(a.a,Object(r.a)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));t.a=Object(i.a)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(s)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(5),c=n(173),l=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.disableTypography,d=void 0!==u&&u,f=Object(o.a)(e,["children","classes","className","disableTypography"]);return i.createElement("div",Object(r.a)({className:Object(a.a)(s.root,l),ref:t},f),d?n:i.createElement(c.a,{component:"h2",variant:"h6"},n))}));t.a=Object(s.a)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(l)},function(e,t,n){"use strict";var r=n(3),o=n(12),i=n(1),a=n(0),s=n(2),c=n(5),l=n(22),u=n(337),d=n(19),f=n(8),h=n(42),p=n(224),m=n(436),g=a.forwardRef((function(e,t){var n=e.action,o=e.anchorOrigin,c=(o=void 0===o?{vertical:"bottom",horizontal:"center"}:o).vertical,g=o.horizontal,v=e.autoHideDuration,b=void 0===v?null:v,y=e.children,_=e.classes,w=e.className,S=e.ClickAwayListenerProps,k=e.ContentProps,x=e.disableWindowBlurListener,O=void 0!==x&&x,C=e.message,E=e.onClose,j=e.onEnter,R=e.onEntered,T=e.onEntering,A=e.onExit,M=e.onExited,L=e.onExiting,$=e.onMouseEnter,N=e.onMouseLeave,D=e.open,P=e.resumeHideDuration,I=e.TransitionComponent,F=void 0===I?p.a:I,z=e.transitionDuration,W=void 0===z?{enter:l.b.enteringScreen,exit:l.b.leavingScreen}:z,B=e.TransitionProps,H=Object(r.a)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),U=a.useRef(),V=a.useState(!0),G=V[0],K=V[1],q=Object(d.a)((function(){E&&E.apply(void 0,arguments)})),Y=Object(d.a)((function(e){E&&null!=e&&(clearTimeout(U.current),U.current=setTimeout((function(){q(null,"timeout")}),e))}));a.useEffect((function(){return D&&Y(b),function(){clearTimeout(U.current)}}),[D,b,Y]);var J=function(){clearTimeout(U.current)},X=a.useCallback((function(){null!=b&&Y(null!=P?P:.5*b)}),[b,P,Y]);return a.useEffect((function(){if(!O&&D)return window.addEventListener("focus",X),window.addEventListener("blur",J),function(){window.removeEventListener("focus",X),window.removeEventListener("blur",J)}}),[O,X,D]),!D&&G?null:a.createElement(u.a,Object(i.a)({onClickAway:function(e){E&&E(e,"clickaway")}},S),a.createElement("div",Object(i.a)({className:Object(s.a)(_.root,_["anchorOrigin".concat(Object(f.a)(c)).concat(Object(f.a)(g))],w),onMouseEnter:function(e){$&&$(e),J()},onMouseLeave:function(e){N&&N(e),X()},ref:t},H),a.createElement(F,Object(i.a)({appear:!0,in:D,onEnter:Object(h.a)((function(){K(!1)}),j),onEntered:R,onEntering:T,onExit:A,onExited:Object(h.a)((function(){K(!0)}),M),onExiting:L,timeout:W,direction:"top"===c?"down":"up"},B),y||a.createElement(m.a,Object(i.a)({message:C,action:n},k)))))}));t.a=Object(c.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},a={justifyContent:"flex-start"},s={top:24},c={bottom:24},l={right:24},u={left:24},d={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Object(i.a)({},t,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({},s,d))),anchorOriginBottomCenter:Object(i.a)({},n,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({},c,d))),anchorOriginTopRight:Object(i.a)({},t,r,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({left:"auto"},s,l))),anchorOriginBottomRight:Object(i.a)({},n,r,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({left:"auto"},c,l))),anchorOriginTopLeft:Object(i.a)({},t,a,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({right:"auto"},s,u))),anchorOriginBottomLeft:Object(i.a)({},n,a,Object(o.a)({},e.breakpoints.up("sm"),Object(i.a)({right:"auto"},c,u)))}}),{flip:!1,name:"MuiSnackbar"})(g)},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.default=a},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(2),s=n(5),c=n(104),l=n(8),u=i.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,d=e.color,f=void 0===d?"default":d,h=e.component,p=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.focusVisibleClassName,_=e.size,w=void 0===_?"large":_,S=e.variant,k=void 0===S?"circular":S,x=Object(r.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return i.createElement(c.a,Object(o.a)({className:Object(a.a)(s.root,u,"large"!==w&&s["size".concat(Object(l.a)(w))],g&&s.disabled,"extended"===k&&s.extended,{primary:s.primary,secondary:s.secondary,inherit:s.colorInherit}[f]),component:p,disabled:g,focusRipple:!b,focusVisibleClassName:Object(a.a)(s.focusVisible,y),ref:t},x),i.createElement("span",{className:s.label},n))}));t.a=Object(s.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(u)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(12),a=n(0),s=n(2),c=n(5),l=a.forwardRef((function(e,t){var n=e.classes,i=e.className,c=e.component,l=void 0===c?"div":c,u=e.disableGutters,d=void 0!==u&&u,f=e.variant,h=void 0===f?"regular":f,p=Object(o.a)(e,["classes","className","component","disableGutters","variant"]);return a.createElement(l,Object(r.a)({className:Object(s.a)(n.root,n[h],i,!d&&n.gutters),ref:t},p))}));t.a=Object(c.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(i.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(l)},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getSelectIdIcon=function(e,t){t=t||".";var n="",r=null===e||void 0===e?void 0:e.common;if(r){var o=r.icon;if(o)if(o.startsWith("data:image/"))n=o;else{if(!o.includes("."))return null;var i;"instance"===e.type||"adapter"===e.type?n=t+"/adapter/"+r.name+"/"+o:e._id&&e._id.startsWith("system.adapter.")?(i=e._id.split(".",3),"/"===o[0]?i[2]+=o:i[2]+="/"+o,n=t+"/adapter/"+i[2]):(i=e._id.split(".",2),"/"===o[0]?i[0]+=o:i[0]+="/"+o,n=t+"/adapter/"+i[0])}}return n||null},t.getSystemIcon=function(e){var t,n=null===e||void 0===e?void 0:e._id;if(!n)return null;n.startsWith("_design/")||"system"===n?t=o.default.createElement(s.default,{className:"iconOwn"}):"0_userdata"===n||"0_userdata.0"===n?t=o.default.createElement(c.default,{className:"iconOwn"}):"alias"===n||"alias.0"===n?t=o.default.createElement(m.default,{className:"iconOwn"}):"system.adapter"===n?t=o.default.createElement(s.default,{className:"iconOwn"}):"system.group"===n?t=o.default.createElement(l.default,{className:"iconOwn"}):"system.user"===n?t=o.default.createElement(u.default,{className:"iconOwn"}):"system.host"===n?t=o.default.createElement(d.default,{className:"iconOwn"}):n.endsWith(".connection")||n.endsWith(".connected")?t=o.default.createElement(f.default,{className:"iconOwn"}):n.endsWith(".info")?t=o.default.createElement(h.default,{className:"iconOwn"}):"meta"===(null===e||void 0===e?void 0:e.type)&&(t=o.default.createElement(p.default,{className:"iconOwn"}));return t||null};var o=v(n(0)),i=v(n(4)),a=v(n(427)),s=v(n(395)),c=v(n(396)),l=v(n(397)),u=v(n(398)),d=v(n(399)),f=v(n(400)),h=v(n(401)),p=v(n(402)),m=v(n(403)),g=v(n(61));function v(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;){var a=o(t),s=a.cell,c=a.lineIsOver;i.push(s),c&&(n.push(i),i=[])}return n}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){(function(e,n){var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",c="[object Date]",l="[object Error]",u="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",S=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[i]=x[a]=x[_]=x[s]=x[w]=x[c]=x[l]=x[u]=x[d]=x[f]=x[h]=x[m]=x[g]=x[v]=x[y]=!1;var O="object"==typeof e&&e&&e.Object===Object&&e,C="object"==typeof self&&self&&self.Object===Object&&self,E=O||C||Function("return this")(),j=t&&!t.nodeType&&t,R=j&&"object"==typeof n&&n&&!n.nodeType&&n,T=R&&R.exports===j,A=T&&O.process,M=function(){try{return A&&A.binding&&A.binding("util")}catch(e){}}(),L=M&&M.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++ns))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var u=-1,d=!0,f=2&n?new ye:void 0;for(i.set(e,t),i.set(t,e);++u-1},ve.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||ve),string:new ge}},be.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return Te(this,e).get(e)},be.prototype.has=function(e){return Te(this,e).has(e)},be.prototype.set=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,r),this},ye.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new ve,this.size=0},_e.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new be(r)}return n.set(e,t),this.size=n.size,this};var Me=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}function Be(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var Ue=L?function(e){return function(t){return e(t)}}(L):function(e){return He(e)&&We(e.length)&&!!x[ke(e)]};function Ve(e){return null!=(t=e)&&We(t.length)&&!ze(t)?we(e):Ee(e);var t}n.exports=function(e,t){return Oe(e,t)}}).call(this,n(69),n(212)(e))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0;t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var t;return"undefined"===typeof window?(e.window={},t=n(154),delete e.window):window.ace?(t=window.ace).acequire=window.ace.require||window.ace.acequire:t=n(154),t};t.debounce=function(e,t){var n=null;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,o)}),t)}}}).call(this,n(69))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&e.handleMarkers(w,t);for(r=0;r0?e.breadcrumbs:void 0,e.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors(Object(a.f)(m(),this._eventProcessors),e,t)},e.prototype.setSDKProcessingMetadata=function(e){return this._sdkProcessingMetadata=Object(a.a)(Object(a.a)({},this._sdkProcessingMetadata),e),this},e.prototype._notifyEventProcessors=function(e,t,n,r){var o=this;return void 0===r&&(r=0),new f((function(i,s){var l=e[r];if(null===t||"function"!==typeof l)i(t);else{var u=l(Object(a.a)({},t),n);Object(c.m)(u)?u.then((function(t){return o._notifyEventProcessors(e,t,n,r+1).then(i)})).then(null,s):o._notifyEventProcessors(e,u,n,r+1).then(i).then(null,s)}}))},e.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},e}();function m(){var e=Object(h.a)();return e.__SENTRY__=e.__SENTRY__||{},e.__SENTRY__.globalEventProcessors=e.__SENTRY__.globalEventProcessors||[],e.__SENTRY__.globalEventProcessors}function g(e){m().push(e)}var v=n(454),b=n(132),y=n(131),_=n(51),w=function(){function e(e){this.errors=0,this.sid=Object(v.g)(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var t=Object(l.b)();this.timestamp=t,this.started=t,e&&this.update(e)}return e.prototype.update=function(e){if(void 0===e&&(e={}),e.user&&(!this.ipAddress&&e.user.ip_address&&(this.ipAddress=e.user.ip_address),this.did||e.did||(this.did=e.user.id||e.user.email||e.user.username)),this.timestamp=e.timestamp||Object(l.b)(),e.ignoreDuration&&(this.ignoreDuration=e.ignoreDuration),e.sid&&(this.sid=32===e.sid.length?e.sid:Object(v.g)()),void 0!==e.init&&(this.init=e.init),!this.did&&e.did&&(this.did=""+e.did),"number"===typeof e.started&&(this.started=e.started),this.ignoreDuration)this.duration=void 0;else if("number"===typeof e.duration)this.duration=e.duration;else{var t=this.timestamp-this.started;this.duration=t>=0?t:0}e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),!this.ipAddress&&e.ipAddress&&(this.ipAddress=e.ipAddress),!this.userAgent&&e.userAgent&&(this.userAgent=e.userAgent),"number"===typeof e.errors&&(this.errors=e.errors),e.status&&(this.status=e.status)},e.prototype.close=function(e){e?this.update({status:e}):"ok"===this.status?this.update({status:"exited"}):this.update()},e.prototype.toJSON=function(){return Object(_.b)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"===typeof this.did||"string"===typeof this.did?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},e}(),S=function(){function e(e,t,n){void 0===t&&(t=new p),void 0===n&&(n=4),this._version=n,this._stack=[{}],this.getStackTop().scope=t,e&&this.bindClient(e)}return e.prototype.isOlderThan=function(e){return this._version1&&(d=h.slice(0,-1).join("/"),f=h.pop()),f){var p=f.match(/^\d+/);p&&(f=p[0])}return Y({host:c,pass:s,path:d,projectId:f,port:u,protocol:r,publicKey:o})}(e):Y(e);return function(e){if(Object(U.b)()){var t=e.port,n=e.projectId,r=e.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(t){if(!e[t])throw new G("Invalid Sentry Dsn: "+t+" missing")})),!n.match(/^\d+$/))throw new G("Invalid Sentry Dsn: Invalid projectId "+n);if(!function(e){return"http"===e||"https"===e}(r))throw new G("Invalid Sentry Dsn: Invalid protocol "+r);if(t&&isNaN(parseInt(t,10)))throw new G("Invalid Sentry Dsn: Invalid port "+t)}}(t),t}var X=n(82),Q=[];function Z(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function ee(e){var t={};return function(e){var t=e.defaultIntegrations&&Object(a.f)(e.defaultIntegrations)||[],n=e.integrations,r=Object(a.f)(Z(t));Array.isArray(n)?r=Object(a.f)(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))})),Z(n)):"function"===typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o=r.map((function(e){return e.name})),i="Debug";return-1!==o.indexOf(i)&&r.push.apply(r,Object(a.f)(r.splice(o.indexOf(i),1))),r}(e).forEach((function(e){t[e.name]=e,function(e){-1===Q.indexOf(e.name)&&(e.setupOnce(g,O),Q.push(e.name),b.b.log("Integration installed: "+e.name))}(e)})),Object(_.a)(t,"initialized",!0),t}var te="Not capturing exception because it's already been captured.",ne=function(){function e(e,t){this._integrations={},this._numProcessing=0,this._backend=new e(t),this._options=t,t.dsn&&(this._dsn=J(t.dsn))}return e.prototype.captureException=function(e,t,n){var r=this;if(!Object(v.c)(e)){var o=t&&t.event_id;return this._process(this._getBackend().eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}b.b.log(te)},e.prototype.captureMessage=function(e,t,n,r){var o=this,i=n&&n.event_id,a=Object(c.i)(e)?this._getBackend().eventFromMessage(String(e),t,n):this._getBackend().eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i},e.prototype.captureEvent=function(e,t,n){if(!(t&&t.originalException&&Object(v.c)(t.originalException))){var r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){r=e}))),r}b.b.log(te)},e.prototype.captureSession=function(e){this._isEnabled()?"string"!==typeof e.release?Object(U.b)()&&b.b.warn("Discarded session because of missing or non-string release"):(this._sendSession(e),e.update({init:!1})):Object(U.b)()&&b.b.warn("SDK not enabled, will not capture session.")},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.getTransport=function(){return this._getBackend().getTransport()},e.prototype.flush=function(e){var t=this;return this._isClientDoneProcessing(e).then((function(n){return t.getTransport().close(e).then((function(e){return n&&e}))}))},e.prototype.close=function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))},e.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=ee(this._options))},e.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch(t){return b.b.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},e.prototype._updateSessionFromEvent=function(e,t){var n,r,o=!1,i=!1,s=t.exception&&t.exception.values;if(s){i=!0;try{for(var c=Object(a.g)(s),l=c.next();!l.done;l=c.next()){var u=l.value.mechanism;if(u&&!1===u.handled){o=!0;break}}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}var d="ok"===e.status;(d&&0===e.errors||d&&o)&&(e.update(Object(a.a)(Object(a.a)({},o&&{status:"crashed"}),{errors:e.errors||Number(i||o)})),this.captureSession(e))},e.prototype._sendSession=function(e){this._getBackend().sendSession(e)},e.prototype._isClientDoneProcessing=function(e){var t=this;return new f((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},e.prototype._prepareEvent=function(e,t,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,s=Object(a.a)(Object(a.a)({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:Object(v.g)()),timestamp:e.timestamp||Object(l.a)()});this._applyClientOptions(s),this._applyIntegrationsMetadata(s);var c=t;n&&n.captureContext&&(c=p.clone(c).update(n.captureContext));var d=u(s);return c&&(d=c.applyToEvent(s,n)),d.then((function(e){return"number"===typeof i&&i>0?r._normalizeEvent(e,i):e}))},e.prototype._normalizeEvent=function(e,t){if(!e)return null;var n=Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return Object(a.a)(Object(a.a)({},e),e.data&&{data:Object(_.g)(e.data,t)})}))}),e.user&&{user:Object(_.g)(e.user,t)}),e.contexts&&{contexts:Object(_.g)(e.contexts,t)}),e.extra&&{extra:Object(_.g)(e.extra,t)});return e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace),e.sdkProcessingMetadata=Object(a.a)(Object(a.a)({},e.sdkProcessingMetadata),{baseClientNormalized:!0}),n},e.prototype._applyClientOptions=function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Object(X.d)(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(X.d)(s.value,a));var c=e.request;c&&c.url&&(c.url=Object(X.d)(c.url,a))},e.prototype._applyIntegrationsMetadata=function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=Object(a.f)(e.sdk.integrations||[],t))},e.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},e.prototype._captureEvent=function(e,t,n){return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){b.b.error(e)}))},e.prototype._processEvent=function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate,s=this.getTransport();function l(e,t){s.recordLostEvent&&s.recordLostEvent(e,t)}if(!this._isEnabled())return d(new G("SDK not enabled, will not capture event."));var u="transaction"===e.type;return!u&&"number"===typeof a&&Math.random()>a?(l("sample_rate","event"),d(new G("Discarding event because it's not included in the random sample (sampling rate = "+a+")"))):this._prepareEvent(e,n,t).then((function(n){if(null===n)throw l("event_processor",e.type||"event"),new G("An event processor returned null, will not send event.");return t&&t.data&&!0===t.data.__sentry__||u||!i?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Object(c.m)(e))return e.then((function(e){if(!Object(c.h)(e)&&null!==e)throw new G(t);return e}),(function(e){throw new G("beforeSend rejected with "+e)}));if(!Object(c.h)(e)&&null!==e)throw new G(t);return e}(i(n,t))})).then((function(t){if(null===t)throw l("before_send",e.type||"event"),new G("`beforeSend` returned `null`, will not send event.");var o=n&&n.getSession&&n.getSession();return!u&&o&&r._updateSessionFromEvent(o,t),r._sendEvent(t),t})).then(null,(function(e){if(e instanceof G)throw e;throw r.captureException(e,{data:{__sentry__:!0},originalException:e}),new G("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)}))},e.prototype._process=function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))},e}();var re=function(){function e(){}return e.prototype.sendEvent=function(e){return u({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})},e.prototype.close=function(e){return u(!0)},e}(),oe=function(){function e(e){this._options=e,this._options.dsn||b.b.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype.eventFromException=function(e,t){throw new G("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(e,t,n){throw new G("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,(function(e){Object(U.b)()&&b.b.error("Error while sending event: "+e)}))},e.prototype.sendSession=function(e){this._transport.sendSession?this._transport.sendSession(e).then(null,(function(e){Object(U.b)()&&b.b.error("Error while sending session: "+e)})):Object(U.b)()&&b.b.warn("Dropping session because custom transport doesn't implement sendSession")},e.prototype.getTransport=function(){return this._transport},e.prototype._setupTransport=function(){return new re},e}(),ie=n(222),ae="?",se=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ce=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,le=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ue=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,de=/\((\S*)(?::(\d+))(?::(\d+))\)/,fe=/Minified React error #\d+;/i;function he(e){var t=null,n=0;e&&("number"===typeof e.framesToPop?n=e.framesToPop:fe.test(e.message)&&(n=1));try{if(t=function(e){if(!e||!e.stacktrace)return null;for(var t,n=e.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,i=n.split("\n"),a=[],s=0;s eval")>-1&&(o=ue.exec(i[3]))&&(i[1]=i[1]||"eval",i[3]=o[1],i[4]=o[2],i[5]="");var m=i[3];p=i[1]||ae;p=(r=Object(a.e)(pe(p,m),2))[0],s={url:m=r[1],func:p,line:i[4]?+i[4]:null,column:i[5]?+i[5]:null}}c.push(s)}}catch(g){t={error:g}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}if(!c.length)return null;return{message:ge(e),name:e.name,stack:c}}(e),t)return me(t,n)}catch(r){}return{message:ge(e),name:e&&e.name,stack:[],failed:!0}}var pe=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:ae,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]};function me(e,t){try{return Object(a.a)(Object(a.a)({},e),{stack:e.stack.slice(t)})}catch(n){return e}}function ge(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function ve(e){var t=ye(e.stack),n={type:e.name,value:e.message};return t&&t.length&&(n.stacktrace={frames:t}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function be(e){return{exception:{values:[ve(e)]}}}function ye(e){if(!e||!e.length)return[];var t=e,n=t[0].func||"",r=t[t.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return{colno:null===e.column?void 0:e.column,filename:e.url||t[0].url,function:e.func||"?",in_app:!0,lineno:null===e.line?void 0:e.line}})).reverse()}function _e(e,t,n){var r=Se(t,n&&n.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return Object(v.a)(r),r.level=s.a.Error,n&&n.event_id&&(r.event_id=n.event_id),u(r)}function we(e,t,n,r){void 0===n&&(n=s.a.Info);var o=ke(t,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),u(o)}function Se(e,t,n){var r;if(void 0===n&&(n={}),Object(c.e)(e)&&e.error)return r=be(he(e=e.error));if(Object(c.a)(e)||Object(c.b)(e)){var o=e;if("stack"in e)r=be(he(e));else{var i=o.name||(Object(c.a)(o)?"DOMError":"DOMException"),s=o.message?i+": "+o.message:i;r=ke(s,t,n),Object(v.b)(r,s)}return"code"in o&&(r.tags=Object(a.a)(Object(a.a)({},r.tags),{"DOMException.code":""+o.code})),r}return Object(c.d)(e)?r=be(he(e)):Object(c.h)(e)||Object(c.f)(e)?(r=function(e,t,n){var r={exception:{values:[{type:Object(c.f)(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(_.c)(e)}]},extra:{__serialized__:Object(_.h)(e)}};if(t){var o=ye(he(t).stack);r.stacktrace={frames:o}}return r}(e,t,n.isRejection),Object(v.a)(r,{synthetic:!0}),r):(r=ke(e,t,n),Object(v.b)(r,""+e,void 0),Object(v.a)(r,{synthetic:!0}),r)}function ke(e,t,n){void 0===n&&(n={});var r={message:e};if(n.attachStacktrace&&t){var o=ye(he(t).stack);r.stacktrace={frames:o}}return r}!function(){function e(e,t,n){void 0===t&&(t={}),this.dsn=e,this._dsnObject=J(e),this.metadata=t,this._tunnel=n}e.prototype.getDsn=function(){return this._dsnObject},e.prototype.forceEnvelope=function(){return!!this._tunnel},e.prototype.getBaseApiEndpoint=function(){return xe(this._dsnObject)},e.prototype.getStoreEndpoint=function(){return Ee(this._dsnObject)},e.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return je(this._dsnObject)},e.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return Re(this._dsnObject,this._tunnel)}}();function xe(e){var t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"}function Oe(e,t){return""+xe(e)+e.projectId+"/"+t+"/"}function Ce(e){return Object(_.i)({sentry_key:e.publicKey,sentry_version:"7"})}function Ee(e){return Oe(e,"store")}function je(e){return Ee(e)+"?"+Ce(e)}function Re(e,t){return t||function(e){return Oe(e,"envelope")}(e)+"?"+Ce(e)}function Te(e){if(e.metadata&&e.metadata.sdk){var t=e.metadata.sdk;return{name:t.name,version:t.version}}}function Ae(e,t){var n,r=Te(t),o=e.type||"event",i="transaction"===o||!!t.tunnel,s=(e.sdkProcessingMetadata||{}).transactionSampling||{},c=s.method,l=s.rate;!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=Object(a.f)(e.sdk.integrations||[],t.integrations||[]),e.sdk.packages=Object(a.f)(e.sdk.packages||[],t.packages||[]))}(e,t.metadata.sdk),e.tags=e.tags||{},e.extra=e.extra||{},e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baseClientNormalized||(e.tags.skippedNormalization=!0),delete e.sdkProcessingMetadata;try{n=JSON.stringify(e)}catch(h){e.tags.JSONStringifyError=!0,e.extra.JSONStringifyError=h;try{n=JSON.stringify(Object(_.g)(e))}catch(p){var u=p;n=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:u.message,stack:u.stack}})}}var d={body:n,type:o,url:i?Re(t.dsn,t.tunnel):je(t.dsn)};if(i){var f=JSON.stringify(Object(a.a)(Object(a.a)({event_id:e.event_id,sent_at:(new Date).toISOString()},r&&{sdk:r}),!!t.tunnel&&{dsn:q(t.dsn)}))+"\n"+JSON.stringify({type:o,sample_rates:[{id:c,rate:l}]})+"\n"+d.body;d.body=f}return d}function Me(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length0&&n(!1)}),e);t.forEach((function(e){u(e).then((function(){--o||(clearTimeout(i),n(!0))}),r)}))}))}}}var Le,$e=Object(h.a)();function Ne(){if(Le)return Le;if(Object(ie.a)($e.fetch))return Le=$e.fetch.bind($e);var e=$e.document,t=$e.fetch;if(e&&"function"===typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(o){Object(U.b)()&&b.b.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",o)}return Le=t.bind($e)}function De(e,t){if("[object Navigator]"===Object.prototype.toString.call($e&&$e.navigator)&&"function"===typeof $e.navigator.sendBeacon)return $e.navigator.sendBeacon.bind($e.navigator)(e,t);if(Object(ie.b)()){var n=Ne();n(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){console.error(e)}))}else;}function Pe(e){return"event"===e?"error":e}var Ie=Object(h.a)(),Fe=function(){function e(e){var t,n,r,o=this;this.options=e,this._buffer=Me(30),this._rateLimits={},this._outcomes={},this._api=(t=e.dsn,n=e._metadata,r=e.tunnel,{initDsn:t,metadata:n||{},dsn:J(t),tunnel:r}),this.url=je(this._api.dsn),this.options.sendClientReports&&Ie.document&&Ie.document.addEventListener("visibilitychange",(function(){"hidden"===Ie.document.visibilityState&&o._flushOutcomes()}))}return e.prototype.sendEvent=function(e){return this._sendRequest(Ae(e,this._api),e)},e.prototype.sendSession=function(e){return this._sendRequest(function(e,t){var n=Te(t),r="aggregates"in e?"sessions":"session";return{body:JSON.stringify(Object(a.a)(Object(a.a)({sent_at:(new Date).toISOString()},n&&{sdk:n}),!!t.tunnel&&{dsn:q(t.dsn)}))+"\n"+JSON.stringify({type:r})+"\n"+JSON.stringify(e),type:r,url:Re(t.dsn,t.tunnel)}}(e,this._api),e)},e.prototype.close=function(e){return this._buffer.drain(e)},e.prototype.recordLostEvent=function(e,t){var n;if(this.options.sendClientReports){var r=Pe(t)+":"+e;b.b.log("Adding outcome: "+r),this._outcomes[r]=(null!==(n=this._outcomes[r])&&void 0!==n?n:0)+1}},e.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var e=this._outcomes;if(this._outcomes={},Object.keys(e).length){b.b.log("Flushing outcomes:\n"+JSON.stringify(e,null,2));var t=Re(this._api.dsn,this._api.tunnel),n=JSON.stringify(Object(a.a)({},this._api.tunnel&&{dsn:q(this._api.dsn)}))+"\n"+JSON.stringify({type:"client_report"})+"\n"+JSON.stringify({timestamp:Object(l.a)(),discarded_events:Object.keys(e).map((function(t){var n=Object(a.e)(t.split(":"),2),r=n[0];return{reason:n[1],category:r,quantity:e[t]}}))});try{De(t,n)}catch(r){b.b.error(r)}}else b.b.log("No outcomes to flush")}},e.prototype._handleResponse=function(e){var t,n=e.requestType,r=e.response,o=e.headers,i=e.resolve,a=e.reject,s=(t=r.status)>=200&&t<300?"success":429===t?"rate_limit":t>=400&&t<500?"invalid":t>=500?"failed":"unknown";this._handleRateLimit(o)&&Object(U.b)()&&b.b.warn("Too many "+n+" requests, backing off until: "+this._disabledUntil(n)),"success"!==s?a(r):i({status:s})},e.prototype._disabledUntil=function(e){var t=Pe(e);return this._rateLimits[t]||this._rateLimits.all},e.prototype._isRateLimited=function(e){return this._disabledUntil(e)>new Date(Date.now())},e.prototype._handleRateLimit=function(e){var t,n,r,o,i=Date.now(),s=e["x-sentry-rate-limits"],c=e["retry-after"];if(s){try{for(var l=Object(a.g)(s.trim().split(",")),u=l.next();!u.done;u=l.next()){var d=u.value.split(":",2),f=parseInt(d[0],10),h=1e3*(isNaN(f)?60:f);try{for(var p=(r=void 0,Object(a.g)(d[1].split(";"))),m=p.next();!m.done;m=p.next()){var g=m.value;this._rateLimits[g||"all"]=new Date(i+h)}}catch(b){r={error:b}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(y){t={error:y}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return!0}return!!c&&(this._rateLimits.all=new Date(i+Object(v.e)(i,c)),!0)},e}(),ze=function(e){function t(t,n){void 0===n&&(n=Ne());var r=e.call(this,t)||this;return r._fetch=n,r}return Object(a.c)(t,e),t.prototype._sendRequest=function(e,t){var n=this;if(this._isRateLimited(e.type))return this.recordLostEvent("ratelimit_backoff",e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429});var r={body:e.body,method:"POST",referrerPolicy:Object(ie.e)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new f((function(t,o){n._fetch(e.url,r).then((function(r){var i={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};n._handleResponse({requestType:e.type,response:r,headers:i,resolve:t,reject:o})})).catch(o)}))})).then(void 0,(function(t){throw t instanceof G?n.recordLostEvent("queue_overflow",e.type):n.recordLostEvent("network_error",e.type),t}))},t}(Fe),We=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t.prototype._sendRequest=function(e,t){var n=this;return this._isRateLimited(e.type)?(this.recordLostEvent("ratelimit_backoff",e.type),Promise.reject({event:t,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new f((function(t,r){var o=new XMLHttpRequest;for(var i in o.onreadystatechange=function(){if(4===o.readyState){var i={"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")};n._handleResponse({requestType:e.type,response:o,headers:i,resolve:t,reject:r})}},o.open("POST",e.url),n.options.headers)Object.prototype.hasOwnProperty.call(n.options.headers,i)&&o.setRequestHeader(i,n.options.headers[i]);o.send(e.body)}))})).then(void 0,(function(t){throw t instanceof G?n.recordLostEvent("queue_overflow",e.type):n.recordLostEvent("network_error",e.type),t}))},t}(Fe),Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t.prototype.eventFromException=function(e,t){return _e(this._options,e,t)},t.prototype.eventFromMessage=function(e,t,n){return void 0===t&&(t=s.a.Info),we(this._options,e,t,n)},t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var t=Object(a.a)(Object(a.a)({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(t):Object(ie.b)()?new ze(t):new We(t)},t}(oe),He=Object(h.a)(),Ue=0;function Ve(){return Ue>0}function Ge(){Ue+=1,setTimeout((function(){Ue-=1}))}function Ke(e,t,n){if(void 0===t&&(t={}),"function"!==typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(Object(_.e)(e))return e}catch(s){return e}var o=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var o=r.map((function(e){return Ke(e,t)}));return e.apply(this,o)}catch(i){throw Ge(),W((function(e){e.addEventProcessor((function(e){return t.mechanism&&(Object(v.b)(e,void 0,void 0),Object(v.a)(e,t.mechanism)),e.extra=Object(a.a)(Object(a.a)({},e.extra),{arguments:r}),e})),T(i)})),i}};try{for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=e[i])}catch(c){}Object(_.f)(o,e),Object(_.a)(e,"__sentry_wrapped__",o);try{Object.getOwnPropertyDescriptor(o,"name").configurable&&Object.defineProperty(o,"name",{get:function(){return e.name}})}catch(c){}return o}function qe(e){if(void 0===e&&(e={}),He.document)if(e.eventId)if(e.dsn){var t=He.document.createElement("script");t.async=!0,t.src=function(e,t){var n=J(e),r=xe(n)+"embed/error-page/",o="dsn="+q(n);for(var i in t)if("dsn"!==i)if("user"===i){if(!t.user)continue;t.user.name&&(o+="&name="+encodeURIComponent(t.user.name)),t.user.email&&(o+="&email="+encodeURIComponent(t.user.email))}else o+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);return r+"?"+o}(e.dsn,e),e.onLoad&&(t.onload=e.onLoad);var n=He.document.head||He.document.body;n&&n.appendChild(t)}else Object(U.b)()&&b.b.error("Missing dsn option in showReportDialog call");else Object(U.b)()&&b.b.error("Missing eventId option in showReportDialog call")}var Ye,Je=n(166),Xe=Object(h.a)(),Qe={},Ze={};function et(e){if(!Ze[e])switch(Ze[e]=!0,e){case"console":!function(){if(!("console"in Xe))return;["debug","info","warn","error","log","assert"].forEach((function(e){e in Xe.console&&Object(_.d)(Xe.console,e,(function(t){return function(){for(var n=[],r=0;r2?t[2]:void 0;if(r){var o=Ye,i=String(r);Ye=i,nt("history",{from:o,to:i})}return e.apply(this,t)}}Xe.onpopstate=function(){for(var t=[],n=0;n"}0!==n.length&&O().addBreadcrumb({category:"ui."+t.name,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this._options.dom)),this._options.xhr&&tt("xhr",pt),this._options.fetch&&tt("fetch",mt),this._options.history&&tt("history",gt)},e.id="Breadcrumbs",e}();function ht(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:Object(dt.a)(e.level),message:Object(X.b)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: "+(Object(X.b)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}O().addBreadcrumb(t,{input:e.args,level:e.level})}function pt(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;O().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;}function mt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?O().addBreadcrumb({category:"fetch",data:e.fetchData,level:s.a.Error,type:"http"},{data:e.error,input:e.args}):O().addBreadcrumb({category:"fetch",data:Object(a.a)(Object(a.a)({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function gt(e){var t=Object(h.a)(),n=e.from,r=e.to,o=Object(v.f)(t.location.href),i=Object(v.f)(n),a=Object(v.f)(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),O().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}var vt,bt=function(e){function t(t){void 0===t&&(t={});return t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:H}],version:H},e.call(this,Be,t)||this}return Object(a.c)(t,e),t.prototype.showReportDialog=function(e){void 0===e&&(e={}),Object(h.a)().document&&(this._isEnabled()?qe(Object(a.a)(Object(a.a)({},e),{dsn:e.dsn||this.getDsn()})):b.b.error("Trying to call showReportDialog with Sentry Client disabled"))},t.prototype._prepareEvent=function(t,n,r){return t.platform=t.platform||"javascript",e.prototype._prepareEvent.call(this,t,n,r)},t.prototype._sendEvent=function(t){var n=this.getIntegration(ft);n&&n.addSentryBreadcrumb(t),e.prototype._sendEvent.call(this,t)},t}(ne),yt=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){vt=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],t=0;t=0;t--){var n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null},e.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace)return this._getLastValidUrl(e.stacktrace.frames);var t;try{t=e.exception.values[0].stacktrace.frames}catch(n){}return t?this._getLastValidUrl(t):null}catch(r){return Object(U.b)()&&b.b.error("Cannot extract url for event "+Object(v.d)(e)),null}},e.id="InboundFilters",e}();var St=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],kt=function(){function e(t){this.name=e.id,this._options=Object(a.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return e.prototype.setupOnce=function(){var e=Object(h.a)();this._options.setTimeout&&Object(_.d)(e,"setTimeout",xt),this._options.setInterval&&Object(_.d)(e,"setInterval",xt),this._options.requestAnimationFrame&&Object(_.d)(e,"requestAnimationFrame",Ot),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Object(_.d)(XMLHttpRequest.prototype,"send",Ct);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:St).forEach(Et)},e.id="TryCatch",e}();function xt(e){return function(){for(var t=[],n=0;n0?t:Object(ut.a)();return 0===l.length&&l.push({colno:u,filename:f,function:"?",in_app:!0,lineno:d}),e}function Mt(e){Object(U.b)()&&b.b.log("Global Handler attached: "+e)}function Lt(e,t,n,r){Object(v.a)(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function $t(){var e=O(),t=e.getClient();return[e,t&&t.getOptions().attachStacktrace]}var Nt=function(){function e(t){void 0===t&&(t={}),this.name=e.id,this._key=t.key||"cause",this._limit=t.limit||5}return e.prototype.setupOnce=function(){g((function(t,n){var r=O().getIntegration(e);return r?function(e,t,n,r){if(!n.exception||!n.exception.values||!r||!Object(c.g)(r.originalException,Error))return n;var o=Dt(t,r.originalException,e);return n.exception.values=Object(a.f)(o,n.exception.values),n}(r._key,r._limit,t,n):t}))},e.id="LinkedErrors",e}();function Dt(e,t,n,r){if(void 0===r&&(r=[]),!Object(c.g)(t[n],Error)||r.length+1>=e)return r;var o=ve(he(t[n]));return Dt(e,t[n],n,Object(a.f)([o],r))}var Pt=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,n){t((function(t){var r=n().getIntegration(e);if(r){try{if(function(e,t){if(!t)return!1;if(function(e,t){var n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Ft(e,t))return!1;if(!It(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){var n=zt(t),r=zt(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Ft(e,t))return!1;if(!It(e,t))return!1;return!0}(e,t))return!0;return!1}(t,r._previousEvent))return b.b.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){return r._previousEvent=t}return r._previousEvent=t}return t}))},e.id="Dedupe",e}();function It(e,t){var n=Wt(e),r=Wt(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,(r=r).length!==n.length)return!1;for(var o=0;o=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var R=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function T(e){var t=R.exec(e);return t?t.slice(1):[]}function A(){for(var e=[],t=0;t=-1&&!r;o--){var i=o>=0?e[o]:"/";i&&(n=i+"/"+n,r="/"===i.charAt(0))}return(r?"/":"")+(n=j(n.split("/").filter((function(e){return!!e})),!r).join("/"))||"."}function M(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function L(e,t){var n=T(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n}var $=function(){function e(t){var n=this;void 0===t&&(t={}),this.name=e.id,this._prefix="app:///",this._iteratee=function(e){if(!e.filename)return e;var t=/^[A-Z]:\\/.test(e.filename),r=/^\//.test(e.filename);if(t||r){var o=t?e.filename.replace(/^[A-Z]:/,"").replace(/\\/g,"/"):e.filename,i=n._root?function(e,t){e=A(e).substr(1),t=A(t).substr(1);for(var n=M(e.split("/")),r=M(t.split("/")),o=Math.min(n.length,r.length),i=o,a=0;a=0;n--){var r=t[n];if(!0===r.in_app){e.transaction=this._getTransaction(r);break}}return e},e.prototype._getFramesFromEvent=function(e){var t=e.exception&&e.exception.values&&e.exception.values[0];return t&&t.stacktrace&&t.stacktrace.frames||[]},e.prototype._getTransaction=function(e){return e.module||e.function?(e.module||"?")+"/"+(e.function||"?"):""},e.id="Transaction",e}(),P=n(453),I={id:"Tracing"},F={id:"BrowserTracing"},z="ui.vue",W={activate:["activated","deactivated"],create:["beforeCreate","created"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]},B=/(?:^|[-_/])(\w)/g,H="root",U="anonymous component",V=function(){function e(t){var n=this;this.name=e.id,this._componentsCache={},this._applyTracingHooks=function(e,t){if(!e.$options.$_sentryPerfHook){e.$options.$_sentryPerfHook=!0;var i=n._getComponentName(e),a=i===H,s={},c=function(r){var o=Object(P.c)();n._rootSpan?n._finishRootSpan(o,t):e.$once("hook:"+r,(function(){var e=t().getIntegration(I);if(e){n._tracingActivity=e.constructor.pushActivity("Vue Application Render");var r=e.constructor.getTransaction();r&&(n._rootSpan=r.startChild({description:"Application Render",op:z}))}else{var o=function(e){if(e&&e.getScope){var t=e.getScope();if(t)return t.getTransaction()}return}(t());o&&(n._rootSpan=o.startChild({description:"Application Render",op:z}))}}))},l=function(r,o){var a=Array.isArray(n._options.tracingOptions.trackComponents)?n._options.tracingOptions.trackComponents.indexOf(i)>-1:n._options.tracingOptions.trackComponents;if(n._rootSpan&&a){var c=Object(P.c)(),l=s[o];l?(l.finish(),n._finishRootSpan(c,t)):e.$once("hook:"+r,(function(){n._rootSpan&&(s[o]=n._rootSpan.startChild({description:"Vue <"+i+">",op:"ui.vue."+o}))}))}};n._options.tracingOptions.hooks.forEach((function(t){var i=W[t];i?i.forEach((function(o){var i=a?c.bind(n,o):l.bind(n,o,t),s=e.$options[o];Array.isArray(s)?e.$options[o]=Object(r.f)([i],s):e.$options[o]="function"===typeof s?[i,s]:[i]})):o.b.warn("Unknown hook: "+t)}))}},o.b.log("You are still using the Vue.js integration, consider moving to @sentry/vue"),this._options=Object(r.a)(Object(r.a)({Vue:Object(i.a)().Vue,attachProps:!0,logErrors:!1,tracing:!1},t),{tracingOptions:Object(r.a)({hooks:["mount","update"],timeout:2e3,trackComponents:!1},t.tracingOptions)})}return e.prototype.setupOnce=function(e,t){this._options.Vue?(this._attachErrorHandler(t),this._options.tracing&&this._startTracing(t)):o.b.error("Vue integration is missing a Vue instance")},e.prototype._getComponentName=function(e){if(!e)return U;if(e.$root===e)return H;if(!e.$options)return U;if(e.$options.name)return e.$options.name;if(e.$options._componentTag)return e.$options._componentTag;if(e.$options.__file){var t=L(e.$options.__file.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"),".vue");return this._componentsCache[t]||(this._componentsCache[t]=t.replace(B,(function(e,t){return t?t.toUpperCase():""})))}return U},e.prototype._finishRootSpan=function(e,t){var n=this;this._rootSpanTimer&&clearTimeout(this._rootSpanTimer),this._rootSpanTimer=setTimeout((function(){if(n._tracingActivity){var r=t().getIntegration(I);r&&r.constructor.popActivity(n._tracingActivity)}n._rootSpan&&n._rootSpan.finish(e)}),this._options.tracingOptions.timeout)},e.prototype._startTracing=function(e){var t=this._applyTracingHooks;this._options.Vue.mixin({beforeCreate:function(){e().getIntegration(I)||e().getIntegration(F)?t(this,e):o.b.error("Vue integration has tracing enabled, but Tracing integration is not configured")}})},e.prototype._attachErrorHandler=function(t){var n=this,r=this._options.Vue.config.errorHandler;this._options.Vue.config.errorHandler=function(i,a,s){var c={};if(a)try{c.componentName=n._getComponentName(a),n._options.attachProps&&(c.propsData=a.$options.propsData)}catch(l){o.b.warn("Unable to extract metadata from Vue component.")}s&&(c.lifecycleHook=s),t().getIntegration(e)&&setTimeout((function(){t().withScope((function(e){e.setContext("vue",c),t().captureException(i)}))})),"function"===typeof r&&r.call(n._options.Vue,i,a,s),n._options.logErrors&&(n._options.Vue.util&&n._options.Vue.util.warn("Error in "+s+': "'+(i&&i.toString())+'"',a),console.error(i))}},e.id="Vue",e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=w(n(0)),o=_(n(351)),i=w(n(4)),a=_(n(311)),s=_(n(312)),c=w(n(355)),l=w(n(151)),u=w(n(60)),d=w(n(299)),f=w(n(379)),h=w(n(217)),p=w(n(218)),m=w(n(381)),g=w(n(61)),v=w(n(382)),b=w(n(13));function y(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==S(e)&&"function"!==typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return(0,h.default)(g.default.getThemeName(e))}},{key:"getThemeName",value:function(e){return e.name}},{key:"getThemeType",value:function(e){return e.palette.type}},{key:"toggleTheme",value:function(){var e=this.state.themeName,t="dark"===e?"blue":"blue"===e?"colored":"colored"===e?"light":"dark";g.default.setThemeName(t);var n=this.createTheme(t);this.setState({theme:n,themeName:this.getThemeName(n),themeType:this.getThemeType(n)})}},{key:"getSystemConfig",value:function(){return this.socket.getSystemConfig()}},{key:"getExpertMode",value:function(){return"true"===window.sessionStorage.getItem("App.expertMode")||!!this._systemConfig.expertMode}},{key:"onConnectionReady",value:function(){}},{key:"encrypt",value:function(e){for(var t="",n=0;n=e[n]}))||"xs"}},{key:"onClose",value:function(){if("undefined"!==typeof window.parent&&window.parent)try{window.parent.$iframeDialog&&"function"===typeof window.parent.$iframeDialog.close?window.parent.$iframeDialog.close():window.parent.postMessage("close","*")}catch(e){window.parent.postMessage("close","*")}}}],i&&O(t.prototype,i),y&&O(t,y),Object.defineProperty(t,"prototype",{writable:!1}),w}(m.default);$.propTypes={adapterName:i.default.string,onThemeChange:i.default.func,socket:i.default.object,encryptedFields:i.default.array,bottomButtons:i.default.bool};var N=$;t.default=N},function(e,t,n){"use strict";function r(){var e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(var r=0;r=43)}})).catch((function(){return!1}))}function S(e){return"boolean"===typeof m?l.resolve(m):w(e).then((function(e){return m=e}))}function k(e){var t=g[e.name],n={};n.promise=new l((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function x(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function O(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function C(e,t){return new l((function(n,r){if(g[e.name]=g[e.name]||D(),e.db){if(!t)return n(e.db);k(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=a.open.apply(a,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(p)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),x(e)}}))}function E(e){return C(e,!1)}function j(e){return C(e,!0)}function R(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function T(e){return new l((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}function A(e){return c([_(atob(e.data))],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function L(e){var t=this,n=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return d(n,e,e),n}function $(e){k(e);for(var t=g[e.name],n=t.forages,r=0;r0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return l.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),j(e)})).then((function(){return $(e).then((function(){N(e,t,n,r-1)}))})).catch(n);n(i)}}function D(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function P(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=g[n.name];o||(o=D(),g[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=L);var i=[];function a(){return l.resolve()}for(var s=0;s>4,u[c++]=(15&r)<<4|o>>2,u[c++]=(3&o)<<6|63&i;return l}function pe(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=Y[(3&n[t])<<4|n[t+1]>>4],r+=Y[(15&n[t+1])<<2|n[t+2]>>6],r+=Y[63&n[t+2]];return n.length%3===2?r=r.substring(0,r.length-1)+"=":n.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}function me(e,t){var n="";if(e&&(n=fe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===fe.call(e.buffer))){var r,o=Q;e instanceof ArrayBuffer?(r=e,o+=ee):(r=e.buffer,"[object Int8Array]"===n?o+=ne:"[object Uint8Array]"===n?o+=re:"[object Uint8ClampedArray]"===n?o+=oe:"[object Int16Array]"===n?o+=ie:"[object Uint16Array]"===n?o+=se:"[object Int32Array]"===n?o+=ae:"[object Uint32Array]"===n?o+=ce:"[object Float32Array]"===n?o+=le:"[object Float64Array]"===n?o+=ue:t(new Error("Failed to get type for BinaryArray"))),t(o+pe(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=J+e.type+"~"+pe(this.result);t(Q+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function ge(e){if(e.substring(0,Z)!==Q)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(Z,de);if(r===te&&X.test(n)){var o=n.match(X);t=o[1],n=n.substring(o[0].length)}var i=he(n);switch(r){case ee:return i;case te:return c([i],{type:t});case ne:return new Int8Array(i);case re:return new Uint8Array(i);case oe:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case se:return new Uint16Array(i);case ae:return new Int32Array(i);case ce:return new Uint32Array(i);case le:return new Float32Array(i);case ue:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}}var ve={serialize:me,deserialize:ge,stringToBuffer:he,bufferToString:pe};function be(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function ye(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!==typeof e[r]?e[r].toString():e[r];var o=new l((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(o){return r(o)}n.db.transaction((function(o){be(o,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=ve,o}function _e(e,t,n,r,o,i){e.executeSql(n,r,o,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?i(e,a):be(e,t,(function(){e.executeSql(n,r,o,i)}),i)}),i):i(e,a)}),i)}function we(e,t){var n=this;e=f(e);var r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Se(e,t){var n=this,r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName,[],(function(n,r){for(var i=r.rows,a=i.length,s=0;s0)return void i(ke.apply(o,[e,s,n,r-1]));a(t)}}))}))})).catch(a)}));return u(i,n),i}function xe(e,t,n){return ke.apply(this,[e,t,n,1])}function Oe(e,t){var n=this;e=f(e);var r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Ce(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function Ee(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return u(n,e),n}function je(e,t){var n=this,r=new l((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return u(r,t),r}function Re(e){var t=this,n=new l((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],o=0;o '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var o=[],i=0;i0}function Pe(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=$e(e,t._defaultConfig),De()?(t._dbInfo=n,n.serializer=ve,l.resolve()):l.reject()}function Ie(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return u(n,e),n}function Fe(e,t){var n=this;e=f(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return u(r,t),r}function ze(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):l.reject("Invalid arguments"),u(r,t),r}var Ke={_driver:"localStorageWrapper",_initStorage:Pe,_support:Le(),iterate:ze,getItem:Fe,setItem:Ve,removeItem:Ue,clear:Ie,length:He,key:We,keys:Be,dropInstance:Ge},qe=function(e,t){return e===t||"number"===typeof e&&"number"===typeof t&&isNaN(e)&&isNaN(t)},Ye=function(e,t){for(var n=e.length,r=0;r=0)return 1;return 0}();var o=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function i(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:c(s(e))}function l(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),d=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?u:10===e?d:u||d}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function m(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||h(e.firstElementChild)===e)}(a)?a:h(a);var s=p(e);return s.host?m(s.host,t):m(e,p(t).host)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(t,"top"),o=g(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function b(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,r=f(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},S=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=f(10),o="HTML"===t.nodeName,i=C(e),s=C(t),l=c(e),u=a(t),d=parseFloat(u.borderTopWidth),h=parseFloat(u.borderLeftWidth);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=O({top:i.top-s.top-d,left:i.left-s.left-h,width:i.width,height:i.height});if(p.marginTop=0,p.marginLeft=0,!r&&o){var m=parseFloat(u.marginTop),g=parseFloat(u.marginLeft);p.top-=d-m,p.bottom-=d-m,p.left-=h-g,p.right-=h-g,p.marginTop=m,p.marginLeft=g}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(p=v(p,t)),p}function j(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=E(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:g(n),s=t?0:g(n,"left"),c={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return O(c)}function R(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&R(n)}function T(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?T(e):m(e,l(t));if("viewport"===r)i=j(a,o);else{var u=void 0;"scrollParent"===r?"BODY"===(u=c(s(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===r?e.ownerDocument.documentElement:r;var d=E(u,a,o);if("HTML"!==u.nodeName||R(a))i=d;else{var f=_(e.ownerDocument),h=f.height,p=f.width;i.top+=d.top-d.marginTop,i.bottom=h+d.top,i.left+=d.left-d.marginLeft,i.right=p+d.left}}var g="number"===typeof(n=n||0);return i.left+=g?n:n.left||0,i.top+=g?n:n.top||0,i.right-=g?n:n.right||0,i.bottom-=g?n:n.bottom||0,i}function M(e){return e.width*e.height}function L(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=A(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(s).map((function(e){return x({key:e},s[e],{area:M(s[e])})})).sort((function(e,t){return t.area-e.area})),l=c.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=l.length>0?l[0].key:c[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function $(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?T(t):m(t,l(n));return E(n,o,r)}function N(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function D(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function P(e,t,n){n=n.split("-")[0];var r=N(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",c=i?"height":"width",l=i?"width":"height";return o[a]=t[a]+t[c]/2-r[c]/2,o[s]=n===s?t[s]-r[l]:t[D(s)],o}function I(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function F(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=I(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offsets.reference),t=n(t,e))})),t}function z(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=$(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=L(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=P(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=F(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function B(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=ee.indexOf(e),r=ee.slice(n+1).concat(ee.slice(0,n));return t?r.reverse():r}var ne="flip",re="clockwise",oe="counterclockwise";function ie(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(I(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return l=l.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){return O("%p"===a?n:r)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))})),l.forEach((function(e,t){e.forEach((function(n,r){Y(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var ae={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",l=s?"width":"height",u={start:k({},c,i[c]),end:k({},c,i[c]+i[l]-a[l])};e.offsets.popper=x({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],c=void 0;return c=Y(+n)?[+n,0]:ie(n,i,a,s),"left"===s?(i.top+=c[0],i.left-=c[1]):"right"===s?(i.top+=c[0],i.left+=c[1]):"top"===s?(i.left+=c[0],i.top-=c[1]):"bottom"===s&&(i.left+=c[0],i.top+=c[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var r=B("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var c=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=c;var l=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]c[e]&&!t.escapeWithReference&&(r=Math.min(u[n],c[e]-("right"===e?u.width:u.height))),k({},n,r)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=x({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",c=a?"left":"top",l=a?"width":"height";return n[s]i(r[s])&&(e.offsets.popper[c]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,s=i.popper,c=i.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",d=l?"Top":"Left",f=d.toLowerCase(),h=l?"left":"top",p=l?"bottom":"right",m=N(r)[u];c[p]-ms[p]&&(e.offsets.popper[f]+=c[f]+m-s[p]),e.offsets.popper=O(e.offsets.popper);var g=c[f]+c[u]/2-m/2,v=a(e.instance.popper),b=parseFloat(v["margin"+d]),y=parseFloat(v["border"+d+"Width"]),_=g-e.offsets.popper[f]-b-y;return _=Math.max(Math.min(s[u]-m,_),0),e.arrowElement=r,e.offsets.arrow=(k(n={},f,Math.round(_)),k(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=D(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ne:a=[r,o];break;case re:a=te(r);break;case oe:a=te(r,!0);break;default:a=t.behavior}return a.forEach((function(s,c){if(r!==s||a.length===c+1)return e;r=e.placement.split("-")[0],o=D(r);var l=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="left"===r&&d(l.right)>d(u.left)||"right"===r&&d(l.left)d(u.top)||"bottom"===r&&d(l.top)d(n.right),m=d(l.top)d(n.bottom),v="left"===r&&h||"right"===r&&p||"top"===r&&m||"bottom"===r&&g,b=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(b&&"start"===i&&h||b&&"end"===i&&p||!b&&"start"===i&&m||!b&&"end"===i&&g),_=!!t.flipVariationsByContent&&(b&&"start"===i&&p||b&&"end"===i&&h||!b&&"start"===i&&g||!b&&"end"===i&&m),w=y||_;(f||v||w)&&(e.flipped=!0,(f||v)&&(r=a[c+1]),w&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=x({},e.offsets.popper,P(e.instance.popper,e.offsets.reference,e.placement)),e=F(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=D(t),e.offsets.popper=O(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=I(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=o(this.update.bind(this)),this.options=x({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(x({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){r.options.modifiers[t]=x({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return x({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&i(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return S(e,[{key:"update",value:function(){return z.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return K.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),e}();ce.Utils=("undefined"!==typeof window?window:e).PopperUtils,ce.placements=Z,ce.Defaults=se,t.a=ce}).call(this,n(69))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diff=t.split=void 0;var r=n(409),o=n(410);t.diff=o.default;var i=n(310);t.split=i.default,t.default=r.default},function(e,t,n){"use strict";var r=n(414),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,c,l,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),c=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),c.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(s):c.removeAllRanges()),l&&document.body.removeChild(l),a()}return u}},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}),"FileCopy");t.default=a},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.default=a},function(e,t,n){"use strict";var r=n(24),o=n(35);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(36)).default)(i.createElement("path",{d:"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"}),"ImportExport");t.default=a},,function(e,t,n){"use strict";n.d(t,"a",(function(){return ge}));var r=n(0),o=n.n(r),i=n(4),a=n.n(i);function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;var u=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function d(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=u.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"===typeof t?t:"string"===typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var f=[".DS_Store","Thumbs.db"];function h(e){return"object"===typeof e&&null!==e}function p(e){return b(e.target.files).map((function(e){return d(e)}))}function m(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return d(e)}))]}}))}))}function g(e,t){return s(this,void 0,void 0,(function(){var n;return c(this,(function(r){switch(r.label){case 0:return null===e?[2,[]]:e.items?(n=b(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(y))]):[3,2];case 1:return[2,v(_(r.sent()))];case 2:return[2,v(b(e.files).map((function(e){return d(e)})))]}}))}))}function v(e){return e.filter((function(e){return-1===f.indexOf(e.name)}))}function b(e){if(null===e)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,P(n)];if(e.sizen)return[!1,P(n)]}return[!0,null]}function B(e){return void 0!==e&&null!==e}function H(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=T(z(e,n),1)[0],i=T(W(e,r,o),1)[0];return t&&i}))}function U(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function V(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function G(e){e.preventDefault()}function K(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function q(e){return-1!==e.indexOf("Edge/")}function Y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return K(e)||q(e)}function J(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var he=Object(r.forwardRef)((function(e,t){var n=e.children,i=ge(fe(e,te)),a=i.open,s=fe(i,ne);return Object(r.useImperativeHandle)(t,(function(){return{open:a}}),[a]),o.a.createElement(r.Fragment,null,n(ue(ue({},s),{},{open:a})))}));he.displayName="Dropzone";var pe={disabled:!1,getFilesFromEvent:function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){return h(e)&&h(e.dataTransfer)?[2,g(e.dataTransfer,e.type)]:function(e){return h(e)&&h(e.target)}(e)?[2,p(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"===typeof e.getFile}))?[2,m(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};he.defaultProps=pe,he.propTypes={children:a.a.func,accept:a.a.oneOfType([a.a.string,a.a.arrayOf(a.a.string)]),multiple:a.a.bool,preventDropOnDocument:a.a.bool,noClick:a.a.bool,noKeyboard:a.a.bool,noDrag:a.a.bool,noDragEventsBubbling:a.a.bool,minSize:a.a.number,maxSize:a.a.number,maxFiles:a.a.number,disabled:a.a.bool,getFilesFromEvent:a.a.func,onFileDialogCancel:a.a.func,onFileDialogOpen:a.a.func,useFsAccessApi:a.a.bool,onDragEnter:a.a.func,onDragLeave:a.a.func,onDragOver:a.a.func,onDrop:a.a.func,onDropAccepted:a.a.func,onDropRejected:a.a.func,validator:a.a.func};var me={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ue(ue({},pe),e),n=t.accept,o=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,c=t.multiple,l=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,h=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,v=t.onFileDialogOpen,b=t.useFsAccessApi,y=t.preventDropOnDocument,_=t.noClick,w=t.noKeyboard,S=t.noDrag,k=t.noDragEventsBubbling,x=t.validator,O=Object(r.useMemo)((function(){return"function"===typeof v?v:be}),[v]),C=Object(r.useMemo)((function(){return"function"===typeof g?g:be}),[g]),E=Object(r.useRef)(null),j=Object(r.useRef)(null),R=Object(r.useReducer)(ve,me),T=ae(R,2),A=T[0],M=T[1],L=A.isFocused,$=A.isFileDialogActive,N=A.draggedFiles,D=Object(r.useRef)("undefined"!==typeof window&&window.isSecureContext&&b&&X()),P=function(){!D.current&&$&&setTimeout((function(){j.current&&(j.current.files.length||(M({type:"closeDialog"}),C()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",P,!1),function(){window.removeEventListener("focus",P,!1)}}),[j,$,C,D]);var I=Object(r.useRef)([]),B=function(e){E.current&&E.current.contains(e.target)||(e.preventDefault(),I.current=[])};Object(r.useEffect)((function(){return y&&(document.addEventListener("dragover",G,!1),document.addEventListener("drop",B,!1)),function(){y&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",B))}}),[E,y]);var K=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),ke(e),I.current=[].concat(ie(I.current),[e.target]),V(e)&&Promise.resolve(i(e)).then((function(t){U(e)&&!k||(M({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e))}))}),[i,u,k]),q=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),ke(e);var t=V(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&f&&f(e),!1}),[f,k]),te=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),ke(e);var t=I.current.filter((function(e){return E.current&&E.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),I.current=t,t.length>0||(M({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),V(e)&&d&&d(e))}),[E,d,k]),ne=Object(r.useCallback)((function(e,t){var r=[],o=[];e.forEach((function(e){var t=ae(z(e,n),2),i=t[0],c=t[1],l=ae(W(e,s,a),2),u=l[0],d=l[1],f=x?x(e):null;if(i&&u&&!f)r.push(e);else{var h=[c,d];f&&(h=h.concat(f)),o.push({file:e,errors:h.filter((function(e){return e}))})}})),(!c&&r.length>1||c&&l>=1&&r.length>l)&&(r.forEach((function(e){o.push({file:e,errors:[F]})})),r.splice(0)),M({acceptedFiles:r,fileRejections:o,type:"setFiles"}),h&&h(r,o,t),o.length>0&&m&&m(o,t),r.length>0&&p&&p(r,t)}),[M,c,n,s,a,l,h,p,m,x]),se=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),ke(e),I.current=[],V(e)&&Promise.resolve(i(e)).then((function(t){U(e)&&!k||ne(t,e)})),M({type:"reset"})}),[i,ne,k]),ce=Object(r.useCallback)((function(){if(D.current){M({type:"openDialog"}),O();var e={multiple:c,types:Q(n)};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){ne(e,null),M({type:"closeDialog"})})).catch((function(e){Z(e)?(C(e),M({type:"closeDialog"})):ee(e)&&(D.current=!1,j.current&&(j.current.value=null,j.current.click()))}))}else j.current&&(M({type:"openDialog"}),O(),j.current.value=null,j.current.click())}),[M,O,C,b,ne,n,c]),le=Object(r.useCallback)((function(e){E.current&&E.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),ce()))}),[E,ce]),he=Object(r.useCallback)((function(){M({type:"focus"})}),[]),ge=Object(r.useCallback)((function(){M({type:"blur"})}),[]),ye=Object(r.useCallback)((function(){_||(Y()?setTimeout(ce,0):ce())}),[_,ce]),_e=function(e){return o?null:e},we=function(e){return w?null:_e(e)},Se=function(e){return S?null:_e(e)},ke=function(e){k&&e.stopPropagation()},xe=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,c=e.onClick,l=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,f=e.onDrop,h=fe(e,re);return ue(ue(de({onKeyDown:we(J(i,le)),onFocus:we(J(a,he)),onBlur:we(J(s,ge)),onClick:_e(J(c,ye)),onDragEnter:Se(J(l,K)),onDragOver:Se(J(u,q)),onDragLeave:Se(J(d,te)),onDrop:Se(J(f,se)),role:"string"===typeof r&&""!==r?r:"button"},n,E),o||w?{}:{tabIndex:0}),h)}}),[E,le,he,ge,ye,K,q,te,se,w,S,o]),Oe=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),Ce=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,i=e.onClick,a=fe(e,oe),s=de({accept:n,multiple:c,type:"file",style:{display:"none"},onChange:_e(J(o,se)),onClick:_e(J(i,Oe)),autoComplete:"off",tabIndex:-1},r,j);return ue(ue({},s),a)}}),[j,n,c,se,o]),Ee=N.length,je=Ee>0&&H({files:N,accept:n,minSize:s,maxSize:a,multiple:c,maxFiles:l}),Re=Ee>0&&!je;return ue(ue({},A),{},{isDragAccept:je,isDragReject:Re,isFocused:L&&!o,getRootProps:xe,getInputProps:Ce,rootRef:E,inputRef:j,open:_e(ce)})}function ve(e,t){switch(t.type){case"focus":return ue(ue({},e),{},{isFocused:!0});case"blur":return ue(ue({},e),{},{isFocused:!1});case"openDialog":return ue(ue({},me),{},{isFileDialogActive:!0});case"closeDialog":return ue(ue({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ue(ue({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ue(ue({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ue({},me);default:return e}}function be(){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(58);function o(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=o(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},i.apply(this,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(165),o=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,i=e.productionPrefix,a=void 0===i?"jss":i,s=e.seed,c=void 0===s?"":s,l=""===c?"":"".concat(c,"-"),u=0,d=function(){return u+=1};return function(e,t){var i=t.options.name;if(i&&0===i.indexOf("Mui")&&!t.options.link&&!n){if(-1!==o.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(l).concat(i,"-").concat(e.key);return t.options.theme[r.a]&&""===c?"".concat(s,"-").concat(d()):s}return"".concat(l).concat(a).concat(d())}}},function(e,t,n){"use strict";var r=n(0),o=n(16),i=n(21),a=n(14),s=n(19);function c(e){return e.substring(2).toLowerCase()}t.a=function(e){var t=e.children,n=e.disableReactTree,l=void 0!==n&&n,u=e.mouseEvent,d=void 0===u?"onClick":u,f=e.onClickAway,h=e.touchEvent,p=void 0===h?"onTouchEnd":h,m=r.useRef(!1),g=r.useRef(null),v=r.useRef(!1),b=r.useRef(!1);r.useEffect((function(){return setTimeout((function(){v.current=!0}),0),function(){v.current=!1}}),[]);var y=r.useCallback((function(e){g.current=o.findDOMNode(e)}),[]),_=Object(a.a)(t.ref,y),w=Object(s.a)((function(e){var t=b.current;if(b.current=!1,v.current&&g.current&&!function(e){return document.documentElement.clientWidth-1;else n=!Object(i.a)(g.current).documentElement.contains(e.target)||g.current.contains(e.target);n||!l&&t||f(e)}})),S=function(e){return function(n){b.current=!0;var r=t.props[e];r&&r(n)}},k={ref:_};return!1!==p&&(k[p]=S(p)),r.useEffect((function(){if(!1!==p){var e=c(p),t=Object(i.a)(g.current),n=function(){m.current=!0};return t.addEventListener(e,w),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,w),t.removeEventListener("touchmove",n)}}}),[w,p]),!1!==d&&(k[d]=S(d)),r.useEffect((function(){if(!1!==d){var e=c(d),t=Object(i.a)(g.current);return t.addEventListener(e,w),function(){t.removeEventListener(e,w)}}}),[w,d]),r.createElement(r.Fragment,null,r.cloneElement(t,k))}},function(e,t,n){"use strict";var r=n(1),o=n(18),i=n(3),a=n(0),s=n(174),c=n(22),l=n(17),u=n(27),d=n(14),f={entering:{opacity:1},entered:{opacity:1}},h={enter:c.b.enteringScreen,exit:c.b.leavingScreen},p=a.forwardRef((function(e,t){var n=e.children,c=e.disableStrictModeCompat,p=void 0!==c&&c,m=e.in,g=e.onEnter,v=e.onEntered,b=e.onEntering,y=e.onExit,_=e.onExited,w=e.onExiting,S=e.style,k=e.TransitionComponent,x=void 0===k?s.a:k,O=e.timeout,C=void 0===O?h:O,E=Object(i.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),j=Object(l.a)(),R=j.unstable_strictMode&&!p,T=a.useRef(null),A=Object(d.a)(n.ref,t),M=Object(d.a)(R?T:void 0,A),L=function(e){return function(t,n){if(e){var r=R?[T.current,t]:[t,n],i=Object(o.a)(r,2),a=i[0],s=i[1];void 0===s?e(a):e(a,s)}}},$=L(b),N=L((function(e,t){Object(u.b)(e);var n=Object(u.a)({style:S,timeout:C},{mode:"enter"});e.style.webkitTransition=j.transitions.create("opacity",n),e.style.transition=j.transitions.create("opacity",n),g&&g(e,t)})),D=L(v),P=L(w),I=L((function(e){var t=Object(u.a)({style:S,timeout:C},{mode:"exit"});e.style.webkitTransition=j.transitions.create("opacity",t),e.style.transition=j.transitions.create("opacity",t),y&&y(e)})),F=L(_);return a.createElement(x,Object(r.a)({appear:!0,in:m,nodeRef:R?T:void 0,onEnter:N,onEntered:D,onEntering:$,onExit:I,onExited:F,onExiting:P,timeout:C},E),(function(e,t){return a.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,visibility:"exited"!==e||m?void 0:"hidden"},f[e],S,n.props.style),ref:M},t))}))}));t.a=p},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(2),s=n(340),c=n(5),l=i.forwardRef((function(e,t){var n=e.disableUnderline,c=e.classes,l=e.fullWidth,u=void 0!==l&&l,d=e.inputComponent,f=void 0===d?"input":d,h=e.multiline,p=void 0!==h&&h,m=e.type,g=void 0===m?"text":m,v=Object(o.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return i.createElement(s.a,Object(r.a)({classes:Object(r.a)({},c,{root:Object(a.a)(c.root,!n&&c.underline),underline:null}),fullWidth:u,inputComponent:f,multiline:p,ref:t,type:g},v))}));l.muiName="Input",t.a=Object(c.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(l)},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(129),a=n(0),s=n(2),c=n(49),l=n(59),u=n(5),d=n(8),f=n(14),h=n(439),p=n(79),m="undefined"===typeof window?a.useEffect:a.useLayoutEffect,g=a.forwardRef((function(e,t){var n=e["aria-describedby"],u=e.autoComplete,g=e.autoFocus,v=e.classes,b=e.className,y=(e.color,e.defaultValue),_=e.disabled,w=e.endAdornment,S=(e.error,e.fullWidth),k=void 0!==S&&S,x=e.id,O=e.inputComponent,C=void 0===O?"input":O,E=e.inputProps,j=void 0===E?{}:E,R=e.inputRef,T=(e.margin,e.multiline),A=void 0!==T&&T,M=e.name,L=e.onBlur,$=e.onChange,N=e.onClick,D=e.onFocus,P=e.onKeyDown,I=e.onKeyUp,F=e.placeholder,z=e.readOnly,W=e.renderSuffix,B=e.rows,H=e.rowsMax,U=e.rowsMin,V=e.maxRows,G=e.minRows,K=e.startAdornment,q=e.type,Y=void 0===q?"text":q,J=e.value,X=Object(r.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),Q=null!=j.value?j.value:J,Z=a.useRef(null!=Q).current,ee=a.useRef(),te=a.useCallback((function(e){0}),[]),ne=Object(f.a)(j.ref,te),re=Object(f.a)(R,ne),oe=Object(f.a)(ee,re),ie=a.useState(!1),ae=ie[0],se=ie[1],ce=Object(l.b)();var le=Object(c.a)({props:e,muiFormControl:ce,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});le.focused=ce?ce.focused:ae,a.useEffect((function(){!ce&&_&&ae&&(se(!1),L&&L())}),[ce,_,ae,L]);var ue=ce&&ce.onFilled,de=ce&&ce.onEmpty,fe=a.useCallback((function(e){Object(p.b)(e)?ue&&ue():de&&de()}),[ue,de]);m((function(){Z&&fe({value:Q})}),[Q,fe,Z]);a.useEffect((function(){fe(ee.current)}),[]);var he=C,pe=Object(o.a)({},j,{ref:oe});"string"!==typeof he?pe=Object(o.a)({inputRef:oe,type:Y},pe,{ref:null}):A?!B||V||G||H||U?(pe=Object(o.a)({minRows:B||G,rowsMax:H,maxRows:V},pe),he=h.a):he="textarea":pe=Object(o.a)({type:Y},pe);return a.useEffect((function(){ce&&ce.setAdornedStart(Boolean(K))}),[ce,K]),a.createElement("div",Object(o.a)({className:Object(s.a)(v.root,v["color".concat(Object(d.a)(le.color||"primary"))],b,le.disabled&&v.disabled,le.error&&v.error,k&&v.fullWidth,le.focused&&v.focused,ce&&v.formControl,A&&v.multiline,K&&v.adornedStart,w&&v.adornedEnd,"dense"===le.margin&&v.marginDense),onClick:function(e){ee.current&&e.currentTarget===e.target&&ee.current.focus(),N&&N(e)},ref:t},X),K,a.createElement(l.a.Provider,{value:null},a.createElement(he,Object(o.a)({"aria-invalid":le.error,"aria-describedby":n,autoComplete:u,autoFocus:g,defaultValue:y,disabled:le.disabled,id:x,onAnimationStart:function(e){fe("mui-auto-fill-cancel"===e.animationName?ee.current:{value:"x"})},name:M,placeholder:F,readOnly:z,required:le.required,rows:B,value:Q,onKeyDown:P,onKeyUp:I},pe,{className:Object(s.a)(v.input,j.className,le.disabled&&v.disabled,A&&v.inputMultiline,le.hiddenLabel&&v.inputHiddenLabel,K&&v.inputAdornedStart,w&&v.inputAdornedEnd,"search"===Y&&v.inputTypeSearch,"dense"===le.margin&&v.inputMarginDense),onBlur:function(e){L&&L(e),j.onBlur&&j.onBlur(e),ce&&ce.onBlur?ce.onBlur(e):se(!1)},onChange:function(e){if(!Z){var t=e.target||ee.current;if(null==t)throw new Error(Object(i.a)(1));fe({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o-1){var o=ge[e];if(!Array.isArray(o))return U+ee(o)in t&&V+o;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i
|/);\r\n if (m) {\r\n const result = [];\r\n let key = 1;\r\n do {\r\n const p = text.split(m[0]);\r\n p[0] && result.push({p[0]});\r\n\r\n if (m[0].startsWith(');\r\n } else {\r\n let href = m[0].match(/href=\"([^\"]+)\"/) || m[0].match(/href='([^']+)'/);\r\n let target = m[0].match(/target=\"([^\"]+)\"/) || m[0].match(/target='([^']+)'/);\r\n let rel = m[0].match(/rel=\"([^\"]+)\"/) || m[0].match(/rel='([^']+)'/);\r\n const title = m[0].match(/>([^<]*){title ? title[1] : ''});\r\n }\r\n\r\n text = p[1];\r\n\r\n m = text && text.match(/|/);\r\n if (!m) {\r\n p[1] && result.push({p[1]});\r\n }\r\n } while (m);\r\n\r\n return result;\r\n } else {\r\n return text;\r\n }\r\n }\r\n\r\n /**\r\n * Get the smart name of the given state.\r\n * @param {Record | ioBroker.StateObject} states\r\n * @param {string} id\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static getSmartName(states, id, instanceId, noCommon) {\r\n if (!id) {\r\n if (!noCommon) {\r\n if (!states.common) {\r\n return states.smartName;\r\n } else {\r\n if (states && !states.common) {\r\n return states.smartName;\r\n } else {\r\n return states.common.smartName;\r\n }\r\n }\r\n } else {\r\n if (states && !states.common) {\r\n return states.smartName;\r\n } else {\r\n return (states &&\r\n states.common &&\r\n states.common.custom &&\r\n states.common.custom[instanceId]) ?\r\n states.common.custom[instanceId].smartName : undefined;\r\n }\r\n }\r\n } else\r\n if (!noCommon) {\r\n return states[id].common.smartName;\r\n } else {\r\n return (states[id] &&\r\n states[id].common &&\r\n states[id].common.custom &&\r\n states[id].common.custom[instanceId]) ?\r\n states[id].common.custom[instanceId].smartName || null : null;\r\n }\r\n }\r\n\r\n /**\r\n * Get the smart name from a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static getSmartNameFromObj(obj, instanceId, noCommon) {\r\n if (!noCommon) {\r\n if (!obj.common) {\r\n return obj.smartName;\r\n } else {\r\n if (obj && !obj.common) {\r\n return obj.smartName;\r\n } else {\r\n return obj.common.smartName;\r\n }\r\n }\r\n } else {\r\n if (obj && !obj.common) {\r\n return obj.smartName;\r\n } else {\r\n return (obj &&\r\n obj.common &&\r\n obj.common.custom &&\r\n obj.common.custom[instanceId]) ?\r\n obj.common.custom[instanceId].smartName : undefined;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Enable smart name for a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static enableSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = {};\r\n } else {\r\n obj.common.smartName = {};\r\n }\r\n }\r\n\r\n /**\r\n * Completely remove smart name from a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string | number} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static removeSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n if (obj.common && obj.common.custom && obj.common.custom[instanceId]) {\r\n obj.common.custom[instanceId] = null;\r\n }\r\n } else {\r\n obj.common.smartName = null;\r\n }\r\n }\r\n\r\n /**\r\n * Update the smartname of a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} newSmartName\r\n * @param {string | undefined} byON\r\n * @param {string | undefined} smartType\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static updateSmartName(obj, newSmartName, byON, smartType, instanceId, noCommon) {\r\n const language = I18n.getLanguage();\r\n\r\n // convert Old format\r\n if (typeof obj.common.smartName === 'string') {\r\n const nnn = obj.common.smartName;\r\n obj.common.smartName = {};\r\n obj.common.smartName[language] = nnn;\r\n }\r\n\r\n // convert old settings\r\n if (obj.native && obj.native.byON) {\r\n delete obj.native.byON;\r\n let _smartName = obj.common.smartName;\r\n\r\n if (!_smartName || typeof _smartName !== 'object') {\r\n _smartName = {en: _smartName};\r\n _smartName[language] = _smartName.en;\r\n }\r\n obj.common.smartName = _smartName;\r\n }\r\n if (smartType !== undefined) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n if (!smartType) {\r\n delete obj.common.custom[instanceId].smartName.smartType;\r\n } else {\r\n obj.common.custom[instanceId].smartName.smartType = smartType;\r\n }\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n if (!smartType) {\r\n delete obj.common.smartName.smartType;\r\n } else {\r\n obj.common.smartName.smartType = smartType;\r\n }\r\n\r\n }\r\n }\r\n if (byON !== undefined) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n obj.common.custom[instanceId].smartName.byON = byON;\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n obj.common.smartName.byON = byON;\r\n }\r\n }\r\n if (newSmartName !== undefined) {\r\n let smartName;\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = obj.common.custom[instanceId].smartName || {};\r\n smartName = obj.common.custom[instanceId].smartName;\r\n } else {\r\n obj.common.smartName = obj.common.smartName || {};\r\n smartName = obj.common.smartName;\r\n }\r\n smartName[language] = newSmartName;\r\n\r\n // If smart name deleted\r\n if (smartName && (!smartName[language] ||\r\n (smartName[language] === obj.common.name &&\r\n (!obj.common.role || obj.common.role.indexOf('button') >= 0)))) {\r\n delete smartName[language];\r\n let empty = true;\r\n // Check if structure has any definitions\r\n for (const key in smartName) {\r\n if (smartName.hasOwnProperty(key)) {\r\n empty = false;\r\n break;\r\n }\r\n }\r\n // If empty => delete smartName completely\r\n if (empty) {\r\n if (noCommon) {\r\n if (obj.common.custom[instanceId].smartName.byON === undefined) {\r\n delete obj.common.custom[instanceId];\r\n } else {\r\n delete obj.common.custom[instanceId].en;\r\n delete obj.common.custom[instanceId].de;\r\n delete obj.common.custom[instanceId].ru;\r\n delete obj.common.custom[instanceId].nl;\r\n delete obj.common.custom[instanceId].pl;\r\n delete obj.common.custom[instanceId].it;\r\n delete obj.common.custom[instanceId].fr;\r\n delete obj.common.custom[instanceId].pt;\r\n delete obj.common.custom[instanceId].es;\r\n delete obj.common.custom[instanceId]['zh-cn'];\r\n }\r\n } else {\r\n if (obj.common.smartName.byON !== undefined) {\r\n delete obj.common.smartName.en;\r\n delete obj.common.smartName.de;\r\n delete obj.common.smartName.ru;\r\n delete obj.common.smartName.nl;\r\n delete obj.common.smartName.pl;\r\n delete obj.common.smartName.it;\r\n delete obj.common.smartName.fr;\r\n delete obj.common.smartName.pt;\r\n delete obj.common.smartName.es;\r\n delete obj.common.smartName['zh-cn'];\r\n } else {\r\n obj.common.smartName = null;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Disable the smart name of a state.\r\n * @param {ioBroker.StateObject} obj\r\n * @param {string} instanceId\r\n * @param {boolean} [noCommon]\r\n */\r\n static disableSmartName(obj, instanceId, noCommon) {\r\n if (noCommon) {\r\n obj.common.custom = obj.common.custom || {};\r\n obj.common.custom[instanceId] = obj.common.custom[instanceId] || {};\r\n obj.common.custom[instanceId].smartName = false;\r\n } else {\r\n obj.common.smartName = false;\r\n }\r\n }\r\n\r\n /**\r\n * Copy text to the clipboard.\r\n * @param {string} text\r\n * @param {Event} [e]\r\n */\r\n static copyToClipboard(text, e) {\r\n const el = window.document.createElement('textarea');\r\n el.value = text;\r\n window.document.body.appendChild(el);\r\n el.select();\r\n window.document.execCommand('copy');\r\n window.document.body.removeChild(el);\r\n console.log(text);\r\n e && e.stopPropagation();\r\n e && e.preventDefault();\r\n }\r\n\r\n /**\r\n * Gets the extension of a file name.\r\n * @param {string | null} [fileName] the file name.\r\n * @returns {string | null} The extension in lower case.\r\n */\r\n static getFileExtension(fileName) {\r\n const pos = (fileName || '').lastIndexOf('.');\r\n if (pos !== -1) {\r\n return fileName.substring(pos + 1).toLowerCase();\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Format number of bytes as a string with B, KB, MB or GB.\r\n * The base for all calculations is 1024.\r\n * @param {number} bytes The number of bytes.\r\n * @returns {string} The formatted string (e.g. '723.5 KB')\r\n */\r\n static formatBytes(bytes) {\r\n if (Math.abs(bytes) < 1024) {\r\n return bytes + ' B';\r\n }\r\n\r\n const units = ['KB','MB','GB'];\r\n //const units = ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];\r\n let u = -1;\r\n\r\n do {\r\n bytes /= 1024;\r\n ++u;\r\n } while (Math.abs(bytes) >= 1024 && u < units.length - 1);\r\n\r\n return bytes.toFixed(1) + ' ' + units[u];\r\n }\r\n\r\n /**\r\n * Invert the given color according to theme type to get the inverted text color for background\r\n * @param {string} color Color in the format '#rrggbb' or '#rgb' (or without hash)\r\n * @param {string} themeType theme type\r\n * @param {string} invert dark theme has light color in control or light theme has light color in control\r\n * @returns {string}\r\n */\r\n static getInvertedColor(color, themeType, invert) {\r\n if (!color) {\r\n return undefined;\r\n } else {\r\n const invertedColor = Utils.invertColor(color, true);\r\n if (invertedColor === '#FFFFFF' && (themeType === 'dark' || (invert && themeType === 'light'))) {\r\n return '#DDD';\r\n } else\r\n if (invertedColor === '#000000' && (themeType === 'light' || (invert && themeType === 'dark'))) {\r\n return '#222';\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n }\r\n\r\n // Big thanks to: https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color\r\n /**\r\n * Invert the given color\r\n * @param {string} hex Color in the format '#rrggbb' or '#rgb' (or without hash)\r\n * @param {boolean} bw Set to black or white.\r\n * @returns {string}\r\n */\r\n static invertColor(hex, bw) {\r\n if (hex === undefined || hex === null || hex === '' || typeof hex !== 'string') {\r\n return '';\r\n }\r\n if (hex.startsWith('rgba')) {\r\n const m = hex.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*([.\\d]+)\\)/);\r\n if (m) {\r\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0');\r\n }\r\n } else if (hex.startsWith('rgba')) {\r\n const m = hex.match(/rgb?\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)/);\r\n if (m) {\r\n hex = parseInt(m[1], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0') +\r\n parseInt(m[2], 10).toString(16).padStart(2, '0');\r\n }\r\n } else\r\n if (hex.startsWith('#')) {\r\n hex = hex.slice(1);\r\n }\r\n // convert 3-digit hex to 6-digits.\r\n if (hex.length === 3) {\r\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\r\n }\r\n if (hex.length !== 6) {\r\n console.warn('Cannot invert color: ' + hex);\r\n return hex;\r\n }\r\n let r = parseInt(hex.slice(0, 2), 16);\r\n let g = parseInt(hex.slice(2, 4), 16);\r\n let b = parseInt(hex.slice(4, 6), 16);\r\n\r\n if (bw) {\r\n // http://stackoverflow.com/a/3943023/112731\r\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\r\n ? '#000000'\r\n : '#FFFFFF';\r\n }\r\n // invert color components\r\n r = (255 - r).toString(16);\r\n g = (255 - g).toString(16);\r\n b = (255 - b).toString(16);\r\n // pad each with zeros and return\r\n return '#' + r.padStart(2, '0') + g.padStart(2, '0') + b.padStart(2, '0');\r\n }\r\n\r\n // https://github.com/lukeed/clsx/blob/master/src/index.js\r\n // License\r\n // MIT © Luke Edwards\r\n /**\r\n * @private\r\n * @param {any} mix\r\n * @returns {string}\r\n */\r\n static _toVal(mix) {\r\n let k, y, str='';\r\n\r\n if (typeof mix === 'string' || typeof mix === 'number') {\r\n str += mix;\r\n } else if (typeof mix === 'object') {\r\n if (Array.isArray(mix)) {\r\n for (k=0; k < mix.length; k++) {\r\n if (mix[k]) {\r\n if ((y = Utils._toVal(mix[k]))) {\r\n str && (str += ' ');\r\n str += y;\r\n }\r\n }\r\n }\r\n } else {\r\n for (k in mix) {\r\n if (mix[k]) {\r\n str && (str += ' ');\r\n str += k;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n // https://github.com/lukeed/clsx/blob/master/src/index.js\r\n // License\r\n // MIT © Luke Edwards\r\n /**\r\n * Convert any object to a string with its values.\r\n * @returns {string}\r\n */\r\n static clsx () {\r\n let i = 0;\r\n let tmp;\r\n let x;\r\n let str = '';\r\n while (i < arguments.length) {\r\n if ((tmp = arguments[i++])) {\r\n if ((x = Utils._toVal(tmp))) {\r\n str && (str += ' ');\r\n str += x\r\n }\r\n }\r\n }\r\n return str;\r\n }\r\n\r\n /**\r\n * Get the current theme name (either from local storage or the browser settings).\r\n * @param {string} [themeName]\r\n * @returns {string}\r\n */\r\n static getThemeName(themeName = '') {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return window.vendorPrefix;\r\n }\r\n\r\n return themeName ? themeName : window.localStorage && window.localStorage.getItem('App.themeName') ?\r\n window.localStorage.getItem('App.themeName') : window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'colored';\r\n }\r\n\r\n /**\r\n * Get the type of theme.\r\n * @param {string} [themeName]\r\n * @returns {'dark' | 'light'}\r\n */\r\n static getThemeType(themeName = '') {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return 'light';\r\n }\r\n\r\n themeName = themeName || (window.localStorage && window.localStorage.getItem('App.themeName'));\r\n return themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light';\r\n }\r\n\r\n /**\r\n * Set the theme name and theme type.\r\n * @param {string} themeName\r\n */\r\n static setThemeName(themeName) {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return; // ignore\r\n }\r\n window.localStorage.setItem('App.themeName', themeName);\r\n window.localStorage.setItem('App.theme', themeName === 'dark' || themeName === 'blue' ? 'dark' : 'light');\r\n }\r\n\r\n /**\r\n * Toggle the theme name between 'dark' and 'colored'.\r\n * @param {string | null} themeName\r\n * @returns {string} the new theme name.\r\n */\r\n static toggleTheme(themeName) {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return window.vendorPrefix;\r\n }\r\n themeName = themeName || (window.localStorage && window.localStorage.getItem('App.themeName'));\r\n\r\n // dark => blue => colored => light => dark\r\n const themes = Utils.getThemeNames();\r\n const pos = themes.indexOf(themeName);\r\n let newTheme;\r\n if (pos !== -1) {\r\n newTheme = themes[(pos + 1) % themes.length];\r\n } else {\r\n newTheme = themes[0];\r\n }\r\n Utils.setThemeName(newTheme);\r\n\r\n return newTheme;\r\n }\r\n\r\n /**\r\n * Get the list of themes\r\n * @returns {array} list of possible themes\r\n */\r\n static getThemeNames() {\r\n if (window.vendorPrefix && window.vendorPrefix !== '@@vendorPrefix@@') {\r\n return [window.vendorPrefix];\r\n }\r\n\r\n return ['light', 'dark', 'blue', 'colored'];\r\n }\r\n\r\n /**\r\n * Parse a query string into its parts.\r\n * @param {string} query\r\n * @returns {Record}\r\n */\r\n static parseQuery(query) {\r\n query = (query || '').toString().replace(/^\\?/, '');\r\n /** @type {Record} */\r\n const result = {};\r\n query.split('&').forEach(part => {\r\n part = part.trim();\r\n if (part) {\r\n const parts = part.split('=');\r\n const attr = decodeURIComponent(parts[0]).trim();\r\n if (parts.length > 1) {\r\n result[attr] = decodeURIComponent(parts[1]);\r\n if (result[attr] === 'true') {\r\n result[attr] = true;\r\n } else if (result[attr] === 'false') {\r\n result[attr] = false;\r\n } else {\r\n const f = parseFloat(result[attr]);\r\n if (f.toString() === result[attr]) {\r\n result[attr] = f;\r\n }\r\n }\r\n } else {\r\n result[attr] = true;\r\n }\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns parent ID.\r\n * @param {string} id\r\n * @returns {string | null} parent ID or null if no parent\r\n */\r\n static getParentId(id) {\r\n const p = (id || '').toString().split('.');\r\n if (p.length > 1) {\r\n p.pop();\r\n return p.join('.');\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n static formatDate(dateObj, dateFormat) {\r\n // format could be DD.MM.YYYY, YYYY.MM.DD or MM/DD/YYYY\r\n\r\n if (!dateObj) {\r\n return '';\r\n }\r\n\r\n let text;\r\n let mm = dateObj.getMonth() + 1;\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n\r\n let dd = dateObj.getDate();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n\r\n if (dateFormat === 'MM/DD/YYYY') {\r\n text = mm + '/' + dd + '/' + dateObj.getFullYear();\r\n } else {\r\n text = dateObj.getFullYear() + '-' + mm + '-' + dd;\r\n }\r\n\r\n // time\r\n let v = dateObj.getHours();\r\n if (v < 10) {\r\n text += ' 0' + v;\r\n } else {\r\n text += ' ' + v;\r\n }\r\n v = dateObj.getMinutes();\r\n if (v < 10) {\r\n text += ':0' + v;\r\n } else {\r\n text += ':' + v;\r\n }\r\n\r\n v = dateObj.getSeconds();\r\n if (v < 10) {\r\n text += ':0' + v;\r\n } else {\r\n text += ':' + v;\r\n }\r\n\r\n v = dateObj.getMilliseconds();\r\n if (v < 10) {\r\n text += '.00' + v;\r\n } else if (v < 100) {\r\n text += '.0' + v;\r\n } else {\r\n text += '.' + v;\r\n }\r\n\r\n return text;\r\n }\r\n\r\n static formatTime(seconds) {\r\n if (seconds) {\r\n seconds = Math.round(seconds);\r\n const d = Math.floor(seconds / (3600 * 24));\r\n const h = Math.floor((seconds % (3600 * 24)) / 3600);\r\n const m = Math.floor((seconds % 3600) / 60);\r\n const s = seconds % 60;\r\n if (d) {\r\n return `${d}.${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n } else if (h) {\r\n return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n } else {\r\n return `0:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;\r\n }\r\n } else {\r\n return '0:00:00';\r\n }\r\n }\r\n\r\n static MDtext2link(text) {\r\n const m = text.match(/\\d+\\.\\)\\s/);\r\n if (m) {\r\n text = text.replace(m[0], m[0].replace(/\\s/, ' '));\r\n }\r\n\r\n return text.replace(/[^a-zA-Zа-яА-Я0-9]/g, '').trim().replace(/\\s/g, '').toLowerCase();\r\n }\r\n\r\n static openLink(url, target) {\r\n if (target === 'this') {\r\n window.location = url;\r\n } else {\r\n window.open(url, target || '_blank');\r\n }\r\n }\r\n\r\n static MDgetTitle(text) {\r\n let {body, header} = Utils.extractHeader(text);\r\n if (!header.title) {\r\n // remove {docsify-bla}\r\n body = body.replace(/{[^}]*}/g, '');\r\n body = body.trim();\r\n const lines = body.replace(/\\r/g, '').split('\\n');\r\n for (let i = 0; i < lines.length; i++) {\r\n if (lines[i].startsWith('# ')) {\r\n return lines[i].substring(2).trim();\r\n }\r\n }\r\n return '';\r\n } else {\r\n return header.title;\r\n }\r\n }\r\n\r\n static MDextractHeader(text) {\r\n const attrs = {};\r\n if (text.substring(0, 3) === '---') {\r\n const pos = text.substring(3).indexOf('\\n---');\r\n if (pos !== -1) {\r\n const _header = text.substring(3, pos + 3);\r\n const lines = _header.replace(/\\r/g, '').split('\\n');\r\n lines.forEach(line => {\r\n if (!line.trim()) {\r\n return;\r\n }\r\n const pos = line.indexOf(':');\r\n if (pos !== -1) {\r\n const attr = line.substring(0, pos).trim();\r\n attrs[attr] = line.substring(pos + 1).trim();\r\n attrs[attr] = attrs[attr].replace(/^['\"]|['\"]$/g, '');\r\n if (attrs[attr] === 'true') {\r\n attrs[attr] = true;\r\n } else if (attrs[attr] === 'false') {\r\n attrs[attr] = false;\r\n } else if (parseFloat(attrs[attr]).toString() === attrs[attr]) {\r\n attrs[attr] = parseFloat(attrs[attr]);\r\n }\r\n } else {\r\n attrs[line.trim()] = true;\r\n }\r\n });\r\n text = text.substring(pos + 7);\r\n }\r\n }\r\n return {header: attrs, body: text};\r\n }\r\n\r\n static MDremoveDocsify(text) {\r\n const m = text.match(/{docsify-[^}]*}/g);\r\n if (m) {\r\n m.forEach(doc => text = text.replace(doc, ''));\r\n }\r\n return text;\r\n }\r\n\r\n /**\r\n * Generate the json file on the file for download.\r\n * @param {string} filename file name\r\n * @returns {object} json structure (not stringified)\r\n */\r\n static generateFile(filename, json) {\r\n let el = document.createElement('a');\r\n el.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(json, null, 2)));\r\n el.setAttribute('download', filename);\r\n\r\n el.style.display = 'none';\r\n document.body.appendChild(el);\r\n\r\n el.click();\r\n\r\n document.body.removeChild(el);\r\n }\r\n\r\n /**\r\n * Convert quality code into text\r\n * @param {number} quality code\r\n * @returns {array} lines that decode qulity\r\n */\r\n static quality2text(quality) {\r\n const custom = quality & 0xFFFF0000;\r\n const text = QUALITY_BITS[quality];\r\n let result;\r\n if (text) {\r\n result = [text];\r\n } else if (quality & 0x01) {\r\n result = [QUALITY_BITS[0x01], '0x' + (quality & (0xFFFF & ~1)).toString(16)];\r\n } else if (quality & 0x02) {\r\n result = [QUALITY_BITS[0x02], '0x' + (quality & (0xFFFF & ~2)).toString(16)];\r\n } else {\r\n result = ['0x' + quality.toString(16)];\r\n }\r\n if (custom) {\r\n result.push('0x' + (custom >> 16).toString(16).toUpperCase());\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Deep copy object\r\n * @param {object} object\r\n * @returns {object}\r\n */\r\n static clone(object) {\r\n return JSON.parse(JSON.stringify(object));\r\n }\r\n\r\n /**\r\n * Get states of object\r\n * @param {object} obj\r\n * @returns {object} states as an object in form {\"value1\": \"label1\", \"value2\": \"label2\"} or null\r\n */\r\n static getStates(obj) {\r\n let states = obj?.common?.states;\r\n if (states) {\r\n if (typeof states === 'string' && states[0] === '{') {\r\n try {\r\n states = JSON.parse(states);\r\n } catch (ex) {\r\n console.error(`Cannot parse states: ${states}`);\r\n states = null;\r\n }\r\n } else\r\n // if old format val1:text1;val2:text2\r\n if (typeof states === 'string') {\r\n const parts = states.split(';');\r\n states = {};\r\n for (let p = 0; p < parts.length; p++) {\r\n const s = parts[p].split(':');\r\n states[s[0]] = s[1];\r\n }\r\n } else if (Array.isArray(states)) {\r\n const result = {};\r\n states.forEach((value, key) => result[key] = value);\r\n return result;\r\n }\r\n }\r\n return states;\r\n }\r\n\r\n /**\r\n * Get svg file as text\r\n * @param {string} url URL of SVG file\r\n * @returns {object} Promise with \"data:image...\"\r\n */\r\n static getSvg(url) {\r\n return fetch(url)\r\n .then(response => response.blob())\r\n .then(blob => {\r\n return new Promise(resolve => {\r\n const reader = new FileReader();\r\n reader.onload = function() { // do not optimize this function. \"this\" is important.\r\n resolve(this.result);\r\n };\r\n reader.readAsDataURL(blob);\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport default Utils;\r\n","import * as React from 'react';\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nexport default function useId(idOverride) {\n var _React$useState = React.useState(idOverride),\n defaultId = _React$useState[0],\n setDefaultId = _React$useState[1];\n\n var id = idOverride || defaultId;\n React.useEffect(function () {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the random value for client-side rendering only.\n // We can't use it server-side.\n setDefaultId(\"mui-\".concat(Math.round(Math.random() * 1e5)));\n }\n }, [defaultId]);\n return id;\n}","import { deepmerge } from '@material-ui/utils';\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n\n });\n}\n\nexport default merge;","export { default } from './Button';","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc.defaultView || window;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/**\n * This module mostly exists for optimizations in the build process\n * through rollup and terser. We define some global constants which\n * are normally undefined. However terser overrides these with global\n * definitions which can be evaluated by the static analyzer when\n * creating a bundle.\n *\n * In turn the `isDebugBuild` and `isBrowserBundle` functions are pure\n * and can help us remove unused code from the bundles.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\ndeclare const __SENTRY_NO_DEBUG__: boolean | undefined;\n\n/**\n * Figures out if we're building with debug functionality.\n *\n * @returns true if this is a debug build\n */\nexport function isDebugBuild(): boolean {\n return typeof __SENTRY_NO_DEBUG__ !== 'undefined' && !__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n","import defineProperty from \"./defineProperty.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","export { default } from './Dialog';","export { default } from './DialogActions';","export { default } from './DialogContent';","export { default } from './DialogContentText';","export { default } from './DialogTitle';","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return _extends({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return _extends({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, _defineProperty({}, breakpoints.up('sm'), _extends({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, _defineProperty(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), _defineProperty(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\nimport { deepmerge } from '@material-ui/utils';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport indigo from '../colors/indigo';\nimport pink from '../colors/pink';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport green from '../colors/green';\nimport { darken, getContrastRatio, lighten } from './colorManipulator';\nexport var light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: grey[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport var dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: grey[800],\n default: '#303030'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\n\nexport default function createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: indigo[300],\n main: indigo[500],\n dark: indigo[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: pink.A200,\n main: pink.A400,\n dark: pink.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: red[300],\n main: red[500],\n dark: red[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: orange[300],\n main: orange[500],\n dark: orange[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: blue[300],\n main: blue[500],\n dark: blue[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: green[300],\n main: green[500],\n dark: green[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = _objectWithoutProperties(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n\n function getContrastText(background) {\n var contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = getContrastRatio(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = _extends({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : _formatMuiErrorMessage(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: common,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nexport default function createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = _objectWithoutProperties(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return _extends({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return deepmerge(_extends({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","var shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","var shape = {\n borderRadius: 4\n};\nexport default shape;","import { createUnarySpacing } from '@material-ui/system';\nvar warnOnce;\nexport default function createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = createUnarySpacing({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\nimport createBreakpoints from './createBreakpoints';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport transitions from './transitions';\nimport zIndex from './zIndex';\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = _objectWithoutProperties(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n\n var palette = createPalette(paletteInput);\n var breakpoints = createBreakpoints(breakpointsInput);\n var spacing = createSpacing(spacingInput);\n var muiTheme = deepmerge({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: createMixins(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: shadows,\n typography: createTypography(palette, typographyInput),\n spacing: spacing,\n shape: shape,\n transitions: transitions,\n zIndex: zIndex\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return deepmerge(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: _defineProperty({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\nexport function createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\nexport default createTheme;","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","var common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj) {\n var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\"\n}), 'Delete');\n\nexports.default = _default;","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\nexport default isBrowser;\n","import { isRegExp, isString } from './is';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function safeJoin(input: any[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value: string, pattern: RegExp | string): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return (pattern as RegExp).test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n\n/**\n * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to\n * `new RegExp()`.\n *\n * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime\n * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node\n * 12+).\n *\n * @param regexString The string to escape\n * @returns An version of the string with all special regex characters escaped\n */\nexport function escapeStringForRegex(regexString: string): string {\n // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems\n // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.\n return regexString.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n","export { default } from './FormControl';\nexport { default as useFormControl } from './useFormControl';","export { default } from './Modal';\nexport { default as ModalManager } from './ModalManager';","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport PropTypes from 'prop-types';\nimport merge from './merge'; // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nvar values = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n};\nvar defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: function up(key) {\n return \"@media (min-width:\".concat(values[key], \"px)\");\n }\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n if (process.env.NODE_ENV !== 'production') {\n if (!props.theme) {\n console.error('Material-UI: You are calling a style function without a theme value.');\n }\n }\n\n if (Array.isArray(propValue)) {\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n return propValue.reduce(function (acc, item, index) {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (_typeof(propValue) === 'object') {\n var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n\n return Object.keys(propValue).reduce(function (acc, breakpoint) {\n acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);\n return acc;\n }, {});\n }\n\n var output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var base = styleFunction(props);\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n var extended = themeBreakpoints.keys.reduce(function (acc, key) {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme: props.theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return merge(base, extended);\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n\nexport default breakpoints;","import React from 'react';\nimport { ProviderContext } from '.';\n\n// @ts-ignore\nexport default React.createContext();\n","import Slide from '@material-ui/core/Slide';\nimport { SnackbarClassKey } from '@material-ui/core/Snackbar';\nimport { CloseReason, ContainerClassKey, SnackbarProviderProps, VariantType, SnackbarOrigin, VariantClassKey } from '../index';\nimport { SnackbarItemProps } from '../SnackbarItem';\nimport { Snack } from '../SnackbarProvider';\n\nexport const allClasses: {\n mui: Record;\n container: Record;\n} = {\n mui: {\n root: {},\n anchorOriginTopCenter: {},\n anchorOriginBottomCenter: {},\n anchorOriginTopRight: {},\n anchorOriginBottomRight: {},\n anchorOriginTopLeft: {},\n anchorOriginBottomLeft: {},\n },\n container: {\n containerRoot: {},\n containerAnchorOriginTopCenter: {},\n containerAnchorOriginBottomCenter: {},\n containerAnchorOriginTopRight: {},\n containerAnchorOriginBottomRight: {},\n containerAnchorOriginTopLeft: {},\n containerAnchorOriginBottomLeft: {},\n },\n};\n\nexport const MESSAGES = {\n NO_PERSIST_ALL: 'WARNING - notistack: Reached maxSnack while all enqueued snackbars have \\'persist\\' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented.',\n};\n\nexport const SNACKBAR_INDENTS = {\n view: { default: 20, dense: 4 },\n snackbar: { default: 6, dense: 2 },\n};\n\nexport const DEFAULTS = {\n maxSnack: 3,\n dense: false,\n hideIconVariant: false,\n variant: 'default' as VariantType,\n autoHideDuration: 5000,\n anchorOrigin: { vertical: 'bottom', horizontal: 'left' } as SnackbarOrigin,\n TransitionComponent: Slide,\n transitionDuration: {\n enter: 225,\n exit: 195,\n },\n};\n\nexport const capitalise = (text: string): string => text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const originKeyExtractor = (anchor: Snack['anchorOrigin']): string => (\n `${capitalise(anchor.vertical)}${capitalise(anchor.horizontal)}`\n);\n\n/**\n * Omit SnackbarContainer class keys that are not needed for SnackbarItem\n */\nexport const omitContainerKeys = (classes: SnackbarProviderProps['classes']): SnackbarItemProps['classes'] => (\n // @ts-ignore\n Object.keys(classes).filter(key => !allClasses.container[key]).reduce((obj, key) => ({ ...obj, [key]: classes[key] }), {})\n);\n\nexport const REASONS: { [key: string]: CloseReason } = {\n TIMEOUT: 'timeout',\n CLICKAWAY: 'clickaway',\n MAXSNACK: 'maxsnack',\n INSTRUCTED: 'instructed',\n};\n\n/** Tranforms classes name */\nexport const transformer = {\n toContainerAnchorOrigin: (origin: string) => `containerAnchorOrigin${origin}` as ContainerClassKey,\n toAnchorOrigin: ({ vertical, horizontal }: SnackbarOrigin) => (\n `anchorOrigin${capitalise(vertical)}${capitalise(horizontal)}` as SnackbarClassKey\n ),\n toVariant: (variant: VariantType) => `variant${capitalise(variant)}` as VariantClassKey,\n};\n\nexport const isDefined = (value: string | null | undefined | number): boolean => (!!value || value === 0);\n\nconst numberOrNull = (numberish?: number | null) => (\n typeof numberish === 'number' || numberish === null\n);\n\n// @ts-ignore\nexport const merge = (options, props, defaults) => (name: keyof Snack): any => {\n if (name === 'autoHideDuration') {\n if (numberOrNull(options.autoHideDuration)) return options.autoHideDuration;\n if (numberOrNull(props.autoHideDuration)) return props.autoHideDuration;\n return DEFAULTS.autoHideDuration;\n }\n\n return options[name] || props[name] || defaults[name];\n};\n\nexport function objectMerge(options = {}, props = {}, defaults = {}) {\n return {\n ...defaults,\n ...props,\n ...options,\n };\n}\n","import React, { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport { createStyles, Theme, withStyles, WithStyles } from '@material-ui/core/styles';\nimport { SnackbarContentProps } from '../index';\n\nconst styles = (theme: Theme) => createStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n flexGrow: 1,\n [theme.breakpoints.up('sm')]: {\n flexGrow: 'initial',\n minWidth: 288,\n },\n }\n});\n\ninterface Props extends WithStyles, SnackbarContentProps { }\n\nconst SnackbarContent = forwardRef(({ classes, className, ...props }, ref) => (\n
\n))\n\nexport default withStyles(styles)(SnackbarContent);\n","import { Snack } from '../SnackbarProvider';\n\nconst DIRECTION = {\n right: 'left',\n left: 'right',\n bottom: 'up',\n top: 'down',\n} as const;\nexport type DirectionType = typeof DIRECTION[keyof typeof DIRECTION]\n\nexport const getTransitionDirection = (anchorOrigin: Snack['anchorOrigin']): DirectionType => {\n if (anchorOrigin.horizontal !== 'center') {\n return DIRECTION[anchorOrigin.horizontal];\n }\n return DIRECTION[anchorOrigin.vertical];\n};\n","import React from 'react';\nimport SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';\nimport { IconVariant } from '../index';\n\ntype Icon = (props: SvgIconProps) => JSX.Element;\n\nconst CheckIcon: Icon = props => (\n \n \n \n);\n\nconst WarningIcon: Icon = props => (\n \n \n \n);\n\nconst ErrorIcon: Icon = props => (\n \n \n \n);\n\nconst InfoIcon: Icon = props => (\n \n \n \n);\n\nconst iconStyles = {\n fontSize: 20,\n marginInlineEnd: 8,\n};\n\nconst defaultIconVariants: IconVariant = {\n default: undefined,\n success: ,\n warning: ,\n error: ,\n info: ,\n};\n\nexport default defaultIconVariants;\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/createChainedFunction.js\n */\nexport default function createChainedFunction(funcs, extraArg) {\n return funcs.reduce((acc, func) => {\n if (func == null) return acc;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof func !== 'function') {\n // eslint-disable-next-line no-console\n console.error('Invalid Argument Type. must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction(...args) {\n const argums = [...args];\n if (extraArg && argums.indexOf(extraArg) === -1) {\n argums.push(extraArg);\n }\n acc.apply(this, argums);\n func.apply(this, argums);\n };\n }, () => { });\n}\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/utils/useEventCallback.js\n */\nimport * as React from 'react';\n\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\nexport default function useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useCallback((...args) => (0, ref.current)(...args), []);\n}\n","/**\n * @link https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Snackbar/Snackbar.js\n */\nimport * as React from 'react';\nimport ClickAwayListener from '@material-ui/core/ClickAwayListener';\nimport { REASONS } from '../utils/constants';\nimport useEventCallback from '../utils/useEventCallback';\n\nconst Snackbar = React.forwardRef((props, ref) => {\n const {\n children,\n autoHideDuration,\n ClickAwayListenerProps,\n disableWindowBlurListener = false,\n onClose,\n onMouseEnter,\n onMouseLeave,\n open,\n resumeHideDuration,\n ...other\n } = props;\n\n const timerAutoHide = React.useRef();\n\n const handleClose = useEventCallback((...args) => {\n if (onClose) {\n onClose(...args);\n }\n });\n\n const setAutoHideTimer = useEventCallback((autoHideDurationParam) => {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(() => {\n handleClose(null, REASONS.TIMEOUT);\n }, autoHideDurationParam);\n });\n\n React.useEffect(() => {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return () => {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]);\n\n /**\n * Pause the timer when the user is interacting with the Snackbar\n * or when the user hide the window.\n */\n const handlePause = () => {\n clearTimeout(timerAutoHide.current);\n };\n\n /**\n * Restart the timer when the user is no longer interacting with the Snackbar\n * or when the window is shown back.\n */\n const handleResume = React.useCallback(() => {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n const handleMouseEnter = (event) => {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n handlePause();\n };\n\n const handleMouseLeave = (event) => {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n handleResume();\n };\n\n const handleClickAway = (event) => {\n if (onClose) {\n onClose(event, REASONS.CLICKAWAY);\n }\n };\n\n React.useEffect(() => {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n\n return () => {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]);\n\n return (\n \n
\n {children}\n
\n
\n );\n});\n\nexport default Snackbar;\n","import React, { useState, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport { withStyles, WithStyles, createStyles, Theme, emphasize } from '@material-ui/core/styles';\nimport Collapse from '@material-ui/core/Collapse';\nimport SnackbarContent from '../SnackbarContent';\nimport { getTransitionDirection } from './SnackbarItem.util';\nimport { allClasses, REASONS, objectMerge, DEFAULTS, transformer } from '../utils/constants';\nimport { SharedProps, RequiredBy, TransitionHandlerProps, SnackbarProviderProps as ProviderProps } from '../index';\nimport defaultIconVariants from '../utils/defaultIconVariants';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport { Snack } from '../SnackbarProvider';\nimport Snackbar from './Snackbar';\n\nconst styles = (theme: Theme) => {\n // @ts-ignore\n const mode = theme.palette.mode || theme.palette.type;\n const backgroundColor = emphasize(theme.palette.background.default, mode === 'light' ? 0.8 : 0.98);\n return createStyles({\n ...allClasses.mui,\n contentRoot: {\n ...theme.typography.body2,\n backgroundColor,\n color: theme.palette.getContrastText(backgroundColor),\n alignItems: 'center',\n padding: '6px 16px',\n borderRadius: '4px',\n boxShadow: '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)',\n },\n lessPadding: {\n paddingLeft: 8 * 2.5,\n },\n variantSuccess: {\n backgroundColor: '#43a047', // green\n color: '#fff',\n },\n variantError: {\n backgroundColor: '#d32f2f', // dark red\n color: '#fff',\n },\n variantInfo: {\n backgroundColor: '#2196f3', // nice blue\n color: '#fff',\n },\n variantWarning: {\n backgroundColor: '#ff9800', // amber\n color: '#fff',\n },\n message: {\n display: 'flex',\n alignItems: 'center',\n padding: '8px 0',\n },\n action: {\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: 16,\n marginRight: -8,\n },\n wrappedRoot: {\n position: 'relative',\n transform: 'translateX(0)',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n },\n });\n}\n\n\ntype RemovedProps =\n | 'variant' // the one received from Provider is processed and passed to snack prop \n | 'anchorOrigin' // same as above\n | 'autoHideDuration' // same as above\n | 'preventDuplicate' // the one recevied from enqueueSnackbar is processed in provider, therefore shouldn't be passed to SnackbarItem */\n\n\nexport interface SnackbarItemProps extends WithStyles, RequiredBy, 'onEntered' | 'onExited' | 'onClose'> {\n snack: Snack;\n dense: ProviderProps['dense'];\n iconVariant: ProviderProps['iconVariant'];\n hideIconVariant: ProviderProps['hideIconVariant'];\n}\n\nconst SnackbarItem: React.FC = ({ classes, ...props }) => {\n const timeout = useRef>();\n const [collapsed, setCollapsed] = useState(true);\n\n useEffect(() => (): void => {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n }, []);\n\n const handleClose = createChainedFunction([props.snack.onClose, props.onClose], props.snack.key);\n\n const handleEntered: TransitionHandlerProps['onEntered'] = () => {\n if (props.snack.requestClose) {\n handleClose(null, REASONS.INSTRCUTED);\n }\n };\n\n const handleExitedScreen = (): void => {\n timeout.current = setTimeout(() => {\n setCollapsed(!collapsed);\n }, 125);\n };\n\n const {\n style,\n dense,\n ariaAttributes: otherAriaAttributes,\n className: otherClassName,\n hideIconVariant,\n iconVariant,\n snack,\n action: otherAction,\n content: otherContent,\n TransitionComponent: otherTranComponent,\n TransitionProps: otherTranProps,\n transitionDuration: otherTranDuration,\n onEnter: ignoredOnEnter,\n onEntered: ignoredOnEntered,\n onEntering: ignoredOnEntering,\n onExit: ignoredOnExit,\n onExited: ignoredOnExited,\n onExiting: ignoredOnExiting,\n ...other\n } = props;\n\n const {\n persist,\n key,\n open,\n entered,\n requestClose,\n className: singleClassName,\n variant,\n content: singleContent,\n action: singleAction,\n ariaAttributes: singleAriaAttributes,\n anchorOrigin,\n message: snackMessage,\n TransitionComponent: singleTranComponent,\n TransitionProps: singleTranProps,\n transitionDuration: singleTranDuration,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n ...singleSnackProps\n } = snack;\n\n const icon = {\n ...defaultIconVariants,\n ...iconVariant,\n }[variant];\n\n const ariaAttributes = {\n 'aria-describedby': 'notistack-snackbar',\n ...objectMerge(singleAriaAttributes, otherAriaAttributes),\n };\n\n const TransitionComponent = singleTranComponent || otherTranComponent || DEFAULTS.TransitionComponent;\n const transitionDuration = objectMerge(singleTranDuration, otherTranDuration, DEFAULTS.transitionDuration);\n const transitionProps = {\n direction: getTransitionDirection(anchorOrigin),\n ...objectMerge(singleTranProps, otherTranProps),\n };\n\n let action = singleAction || otherAction;\n if (typeof action === 'function') {\n action = action(key);\n }\n\n let content = singleContent || otherContent;\n if (typeof content === 'function') {\n content = content(key, snack.message);\n }\n\n const callbacks: { [key in keyof TransitionHandlerProps]?: any } =\n ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].reduce((acc, cbName) => ({\n ...acc,\n // @ts-ignore\n [cbName]: createChainedFunction([props.snack[cbName], props[cbName]], props.snack.key),\n }), {});\n\n return (\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n {content || (\n \n
\n {!hideIconVariant ? icon : null}\n {snackMessage}\n
\n {action && (\n
{action}
\n )}\n \n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(SnackbarItem);\n","import React from 'react';\nimport clsx from 'clsx';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { SNACKBAR_INDENTS } from './utils/constants';\nimport { SnackbarProviderProps } from '.';\n\nconst collapse = {\n // Material-UI 4.12.x and above uses MuiCollapse-root; earlier versions use\n // Mui-Collapse-container. https://github.com/mui-org/material-ui/pull/24084\n container: '& > .MuiCollapse-container, & > .MuiCollapse-root',\n wrapper: '& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper',\n};\n\nconst xsWidthMargin = 16;\n\nconst useStyle = makeStyles((theme) => ({\n root: {\n boxSizing: 'border-box',\n display: 'flex',\n maxHeight: '100%',\n position: 'fixed',\n zIndex: theme.zIndex.snackbar,\n height: 'auto',\n width: 'auto',\n transition: 'top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms',\n // container itself is invisible and should not block clicks, clicks should be passed to its children\n pointerEvents: 'none',\n [collapse.container]: {\n pointerEvents: 'all',\n },\n [collapse.wrapper]: {\n padding: `${SNACKBAR_INDENTS.snackbar.default}px 0px`,\n transition: 'padding 300ms ease 0ms',\n },\n maxWidth: `calc(100% - ${SNACKBAR_INDENTS.view.default * 2}px)`,\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n maxWidth: `calc(100% - ${xsWidthMargin * 2}px)`,\n },\n },\n rootDense: {\n [collapse.wrapper]: {\n padding: `${SNACKBAR_INDENTS.snackbar.dense}px 0px`,\n },\n },\n top: {\n top: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default,\n flexDirection: 'column',\n },\n bottom: {\n bottom: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default,\n flexDirection: 'column-reverse',\n },\n left: {\n left: SNACKBAR_INDENTS.view.default,\n [theme.breakpoints.up('sm')]: {\n alignItems: 'flex-start',\n },\n [theme.breakpoints.down('xs')]: {\n left: `${xsWidthMargin}px`,\n },\n },\n right: {\n right: SNACKBAR_INDENTS.view.default,\n [theme.breakpoints.up('sm')]: {\n alignItems: 'flex-end',\n },\n [theme.breakpoints.down('xs')]: {\n right: `${xsWidthMargin}px`,\n },\n },\n center: {\n left: '50%',\n transform: 'translateX(-50%)',\n [theme.breakpoints.up('sm')]: {\n alignItems: 'center',\n },\n },\n}));\n\ninterface SnackbarContainerProps {\n children: JSX.Element | JSX.Element[];\n className?: string;\n dense: SnackbarProviderProps['dense'];\n anchorOrigin: NonNullable;\n}\n\nconst SnackbarContainer: React.FC = (props) => {\n const classes = useStyle();\n const { className, anchorOrigin, dense, ...other } = props;\n\n const combinedClassname = clsx(\n classes[anchorOrigin.vertical],\n classes[anchorOrigin.horizontal],\n { [classes.rootDense]: dense },\n classes.root, // root should come after others to override maxWidth\n className,\n );\n\n return (\n
\n );\n};\n\nexport default React.memo(SnackbarContainer);\n","import React, { Component } from 'react';\nimport { createPortal } from 'react-dom';\nimport clsx from 'clsx';\nimport SnackbarContext from './SnackbarContext';\nimport { MESSAGES, REASONS, originKeyExtractor, omitContainerKeys, DEFAULTS, merge, transformer, isDefined } from './utils/constants';\nimport SnackbarItem from './SnackbarItem';\nimport SnackbarContainer from './SnackbarContainer';\nimport warning from './utils/warning';\nimport { SnackbarProviderProps, SnackbarKey, SnackbarMessage, OptionsObject, RequiredBy, ProviderContext, TransitionHandlerProps } from '.';\nimport createChainedFunction from './utils/createChainedFunction';\n\ntype Reducer = (state: State) => State;\ntype SnacksByPosition = { [key: string]: Snack[] };\n\nexport interface Snack extends RequiredBy {\n message: SnackbarMessage;\n open: boolean;\n entered: boolean;\n requestClose: boolean;\n}\n\ninterface State {\n snacks: Snack[];\n queue: Snack[];\n contextValue: ProviderContext;\n}\n\nclass SnackbarProvider extends Component {\n constructor(props: SnackbarProviderProps) {\n super(props);\n this.state = {\n snacks: [],\n queue: [], // eslint-disable-line react/no-unused-state\n contextValue: {\n enqueueSnackbar: this.enqueueSnackbar,\n closeSnackbar: this.closeSnackbar,\n },\n };\n }\n\n get maxSnack(): number {\n return this.props.maxSnack || DEFAULTS.maxSnack;\n }\n\n /**\n * Adds a new snackbar to the queue to be presented.\n * Returns generated or user defined key referencing the new snackbar or null\n */\n enqueueSnackbar = (message: SnackbarMessage, opts: OptionsObject = {}): SnackbarKey => {\n const {\n key,\n preventDuplicate,\n ...options\n } = opts;\n\n const hasSpecifiedKey = isDefined(key);\n const id = hasSpecifiedKey ? (key as SnackbarKey) : new Date().getTime() + Math.random();\n\n const merger = merge(options, this.props, DEFAULTS);\n const snack: Snack = {\n key: id,\n ...options,\n message,\n open: true,\n entered: false,\n requestClose: false,\n variant: merger('variant'),\n anchorOrigin: merger('anchorOrigin'),\n autoHideDuration: merger('autoHideDuration'),\n };\n\n if (options.persist) {\n snack.autoHideDuration = undefined;\n }\n\n this.setState((state) => {\n if ((preventDuplicate === undefined && this.props.preventDuplicate) || preventDuplicate) {\n const compareFunction = (item: Snack): boolean => (\n hasSpecifiedKey ? item.key === key : item.message === message\n );\n\n const inQueue = state.queue.findIndex(compareFunction) > -1;\n const inView = state.snacks.findIndex(compareFunction) > -1;\n if (inQueue || inView) {\n return state;\n }\n }\n\n return this.handleDisplaySnack({\n ...state,\n queue: [...state.queue, snack],\n });\n });\n\n return id;\n };\n\n /**\n * Reducer: Display snack if there's space for it. Otherwise, immediately\n * begin dismissing the oldest message to start showing the new one.\n */\n handleDisplaySnack: Reducer = (state) => {\n const { snacks } = state;\n if (snacks.length >= this.maxSnack) {\n return this.handleDismissOldest(state);\n }\n return this.processQueue(state);\n };\n\n /**\n * Reducer: Display items (notifications) in the queue if there's space for them.\n */\n processQueue: Reducer = (state) => {\n const { queue, snacks } = state;\n if (queue.length > 0) {\n return {\n ...state,\n snacks: [...snacks, queue[0]],\n queue: queue.slice(1, queue.length),\n };\n }\n return state;\n };\n\n /**\n * Reducer: Hide oldest snackbar on the screen because there exists a new one which we have to display.\n * (ignoring the one with 'persist' flag. i.e. explicitly told by user not to get dismissed).\n *\n * Note 1: If there is already a message leaving the screen, no new messages are dismissed.\n * Note 2: If the oldest message has not yet entered the screen, only a request to close the\n * snackbar is made. Once it entered the screen, it will be immediately dismissed.\n */\n handleDismissOldest: Reducer = (state) => {\n if (state.snacks.some(item => !item.open || item.requestClose)) {\n return state;\n }\n\n let popped = false;\n let ignore = false;\n\n const persistentCount = state.snacks.reduce((acc, current) => (\n acc + (current.open && current.persist ? 1 : 0)\n ), 0);\n\n if (persistentCount === this.maxSnack) {\n warning(MESSAGES.NO_PERSIST_ALL);\n ignore = true;\n }\n\n const snacks = state.snacks.map((item) => {\n if (!popped && (!item.persist || ignore)) {\n popped = true;\n\n if (!item.entered) {\n return {\n ...item,\n requestClose: true,\n };\n }\n\n if (item.onClose) item.onClose(null, REASONS.MAXSNACK, item.key);\n if (this.props.onClose) this.props.onClose(null, REASONS.MAXSNACK, item.key);\n\n return {\n ...item,\n open: false,\n };\n }\n\n return { ...item };\n });\n\n return { ...state, snacks };\n };\n\n /**\n * Set the entered state of the snackbar with the given key.\n */\n handleEnteredSnack: TransitionHandlerProps['onEntered'] = (node, isAppearing, key) => {\n if (!isDefined(key)) {\n throw new Error('handleEnteredSnack Cannot be called with undefined key');\n }\n\n this.setState(({ snacks }) => ({\n snacks: snacks.map(item => (\n item.key === key ? { ...item, entered: true } : { ...item }\n )),\n }));\n }\n\n /**\n * Hide a snackbar after its timeout.\n */\n handleCloseSnack: TransitionHandlerProps['onClose'] = (event, reason, key) => {\n // should not use createChainedFunction for onClose.\n // because this.closeSnackbar called this function\n if (this.props.onClose) {\n this.props.onClose(event, reason, key);\n }\n\n if (reason === REASONS.CLICKAWAY) return;\n const shouldCloseAll = key === undefined;\n\n this.setState(({ snacks, queue }) => ({\n snacks: snacks.map((item) => {\n if (!shouldCloseAll && item.key !== key) {\n return { ...item };\n }\n\n return item.entered\n ? { ...item, open: false }\n : { ...item, requestClose: true };\n }),\n queue: queue.filter(item => item.key !== key), // eslint-disable-line react/no-unused-state\n }));\n };\n\n /**\n * Close snackbar with the given key\n */\n closeSnackbar: ProviderContext['closeSnackbar'] = (key) => {\n // call individual snackbar onClose callback passed through options parameter\n const toBeClosed = this.state.snacks.find(item => item.key === key);\n if (isDefined(key) && toBeClosed && toBeClosed.onClose) {\n toBeClosed.onClose(null, REASONS.INSTRUCTED, key);\n }\n\n this.handleCloseSnack(null, REASONS.INSTRUCTED, key);\n }\n\n /**\n * When we set open attribute of a snackbar to false (i.e. after we hide a snackbar),\n * it leaves the screen and immediately after leaving animation is done, this method\n * gets called. We remove the hidden snackbar from state and then display notifications\n * waiting in the queue (if any). If after this process the queue is not empty, the\n * oldest message is dismissed.\n */\n // @ts-ignore\n handleExitedSnack: TransitionHandlerProps['onExited'] = (event, key1, key2) => {\n const key = key1 || key2;\n if (!isDefined(key)) {\n throw new Error('handleExitedSnack Cannot be called with undefined key');\n }\n\n this.setState((state) => {\n const newState = this.processQueue({\n ...state,\n snacks: state.snacks.filter(item => item.key !== key),\n });\n\n if (newState.queue.length === 0) {\n return newState;\n }\n\n return this.handleDismissOldest(newState);\n });\n };\n\n render(): JSX.Element {\n const { contextValue } = this.state;\n const {\n maxSnack: dontspread1,\n preventDuplicate: dontspread2,\n variant: dontspread3,\n anchorOrigin: dontspread4,\n iconVariant,\n dense = DEFAULTS.dense,\n hideIconVariant = DEFAULTS.hideIconVariant,\n domRoot,\n children,\n classes = {},\n ...props\n } = this.props;\n\n const categ = this.state.snacks.reduce((acc, current) => {\n const category = originKeyExtractor(current.anchorOrigin);\n const existingOfCategory = acc[category] || [];\n return {\n ...acc,\n [category]: [...existingOfCategory, current],\n };\n }, {});\n\n const snackbars = Object.keys(categ).map((origin) => {\n const snacks = categ[origin];\n return (\n \n {snacks.map(snack => (\n \n ))}\n \n );\n });\n\n return (\n \n {children}\n {domRoot ? createPortal(snackbars, domRoot) : snackbars}\n \n );\n }\n}\n\nexport default SnackbarProvider;\n","import { useContext } from 'react';\nimport SnackbarContext from './SnackbarContext';\nimport { ProviderContext } from '.';\n\nexport default (): ProviderContext => useContext(SnackbarContext);\n","var grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nexport default grey;","var indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nexport default indigo;","var pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nexport default pink;","var red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","var orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","var blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","var green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport useControlled from '../utils/useControlled';\nimport useFormControl from '../FormControl/useFormControl';\nimport withStyles from '../styles/withStyles';\nimport IconButton from '../IconButton';\nexport var styles = {\n root: {\n padding: 9\n },\n checked: {},\n disabled: {},\n input: {\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n var autoFocus = props.autoFocus,\n checkedProp = props.checked,\n checkedIcon = props.checkedIcon,\n classes = props.classes,\n className = props.className,\n defaultChecked = props.defaultChecked,\n disabledProp = props.disabled,\n icon = props.icon,\n id = props.id,\n inputProps = props.inputProps,\n inputRef = props.inputRef,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onFocus = props.onFocus,\n readOnly = props.readOnly,\n required = props.required,\n tabIndex = props.tabIndex,\n type = props.type,\n value = props.value,\n other = _objectWithoutProperties(props, [\"autoFocus\", \"checked\", \"checkedIcon\", \"classes\", \"className\", \"defaultChecked\", \"disabled\", \"icon\", \"id\", \"inputProps\", \"inputRef\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"readOnly\", \"required\", \"tabIndex\", \"type\", \"value\"]);\n\n var _useControlled = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n checked = _useControlled2[0],\n setCheckedState = _useControlled2[1];\n\n var muiFormControl = useFormControl();\n\n var handleFocus = function handleFocus(event) {\n if (onFocus) {\n onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n\n var handleInputChange = function handleInputChange(event) {\n var newChecked = event.target.checked;\n setCheckedState(newChecked);\n\n if (onChange) {\n // TODO v5: remove the second argument.\n onChange(event, newChecked);\n }\n };\n\n var disabled = disabledProp;\n\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n\n var hasLabelFor = type === 'checkbox' || type === 'radio';\n return /*#__PURE__*/React.createElement(IconButton, _extends({\n component: \"span\",\n className: clsx(classes.root, className, checked && classes.checked, disabled && classes.disabled),\n disabled: disabled,\n tabIndex: null,\n role: undefined,\n onFocus: handleFocus,\n onBlur: handleBlur,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"input\", _extends({\n autoFocus: autoFocus,\n checked: checkedProp,\n defaultChecked: defaultChecked,\n className: classes.input,\n disabled: disabled,\n id: hasLabelFor && id,\n name: name,\n onChange: handleInputChange,\n readOnly: readOnly,\n ref: inputRef,\n required: required,\n tabIndex: tabIndex,\n type: type,\n value: value\n }, inputProps)), checked ? checkedIcon : icon);\n}); // NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\n\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /*\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwitchBase'\n})(SwitchBase);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Clear');\n\nexports.default = _default;","import React from 'react';\nexport default React.createContext(null);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: theme.typography.pxToRem(24),\n transition: theme.transitions.create('fill', {\n duration: theme.transitions.duration.shorter\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(35)\n }\n };\n};\nvar SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'svg' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n htmlColor = props.htmlColor,\n titleAccess = props.titleAccess,\n _props$viewBox = props.viewBox,\n viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"titleAccess\", \"viewBox\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n focusable: \"false\",\n viewBox: viewBox,\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, other), children, titleAccess ? /*#__PURE__*/React.createElement(\"title\", null, titleAccess) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n */\n color: PropTypes.oneOf(['action', 'disabled', 'error', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this property.\n */\n shapeRendering: PropTypes.string,\n\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default withStyles(styles, {\n name: 'MuiSvgIcon'\n})(SvgIcon);","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useEventCallback from '../utils/useEventCallback';\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = React.useState(false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = useEventCallback(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: childClassName\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Ripple from './Ripple';\nvar DURATION = 550;\nexport var DELAY_RIPPLE = 80;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n },\n\n /* Styles applied to the internal `Ripple` components `ripple` class. */\n ripple: {\n opacity: 0,\n position: 'absolute'\n },\n\n /* Styles applied to the internal `Ripple` components `rippleVisible` class. */\n rippleVisible: {\n opacity: 0.3,\n transform: 'scale(1)',\n animation: \"$enter \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */\n ripplePulsate: {\n animationDuration: \"\".concat(theme.transitions.duration.shorter, \"ms\")\n },\n\n /* Styles applied to the internal `Ripple` components `child` class. */\n child: {\n opacity: 1,\n display: 'block',\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the internal `Ripple` components `childLeaving` class. */\n childLeaving: {\n opacity: 0,\n animation: \"$exit \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `childPulsate` class. */\n childPulsate: {\n position: 'absolute',\n left: 0,\n top: 0,\n animation: \"$pulsate 2500ms \".concat(theme.transitions.easing.easeInOut, \" 200ms infinite\")\n },\n '@keyframes enter': {\n '0%': {\n transform: 'scale(0)',\n opacity: 0.1\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.3\n }\n },\n '@keyframes exit': {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n },\n '@keyframes pulsate': {\n '0%': {\n transform: 'scale(1)'\n },\n '50%': {\n transform: 'scale(0.92)'\n },\n '100%': {\n transform: 'scale(1)'\n }\n }\n };\n};\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nvar TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(props, ref) {\n var _props$center = props.center,\n centerProp = _props$center === void 0 ? false : _props$center,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"center\", \"classes\", \"className\"]);\n\n var _React$useState = React.useState([]),\n ripples = _React$useState[0],\n setRipples = _React$useState[1];\n\n var nextKey = React.useRef(0);\n var rippleCallback = React.useRef(null);\n React.useEffect(function () {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n var ignoringMouseDown = React.useRef(false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n var startTimer = React.useRef(null); // This is the hook called once the previous timeout is ready.\n\n var startTimerCommit = React.useRef(null);\n var container = React.useRef(null);\n React.useEffect(function () {\n return function () {\n clearTimeout(startTimer.current);\n };\n }, []);\n var startCommit = React.useCallback(function (params) {\n var pulsate = params.pulsate,\n rippleX = params.rippleX,\n rippleY = params.rippleY,\n rippleSize = params.rippleSize,\n cb = params.cb;\n setRipples(function (oldRipples) {\n return [].concat(_toConsumableArray(oldRipples), [/*#__PURE__*/React.createElement(Ripple, {\n key: nextKey.current,\n classes: classes,\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n })]);\n });\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n var start = React.useCallback(function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cb = arguments.length > 2 ? arguments[2] : undefined;\n var _options$pulsate = options.pulsate,\n pulsate = _options$pulsate === void 0 ? false : _options$pulsate,\n _options$center = options.center,\n center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,\n _options$fakeElement = options.fakeElement,\n fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n var element = fakeElement ? null : container.current;\n var rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n var rippleX;\n var rippleY;\n var rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n var _ref = event.touches ? event.touches[0] : event,\n clientX = _ref.clientX,\n clientY = _ref.clientY;\n\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = function () {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(function () {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }\n }, [centerProp, startCommit]);\n var pulsate = React.useCallback(function () {\n start({}, {\n pulsate: true\n });\n }, [start]);\n var stop = React.useCallback(function (event, cb) {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n event.persist();\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(function () {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(function (oldRipples) {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n React.useImperativeHandle(ref, function () {\n return {\n pulsate: pulsate,\n start: start,\n stop: stop\n };\n }, [pulsate, start, stop]);\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, className),\n ref: container\n }, other), /*#__PURE__*/React.createElement(TransitionGroup, {\n component: null,\n exit: true\n }, ripples));\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiTouchRipple'\n})( /*#__PURE__*/React.memo(TouchRipple));","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport clsx from 'clsx';\nimport { elementTypeAcceptingRef, refType } from '@material-ui/utils';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport TouchRipple from './TouchRipple';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = _objectWithoutProperties(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = React.useRef(null);\n\n function getButtonNode() {\n // #StrictMode ready\n return ReactDOM.findDOMNode(buttonRef.current);\n }\n\n var rippleRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n React.useImperativeHandle(action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n React.useEffect(function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return useEventCallback(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = useEventCallback(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = React.useRef(false);\n var handleKeyDown = useEventCallback(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = useEventCallback(function (event) {\n // calling preventDefault in keyUp on a \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _styles = require(\"@material-ui/styles\");\n\nvar _defaultTheme = _interopRequireDefault(require(\"./defaultTheme\"));\n\nfunction withStyles(stylesOrCreator, options) {\n return (0, _styles.withStyles)(stylesOrCreator, (0, _extends2.default)({\n defaultTheme: _defaultTheme.default\n }, options));\n}\n\nvar _default = withStyles;\nexports.default = _default;","/** @license Material-UI v4.12.1\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport { default as borders } from './borders';\nexport * from './borders';\nexport { default as breakpoints } from './breakpoints';\nexport { default as compose } from './compose';\nexport { default as styleFunctionSx } from './styleFunctionSx';\nexport * from './styleFunctionSx';\nexport { default as display } from './display';\nexport { default as flexbox } from './flexbox';\nexport * from './flexbox';\nexport { default as grid } from './grid';\nexport * from './grid';\nexport { default as palette } from './palette';\nexport * from './palette';\nexport { default as positions } from './positions';\nexport * from './positions';\nexport { default as shadows } from './shadows';\nexport { default as sizing } from './sizing';\nexport * from './sizing';\nexport { default as spacing } from './spacing';\nexport * from './spacing';\nexport { default as style } from './style';\nexport { default as typography } from './typography';\nexport * from './typography';","export default function requirePropFactory(componentNameInError) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n var requireProp = function requireProp(requiredProp) {\n return function (props, propName, componentName, location, propFullName) {\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameInError, \"` must be used on `\").concat(requiredProp, \"`.\"));\n }\n\n return null;\n };\n };\n\n return requireProp;\n}","import { borders, compose, display, flexbox, grid, palette, positions, shadows, sizing, spacing, typography, styleFunctionSx } from '@material-ui/system';\nimport styled from '../styles/styled';\nexport var styleFunction = styleFunctionSx(compose(borders, display, flexbox, grid, positions, palette, shadows, sizing, spacing, typography));\n/**\n * @ignore - do not document.\n */\n\nvar Box = styled('div')(styleFunction, {\n name: 'MuiBox'\n});\nexport default Box;","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { makeStyles as makeStylesWithoutDefault } from '@material-ui/styles';\nimport defaultTheme from './defaultTheme';\n\nfunction makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return makeStylesWithoutDefault(stylesOrCreator, _extends({\n defaultTheme: defaultTheme\n }, options));\n}\n\nexport default makeStyles;","import style from './style';\nimport compose from './compose';\nexport var displayPrint = style({\n prop: 'displayPrint',\n cssProperty: false,\n transform: function transform(value) {\n return {\n '@media print': {\n display: value\n }\n };\n }\n});\nexport var displayRaw = style({\n prop: 'display'\n});\nexport var overflow = style({\n prop: 'overflow'\n});\nexport var textOverflow = style({\n prop: 'textOverflow'\n});\nexport var visibility = style({\n prop: 'visibility'\n});\nexport var whiteSpace = style({\n prop: 'whiteSpace'\n});\nexport default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);","import style from './style';\nvar boxShadow = style({\n prop: 'boxShadow',\n themeKey: 'shadows'\n});\nexport default boxShadow;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 12,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE 11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -12,\n '$sizeSmall&': {\n marginLeft: -3\n }\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -12,\n '$sizeSmall&': {\n marginRight: -3\n }\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: 3,\n fontSize: theme.typography.pxToRem(18)\n },\n\n /* Styles applied to the children container element. */\n label: {\n width: '100%',\n display: 'flex',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n }\n };\n};\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nvar IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {\n var _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"edge\", \"children\", \"classes\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], disabled && classes.disabled, size === \"small\" && classes[\"size\".concat(capitalize(size))], {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge]),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes = {\n /**\n * The icon element.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n var found = React.Children.toArray(props.children).some(function (child) {\n return /*#__PURE__*/React.isValidElement(child) && child.props.onClick;\n });\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener ' + 'to a child of a button element.', 'Firefox will never trigger the event.', 'You should move the onClick listener to the parent button element.', 'https://github.com/mui-org/material-ui/issues/13957'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['start', 'end', false]),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiIconButton'\n})(IconButton);","import { createTheme } from '@material-ui/core/styles';\n\nimport orange from '@material-ui/core/colors/orange';\n\nconst step = (16 - 5) / 23 / 100;\n\n/**\n * Convert hex color in the format '#rrggbb' or '#rgb' to an RGB object.\n * @param {string} hex\n * @returns {{r: number, g: number, b: number}}\n */\nfunction toInt(hex) {\n const rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n\n if (hex.length === 7) {\n rgb.r = parseInt(hex.substr(1, 2), 16);\n rgb.g = parseInt(hex.substr(3, 2), 16);\n rgb.b = parseInt(hex.substr(5, 2), 16);\n } else if (hex.length === 4) {\n\n const r = hex.substr(1, 1);\n const g = hex.substr(2, 1);\n const b = hex.substr(3, 1);\n\n rgb.r = parseInt(r + r, 16);\n rgb.g = parseInt(g + g, 16);\n rgb.b = parseInt(b + b, 16);\n }\n\n return rgb;\n}\n\n/**\n * Convert an RGB object to a hex color string in the format '#rrggbb'.\n * @param {{r: number, g: number, b: number}} int\n * @returns {string}\n */\nfunction toHex(int) {\n return '#' + Math.round(int.r).toString(16) + Math.round(int.g).toString(16) + Math.round(int.b).toString(16);\n}\n\n/**\n * @param {string} color color in the format '#rrggbb' or '#rgb'\n * @param {string} overlayColor overlay color in the format '#rrggbb' or '#rgb'\n * @param {number} elevation elevation as an integer starting with 1\n * @returns {string} the hex color string in the format '#rrggbb'\n */\nfunction getElevation(color, overlayColor, elevation) {\n const rgb = toInt(color);\n const overlay = toInt(overlayColor);\n\n rgb.r += overlay.r * (0.05 + step * (elevation - 1));\n rgb.g += overlay.g * (0.05 + step * (elevation - 1));\n rgb.b += overlay.b * (0.05 + step * (elevation - 1));\n\n return toHex(rgb);\n}\n\n/**\n * Get all 24 elevations of the given color and overlay.\n * @param {string} color color in the format '#rrggbb' or '#rgb'\n * @param {string} overlay overlay color in the format '#rrggbb' or '#rgb'\n * @returns {import('@material-ui/core/styles/withStyles').CSSProperties}\n */\nfunction getElevations(color, overlay) {\n /** @type {import('@material-ui/core/styles/withStyles').CSSProperties} */\n const elevations = {};\n\n for(let i = 1; i <= 24; i++) {\n elevations['elevation' + i] = {\n backgroundColor: getElevation(color, overlay, i)\n }\n }\n\n return elevations;\n}\n\n/**\n * The theme creation factory function.\n * @param {string} type\n * @returns {import('./types').Theme}\n */\nconst Theme = type => {\n let theme;\n if (type === 'dark') {\n theme = {\n name: type,\n palette: {\n type: 'dark',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n primary: {\n main: '#4dabf5'\n },\n secondary: {\n main: '#436a93'\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff'\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#272727'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100]\n }\n }\n },\n MuiPaper: getElevations('#121212', '#fff')\n }\n };\n } else if (type === 'blue') {\n theme = {\n name: type,\n palette: {\n type: 'dark',\n background: {\n paper: '#151d21',\n default: '#151d21'\n },\n primary: {\n main: '#4dabf5'\n },\n secondary: {\n main: '#436a93'\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff'\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#2a3135'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100]\n }\n }\n },\n MuiPaper: getElevations('#151d21', '#fff')\n }\n };\n } else if (type === 'colored') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#3399CC'\n },\n secondary: {\n main: '#164477'\n },\n expert: '#96fc96'\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#3399CC'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else if (type === 'PT') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#0F99DE'\n },\n secondary: {\n main: '#88A536'\n },\n expert: '#BD1B24'\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#0F99DE'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else if (type === 'DX') {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#F5F5F7'\n },\n secondary: {\n main: '#a9a9a9'\n },\n expert: '#BD1B24',\n text: {\n primary: '#007AFE',\n secondary: '#007AFE',\n disabled: '#007AFEAA',\n }\n },\n overrides: {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#a9a9a9'\n }\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n } else {\n theme = {\n name: type,\n palette: {\n type: 'light',\n primary: {\n main: '#3399CC'\n },\n secondary: {\n main: '#164477'\n },\n expert: '#14bb00'\n },\n overrides: {\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300]\n }\n }\n }\n }\n };\n }\n\n theme.toolbar = {\n height: 48\n };\n\n // add save toolbar\n theme.saveToolbar = {\n background: theme.palette.primary.main,\n button: {\n borderRadius: 3,\n height: 32\n }\n };\n\n return createTheme(theme);\n};\n\nexport default Theme;\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport './loader.css'\n\nconst styles = theme => ({\n\n});\n\n/**\n * @typedef {object} LoaderProps\n * @property {string} [key] The key to identify this component.\n * @property {number} [size] The size in pixels of this loader.\n * @property {string} [themeType] The chosen theme type.\n * @property {string} [theme] The chosen theme.\n *\n * @extends {React.Component}\n */\nclass Loader extends React.Component {\n /**\n * @param {LoaderProps} props\n */\n constructor(props) {\n super(props);\n this.size = this.props.size || 234;\n }\n\n render() {\n const theme = this.props.themeType || this.props.theme || 'light';\n return
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
;\n }\n}\n\nLoader.propTypes = {\n size: PropTypes.number,\n themeType: PropTypes.string\n};\n\n/** @type {typeof Loader} */\nconst _export = withStyles(styles)(Loader);\nexport default _export;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z\"\n}), 'Save');\n\nexports.default = _default;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { isFilled, isAdornedStart } from '../InputBase/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport isMuiElement from '../utils/isMuiElement';\nimport FormControlContext from './FormControlContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top' // Fix alignment issue on Safari.\n\n },\n\n /* Styles applied to the root element if `margin=\"normal\"`. */\n marginNormal: {\n marginTop: 16,\n marginBottom: 8\n },\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n marginTop: 8,\n marginBottom: 4\n },\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n }\n};\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/components/text-fields/#components).\n *\n * ```jsx\n * \n * Email address\n * \n * We'll never share your email.\n * \n * ```\n *\n * ⚠️Only one input can be used within a FormControl.\n */\n\nvar FormControl = /*#__PURE__*/React.forwardRef(function FormControl(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n visuallyFocused = props.focused,\n _props$hiddenLabel = props.hiddenLabel,\n hiddenLabel = _props$hiddenLabel === void 0 ? false : _props$hiddenLabel,\n _props$margin = props.margin,\n margin = _props$margin === void 0 ? 'none' : _props$margin,\n _props$required = props.required,\n required = _props$required === void 0 ? false : _props$required,\n size = props.size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"fullWidth\", \"focused\", \"hiddenLabel\", \"margin\", \"required\", \"size\", \"variant\"]);\n\n var _React$useState = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialAdornedStart = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n var input = isMuiElement(child, ['Select']) ? child.props.input : child;\n\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n\n return initialAdornedStart;\n }),\n adornedStart = _React$useState[0],\n setAdornedStart = _React$useState[1];\n\n var _React$useState2 = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialFilled = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n if (isFilled(child.props, true)) {\n initialFilled = true;\n }\n });\n }\n\n return initialFilled;\n }),\n filled = _React$useState2[0],\n setFilled = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _focused = _React$useState3[0],\n setFocused = _React$useState3[1];\n\n var focused = visuallyFocused !== undefined ? visuallyFocused : _focused;\n\n if (disabled && focused) {\n setFocused(false);\n }\n\n var registerEffect;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var registeredInput = React.useRef(false);\n\n registerEffect = function registerEffect() {\n if (registeredInput.current) {\n console.error(['Material-UI: There are multiple InputBase components inside a FormControl.', 'This is not supported. It might cause infinite rendering loops.', 'Only use one InputBase.'].join('\\n'));\n }\n\n registeredInput.current = true;\n return function () {\n registeredInput.current = false;\n };\n };\n }\n\n var onFilled = React.useCallback(function () {\n setFilled(true);\n }, []);\n var onEmpty = React.useCallback(function () {\n setFilled(false);\n }, []);\n var childContext = {\n adornedStart: adornedStart,\n setAdornedStart: setAdornedStart,\n color: color,\n disabled: disabled,\n error: error,\n filled: filled,\n focused: focused,\n fullWidth: fullWidth,\n hiddenLabel: hiddenLabel,\n margin: (size === 'small' ? 'dense' : undefined) || margin,\n onBlur: function onBlur() {\n setFocused(false);\n },\n onEmpty: onEmpty,\n onFilled: onFilled,\n onFocus: function onFocus() {\n setFocused(true);\n },\n registerEffect: registerEffect,\n required: required,\n variant: variant\n };\n return /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: childContext\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, margin !== 'none' && classes[\"margin\".concat(capitalize(margin))], fullWidth && classes.fullWidth),\n ref: ref\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The contents of the form control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label should be displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the component will be displayed in focused state.\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the component will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label will be hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, the label will indicate that the input is required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the text field.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormControl'\n})(FormControl);","import { getGlobalObject } from './global';\nimport { isString } from './is';\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem: unknown, keyAttrs?: string[]): string {\n type SimpleNode = {\n parentNode: SimpleNode;\n } | null;\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const MAX_OUTPUT_LEN = 80;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n\n // eslint-disable-next-line no-plusplus\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n const elem = el as {\n tagName?: string;\n id?: string;\n className?: string;\n getAttribute(key: string): string;\n };\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n const global = getGlobalObject();\n try {\n return global.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n","import { isDebugBuild } from './env';\nimport { getGlobalObject } from './global';\nimport { logger } from './logger';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFetch(func: Function): boolean {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (!supportsFetch()) {\n return false;\n }\n\n const global = getGlobalObject();\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = global.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === `function`) {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n if (isDebugBuild()) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in getGlobalObject();\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n const global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (global as any).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsv2json = exports.json2tsv = void 0;\nconst json2tsv_1 = require(\"./json2tsv\");\nvar json2tsv_2 = require(\"./json2tsv\");\nObject.defineProperty(exports, \"json2tsv\", { enumerable: true, get: function () { return json2tsv_2.json2tsv; } });\nconst tsv2json_1 = require(\"./tsv2json\");\nvar tsv2json_2 = require(\"./tsv2json\");\nObject.defineProperty(exports, \"tsv2json\", { enumerable: true, get: function () { return tsv2json_2.tsv2json; } });\n// eslint-disable-next-line import/no-anonymous-default-export\nexports.default = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\n// For CommonJS default export support\nmodule.exports = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\nmodule.exports.default = { json2tsv: json2tsv_1.json2tsv, tsv2json: tsv2json_1.tsv2json };\n//# sourceMappingURL=index.js.map","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\n\nfunction getScale(value) {\n return \"scale(\".concat(value, \", \").concat(Math.pow(value, 2), \")\");\n}\n\nvar styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n/**\n * The Grow transition is used by the [Tooltip](/components/tooltips/) and\n * [Popover](/components/popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? 'auto' : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var timer = React.useRef();\n var autoTimeout = React.useRef();\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var _getTransitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration,\n delay = _getTransitionProps.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay\n })].join(',');\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var _getTransitionProps2 = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration,\n delay = _getTransitionProps2.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay || duration * 0.333\n })].join(',');\n node.style.opacity = '0';\n node.style.transform = getScale(0.75);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTimeout.current || 0);\n }\n };\n\n React.useEffect(function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, show the component; triggers the enter or exit animation.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;","/* eslint-disable import/prefer-default-export */\n// Global index counter to preserve source order.\n// We create the style sheet during the creation of the component,\n// children are handled after the parents, so the order of style elements would be parent->child.\n// It is a problem though when a parent passes a className\n// which needs to override any child's styles.\n// StyleSheet of the child has a higher specificity, because of the source order.\n// So our solution is to render sheets them in the reverse order child->sheet, so\n// that parent has a higher specificity.\nvar indexCounter = -1e9;\nexport function increment() {\n indexCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (indexCounter >= 0) {\n console.warn(['Material-UI: You might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join('\\n'));\n }\n }\n\n return indexCounter;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { deepmerge } from '@material-ui/utils';\nimport noopTheme from './noopTheme';\nexport default function getStylesCreator(stylesOrCreator) {\n var themingEnabled = typeof stylesOrCreator === 'function';\n\n if (process.env.NODE_ENV !== 'production') {\n if (_typeof(stylesOrCreator) !== 'object' && !themingEnabled) {\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You need to provide a function generating the styles or a styles object.'].join('\\n'));\n }\n }\n\n return {\n create: function create(theme, name) {\n var styles;\n\n try {\n styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n if (themingEnabled === true && theme === noopTheme) {\n // TODO: prepend error message/name instead\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n throw err;\n }\n\n if (!name || !theme.overrides || !theme.overrides[name]) {\n return styles;\n }\n\n var overrides = theme.overrides[name];\n\n var stylesWithOverrides = _extends({}, styles);\n\n Object.keys(overrides).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!stylesWithOverrides[key]) {\n console.warn(['Material-UI: You are trying to override a style that does not exist.', \"Fix the `\".concat(key, \"` key of `theme.overrides.\").concat(name, \"`.\")].join('\\n'));\n }\n }\n\n stylesWithOverrides[key] = deepmerge(stylesWithOverrides[key], overrides[key]);\n });\n return stylesWithOverrides;\n },\n options: {}\n };\n}","// We use the same empty object to ref count the styles that don't need a theme object.\nvar noopTheme = {};\nexport default noopTheme;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { getDynamicStyles } from 'jss';\nimport mergeClasses from '../mergeClasses';\nimport multiKeyStore from './multiKeyStore';\nimport useTheme from '../useTheme';\nimport { StylesContext } from '../StylesProvider';\nimport { increment } from './indexCounter';\nimport getStylesCreator from '../getStylesCreator';\nimport noopTheme from '../getStylesCreator/noopTheme';\n\nfunction getClasses(_ref, classes, Component) {\n var state = _ref.state,\n stylesOptions = _ref.stylesOptions;\n\n if (stylesOptions.disableGeneration) {\n return classes || {};\n }\n\n if (!state.cacheClasses) {\n state.cacheClasses = {\n // Cache for the finalized classes value.\n value: null,\n // Cache for the last used classes prop pointer.\n lastProp: null,\n // Cache for the last used rendered classes pointer.\n lastJSS: {}\n };\n } // Tracks if either the rendered classes or classes prop has changed,\n // requiring the generation of a new finalized classes object.\n\n\n var generate = false;\n\n if (state.classes !== state.cacheClasses.lastJSS) {\n state.cacheClasses.lastJSS = state.classes;\n generate = true;\n }\n\n if (classes !== state.cacheClasses.lastProp) {\n state.cacheClasses.lastProp = classes;\n generate = true;\n }\n\n if (generate) {\n state.cacheClasses.value = mergeClasses({\n baseClasses: state.cacheClasses.lastJSS,\n newClasses: classes,\n Component: Component\n });\n }\n\n return state.cacheClasses.value;\n}\n\nfunction attach(_ref2, props) {\n var state = _ref2.state,\n theme = _ref2.theme,\n stylesOptions = _ref2.stylesOptions,\n stylesCreator = _ref2.stylesCreator,\n name = _ref2.name;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n\n if (!sheetManager) {\n sheetManager = {\n refs: 0,\n staticSheet: null,\n dynamicStyles: null\n };\n multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);\n }\n\n var options = _extends({}, stylesCreator.options, stylesOptions, {\n theme: theme,\n flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'\n });\n\n options.generateId = options.serverGenerateClassName || options.generateClassName;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n var staticSheet;\n\n if (stylesOptions.sheetsCache) {\n staticSheet = multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);\n }\n\n var styles = stylesCreator.create(theme, name);\n\n if (!staticSheet) {\n staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({\n link: false\n }, options));\n staticSheet.attach();\n\n if (stylesOptions.sheetsCache) {\n multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);\n }\n }\n\n if (sheetsRegistry) {\n sheetsRegistry.add(staticSheet);\n }\n\n sheetManager.staticSheet = staticSheet;\n sheetManager.dynamicStyles = getDynamicStyles(styles);\n }\n\n if (sheetManager.dynamicStyles) {\n var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({\n link: true\n }, options));\n dynamicSheet.update(props);\n dynamicSheet.attach();\n state.dynamicSheet = dynamicSheet;\n state.classes = mergeClasses({\n baseClasses: sheetManager.staticSheet.classes,\n newClasses: dynamicSheet.classes\n });\n\n if (sheetsRegistry) {\n sheetsRegistry.add(dynamicSheet);\n }\n } else {\n state.classes = sheetManager.staticSheet.classes;\n }\n\n sheetManager.refs += 1;\n}\n\nfunction update(_ref3, props) {\n var state = _ref3.state;\n\n if (state.dynamicSheet) {\n state.dynamicSheet.update(props);\n }\n}\n\nfunction detach(_ref4) {\n var state = _ref4.state,\n theme = _ref4.theme,\n stylesOptions = _ref4.stylesOptions,\n stylesCreator = _ref4.stylesCreator;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n sheetManager.refs -= 1;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);\n stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(sheetManager.staticSheet);\n }\n }\n\n if (state.dynamicSheet) {\n stylesOptions.jss.removeStyleSheet(state.dynamicSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(state.dynamicSheet);\n }\n }\n}\n\nfunction useSynchronousEffect(func, values) {\n var key = React.useRef([]);\n var output; // Store \"generation\" key. Just returns a new object every time\n\n var currentKey = React.useMemo(function () {\n return {};\n }, values); // eslint-disable-line react-hooks/exhaustive-deps\n // \"the first render\", or \"memo dropped the value\"\n\n if (key.current !== currentKey) {\n key.current = currentKey;\n output = func();\n }\n\n React.useEffect(function () {\n return function () {\n if (output) {\n output();\n }\n };\n }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n\nexport default function makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n classNamePrefixOption = options.classNamePrefix,\n Component = options.Component,\n _options$defaultTheme = options.defaultTheme,\n defaultTheme = _options$defaultTheme === void 0 ? noopTheme : _options$defaultTheme,\n stylesOptions2 = _objectWithoutProperties(options, [\"name\", \"classNamePrefix\", \"Component\", \"defaultTheme\"]);\n\n var stylesCreator = getStylesCreator(stylesOrCreator);\n var classNamePrefix = name || classNamePrefixOption || 'makeStyles';\n stylesCreator.options = {\n index: increment(),\n name: name,\n meta: classNamePrefix,\n classNamePrefix: classNamePrefix\n };\n\n var useStyles = function useStyles() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var theme = useTheme() || defaultTheme;\n\n var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2);\n\n var instance = React.useRef();\n var shouldUpdate = React.useRef();\n useSynchronousEffect(function () {\n var current = {\n name: name,\n state: {},\n stylesCreator: stylesCreator,\n stylesOptions: stylesOptions,\n theme: theme\n };\n attach(current, props);\n shouldUpdate.current = false;\n instance.current = current;\n return function () {\n detach(current);\n };\n }, [theme, stylesCreator]);\n React.useEffect(function () {\n if (shouldUpdate.current) {\n update(instance.current, props);\n }\n\n shouldUpdate.current = true;\n });\n var classes = getClasses(instance.current, props.classes, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(classes);\n }\n\n return classes;\n };\n\n return useStyles;\n}","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nvar _default = orange;\nexports.default = _default;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.text.primary,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n },\n '&$disabled': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // Ensure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `variant=\"text\"`. */\n text: {\n padding: '6px 8px'\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"primary\"`. */\n textPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"secondary\"`. */\n textSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n padding: '5px 15px',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabledBackground)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(alpha(theme.palette.primary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.primary.main),\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(alpha(theme.palette.secondary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.secondary.main),\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabled)\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&:active': {\n boxShadow: theme.shadows[8]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"primary\"`. */\n containedPrimary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"secondary\"`. */\n containedSecondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n '&$focusVisible': {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n '&$disabled': {\n boxShadow: 'none'\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit',\n borderColor: 'currentColor'\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"text\"`. */\n textSizeSmall: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"text\"`. */\n textSizeLarge: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"outlined\"`. */\n outlinedSizeSmall: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"outlined\"`. */\n outlinedSizeLarge: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"contained\"`. */\n containedSizeSmall: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"contained\"`. */\n containedSizeLarge: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {},\n\n /* Styles applied to the root element if `size=\"large\"`. */\n sizeLarge: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the startIcon element if supplied. */\n startIcon: {\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n '&$iconSizeSmall': {\n marginLeft: -2\n }\n },\n\n /* Styles applied to the endIcon element if supplied. */\n endIcon: {\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n '&$iconSizeSmall': {\n marginRight: -2\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"small\"`. */\n iconSizeSmall: {\n '& > *:first-child': {\n fontSize: 18\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"medium\"`. */\n iconSizeMedium: {\n '& > *:first-child': {\n fontSize: 20\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"large\"`. */\n iconSizeLarge: {\n '& > *:first-child': {\n fontSize: 22\n }\n }\n };\n};\nvar Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n endIconProp = props.endIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n startIconProp = props.startIcon,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'text' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"]);\n\n var startIcon = startIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.startIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, startIconProp);\n var endIcon = endIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.endIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, endIconProp);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes[\"\".concat(variant).concat(capitalize(color))], size !== 'medium' && [classes[\"\".concat(variant, \"Size\").concat(capitalize(size))], classes[\"size\".concat(capitalize(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, startIcon, children, endIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButton'\n})(Button);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport Modal from '../Modal';\nimport Backdrop from '../Backdrop';\nimport Fade from '../Fade';\nimport { duration } from '../styles/transitions';\nimport Paper from '../Paper';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n '@media print': {\n // Use !important to override the Modal inline-style.\n position: 'absolute !important'\n }\n },\n\n /* Styles applied to the container element if `scroll=\"paper\"`. */\n scrollPaper: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the container element if `scroll=\"body\"`. */\n scrollBody: {\n overflowY: 'auto',\n overflowX: 'hidden',\n textAlign: 'center',\n '&:after': {\n content: '\"\"',\n display: 'inline-block',\n verticalAlign: 'middle',\n height: '100%',\n width: '0'\n }\n },\n\n /* Styles applied to the container element. */\n container: {\n height: '100%',\n '@media print': {\n height: 'auto'\n },\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n margin: 32,\n position: 'relative',\n overflowY: 'auto',\n // Fix IE 11 issue, to remove at some point.\n '@media print': {\n overflowY: 'visible',\n boxShadow: 'none'\n }\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"paper\"`. */\n paperScrollPaper: {\n display: 'flex',\n flexDirection: 'column',\n maxHeight: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"body\"`. */\n paperScrollBody: {\n display: 'inline-block',\n verticalAlign: 'middle',\n textAlign: 'left' // 'initial' doesn't work on IE 11\n\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=false`. */\n paperWidthFalse: {\n maxWidth: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xs\"`. */\n paperWidthXs: {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444),\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"sm\"`. */\n paperWidthSm: {\n maxWidth: theme.breakpoints.values.sm,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.sm + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"md\"`. */\n paperWidthMd: {\n maxWidth: theme.breakpoints.values.md,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.md + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"lg\"`. */\n paperWidthLg: {\n maxWidth: theme.breakpoints.values.lg,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.lg + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xl\"`. */\n paperWidthXl: {\n maxWidth: theme.breakpoints.values.xl,\n '&$paperScrollBody': _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values.xl + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `fullWidth={true}`. */\n paperFullWidth: {\n width: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `fullScreen={true}`. */\n paperFullScreen: {\n margin: 0,\n width: '100%',\n maxWidth: '100%',\n height: '100%',\n maxHeight: 'none',\n borderRadius: 0,\n '&$paperScrollBody': {\n margin: 0,\n maxWidth: '100%'\n }\n }\n };\n};\nvar defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * Dialogs are overlaid modal paper based components with a backdrop.\n */\n\nvar Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {\n var BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableBackdro = props.disableBackdropClick,\n disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableEscapeK = props.disableEscapeKeyDown,\n disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK,\n _props$fullScreen = props.fullScreen,\n fullScreen = _props$fullScreen === void 0 ? false : _props$fullScreen,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'sm' : _props$maxWidth,\n onBackdropClick = props.onBackdropClick,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onEscapeKeyDown = props.onEscapeKeyDown,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n open = props.open,\n _props$PaperComponent = props.PaperComponent,\n PaperComponent = _props$PaperComponent === void 0 ? Paper : _props$PaperComponent,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n _props$scroll = props.scroll,\n scroll = _props$scroll === void 0 ? 'paper' : _props$scroll,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Fade : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n ariaDescribedby = props['aria-describedby'],\n ariaLabelledby = props['aria-labelledby'],\n other = _objectWithoutProperties(props, [\"BackdropProps\", \"children\", \"classes\", \"className\", \"disableBackdropClick\", \"disableEscapeKeyDown\", \"fullScreen\", \"fullWidth\", \"maxWidth\", \"onBackdropClick\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onEscapeKeyDown\", \"onExit\", \"onExited\", \"onExiting\", \"open\", \"PaperComponent\", \"PaperProps\", \"scroll\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"aria-describedby\", \"aria-labelledby\"]);\n\n var mouseDownTarget = React.useRef();\n\n var handleMouseDown = function handleMouseDown(event) {\n mouseDownTarget.current = event.target;\n };\n\n var handleBackdropClick = function handleBackdropClick(event) {\n // Ignore the events not coming from the \"backdrop\"\n // We don't want to close the dialog when clicking the dialog content.\n if (event.target !== event.currentTarget) {\n return;\n } // Make sure the event starts and ends on the same DOM element.\n\n\n if (event.target !== mouseDownTarget.current) {\n return;\n }\n\n mouseDownTarget.current = null;\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (!disableBackdropClick && onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n return /*#__PURE__*/React.createElement(Modal, _extends({\n className: clsx(classes.root, className),\n BackdropComponent: Backdrop,\n BackdropProps: _extends({\n transitionDuration: transitionDuration\n }, BackdropProps),\n closeAfterTransition: true\n }, disableBackdropClick ? {\n disableBackdropClick: disableBackdropClick\n } : {}, {\n disableEscapeKeyDown: disableEscapeKeyDown,\n onEscapeKeyDown: onEscapeKeyDown,\n onClose: onClose,\n open: open,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n timeout: transitionDuration,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n onExit: onExit,\n onExiting: onExiting,\n onExited: onExited,\n role: \"none presentation\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.container, classes[\"scroll\".concat(capitalize(scroll))]),\n onMouseUp: handleBackdropClick,\n onMouseDown: handleMouseDown\n }, /*#__PURE__*/React.createElement(PaperComponent, _extends({\n elevation: 24,\n role: \"dialog\",\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": ariaLabelledby\n }, PaperProps, {\n className: clsx(classes.paper, classes[\"paperScroll\".concat(capitalize(scroll))], classes[\"paperWidth\".concat(capitalize(String(maxWidth)))], PaperProps.className, fullScreen && classes.paperFullScreen, fullWidth && classes.paperFullWidth)\n }), children))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Dialog.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The id(s) of the element(s) that describe the dialog.\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * The id(s) of the element(s) that label the dialog.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * Dialog children, usually the included sub-components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, clicking the backdrop will not fire the `onClose` callback.\n * @deprecated Use the onClose prop with the `reason` argument to filter the `backdropClick` events.\n */\n disableBackdropClick: deprecatedPropType(PropTypes.bool, 'Use the onClose prop with the `reason` argument to filter the `backdropClick` events.'),\n\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n */\n disableEscapeKeyDown: PropTypes.bool,\n\n /**\n * If `true`, the dialog will be full-screen\n */\n fullScreen: PropTypes.bool,\n\n /**\n * If `true`, the dialog stretches to `maxWidth`.\n *\n * Notice that the dialog width grow is limited by the default margin.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * Determine the max-width of the dialog.\n * The dialog width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false]),\n\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the onClose prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `backdropClick` events.'),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the dialog enters.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the escape key is pressed,\n * `disableKeyboard` is false and the modal is in focus.\n * @deprecated Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.\n */\n onEscapeKeyDown: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.'),\n\n /**\n * Callback fired before the dialog exits.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the dialog is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * If `true`, the Dialog is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * The component used to render the body of the dialog.\n */\n PaperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Determine the container for scrolling the dialog.\n */\n scroll: PropTypes.oneOf(['body', 'paper']),\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialog'\n})(Dialog);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogActions'\n})(DialogActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n overflowY: 'auto',\n padding: '8px 24px',\n '&:first-child': {\n // dialog without title\n paddingTop: 20\n }\n },\n\n /* Styles applied to the root element if `dividers={true}`. */\n dividers: {\n padding: '16px 24px',\n borderTop: \"1px solid \".concat(theme.palette.divider),\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n }\n };\n};\nvar DialogContent = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$dividers = props.dividers,\n dividers = _props$dividers === void 0 ? false : _props$dividers,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"dividers\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dividers && classes.dividers),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display the top and bottom dividers.\n */\n dividers: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogContent'\n})(DialogContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n marginBottom: 12\n }\n};\nvar DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(props, ref) {\n return /*#__PURE__*/React.createElement(Typography, _extends({\n component: \"p\",\n variant: \"body1\",\n color: \"textSecondary\",\n ref: ref\n }, props));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContentText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogContentText'\n})(DialogContentText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n margin: 0,\n padding: '16px 24px',\n flex: '0 0 auto'\n }\n};\nvar DialogTitle = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), disableTypography ? children : /*#__PURE__*/React.createElement(Typography, {\n component: \"h2\",\n variant: \"h6\"\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogTitle.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a typography component.\n * For instance, this can be useful to render an h4 instead of the default h2.\n */\n disableTypography: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDialogTitle'\n})(DialogTitle);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { duration } from '../styles/transitions';\nimport ClickAwayListener from '../ClickAwayListener';\nimport useEventCallback from '../utils/useEventCallback';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport Grow from '../Grow';\nimport SnackbarContent from '../SnackbarContent';\nexport var styles = function styles(theme) {\n var top1 = {\n top: 8\n };\n var bottom1 = {\n bottom: 8\n };\n var right = {\n justifyContent: 'flex-end'\n };\n var left = {\n justifyContent: 'flex-start'\n };\n var top3 = {\n top: 24\n };\n var bottom3 = {\n bottom: 24\n };\n var right3 = {\n right: 24\n };\n var left3 = {\n left: 24\n };\n var center = {\n left: '50%',\n right: 'auto',\n transform: 'translateX(-50%)'\n };\n return {\n /* Styles applied to the root element. */\n root: {\n zIndex: theme.zIndex.snackbar,\n position: 'fixed',\n display: 'flex',\n left: 8,\n right: 8,\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */\n anchorOriginTopCenter: _extends({}, top1, _defineProperty({}, theme.breakpoints.up('sm'), _extends({}, top3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */\n anchorOriginBottomCenter: _extends({}, bottom1, _defineProperty({}, theme.breakpoints.up('sm'), _extends({}, bottom3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */\n anchorOriginTopRight: _extends({}, top1, right, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n left: 'auto'\n }, top3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */\n anchorOriginBottomRight: _extends({}, bottom1, right, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n left: 'auto'\n }, bottom3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */\n anchorOriginTopLeft: _extends({}, top1, left, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n right: 'auto'\n }, top3, left3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */\n anchorOriginBottomLeft: _extends({}, bottom1, left, _defineProperty({}, theme.breakpoints.up('sm'), _extends({\n right: 'auto'\n }, bottom3, left3)))\n };\n};\nvar Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(props, ref) {\n var action = props.action,\n _props$anchorOrigin = props.anchorOrigin;\n _props$anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'bottom',\n horizontal: 'center'\n } : _props$anchorOrigin;\n\n var vertical = _props$anchorOrigin.vertical,\n horizontal = _props$anchorOrigin.horizontal,\n _props$autoHideDurati = props.autoHideDuration,\n autoHideDuration = _props$autoHideDurati === void 0 ? null : _props$autoHideDurati,\n children = props.children,\n classes = props.classes,\n className = props.className,\n ClickAwayListenerProps = props.ClickAwayListenerProps,\n ContentProps = props.ContentProps,\n _props$disableWindowB = props.disableWindowBlurListener,\n disableWindowBlurListener = _props$disableWindowB === void 0 ? false : _props$disableWindowB,\n message = props.message,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n open = props.open,\n resumeHideDuration = props.resumeHideDuration,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n } : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"action\", \"anchorOrigin\", \"autoHideDuration\", \"children\", \"classes\", \"className\", \"ClickAwayListenerProps\", \"ContentProps\", \"disableWindowBlurListener\", \"message\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"onMouseEnter\", \"onMouseLeave\", \"open\", \"resumeHideDuration\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n var timerAutoHide = React.useRef();\n\n var _React$useState = React.useState(true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var handleClose = useEventCallback(function () {\n if (onClose) {\n onClose.apply(void 0, arguments);\n }\n });\n var setAutoHideTimer = useEventCallback(function (autoHideDurationParam) {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(function () {\n handleClose(null, 'timeout');\n }, autoHideDurationParam);\n });\n React.useEffect(function () {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return function () {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]); // Pause the timer when the user is interacting with the Snackbar\n // or when the user hide the window.\n\n var handlePause = function handlePause() {\n clearTimeout(timerAutoHide.current);\n }; // Restart the timer when the user is no longer interacting with the Snackbar\n // or when the window is shown back.\n\n\n var handleResume = React.useCallback(function () {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n var handleMouseEnter = function handleMouseEnter(event) {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n\n handlePause();\n };\n\n var handleMouseLeave = function handleMouseLeave(event) {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n\n handleResume();\n };\n\n var handleClickAway = function handleClickAway(event) {\n if (onClose) {\n onClose(event, 'clickaway');\n }\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n };\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n React.useEffect(function () {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n return function () {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]); // So we only render active snackbars.\n\n if (!open && exited) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(ClickAwayListener, _extends({\n onClickAway: handleClickAway\n }, ClickAwayListenerProps), /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"anchorOrigin\".concat(capitalize(vertical)).concat(capitalize(horizontal))], className),\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEnter: createChainedFunction(handleEnter, onEnter),\n onEntered: onEntered,\n onEntering: onEntering,\n onExit: onExit,\n onExited: createChainedFunction(handleExited, onExited),\n onExiting: onExiting,\n timeout: transitionDuration,\n direction: vertical === 'top' ? 'down' : 'up'\n }, TransitionProps), children || /*#__PURE__*/React.createElement(SnackbarContent, _extends({\n message: message,\n action: action\n }, ContentProps)))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Snackbar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display. It renders after the message, at the end of the snackbar.\n */\n action: PropTypes.node,\n\n /**\n * The anchor of the `Snackbar`.\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['center', 'left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onClose` function. `onClose` should then set the state of the `open`\n * prop to hide the Snackbar. This behavior is disabled by default with\n * the `null` value.\n */\n autoHideDuration: PropTypes.number,\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children: PropTypes.element,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Props applied to the `ClickAwayListener` element.\n */\n ClickAwayListenerProps: PropTypes.object,\n\n /**\n * Props applied to the [`SnackbarContent`](/api/snackbar-content/) element.\n */\n ContentProps: PropTypes.object,\n\n /**\n * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.\n */\n disableWindowBlurListener: PropTypes.bool,\n\n /**\n * When displaying multiple consecutive Snackbars from a parent rendering a single\n * , add the key prop to ensure independent treatment of each message.\n * e.g. , otherwise, the message may update-in-place and\n * features such as autoHideDuration may be canceled.\n */\n key: PropTypes.any,\n\n /**\n * The message to display.\n */\n message: PropTypes.node,\n\n /**\n * Callback fired when the component requests to be closed.\n * Typically `onClose` is used to set state in the parent component,\n * which is used to control the `Snackbar` `open` prop.\n * The `reason` parameter can optionally be used to control the response to `onClose`,\n * for example ignoring `clickaway`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"timeout\"` (`autoHideDuration` expired), `\"clickaway\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the transition is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired before the transition is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the transition is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * @ignore\n */\n onMouseEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n\n /**\n * If `true`, `Snackbar` is open.\n */\n open: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before dismissing after user interaction.\n * If `autoHideDuration` prop isn't specified, it does nothing.\n * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,\n * we default to `autoHideDuration / 2` ms.\n */\n resumeHideDuration: PropTypes.number,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiSnackbar'\n})(Snackbar);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');\n\nexports.default = _default;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minHeight: 36,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n borderRadius: '50%',\n padding: 0,\n minWidth: 0,\n width: 56,\n height: 56,\n boxShadow: theme.shadows[6],\n '&:active': {\n boxShadow: theme.shadows[12]\n },\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n },\n textDecoration: 'none'\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // assure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n primary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n secondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"extended\"`. */\n extended: {\n borderRadius: 48 / 2,\n padding: '0 16px',\n width: 'auto',\n minHeight: 'auto',\n minWidth: 48,\n height: 48,\n '&$sizeSmall': {\n width: 'auto',\n padding: '0 8px',\n borderRadius: 34 / 2,\n minWidth: 34,\n height: 34\n },\n '&$sizeMedium': {\n width: 'auto',\n padding: '0 16px',\n borderRadius: 40 / 2,\n minWidth: 40,\n height: 40\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `size=\"small\"``. */\n sizeSmall: {\n width: 40,\n height: 40\n },\n\n /* Styles applied to the root element if `size=\"medium\"``. */\n sizeMedium: {\n width: 48,\n height: 48\n }\n };\n};\nvar Fab = /*#__PURE__*/React.forwardRef(function Fab(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$size = props.size,\n size = _props$size === void 0 ? 'large' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circular' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableFocusRipple\", \"focusVisibleClassName\", \"size\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, size !== 'large' && classes[\"size\".concat(capitalize(size))], disabled && classes.disabled, variant === 'extended' && classes.extended, {\n 'primary': classes.primary,\n 'secondary': classes.secondary,\n 'inherit': classes.colorInherit\n }[color]),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? Fab.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n * 'round' is deprecated, use 'circular' instead.\n */\n variant: chainPropTypes(PropTypes.oneOf(['extended', 'circular', 'round']), function (props) {\n if (props.variant === 'round') {\n throw new Error('Material-UI: variant=\"round\" was renamed variant=\"circular\" for consistency.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFab'\n})(Fab);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `disableGutters={false}`. */\n gutters: _defineProperty({\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2)\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `variant=\"regular\"`. */\n regular: theme.mixins.toolbar,\n\n /* Styles applied to the root element if `variant=\"dense\"`. */\n dense: {\n minHeight: 48\n }\n };\n};\nvar Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'regular' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes[variant], className, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Toolbar.propTypes = {\n /**\n * Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, disables gutter padding.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['regular', 'dense'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiToolbar'\n})(Toolbar);","import React from 'react';\nimport PropTypes from 'prop-types';\nimport SVG from 'react-inlinesvg';\n\nimport IconSystem from '@material-ui/icons/SettingsApplications';\nimport IconPhoto from '@material-ui/icons/Photo';\nimport IconGroup from '@material-ui/icons/SupervisedUserCircle';\nimport IconUser from '@material-ui/icons/PersonOutlined';\nimport IconHost from '@material-ui/icons/Router';\nimport IconConnection from '@material-ui/icons/Wifi';\nimport IconInfo from '@material-ui/icons/Info';\nimport IconMeta from '@material-ui/icons/Description';\nimport IconAlias from '../icons/IconAlias';\n\nimport Utils from './Utils';\n\nexport function getSystemIcon(obj) {\n let icon;\n const id = obj?._id;\n\n if (!id) {\n return null;\n }\n\n // system or design have special icons\n if (id.startsWith('_design/') || (id === 'system')) {\n icon = ;\n } else if (id === '0_userdata' || id === '0_userdata.0') {\n icon = ;\n } else if (id === 'alias' || id === 'alias.0') {\n icon = ;\n } else if (id === 'system.adapter') {\n icon = ;\n } else if (id === 'system.group') {\n icon = ;\n } else if (id === 'system.user') {\n icon = ;\n } else if (id === 'system.host') {\n icon = ;\n } else if (id.endsWith('.connection') || id.endsWith('.connected')) {\n icon = ;\n } else if (id.endsWith('.info')) {\n icon = ;\n } else if (obj?.type === 'meta') {\n icon = ;\n }\n\n return icon || null;\n}\n\nexport function getSelectIdIcon(obj, imagePrefix) {\n imagePrefix = imagePrefix || '.';//http://localhost:8081';\n let src = '';\n const common = obj?.common;\n\n if (common) {\n const cIcon = common.icon;\n if (cIcon) {\n if (!cIcon.startsWith('data:image/')) {\n if (cIcon.includes('.')) {\n let instance;\n if (obj.type === 'instance' || obj.type === 'adapter') {\n src = imagePrefix + '/adapter/' + common.name + '/' + cIcon;\n } else if (obj._id && obj._id.startsWith('system.adapter.')) {\n instance = obj._id.split('.', 3);\n if (cIcon[0] === '/') {\n instance[2] += cIcon;\n } else {\n instance[2] += '/' + cIcon;\n }\n src = imagePrefix + '/adapter/' + instance[2];\n } else {\n instance = obj._id.split('.', 2);\n if (cIcon[0] === '/') {\n instance[0] += cIcon;\n } else {\n instance[0] += '/' + cIcon;\n }\n src = imagePrefix + '/adapter/' + instance[0];\n }\n } else {\n return null;\n }\n } else {\n // base 64 image\n src = cIcon;\n }\n }\n }\n\n return src || null;\n}\n\nclass Icon extends React.Component {\n render() {\n if (this.props.src) {\n if (typeof this.props.src === 'string') {\n if (this.props.src.length < 3) {\n return {this.props.src}; // utf-8 char\n } else {\n if (this.props.src.startsWith('data:image/svg')) {\n return ;\n } else {\n return \"\";\n }\n }\n } else {\n return this.props.src;\n }\n } else {\n return null;\n }\n }\n}\n\nIcon.propTypes = {\n color: PropTypes.string,\n title: PropTypes.string,\n src: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n className: PropTypes.string,\n imagePrefix: PropTypes.string,\n style: PropTypes.object,\n styleUTF8: PropTypes.object,\n};\n\nexport default Icon;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.json2tsv = void 0;\nfunction assertString2DArray(arg) {\n if (!Array.isArray(arg)) {\n throw new TypeError(`Expected string[][], got ${typeof arg}`);\n }\n for (const x of arg) {\n if (!Array.isArray(x)) {\n throw new TypeError(`Expected string[][], got ${typeof x}[]`);\n }\n for (const y of x) {\n if (typeof y !== 'string') {\n throw new TypeError(`Expected string[][], got ${typeof y}[][]`);\n }\n }\n }\n}\nconst SPECIAL_CHAR_REGEX = /[\\t\\n\"]/;\nfunction hasSpecialChar(string) {\n return SPECIAL_CHAR_REGEX.test(string);\n}\nfunction json2tsv(json) {\n assertString2DArray(json);\n return json.map(row => {\n return row.map(cell => {\n return hasSpecialChar(cell) ? `\"${cell.replace(/\"/g, '\"\"')}\"` : cell;\n }).join('\\t');\n }).join('\\n');\n}\nexports.json2tsv = json2tsv;\n//# sourceMappingURL=json2tsv.js.map","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tsv2json = void 0;\n/**\n * Modifies the given array, removing the extracted prefix.\n *\n * Assumes the array is nonempty.\n *\n * Here's how it works:\n * If a cell does not start with \", it is a 'raw' cell and everything is read verbatim until a \\t or \\n is found, which ends the cell.\n * If a cell starts with \", it starts in 'escaped' mode, ignoring this first \". In escaped mode, \\t and \\n are treated as normal characters. Once another \" is found, unless it is not a \"\", the escaped mode is over (but the cell isn't necessarily over yet - it will be over on the next \\t or \\n).\n * If the full tsv data finishes with a cell in escaped mode, then that cell is over.\n */\nfunction extractFirstCell(tsvCharacters) {\n const result = [];\n let escapedMode = tsvCharacters[0] === '\"';\n let index = escapedMode ? 1 : 0;\n function done(lineIsOver) {\n tsvCharacters.splice(0, index + 1);\n return { cell: result.join(''), lineIsOver };\n }\n while (index < tsvCharacters.length) {\n const char = tsvCharacters[index];\n const nextChar = tsvCharacters[index + 1];\n if (escapedMode) {\n if (char === '\"') {\n if (nextChar === '\"') {\n result.push('\"');\n index++;\n }\n else {\n escapedMode = false;\n }\n }\n else {\n result.push(char);\n }\n }\n else {\n if (char === '\\r' && nextChar === '\\n') {\n index++;\n return done(true);\n }\n if (char === '\\n')\n return done(true);\n if (char === '\\t')\n return done(false);\n result.push(char);\n }\n index++;\n }\n return done(true);\n}\nfunction tsv2json(tsv) {\n if (typeof tsv !== 'string')\n throw new TypeError(`Expected string, got ${typeof tsv}`);\n if (tsv === '')\n return [[]];\n const characters = [...tsv]; // Account for surrogate pairs\n const result = [];\n let currentRow = [];\n while (characters.length > 0) {\n const { cell, lineIsOver } = extractFirstCell(characters);\n currentRow.push(cell);\n if (lineIsOver) {\n result.push(currentRow);\n currentRow = [];\n }\n }\n return result;\n}\nexports.tsv2json = tsv2json;\n//# sourceMappingURL=tsv2json.js.map","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n",null,null,"/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/typedef */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst enum States {\n /** Pending */\n PENDING = 0,\n /** Resolved / OK */\n RESOLVED = 1,\n /** Rejected / Error */\n REJECTED = 2,\n}\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise(value: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States = States.PENDING;\n private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]> = [];\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val as unknown as any);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value as unknown as any);\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };\n}\n\nexport { SyncPromise };\n","/* eslint-disable max-lines */\nimport {\n Breadcrumb,\n CaptureContext,\n Context,\n Contexts,\n Event,\n EventHint,\n EventProcessor,\n Extra,\n Extras,\n Primitive,\n RequestSession,\n Scope as ScopeInterface,\n ScopeContext,\n Severity,\n Span,\n Transaction,\n User,\n} from '@sentry/types';\nimport { dateTimestampInSeconds, getGlobalObject, isPlainObject, isThenable, SyncPromise } from '@sentry/utils';\n\nimport { Session } from './session';\n\n/**\n * Absolute maximum number of breadcrumbs added to an event.\n * The `maxBreadcrumbs` option cannot be higher than this value.\n */\nconst MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport class Scope implements ScopeInterface {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean = false;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void> = [];\n\n /** Callback list that will be called after {@link applyToEvent}. */\n protected _eventProcessors: EventProcessor[] = [];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[] = [];\n\n /** User */\n protected _user: User = {};\n\n /** Tags */\n protected _tags: { [key: string]: Primitive } = {};\n\n /** Extra */\n protected _extra: Extras = {};\n\n /** Contexts */\n protected _contexts: Contexts = {};\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: Severity;\n\n /** Transaction Name */\n protected _transactionName?: string;\n\n /** Span */\n protected _span?: Span;\n\n /** Session */\n protected _session?: Session;\n\n /** Request Mode Session Status */\n protected _requestSession?: RequestSession;\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n protected _sdkProcessingMetadata?: { [key: string]: unknown } = {};\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n public static clone(scope?: Scope): Scope {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n this._user = user || {};\n if (this._session) {\n this._session.update({ user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n public getRequestSession(): RequestSession | undefined {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n public setRequestSession(requestSession?: RequestSession): this {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: Severity): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Can be removed in major version.\n * @deprecated in favor of {@link this.setTransactionName}\n */\n public setTransaction(name?: string): this {\n return this.setTransactionName(name);\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts = { ...this._contexts, [key]: context };\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSpan(span?: Span): this {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSpan(): Span | undefined {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n public getTransaction(): Transaction | undefined {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext as (scope: T) => T)(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext as ScopeContext;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n this._breadcrumbs = [...this._breadcrumbs, mergedBreadcrumb].slice(-maxCrumbs);\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional information about the original exception.\n * @hidden\n */\n public applyToEvent(event: Event, hint?: EventHint): PromiseLike {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transactionName = this._span.transaction && this._span.transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = this._sdkProcessingMetadata;\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n public setSDKProcessingMetadata(newData: { [key: string]: unknown }): this {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n protected _notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint?: EventHint,\n index: number = 0,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n if (isThenable(result)) {\n void (result as PromiseLike)\n .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n private _applyFingerprint(event: Event): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors(): EventProcessor[] {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n const global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback: EventProcessor): void {\n getGlobalEventProcessors().push(callback);\n}\n","import { Session as SessionInterface, SessionContext, SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, timestampInSeconds, uuid4 } from '@sentry/utils';\n\n/**\n * @inheritdoc\n */\nexport class Session implements SessionInterface {\n public userAgent?: string;\n public errors: number = 0;\n public release?: string;\n public sid: string = uuid4();\n public did?: string;\n public timestamp: number;\n public started: number;\n public duration?: number = 0;\n public status: SessionStatus = 'ok';\n public environment?: string;\n public ipAddress?: string;\n public init: boolean = true;\n public ignoreDuration: boolean = false;\n\n public constructor(context?: Omit) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n this.timestamp = startingTime;\n this.started = startingTime;\n if (context) {\n this.update(context);\n }\n }\n\n /** JSDoc */\n // eslint-disable-next-line complexity\n public update(context: SessionContext = {}): void {\n if (context.user) {\n if (!this.ipAddress && context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n\n if (!this.did && !context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n this.timestamp = context.timestamp || timestampInSeconds();\n if (context.ignoreDuration) {\n this.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n this.init = context.init;\n }\n if (!this.did && context.did) {\n this.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n if (this.ignoreDuration) {\n this.duration = undefined;\n } else if (typeof context.duration === 'number') {\n this.duration = context.duration;\n } else {\n const duration = this.timestamp - this.started;\n this.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n this.release = context.release;\n }\n if (context.environment) {\n this.environment = context.environment;\n }\n if (!this.ipAddress && context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n if (!this.userAgent && context.userAgent) {\n this.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n if (context.status) {\n this.status = context.status;\n }\n }\n\n /** JSDoc */\n public close(status?: Exclude): void {\n if (status) {\n this.update({ status });\n } else if (this.status === 'ok') {\n this.update({ status: 'exited' });\n } else {\n this.update();\n }\n }\n\n /** JSDoc */\n public toJSON(): {\n init: boolean;\n sid: string;\n did?: string;\n timestamp: string;\n started: string;\n duration?: number;\n status: SessionStatus;\n errors: number;\n attrs?: {\n release?: string;\n environment?: string;\n user_agent?: string;\n ip_address?: string;\n };\n } {\n return dropUndefinedKeys({\n sid: `${this.sid}`,\n init: this.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(this.started * 1000).toISOString(),\n timestamp: new Date(this.timestamp * 1000).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? `${this.did}` : undefined,\n duration: this.duration,\n attrs: {\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent,\n },\n });\n }\n}\n","/* eslint-disable max-lines */\nimport {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n CustomSamplingContext,\n Event,\n EventHint,\n Extra,\n Extras,\n Hub as HubInterface,\n Integration,\n IntegrationClass,\n Primitive,\n SessionContext,\n Severity,\n Span,\n SpanContext,\n Transaction,\n TransactionContext,\n User,\n} from '@sentry/types';\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isNodeEnv, logger, uuid4 } from '@sentry/utils';\n\nimport { Scope } from './scope';\nimport { Session } from './session';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nexport const API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * A layer in the process stack.\n * @hidden\n */\nexport interface Layer {\n client?: Client;\n scope?: Scope;\n}\n\n/**\n * An object that contains a hub and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: {\n hub?: Hub;\n /**\n * Extra Hub properties injected by various SDKs\n */\n integrations?: Integration[];\n extensions?: {\n /** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n domain?: { [key: string]: any };\n } & {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n };\n}\n\n/**\n * @hidden\n * @deprecated Can be removed once `Hub.getActiveDomain` is removed.\n */\nexport interface DomainAsCarrier extends Carrier {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n members: { [key: string]: any }[];\n}\n\n/**\n * @inheritDoc\n */\nexport class Hub implements HubInterface {\n /** Is a {@link Layer}[] containing the client and scope */\n private readonly _stack: Layer[] = [{}];\n\n /** Contains the last event id of a captured event. */\n private _lastEventId?: string;\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {\n this.getStackTop().scope = scope;\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n public isOlderThan(version: number): boolean {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n public bindClient(client?: Client): void {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n public pushScope(): Scope {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n public popScope(): boolean {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n public withScope(callback: (scope: Scope) => void): void {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /** Returns the scope of the top stack. */\n public getScope(): Scope | undefined {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n public getStack(): Layer[] {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: exception,\n syntheticException,\n };\n }\n\n this._invokeClient('captureException', exception, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint): string {\n const eventId = (this._lastEventId = uuid4());\n let finalHint = hint;\n\n // If there's no explicit hint provided, mimic the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n let syntheticException: Error;\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception as Error;\n }\n finalHint = {\n originalException: message,\n syntheticException,\n };\n }\n\n this._invokeClient('captureMessage', message, level, {\n ...finalHint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = uuid4();\n if (event.type !== 'transaction') {\n this._lastEventId = eventId;\n }\n\n this._invokeClient('captureEvent', event, {\n ...hint,\n event_id: eventId,\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const { scope, client } = this.getStackTop();\n\n if (!scope || !client) return;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): void {\n const scope = this.getScope();\n if (scope) scope.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): void {\n const scope = this.getScope();\n if (scope) scope.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): void {\n const scope = this.getScope();\n if (scope) scope.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): void {\n const scope = this.getScope();\n if (scope) scope.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): void {\n const scope = this.getScope();\n if (scope) scope.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setContext(name: string, context: { [key: string]: any } | null): void {\n const scope = this.getScope();\n if (scope) scope.setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n public configureScope(callback: (scope: Scope) => void): void {\n const { scope, client } = this.getStackTop();\n if (scope && client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n public run(callback: (hub: Hub) => void): void {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSpan(context: SpanContext): Span {\n return this._callExtensionMethod('startSpan', context);\n }\n\n /**\n * @inheritDoc\n */\n public startTransaction(context: TransactionContext, customSamplingContext?: CustomSamplingContext): Transaction {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n }\n\n /**\n * @inheritDoc\n */\n public traceHeaders(): { [key: string]: string } {\n return this._callExtensionMethod<{ [key: string]: string }>('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(endSession: boolean = false): void {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n public endSession(): void {\n const layer = this.getStackTop();\n const scope = layer && layer.scope;\n const session = scope && scope.getSession();\n if (session) {\n session.close();\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n if (scope) {\n scope.setSession();\n }\n }\n\n /**\n * @inheritDoc\n */\n public startSession(context?: SessionContext): Session {\n const { scope, client } = this.getStackTop();\n const { release, environment } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const global = getGlobalObject<{ navigator?: { userAgent?: string } }>();\n const { userAgent } = global.navigator || {};\n\n const session = new Session({\n release,\n environment,\n ...(scope && { user: scope.getUser() }),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n if (scope) {\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n currentSession.update({ status: 'exited' });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n }\n\n return session;\n }\n\n /**\n * Sends the current Session on the scope\n */\n private _sendSessionUpdate(): void {\n const { scope, client } = this.getStackTop();\n if (!scope) return;\n\n const session = scope.getSession && scope.getSession();\n if (session) {\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _invokeClient(method: M, ...args: any[]): void {\n const { scope, client } = this.getStackTop();\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (client as any)[method](...args, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _callExtensionMethod(method: string, ...args: any[]): T {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n const carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub: Hub): Hub {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub(): Hub {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * Returns the active domain, if one exists\n * @deprecated No longer used; remove in v7\n * @returns The domain, or undefined if there is no active domain\n */\n// eslint-disable-next-line deprecation/deprecation\nexport function getActiveDomain(): DomainAsCarrier | undefined {\n logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n\n const sentry = getMainCarrier().__SENTRY__;\n\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry: Carrier): Hub {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier: Carrier): boolean {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier: Carrier): Hub {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nexport function setHubOnCarrier(carrier: Carrier, hub: Hub): boolean {\n if (!carrier) return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n","export { Angular } from './angular';\nexport { CaptureConsole } from './captureconsole';\nexport { Debug } from './debug';\nexport { Dedupe } from './dedupe';\nexport { Ember } from './ember';\nexport { ExtraErrorData } from './extraerrordata';\nexport { Offline } from './offline';\nexport { ReportingObserver } from './reportingobserver';\nexport { RewriteFrames } from './rewriteframes';\nexport { SessionTiming } from './sessiontiming';\nexport { Transaction } from './transaction';\nexport { Vue } from './vue';\n","// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata\nexport const SDK_NAME = 'sentry.javascript.browser';\n","export const setPrototypeOf =\n Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);\n\n/**\n * setPrototypeOf polyfill using __proto__\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction setProtoOf(obj: TTarget, proto: TProto): TTarget & TProto {\n // @ts-ignore __proto__ does not exist on obj\n obj.__proto__ = proto;\n return obj as TTarget & TProto;\n}\n\n/**\n * setPrototypeOf polyfill using mixin\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction mixinProperties(obj: TTarget, proto: TProto): TTarget & TProto {\n for (const prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n // @ts-ignore typescript complains about indexing so we remove\n obj[prop] = proto[prop];\n }\n }\n\n return obj as TTarget & TProto;\n}\n","import { setPrototypeOf } from './polyfill';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n /** Display name of this error instance. */\n public name: string;\n\n public constructor(public message: string) {\n super(message);\n\n this.name = new.target.prototype.constructor.name;\n setPrototypeOf(this, new.target.prototype);\n }\n}\n","import { DsnComponents, DsnLike, DsnProtocol } from '@sentry/types';\n\nimport { isDebugBuild } from './env';\nimport { SentryError } from './error';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\nfunction dsnFromString(str: string): DsnComponents {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(`Invalid Sentry Dsn: ${str}`);\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n // TODO this is for backwards compatibility, and can be removed in a future version\n if ('user' in components && !('publicKey' in components)) {\n components.publicKey = components.user;\n }\n\n return {\n user: components.publicKey || '',\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean | void {\n if (!isDebugBuild()) {\n return;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray = ['protocol', 'publicKey', 'host', 'projectId'];\n requiredComponents.forEach(component => {\n if (!dsn[component]) {\n throw new SentryError(`Invalid Sentry Dsn: ${component} missing`);\n }\n });\n\n if (!projectId.match(/^\\d+$/)) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n }\n\n if (!isValidProtocol(protocol)) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n throw new SentryError(`Invalid Sentry Dsn: Invalid port ${port}`);\n }\n\n return true;\n}\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport function makeDsn(from: DsnLike): DsnComponents {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n\n validateDsn(components);\n\n return components;\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Integration, Options } from '@sentry/types';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n} & { initialized?: boolean };\n\n/**\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n return integrations.reduce((acc, integrations) => {\n if (acc.every(accIntegration => integrations.name !== accIntegration.name)) {\n acc.push(integrations);\n }\n return acc;\n }, [] as Integration[]);\n}\n\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options: Options): Integration[] {\n const defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];\n const userIntegrations = options.integrations;\n\n let integrations: Integration[] = [...filterDuplicates(defaultIntegrations)];\n\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = [\n ...integrations.filter(integrations =>\n userIntegrations.every(userIntegration => userIntegration.name !== integrations.name),\n ),\n // And filter out duplicated user options integrations\n ...filterDuplicates(userIntegrations),\n ];\n } else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n\n // Make sure that if present, `Debug` integration will always run last\n const integrationsNames = integrations.map(i => i.name);\n const alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));\n }\n\n return integrations;\n}\n\n/** Setup given integration */\nexport function setupIntegration(integration: Integration): void {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(`Integration installed: ${integration.name}`);\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options: O): IntegrationIndex {\n const integrations: IntegrationIndex = {};\n getIntegrationsToSetup(options).forEach(integration => {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n addNonEnumerableProperty(integrations, 'initialized', true);\n return integrations;\n}\n","/* eslint-disable max-lines */\nimport { Scope, Session } from '@sentry/hub';\nimport {\n Client,\n DsnComponents,\n Event,\n EventHint,\n Integration,\n IntegrationClass,\n Options,\n Severity,\n Transport,\n} from '@sentry/types';\nimport {\n checkOrSetAlreadyCaught,\n dateTimestampInSeconds,\n isDebugBuild,\n isPlainObject,\n isPrimitive,\n isThenable,\n logger,\n makeDsn,\n normalize,\n rejectedSyncPromise,\n resolvedSyncPromise,\n SentryError,\n SyncPromise,\n truncate,\n uuid4,\n} from '@sentry/utils';\n\nimport { Backend, BackendClass } from './basebackend';\nimport { IntegrationIndex, setupIntegrations } from './integration';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /**\n * The backend used to physically interact in the environment. Usually, this\n * will correspond to the client. When composing SDKs, however, the Backend\n * from the root SDK will be used.\n */\n protected readonly _backend: B;\n\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: DsnComponents;\n\n /** Array of used integrations. */\n protected _integrations: IntegrationIndex = {};\n\n /** Number of calls being processed */\n protected _numProcessing: number = 0;\n\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n protected constructor(backendClass: BackendClass, options: O) {\n this._backend = new backendClass(options);\n this._options = options;\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._getBackend()\n .eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined {\n let eventId: string | undefined = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId: string | undefined = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!this._isEnabled()) {\n if (isDebugBuild()) {\n logger.warn('SDK not enabled, will not capture session.');\n }\n return;\n }\n\n if (!(typeof session.release === 'string')) {\n if (isDebugBuild()) {\n logger.warn('Discarded session because of missing or non-string release');\n }\n } else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): DsnComponents | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._getBackend().getTransport();\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return this.getTransport()\n .close(timeout)\n .then(transportFlushed => clientFinished && transportFlushed);\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n if (this._isEnabled() && !this._integrations.initialized) {\n this._integrations = setupIntegrations(this._options);\n }\n }\n\n /**\n * @inheritDoc\n */\n public getIntegration(integration: IntegrationClass): T | null {\n try {\n return (this._integrations[integration.id] as T) || null;\n } catch (_oO) {\n logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n session.update({\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /** Deliver captured session to Sentry */\n protected _sendSession(session: Session): void {\n this._getBackend().sendSession(session);\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Returns the current backend. */\n protected _getBackend(): B {\n return this._backend;\n }\n\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n const { normalizeDepth = 3 } = this.getOptions();\n const prepared: Event = {\n ...event,\n event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = resolvedSyncPromise(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n }\n\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n protected _normalizeEvent(event: Event | null, depth: number): Event | null {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth),\n }),\n };\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n\n event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, baseClientNormalized: true };\n\n return normalized;\n }\n\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n protected _applyClientOptions(event: Event): void {\n const options = this.getOptions();\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n }\n\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\n protected _applyIntegrationsMetadata(event: Event): void {\n const integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationsArray];\n }\n }\n\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n protected _sendEvent(event: Event): void {\n this._getBackend().sendEvent(event);\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n logger.error(reason);\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint?: EventHint, scope?: Scope): PromiseLike {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { beforeSend, sampleRate } = this.getOptions();\n const transport = this.getTransport();\n\n type RecordLostEvent = NonNullable;\n type RecordLostEventParams = Parameters;\n\n function recordLostEvent(outcome: RecordLostEventParams[0], category: RecordLostEventParams[1]): void {\n if (transport.recordLostEvent) {\n transport.recordLostEvent(outcome, category);\n }\n }\n\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.'));\n }\n\n const isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n recordLostEvent('sample_rate', 'event');\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n ),\n );\n }\n\n return this._prepareEvent(event, scope, hint)\n .then(prepared => {\n if (prepared === null) {\n recordLostEvent('event_processor', event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n\n const isInternalException = hint && hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n\n const beforeSendResult = beforeSend(prepared, hint);\n return _ensureBeforeSendRv(beforeSendResult);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n recordLostEvent('before_send', event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n\n const session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason as Error,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing += 1;\n void promise.then(\n value => {\n this._numProcessing -= 1;\n return value;\n },\n reason => {\n this._numProcessing -= 1;\n return reason;\n },\n );\n }\n}\n\n/**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\nfunction _ensureBeforeSendRv(rv: PromiseLike | Event | null): PromiseLike | Event | null {\n const nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return rv.then(\n event => {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n },\n e => {\n throw new SentryError(`beforeSend rejected with ${e}`);\n },\n );\n } else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n}\n","import { Event, Response, Transport } from '@sentry/types';\nimport { resolvedSyncPromise } from '@sentry/utils';\n\n/** Noop transport */\nexport class NoopTransport implements Transport {\n /**\n * @inheritDoc\n */\n public sendEvent(_: Event): PromiseLike {\n return resolvedSyncPromise({\n reason: `NoopTransport: Event has been skipped because no Dsn is configured.`,\n status: 'skipped',\n });\n }\n\n /**\n * @inheritDoc\n */\n public close(_?: number): PromiseLike {\n return resolvedSyncPromise(true);\n }\n}\n","import { Event, EventHint, Options, Session, Severity, Transport } from '@sentry/types';\nimport { isDebugBuild, logger, SentryError } from '@sentry/utils';\n\nimport { NoopTransport } from './transports/noop';\n\n/**\n * Internal platform-dependent Sentry SDK Backend.\n *\n * While {@link Client} contains business logic specific to an SDK, the\n * Backend offers platform specific implementations for low-level operations.\n * These are persisting and loading information, sending events, and hooking\n * into the environment.\n *\n * Backends receive a handle to the Client in their constructor. When a\n * Backend automatically generates events, it must pass them to\n * the Client for validation and processing first.\n *\n * Usually, the Client will be of corresponding type, e.g. NodeBackend\n * receives NodeClient. However, higher-level SDKs can choose to instantiate\n * multiple Backends and delegate tasks between them. In this case, an event\n * generated by one backend might very well be sent by another one.\n *\n * The client also provides access to options via {@link Client.getOptions}.\n * @hidden\n */\nexport interface Backend {\n /** Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n eventFromException(exception: any, hint?: EventHint): PromiseLike;\n\n /** Creates an {@link Event} from primitive inputs to `captureMessage`. */\n eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike;\n\n /** Submits the event to Sentry */\n sendEvent(event: Event): void;\n\n /** Submits the session to Sentry */\n sendSession(session: Session): void;\n\n /**\n * Returns the transport that is used by the backend.\n * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.\n *\n * @returns The transport.\n */\n getTransport(): Transport;\n}\n\n/**\n * A class object that can instantiate Backend objects.\n * @hidden\n */\nexport type BackendClass = new (options: O) => B;\n\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nexport abstract class BaseBackend implements Backend {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** Cached transport used internally. */\n protected _transport: Transport;\n\n /** Creates a new backend instance. */\n public constructor(options: O) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public eventFromException(_exception: any, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromException` method');\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: Severity, _hint?: EventHint): PromiseLike {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): void {\n void this._transport.sendEvent(event).then(null, reason => {\n if (isDebugBuild()) {\n logger.error(`Error while sending event: ${reason}`);\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): void {\n if (!this._transport.sendSession) {\n if (isDebugBuild()) {\n logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n }\n return;\n }\n\n void this._transport.sendSession(session).then(null, reason => {\n if (isDebugBuild()) {\n logger.error(`Error while sending session: ${reason}`);\n }\n });\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport {\n return this._transport;\n }\n\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n protected _setupTransport(): Transport {\n return new NoopTransport();\n }\n}\n","/**\n * This was originally forked from https://github.com/occ/TraceKit, but has since been\n * largely modified and is now maintained as part of Sentry JS SDK.\n */\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access, max-lines */\n\n/**\n * An object representing a single stack frame.\n * {Object} StackFrame\n * {string} url The JavaScript or HTML file URL.\n * {string} func The function name, or empty for anonymous functions (if guessing did not work).\n * {string[]?} args The arguments passed to the function, if known.\n * {number=} line The line number, if known.\n * {number=} column The column number, if known.\n * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.\n */\nexport interface StackFrame {\n url: string;\n func: string;\n line: number | null;\n column: number | null;\n}\n\n/**\n * An object representing a JavaScript stack trace.\n * {Object} StackTrace\n * {string} name The name of the thrown exception.\n * {string} message The exception error message.\n * {TraceKit.StackFrame[]} stack An array of stack frames.\n */\nexport interface StackTrace {\n name: string;\n message: string;\n mechanism?: string;\n stack: StackFrame[];\n failed?: boolean;\n}\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chrome =\n /^\\s*at (?:(.*?) ?\\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst gecko =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst winjs =\n /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nconst geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nconst chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function computeStackTrace(ex: any): StackTrace {\n let stack = null;\n let popSize = 0;\n\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n popSize = ex.framesToPop;\n } else if (reactMinifiedRegexp.test(ex.message)) {\n popSize = 1;\n }\n }\n\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n } catch (e) {\n // no-empty\n }\n\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity\nfunction computeStackTraceFromStackProp(ex: any): StackTrace | null {\n if (!ex || !ex.stack) {\n return null;\n }\n\n const stack = [];\n const lines = ex.stack.split('\\n');\n let isEval;\n let submatch;\n let parts;\n let element;\n\n for (const line of lines) {\n if ((parts = chrome.exec(line))) {\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, url] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n element = {\n url,\n func,\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = winjs.exec(line))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n } else if ((parts = gecko.exec(line))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || `eval`;\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n }\n\n let url = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, url] = extractSafariExtensionDetails(func, url);\n\n element = {\n url,\n func,\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n } else {\n continue;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction computeStackTraceFromStacktraceProp(ex: any): StackTrace | null {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace;\n const opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n const opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n const lines = stacktrace.split('\\n');\n const stack = [];\n let parts;\n\n for (let line = 0; line < lines.length; line += 2) {\n let element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n line: +parts[1],\n column: null,\n };\n } else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[5],\n func: parts[3] || parts[4],\n line: +parts[1],\n column: +parts[2],\n };\n }\n\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack,\n };\n}\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunatelly \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, url: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${url}` : `safari-web-extension:${url}`,\n ]\n : [func, url];\n};\n\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace: StackTrace, popSize: number): StackTrace {\n try {\n return {\n ...stacktrace,\n stack: stacktrace.stack.slice(popSize),\n };\n } catch (e) {\n return stacktrace;\n }\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extractMessage(ex: any): string {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n","import { Event, Exception, StackFrame } from '@sentry/types';\nimport { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\n\nimport { computeStackTrace, StackFrame as TraceKitStackFrame, StackTrace as TraceKitStackTrace } from './tracekit';\n\nconst STACKTRACE_LIMIT = 50;\n\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace: TraceKitStackTrace): Exception {\n const frames = prepareFramesForEvent(stacktrace.stack);\n\n const exception: Exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n\n if (frames && frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nexport function eventFromPlainObject(\n exception: Record,\n syntheticException?: Error,\n rejection?: boolean,\n): Event {\n const event: Event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: `Non-Error ${\n rejection ? 'promise rejection' : 'exception'\n } captured with keys: ${extractExceptionKeysForMessage(exception)}`,\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n\n if (syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace: TraceKitStackTrace): Event {\n const exception = exceptionFromStacktrace(stacktrace);\n\n return {\n exception: {\n values: [exception],\n },\n };\n}\n\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack: TraceKitStackFrame[]): StackFrame[] {\n if (!stack || !stack.length) {\n return [];\n }\n\n let localStack = stack;\n\n const firstFrameFunction = localStack[0].func || '';\n const lastFrameFunction = localStack[localStack.length - 1].func || '';\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(\n (frame: TraceKitStackFrame): StackFrame => ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }),\n )\n .reverse();\n}\n","import { Event, EventHint, Options, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isPlainObject,\n resolvedSyncPromise,\n} from '@sentry/utils';\n\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(options: Options, exception: unknown, hint?: EventHint): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n options: Options,\n message: string,\n level: Severity = Severity.Info,\n hint?: EventHint,\n): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(message, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n exception: unknown,\n syntheticException?: Error,\n options: {\n isRejection?: boolean;\n attachStacktrace?: boolean;\n } = {},\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n // eslint-disable-next-line no-param-reassign\n exception = errorEvent.error;\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {\n const domException = exception as DOMException;\n\n if ('stack' in (exception as Error)) {\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception as Error)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception as Error));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception as Record;\n event = eventFromPlainObject(objectException, syntheticException, options.isRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception as string, syntheticException, options);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nexport function eventFromString(\n input: string,\n syntheticException?: Error,\n options: {\n attachStacktrace?: boolean;\n } = {},\n): Event {\n const event: Event = {\n message: input,\n };\n\n if (options.attachStacktrace && syntheticException) {\n const stacktrace = computeStackTrace(syntheticException);\n const frames = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames,\n };\n }\n\n return event;\n}\n","import { DsnComponents, DsnLike, SdkMetadata } from '@sentry/types';\nimport { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/**\n * Stores details about a Sentry SDK\n */\nexport interface APIDetails {\n /** The DSN as passed to Sentry.init() */\n initDsn: DsnLike;\n /** Metadata about the SDK (name, version, etc) for inclusion in envelope headers */\n metadata: SdkMetadata;\n /** The internally used Dsn object. */\n readonly dsn: DsnComponents;\n /** The envelope tunnel to use. */\n readonly tunnel?: string;\n}\n\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n *\n * @deprecated Please use APIDetails\n **/\nexport class API {\n /** The DSN as passed to Sentry.init() */\n public dsn: DsnLike;\n\n /** Metadata about the SDK (name, version, etc) for inclusion in envelope headers */\n public metadata: SdkMetadata;\n\n /** The internally used Dsn object. */\n private readonly _dsnObject: DsnComponents;\n\n /** The envelope tunnel to use. */\n private readonly _tunnel?: string;\n\n /** Create a new instance of API */\n public constructor(dsn: DsnLike, metadata: SdkMetadata = {}, tunnel?: string) {\n this.dsn = dsn;\n this._dsnObject = makeDsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n\n /** Returns the Dsn object. */\n public getDsn(): DsnComponents {\n return this._dsnObject;\n }\n\n /** Does this transport force envelopes? */\n public forceEnvelope(): boolean {\n return !!this._tunnel;\n }\n\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n public getBaseApiEndpoint(): string {\n return getBaseApiEndpoint(this._dsnObject);\n }\n\n /** Returns the store endpoint URL. */\n public getStoreEndpoint(): string {\n return getStoreEndpoint(this._dsnObject);\n }\n\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n public getStoreEndpointWithUrlEncodedAuth(): string {\n return getStoreEndpointWithUrlEncodedAuth(this._dsnObject);\n }\n\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n public getEnvelopeEndpointWithUrlEncodedAuth(): string {\n return getEnvelopeEndpointWithUrlEncodedAuth(this._dsnObject, this._tunnel);\n }\n}\n\n/** Initializes API Details */\nexport function initAPIDetails(dsn: DsnLike, metadata?: SdkMetadata, tunnel?: string): APIDetails {\n return {\n initDsn: dsn,\n metadata: metadata || {},\n dsn: makeDsn(dsn),\n tunnel,\n } as APIDetails;\n}\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents, target: 'store' | 'envelope'): string {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/${target}/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents): string {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n });\n}\n\n/** Returns the store endpoint URL. */\nfunction getStoreEndpoint(dsn: DsnComponents): string {\n return _getIngestEndpoint(dsn, 'store');\n}\n\n/**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getStoreEndpointWithUrlEncodedAuth(dsn: DsnComponents): string {\n return `${getStoreEndpoint(dsn)}?${_encodedAuth(dsn)}`;\n}\n\n/** Returns the envelope endpoint URL. */\nfunction _getEnvelopeEndpoint(dsn: DsnComponents): string {\n return _getIngestEndpoint(dsn, 'envelope');\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn: DsnComponents, tunnel?: string): string {\n return tunnel ? tunnel : `${_getEnvelopeEndpoint(dsn)}?${_encodedAuth(dsn)}`;\n}\n\n/**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\nexport function getRequestHeaders(\n dsn: DsnComponents,\n clientName: string,\n clientVersion: string,\n): { [key: string]: string } {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n const header = [`Sentry sentry_version=${SENTRY_API_VERSION}`];\n header.push(`sentry_client=${clientName}/${clientVersion}`);\n header.push(`sentry_key=${dsn.publicKey}`);\n if (dsn.pass) {\n header.push(`sentry_secret=${dsn.pass}`);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(\n dsnLike: DsnLike,\n dialogOptions: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n },\n): string {\n const dsn = makeDsn(dsnLike);\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions += `&name=${encodeURIComponent(dialogOptions.user.name)}`;\n }\n if (dialogOptions.user.email) {\n encodedOptions += `&email=${encodeURIComponent(dialogOptions.user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n","import { Event, SdkInfo, SentryRequest, SentryRequestType, Session, SessionAggregates } from '@sentry/types';\nimport { dsnToString, normalize } from '@sentry/utils';\n\nimport { APIDetails, getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth } from './api';\n\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api: APIDetails): SdkInfo | undefined {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n const { name, version } = api.metadata.sdk;\n return { name, version };\n}\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event: Event, sdkInfo?: SdkInfo): Event {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session: Session | SessionAggregates, api: APIDetails): SentryRequest {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n const envelopeHeaders = JSON.stringify({\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!api.tunnel && { dsn: dsnToString(api.dsn) }),\n });\n // I know this is hacky but we don't want to add `session` to request type since it's never rate limited\n const type: SentryRequestType = 'aggregates' in session ? ('sessions' as SentryRequestType) : 'session';\n const itemHeaders = JSON.stringify({\n type,\n });\n\n return {\n body: `${envelopeHeaders}\\n${itemHeaders}\\n${JSON.stringify(session)}`,\n type,\n url: getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel),\n };\n}\n\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event: Event, api: APIDetails): SentryRequest {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n const eventType = event.type || 'event';\n const useEnvelope = eventType === 'transaction' || !!api.tunnel;\n\n const { transactionSampling } = event.sdkProcessingMetadata || {};\n const { method: samplingMethod, rate: sampleRate } = transactionSampling || {};\n\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809 and\n // https://github.com/getsentry/sentry-javascript/pull/4425. TL;DR: even though we normalize all events (which should\n // prevent this), something is causing `JSON.stringify` to throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for `skippedNormalization` and pull out the companion hack in the browser playwright tests\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n }\n\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n\n let body;\n try {\n // 99.9% of events should get through just fine - no change in behavior for them\n body = JSON.stringify(event);\n } catch (err) {\n // Record data about the error without replacing original event data, then force renormalization\n event.tags.JSONStringifyError = true;\n event.extra.JSONStringifyError = err;\n try {\n body = JSON.stringify(normalize(event));\n } catch (newErr) {\n // At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.\n // Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to\n // debug with this hack, we won't ever land here.\n const innerErr = newErr as Error;\n body = JSON.stringify({\n message: 'JSON.stringify error after renormalization',\n // setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually\n extra: { message: innerErr.message, stack: innerErr.stack },\n });\n }\n }\n\n const req: SentryRequest = {\n // this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved\n // the mystery\n // body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n body,\n type: eventType,\n url: useEnvelope\n ? getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel)\n : getStoreEndpointWithUrlEncodedAuth(api.dsn),\n };\n\n // https://develop.sentry.dev/sdk/envelopes/\n\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n const envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!api.tunnel && { dsn: dsnToString(api.dsn) }),\n });\n const itemHeaders = JSON.stringify({\n type: eventType,\n\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n\n // The content-type is assumed to be 'application/json' and not part of\n // the current spec for transaction items, so we don't bloat the request\n // body with it.\n //\n // content_type: 'application/json',\n //\n // The length is optional. It must be the number of bytes in req.Body\n // encoded as UTF-8. Since the server can figure this out and would\n // otherwise refuse events that report the length incorrectly, we decided\n // not to send the length to avoid problems related to reporting the wrong\n // size and to reduce request body size.\n //\n // length: new TextEncoder().encode(req.body).length,\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}`;\n req.body = envelope;\n }\n\n return req;\n}\n","import { SentryError } from './error';\nimport { rejectedSyncPromise, resolvedSyncPromise, SyncPromise } from './syncpromise';\n\nexport interface PromiseBuffer {\n // exposes the internal array so tests can assert on the state of it.\n // XXX: this really should not be public api.\n $: Array>;\n add(taskProducer: () => PromiseLike): PromiseLike;\n drain(timeout?: number): PromiseLike;\n}\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit?: number): PromiseBuffer {\n const buffer: Array> = [];\n\n function isReady(): boolean {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task: PromiseLike): PromiseLike {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer: () => PromiseLike): PromiseLike {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout?: number): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n // eslint-disable-next-line no-plusplus\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n","import { forget, getGlobalObject, isDebugBuild, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\n\nconst global = getGlobalObject();\nlet cachedFetchImpl: FetchImpl;\n\nexport type FetchImpl = typeof fetch;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation(): FetchImpl {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n\n const document = global.document;\n let fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === `function`) {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n if (isDebugBuild()) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url: string, body: string): void {\n const isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n const hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n const sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n\n if (supportsFetch()) {\n const fetch = getNativeFetchImplementation();\n return forget(\n fetch(url, {\n body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }),\n );\n }\n}\n","/**\n * Consumes the promise and logs the error when it rejects.\n * @param promise A promise to forget.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forget(promise: PromiseLike): void {\n void promise.then(null, e => {\n // TODO: Use a better logging mechanism\n // eslint-disable-next-line no-console\n console.error(e);\n });\n}\n","import {\n APIDetails,\n eventToSentryRequest,\n getEnvelopeEndpointWithUrlEncodedAuth,\n getStoreEndpointWithUrlEncodedAuth,\n initAPIDetails,\n sessionToSentryRequest,\n} from '@sentry/core';\nimport {\n Event,\n Outcome,\n Response as SentryResponse,\n SentryRequest,\n SentryRequestType,\n Session,\n Transport,\n TransportOptions,\n} from '@sentry/types';\nimport {\n dateTimestampInSeconds,\n dsnToString,\n eventStatusFromHttpCode,\n getGlobalObject,\n isDebugBuild,\n logger,\n makePromiseBuffer,\n parseRetryAfterHeader,\n PromiseBuffer,\n} from '@sentry/utils';\n\nimport { sendReport } from './utils';\n\nfunction requestTypeToCategory(ty: SentryRequestType): string {\n const tyStr = ty as string;\n return tyStr === 'event' ? 'error' : tyStr;\n}\n\nconst global = getGlobalObject();\n\n/** Base Transport class implementation */\nexport abstract class BaseTransport implements Transport {\n /**\n * @deprecated\n */\n public url: string;\n\n /** Helper to get Sentry API endpoints. */\n protected readonly _api: APIDetails;\n\n /** A simple buffer holding all requests. */\n protected readonly _buffer: PromiseBuffer = makePromiseBuffer(30);\n\n /** Locks transport after receiving rate limits in a response */\n protected readonly _rateLimits: Record = {};\n\n protected _outcomes: { [key: string]: number } = {};\n\n public constructor(public options: TransportOptions) {\n this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);\n\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', () => {\n if (global.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event): PromiseLike {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session): PromiseLike {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this._buffer.drain(timeout);\n }\n\n /**\n * @inheritDoc\n */\n public recordLostEvent(reason: Outcome, category: SentryRequestType): void {\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n const key = `${requestTypeToCategory(category)}:${reason}`;\n logger.log(`Adding outcome: ${key}`);\n this._outcomes[key] = (this._outcomes[key] ?? 0) + 1;\n }\n\n /**\n * Send outcomes as an envelope\n */\n protected _flushOutcomes(): void {\n if (!this.options.sendClientReports) {\n return;\n }\n\n const outcomes = this._outcomes;\n this._outcomes = {};\n\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n logger.log('No outcomes to flush');\n return;\n }\n\n logger.log(`Flushing outcomes:\\n${JSON.stringify(outcomes, null, 2)}`);\n\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._api.dsn, this._api.tunnel);\n // Envelope header is required to be at least an empty object\n const envelopeHeader = JSON.stringify({ ...(this._api.tunnel && { dsn: dsnToString(this._api.dsn) }) });\n const itemHeaders = JSON.stringify({\n type: 'client_report',\n });\n const item = JSON.stringify({\n timestamp: dateTimestampInSeconds(),\n discarded_events: Object.keys(outcomes).map(key => {\n const [category, reason] = key.split(':');\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n }),\n });\n const envelope = `${envelopeHeader}\\n${itemHeaders}\\n${item}`;\n\n try {\n sendReport(url, envelope);\n } catch (e) {\n logger.error(e);\n }\n }\n\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n protected _handleResponse({\n requestType,\n response,\n headers,\n resolve,\n reject,\n }: {\n requestType: SentryRequestType;\n response: Response | XMLHttpRequest;\n headers: Record;\n resolve: (value?: SentryResponse | PromiseLike | null | undefined) => void;\n reject: (reason?: unknown) => void;\n }): void {\n const status = eventStatusFromHttpCode(response.status);\n /**\n * \"The name is case-insensitive.\"\n * https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n */\n const limited = this._handleRateLimit(headers);\n if (limited && isDebugBuild()) {\n logger.warn(`Too many ${requestType} requests, backing off until: ${this._disabledUntil(requestType)}`);\n }\n\n if (status === 'success') {\n resolve({ status });\n return;\n }\n\n reject(response);\n }\n\n /**\n * Gets the time that given category is disabled until for rate limiting\n */\n protected _disabledUntil(requestType: SentryRequestType): Date {\n const category = requestTypeToCategory(requestType);\n return this._rateLimits[category] || this._rateLimits.all;\n }\n\n /**\n * Checks if a category is rate limited\n */\n protected _isRateLimited(requestType: SentryRequestType): boolean {\n return this._disabledUntil(requestType) > new Date(Date.now());\n }\n\n /**\n * Sets internal _rateLimits from incoming headers. Returns true if headers contains a non-empty rate limiting header.\n */\n protected _handleRateLimit(headers: Record): boolean {\n const now = Date.now();\n const rlHeader = headers['x-sentry-rate-limits'];\n const raHeader = headers['retry-after'];\n\n if (rlHeader) {\n // rate limit headers are of the form\n //
,
,..\n // where each
is of the form\n // : : : \n // where\n // is a delay in ms\n // is the event type(s) (error, transaction, etc) being rate limited and is of the form\n // ;;...\n // is what's being limited (org, project, or key) - ignored by SDK\n // is an arbitrary string like \"org_quota\" - ignored by SDK\n for (const limit of rlHeader.trim().split(',')) {\n const parameters = limit.split(':', 2);\n const headerDelay = parseInt(parameters[0], 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n for (const category of parameters[1].split(';')) {\n this._rateLimits[category || 'all'] = new Date(now + delay);\n }\n }\n return true;\n } else if (raHeader) {\n this._rateLimits.all = new Date(now + parseRetryAfterHeader(now, raHeader));\n return true;\n }\n return false;\n }\n\n protected abstract _sendRequest(\n sentryRequest: SentryRequest,\n originalPayload: Event | Session,\n ): PromiseLike;\n}\n","import { EventStatus } from '@sentry/types';\n/**\n * Converts an HTTP status code to sentry status {@link EventStatus}.\n *\n * @param code number HTTP status code\n * @returns EventStatus\n */\nexport function eventStatusFromHttpCode(code: number): EventStatus {\n if (code >= 200 && code < 300) {\n return 'success';\n }\n\n if (code === 429) {\n return 'rate_limit';\n }\n\n if (code >= 400 && code < 500) {\n return 'invalid';\n }\n\n if (code >= 500) {\n return 'failed';\n }\n\n return 'unknown';\n}\n","import { Event, Response, SentryRequest, Session, TransportOptions } from '@sentry/types';\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\nimport { FetchImpl, getNativeFetchImplementation } from './utils';\n\n/** `fetch` based transport */\nexport class FetchTransport extends BaseTransport {\n /**\n * Fetch API reference which always points to native browser implementation.\n */\n private _fetch: typeof fetch;\n\n public constructor(options: TransportOptions, fetchImpl: FetchImpl = getNativeFetchImplementation()) {\n super(options);\n this._fetch = fetchImpl;\n }\n\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n protected _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike {\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: `Transport for ${sentryRequest.type} requests locked till ${this._disabledUntil(\n sentryRequest.type,\n )} due to too many requests.`,\n status: 429,\n });\n }\n\n const options: RequestInit = {\n body: sentryRequest.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy,\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n\n return this._buffer\n .add(\n () =>\n new SyncPromise((resolve, reject) => {\n void this._fetch(sentryRequest.url, options)\n .then(response => {\n const headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n this._handleResponse({\n requestType: sentryRequest.type,\n response,\n headers,\n resolve,\n reject,\n });\n })\n .catch(reject);\n }),\n )\n .then(undefined, reason => {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n this.recordLostEvent('queue_overflow', sentryRequest.type);\n } else {\n this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n }\n}\n","import { Event, Response, SentryRequest, Session } from '@sentry/types';\nimport { SentryError, SyncPromise } from '@sentry/utils';\n\nimport { BaseTransport } from './base';\n\n/** `XHR` based transport */\nexport class XHRTransport extends BaseTransport {\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n protected _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike {\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n reason: `Transport for ${sentryRequest.type} requests locked till ${this._disabledUntil(\n sentryRequest.type,\n )} due to too many requests.`,\n status: 429,\n });\n }\n\n return this._buffer\n .add(\n () =>\n new SyncPromise((resolve, reject) => {\n const request = new XMLHttpRequest();\n\n request.onreadystatechange = (): void => {\n if (request.readyState === 4) {\n const headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n this._handleResponse({ requestType: sentryRequest.type, response: request, headers, resolve, reject });\n }\n };\n\n request.open('POST', sentryRequest.url);\n for (const header in this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(this.options.headers, header)) {\n request.setRequestHeader(header, this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n }),\n )\n .then(undefined, reason => {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n this.recordLostEvent('queue_overflow', sentryRequest.type);\n } else {\n this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n }\n}\n","import { BaseBackend } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\n\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.denyUrls}.\n * By default, all errors will be sent.\n */\n allowUrls?: Array;\n\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To allow certain errors instead, use {@link Options.allowUrls}.\n * By default, all errors will be sent.\n */\n denyUrls?: Array;\n\n /** @deprecated use {@link Options.allowUrls} instead. */\n whitelistUrls?: Array;\n\n /** @deprecated use {@link Options.denyUrls} instead. */\n blacklistUrls?: Array;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend {\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike {\n return eventFromException(this._options, exception, hint);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike {\n return eventFromMessage(this._options, message, level, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n tunnel: this._options.tunnel,\n sendClientReports: this._options.sendClientReports,\n _metadata: this._options._metadata,\n };\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n }\n}\n","import { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';\nimport { DsnLike, Event as SentryEvent, Mechanism, Scope, WrappedFunction } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n addNonEnumerableProperty,\n getGlobalObject,\n getOriginalFunction,\n isDebugBuild,\n logger,\n markFunctionWrapped,\n} from '@sentry/utils';\n\nconst global = getGlobalObject();\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(() => {\n ignoreOnError -= 1;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: WrappedFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n before?: WrappedFunction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sentryWrapped: WrappedFunction = function (this: any): void {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg: any) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope: Scope) => {\n scope.addEventProcessor((event: SentryEvent) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') as PropertyDescriptor;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(): void;\n}\n\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options: ReportDialogOptions = {}): void {\n if (!global.document) {\n return;\n }\n\n if (!options.eventId) {\n if (isDebugBuild()) {\n logger.error(`Missing eventId option in showReportDialog call`);\n }\n return;\n }\n\n if (!options.dsn) {\n if (isDebugBuild()) {\n logger.error(`Missing dsn option in showReportDialog call`);\n }\n return;\n }\n\n const script = global.document.createElement('script');\n script.async = true;\n script.src = getReportDialogEndpoint(options.dsn, options);\n\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n\n const injectionPoint = global.document.head || global.document.body;\n\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { WrappedFunction } from '@sentry/types';\n\nimport { isDebugBuild } from './env';\nimport { getGlobalObject } from './global';\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\n\nconst global = getGlobalObject();\n\ntype InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'history'\n | 'sentry'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\ntype InstrumentHandlerCallback = (data: any) => void;\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Instruments given API */\nfunction instrument(type: InstrumentHandlerType): void {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(type: InstrumentHandlerType, callback: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(callback);\n instrument(type);\n}\n\n/** JSDoc */\nfunction triggerHandlers(type: InstrumentHandlerType, data: any): void {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n if (isDebugBuild()) {\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(\n handler,\n )}\\nError: ${e}`,\n );\n }\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole(): void {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level: string): void {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function (originalConsoleMethod: () => any): Function {\n return function (...args: any[]): void {\n triggerHandlers('console', { args, level });\n\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.call(global.console, args);\n }\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch(): void {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function (originalFetch: () => void): () => void {\n return function (...args: any[]): void {\n const handlerData = {\n args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(global, args).then(\n (response: Response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\ntype XHRSendInput = null | Blob | BufferSource | FormData | URLSearchParams | string;\n\n/** JSDoc */\ninterface SentryWrappedXMLHttpRequest extends XMLHttpRequest {\n [key: string]: any;\n __sentry_xhr__?: {\n method?: string;\n url?: string;\n status_code?: number;\n body?: XHRSendInput;\n };\n}\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs: any[] = []): string {\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs: any[] = []): string {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n/** JSDoc */\nfunction instrumentXHR(): void {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen: () => void): () => void {\n return function (this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const url = args[1];\n const xhrInfo: SentryWrappedXMLHttpRequest['__sentry_xhr__'] = (xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = function (): void {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhr.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr,\n });\n }\n };\n\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original: WrappedFunction): Function {\n return function (...readyStateArgs: any[]): void {\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n } else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n return originalOpen.apply(xhr, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend: () => void): () => void {\n return function (this: SentryWrappedXMLHttpRequest, ...args: any[]): void {\n if (this.__sentry_xhr__ && args[0] !== undefined) {\n this.__sentry_xhr__.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref: string;\n\n/** JSDoc */\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = global.onpopstate;\n global.onpopstate = function (this: WindowEventHandlers, ...args: any[]): any {\n const to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function (this: History, ...args: any[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n\nconst debounceDuration = 1000;\nlet debounceTimerID: number | undefined;\nlet lastCapturedEvent: Event | undefined;\n\n/**\n * Decide whether the current event should finish the debounce of previously captured one.\n * @param previous previously captured event\n * @param current event to be captured\n */\nfunction shouldShortcircuitPreviousDebounce(previous: Event | undefined, current: Event): boolean {\n // If there was no previous event, it should always be swapped for the new one.\n if (!previous) {\n return true;\n }\n\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (previous.type !== current.type) {\n return true;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (previous.target !== current.target) {\n return true;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return false;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event: Event): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n\n try {\n const target = event.target as HTMLElement;\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler: Function, globalListener: boolean = false): (event: Event) => void {\n return (event: Event): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.\n if (debounceTimerID === undefined) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = global.setTimeout(() => {\n debounceTimerID = undefined;\n }, debounceDuration);\n };\n}\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: Function;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\n/** JSDoc */\nfunction instrumentDOM(): void {\n if (!('document' in global)) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n global.document.addEventListener('click', globalDOMEventHandler, false);\n global.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (global as any)[target] && (global as any)[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount += 1;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function (\n this: Element,\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this as InstrumentedElement;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount -= 1;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler: OnErrorEventHandler = null;\n/** JSDoc */\nfunction instrumentError(): void {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function (msg: any, url: any, line: any, column: any, error: any): boolean {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nlet _oldOnUnhandledRejectionHandler: ((e: any) => void) | null = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function (e: any): boolean {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Event, Integration, Severity } from '@sentry/types';\nimport {\n addInstrumentationHandler,\n getEventDescription,\n getGlobalObject,\n htmlTreeAsString,\n parseUrl,\n safeJoin,\n severityFromString,\n} from '@sentry/utils';\n\n/** JSDoc */\ninterface BreadcrumbsOptions {\n console: boolean;\n dom: boolean | { serializeAttribute: string | string[] };\n fetch: boolean;\n history: boolean;\n sentry: boolean;\n xhr: boolean;\n}\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nexport class Breadcrumbs implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Breadcrumbs';\n\n /**\n * @inheritDoc\n */\n public name: string = Breadcrumbs.id;\n\n /** JSDoc */\n private readonly _options: BreadcrumbsOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this._options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n public addSentryBreadcrumb(event: Event): void {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n public setupOnce(): void {\n if (this._options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this._options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this._options.dom));\n }\n if (this._options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this._options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this._options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n }\n}\n\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _domBreadcrumb(dom: BreadcrumbsOptions['dom']): (handlerData: { [key: string]: any }) => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _innerDomBreadcrumb(handlerData: { [key: string]: any }): void {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target as Node, keyAttrs)\n : htmlTreeAsString(handlerData.event as unknown as Node, keyAttrs);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _consoleBreadcrumb(handlerData: { [key: string]: any }): void {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _xhrBreadcrumb(handlerData: { [key: string]: any }): void {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {};\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: {\n method,\n url,\n status_code,\n },\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n input: body,\n },\n );\n\n return;\n }\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _fetchBreadcrumb(handlerData: { [key: string]: any }): void {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _historyBreadcrumb(handlerData: { [key: string]: any }): void {\n const global = getGlobalObject();\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(global.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}\n","import { BaseClient, Scope, SDK_VERSION } from '@sentry/core';\nimport { Event, EventHint } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\nimport { BrowserBackend, BrowserOptions } from './backend';\nimport { injectReportDialog, ReportDialogOptions } from './helpers';\nimport { Breadcrumbs } from './integrations';\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserOptions = {}) {\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(BrowserBackend, options);\n }\n\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n public showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n const document = getGlobalObject().document;\n if (!document) {\n return;\n }\n\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n\n injectReportDialog({\n ...options,\n dsn: options.dsn || this.getDsn(),\n });\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, scope, hint);\n }\n\n /**\n * @inheritDoc\n */\n protected _sendEvent(event: Event): void {\n const integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n super._sendEvent(event);\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString: () => void;\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class FunctionToString implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'FunctionToString';\n\n /**\n * @inheritDoc\n */\n public name: string = FunctionToString.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function (this: WrappedFunction, ...args: any[]): string {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n }\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { Event, Integration, StackFrame } from '@sentry/types';\nimport { getEventDescription, isDebugBuild, isMatchingPattern, logger } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\n/** JSDoc */\ninterface InboundFiltersOptions {\n allowUrls: Array;\n denyUrls: Array;\n ignoreErrors: Array;\n ignoreInternal: boolean;\n\n /** @deprecated use {@link InboundFiltersOptions.allowUrls} instead. */\n whitelistUrls: Array;\n /** @deprecated use {@link InboundFiltersOptions.denyUrls} instead. */\n blacklistUrls: Array;\n}\n\n/** Inbound filters configurable by the user */\nexport class InboundFilters implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'InboundFilters';\n\n /**\n * @inheritDoc\n */\n public name: string = InboundFilters.id;\n\n public constructor(private readonly _options: Partial = {}) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n const hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n const self = hub.getIntegration(InboundFilters);\n if (self) {\n const client = hub.getClient();\n const clientOptions = client ? client.getOptions() : {};\n // This checks prevents most of the occurrences of the bug linked below:\n // https://github.com/getsentry/sentry-javascript/issues/2622\n // The bug is caused by multiple SDK instances, where one is minified and one is using non-mangled code.\n // Unfortunatelly we cannot fix it reliably (thus reserved property in rollup's terser config),\n // as we cannot force people using multiple instances in their apps to sync SDK versions.\n const options = typeof self._mergeOptions === 'function' ? self._mergeOptions(clientOptions) : {};\n if (typeof self._shouldDropEvent !== 'function') {\n return event;\n }\n return self._shouldDropEvent(event, options) ? null : event;\n }\n return event;\n });\n }\n\n /** JSDoc */\n private _shouldDropEvent(event: Event, options: Partial): boolean {\n if (this._isSentryError(event, options)) {\n if (isDebugBuild()) {\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n }\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n if (isDebugBuild()) {\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n }\n return true;\n }\n if (this._isDeniedUrl(event, options)) {\n if (isDebugBuild()) {\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n }\n return true;\n }\n if (!this._isAllowedUrl(event, options)) {\n if (isDebugBuild()) {\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${this._getEventFilterUrl(event)}`,\n );\n }\n return true;\n }\n return false;\n }\n\n /** JSDoc */\n private _isSentryError(event: Event, options: Partial): boolean {\n if (!options.ignoreInternal) {\n return false;\n }\n\n try {\n // @ts-ignore can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n\n return false;\n }\n\n /** JSDoc */\n private _isIgnoredError(event: Event, options: Partial): boolean {\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n\n return this._getPossibleEventMessages(event).some(message =>\n // Not sure why TypeScript complains here...\n (options.ignoreErrors as Array).some(pattern => isMatchingPattern(message, pattern)),\n );\n }\n\n /** JSDoc */\n private _isDeniedUrl(event: Event, options: Partial): boolean {\n // TODO: Use Glob instead?\n if (!options.denyUrls || !options.denyUrls.length) {\n return false;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? false : options.denyUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _isAllowedUrl(event: Event, options: Partial): boolean {\n // TODO: Use Glob instead?\n if (!options.allowUrls || !options.allowUrls.length) {\n return true;\n }\n const url = this._getEventFilterUrl(event);\n return !url ? true : options.allowUrls.some(pattern => isMatchingPattern(url, pattern));\n }\n\n /** JSDoc */\n private _mergeOptions(clientOptions: Partial = {}): Partial {\n return {\n allowUrls: [\n // eslint-disable-next-line deprecation/deprecation\n ...(this._options.whitelistUrls || []),\n ...(this._options.allowUrls || []),\n // eslint-disable-next-line deprecation/deprecation\n ...(clientOptions.whitelistUrls || []),\n ...(clientOptions.allowUrls || []),\n ],\n denyUrls: [\n // eslint-disable-next-line deprecation/deprecation\n ...(this._options.blacklistUrls || []),\n ...(this._options.denyUrls || []),\n // eslint-disable-next-line deprecation/deprecation\n ...(clientOptions.blacklistUrls || []),\n ...(clientOptions.denyUrls || []),\n ],\n ignoreErrors: [\n ...(this._options.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...DEFAULT_IGNORE_ERRORS,\n ],\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n };\n }\n\n /** JSDoc */\n private _getPossibleEventMessages(event: Event): string[] {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};\n return [`${value}`, `${type}: ${value}`];\n } catch (oO) {\n if (isDebugBuild()) {\n logger.error(`Cannot extract message for event ${getEventDescription(event)}`);\n }\n return [];\n }\n }\n return [];\n }\n\n /** JSDoc */\n private _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n }\n\n /** JSDoc */\n private _getEventFilterUrl(event: Event): string | null {\n try {\n if (event.stacktrace) {\n return this._getLastValidUrl(event.stacktrace.frames);\n }\n let frames;\n try {\n // @ts-ignore we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? this._getLastValidUrl(frames) : null;\n } catch (oO) {\n if (isDebugBuild()) {\n logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n }\n return null;\n }\n }\n}\n","import { Integration, WrappedFunction } from '@sentry/types';\nimport { fill, getFunctionName, getGlobalObject, getOriginalFunction } from '@sentry/utils';\n\nimport { wrap } from '../helpers';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\n/** JSDoc */\ninterface TryCatchOptions {\n setTimeout: boolean;\n setInterval: boolean;\n requestAnimationFrame: boolean;\n XMLHttpRequest: boolean;\n eventTarget: boolean | string[];\n}\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nexport class TryCatch implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'TryCatch';\n\n /**\n * @inheritDoc\n */\n public name: string = TryCatch.id;\n\n /** JSDoc */\n private readonly _options: TryCatchOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: Partial) {\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n public setupOnce(): void {\n const global = getGlobalObject();\n\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', _wrapTimeFunction);\n }\n\n if (this._options.setInterval) {\n fill(global, 'setInterval', _wrapTimeFunction);\n }\n\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n}\n\n/** JSDoc */\nfunction _wrapTimeFunction(original: () => void): () => number {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: any, ...args: any[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original: any): (callback: () => void) => any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: any, callback: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.call(\n this,\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }),\n );\n };\n}\n\n/** JSDoc */\nfunction _wrapXHR(originalSend: () => void): () => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (this: XMLHttpRequest, ...args: any[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original: WrappedFunction): () => any {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\n/** JSDoc */\nfunction _wrapEventTarget(target: string): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const global = getGlobalObject() as { [key: string]: any };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = global[target] && global[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original: () => void): (\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): (eventName: string, fn: EventListenerObject, capture?: boolean, secure?: boolean) => void {\n try {\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.call(\n this,\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn as any as WrappedFunction, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: true,\n type: 'instrument',\n },\n }),\n options,\n );\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (\n originalRemoveEventListener: () => void,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): (this: any, eventName: string, fn: EventListenerObject, options?: boolean | EventListenerOptions) => () => void {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this: any,\n eventName: string,\n fn: EventListenerObject,\n options?: boolean | EventListenerOptions,\n ): () => void {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = fn as unknown as WrappedFunction;\n try {\n const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n },\n );\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Hub, Integration, Primitive, Severity } from '@sentry/types';\nimport {\n addExceptionMechanism,\n addInstrumentationHandler,\n getLocationHref,\n isDebugBuild,\n isErrorEvent,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/utils';\n\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\ntype GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';\n\n/** JSDoc */\ntype GlobalHandlersIntegrations = Record;\n\n/** Global handlers */\nexport class GlobalHandlers implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'GlobalHandlers';\n\n /**\n * @inheritDoc\n */\n public name: string = GlobalHandlers.id;\n\n /** JSDoc */\n private readonly _options: GlobalHandlersIntegrations;\n\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n private _installFunc: Record void) | undefined> = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n\n /** JSDoc */\n public constructor(options?: GlobalHandlersIntegrations) {\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n }\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n Error.stackTraceLimit = 50;\n const options = this._options;\n\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (const key in options) {\n const installFunc = this._installFunc[key as GlobalHandlersIntegrationsOptionKeys];\n if (installFunc && options[key as GlobalHandlersIntegrationsOptionKeys]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key as GlobalHandlersIntegrationsOptionKeys] = undefined;\n }\n }\n }\n}\n\n/** JSDoc */\nfunction _installGlobalOnErrorHandler(): void {\n addInstrumentationHandler(\n 'error',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (data: { msg: any; url: any; line: any; column: any; error: any }) => {\n const [hub, attachStacktrace] = getHubAndAttachStacktrace();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n const { msg, url, line, column, error } = data;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n\n const event =\n error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(\n eventFromUnknownInput(error || msg, undefined, {\n attachStacktrace,\n isRejection: false,\n }),\n url,\n line,\n column,\n );\n\n event.level = Severity.Error;\n\n addMechanismAndCapture(hub, error, event, 'onerror');\n },\n );\n}\n\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler(): void {\n addInstrumentationHandler(\n 'unhandledrejection',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e: any) => {\n const [hub, attachStacktrace] = getHubAndAttachStacktrace();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace,\n isRejection: true,\n });\n\n event.level = Severity.Error;\n\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n },\n );\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg: any, url: any, line: any, column: any): Event {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event: Event, url: any, line: any, column: any): Event {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type: string): void {\n if (isDebugBuild()) {\n logger.log(`Global Handler attached: ${type}`);\n }\n}\n\nfunction addMechanismAndCapture(hub: Hub, error: EventHint['originalException'], event: Event, type: string): void {\n addExceptionMechanism(event, {\n handled: false,\n type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\n\nfunction getHubAndAttachStacktrace(): [Hub, boolean | undefined] {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const attachStacktrace = client && client.getOptions().attachStacktrace;\n return [hub, attachStacktrace];\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';\nimport { isInstanceOf } from '@sentry/utils';\n\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\ninterface LinkedErrorsOptions {\n key: string;\n limit: number;\n}\n\n/** Adds SDK info to an event. */\nexport class LinkedErrors implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'LinkedErrors';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = LinkedErrors.id;\n\n /**\n * @inheritDoc\n */\n private readonly _key: LinkedErrorsOptions['key'];\n\n /**\n * @inheritDoc\n */\n private readonly _limit: LinkedErrorsOptions['limit'];\n\n /**\n * @inheritDoc\n */\n public constructor(options: Partial = {}) {\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(LinkedErrors);\n return self ? _handler(self._key, self._limit, event, hint) : event;\n });\n }\n}\n\n/**\n * @inheritDoc\n */\nexport function _handler(key: string, limit: number, event: Event, hint?: EventHint): Event | null {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n const linkedErrors = _walkErrorTree(limit, hint.originalException as ExtendedError, key);\n event.exception.values = [...linkedErrors, ...event.exception.values];\n return event;\n}\n\n/**\n * JSDOC\n */\nexport function _walkErrorTree(limit: number, error: ExtendedError, key: string, stack: Exception[] = []): Exception[] {\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= limit) {\n return stack;\n }\n const stacktrace = computeStackTrace(error[key]);\n const exception = exceptionFromStacktrace(stacktrace);\n return _walkErrorTree(limit, error[key], key, [exception, ...stack]);\n}\n","import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string = Dedupe.id;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((currentEvent: Event) => {\n const self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(`Event dropped due to being a duplicate of previously captured event.`);\n return null;\n }\n } catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n }\n}\n\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n } else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n}\n","import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (global.location && global.location.href);\n const { referrer } = global.document || {};\n const { userAgent } = global.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...(url && { url }), headers };\n\n return { ...event, request };\n }\n return event;\n });\n }\n}\n","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { Hub } from '@sentry/types';\nimport { addInstrumentationHandler, getGlobalObject, isDebugBuild, logger, resolvedSyncPromise } from '@sentry/utils';\n\nimport { BrowserOptions } from './backend';\nimport { BrowserClient } from './client';\nimport { ReportDialogOptions, wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\n\nexport const defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new UserAgent(),\n];\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): void {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n const window = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {\n options.release = window.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n initAndBind(BrowserClient, options);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n const client = hub.getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId(): string | undefined {\n return getCurrentHub().lastEventId();\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function flush(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n if (isDebugBuild()) {\n logger.warn('Cannot flush events. No client defined.');\n }\n return resolvedSyncPromise(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function close(timeout?: number): PromiseLike {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n if (isDebugBuild()) {\n logger.warn('Cannot flush events and disable SDK. No client defined.');\n }\n return resolvedSyncPromise(false);\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn: (...args: any) => any): any {\n return internalWrap(fn)();\n}\n\nfunction startSessionOnHub(hub: Hub): void {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking(): void {\n const window = getGlobalObject();\n const document = window.document;\n\n if (typeof document === 'undefined') {\n if (isDebugBuild()) {\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n }\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n","import { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, logger } from '@sentry/utils';\n\n// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js\nconst angularPattern = /^\\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\\] (.*?)\\n?(\\S+)$/;\n\n/**\n * AngularJS integration\n *\n * Provides an $exceptionHandler for AngularJS\n */\nexport class Angular implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'AngularJS';\n\n /**\n * moduleName used in Angular's DI resolution algorithm\n */\n public static moduleName: string = 'ngSentry';\n\n /**\n * @inheritDoc\n */\n public name: string = Angular.id;\n\n /**\n * Angular's instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _angular: any;\n\n /**\n * ngSentry module instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _module: any;\n\n /**\n * Returns current hub.\n */\n private _getCurrentHub?: () => Hub;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(options: { angular?: any } = {}) {\n logger.log('You are still using the Angular integration, consider moving to @sentry/angular');\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this._angular = options.angular || getGlobalObject().angular;\n\n if (!this._angular) {\n logger.error('AngularIntegration is missing an Angular instance');\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._module = this._angular.module(Angular.moduleName, []);\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._module) {\n return;\n }\n\n this._getCurrentHub = getCurrentHub;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._module.config([\n '$provide',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ($provide: any): void => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n $provide.decorator('$exceptionHandler', ['$delegate', this._$exceptionHandlerDecorator.bind(this)]);\n },\n ]);\n }\n\n /**\n * Angular's exceptionHandler for Sentry integration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _$exceptionHandlerDecorator($delegate: any): any {\n return (exception: Error, cause?: string): void => {\n const hub = this._getCurrentHub && this._getCurrentHub();\n\n if (hub && hub.getIntegration(Angular)) {\n hub.withScope(scope => {\n if (cause) {\n scope.setExtra('cause', cause);\n }\n\n scope.addEventProcessor((event: Event) => {\n const ex = event.exception && event.exception.values && event.exception.values[0];\n\n if (ex) {\n const matches = angularPattern.exec(ex.value || '');\n\n if (matches) {\n // This type now becomes something like: $rootScope:inprog\n ex.type = matches[1];\n ex.value = matches[2];\n event.message = `${ex.type}: ${ex.value}`;\n // auto set a new tag specifically for the angular error url\n event.extra = {\n ...event.extra,\n angularDocs: matches[3].substr(0, 250),\n };\n }\n }\n\n return event;\n });\n\n hub.captureException(exception);\n });\n }\n $delegate(exception, cause);\n };\n }\n}\n","import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { fill, getGlobalObject, safeJoin, severityFromString } from '@sentry/utils';\n\nconst global = getGlobalObject();\n\n/** Send Console API calls as Sentry Events */\nexport class CaptureConsole implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'CaptureConsole';\n\n /**\n * @inheritDoc\n */\n public name: string = CaptureConsole.id;\n\n /**\n * @inheritDoc\n */\n private readonly _levels: string[] = ['log', 'info', 'warn', 'error', 'debug', 'assert'];\n\n /**\n * @inheritDoc\n */\n public constructor(options: { levels?: string[] } = {}) {\n if (options.levels) {\n this._levels = options.levels;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!('console' in global)) {\n return;\n }\n\n this._levels.forEach((level: string) => {\n if (!(level in global.console)) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(global.console, level, (originalConsoleMethod: () => any) => (...args: any[]): void => {\n const hub = getCurrentHub();\n\n if (hub.getIntegration(CaptureConsole)) {\n hub.withScope(scope => {\n scope.setLevel(severityFromString(level));\n scope.setExtra('arguments', args);\n scope.addEventProcessor(event => {\n event.logger = 'console';\n return event;\n });\n\n let message = safeJoin(args, ' ');\n if (level === 'assert') {\n if (args[0] === false) {\n message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;\n scope.setExtra('arguments', args.slice(1));\n hub.captureMessage(message);\n }\n } else if (level === 'error' && args[0] instanceof Error) {\n hub.captureException(args[0]);\n } else {\n hub.captureMessage(message);\n }\n });\n }\n\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.call(global.console, args);\n }\n });\n });\n }\n}\n","import { Event, EventHint, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { consoleSandbox } from '@sentry/utils';\n\n/** JSDoc */\ninterface DebugOptions {\n stringify?: boolean;\n debugger?: boolean;\n}\n\n/** JSDoc */\nexport class Debug implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Debug';\n\n /**\n * @inheritDoc\n */\n public name: string = Debug.id;\n\n /** JSDoc */\n private readonly _options: DebugOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: DebugOptions) {\n this._options = {\n debugger: false,\n stringify: false,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(Debug);\n if (self) {\n if (self._options.debugger) {\n // eslint-disable-next-line no-debugger\n debugger;\n }\n\n /* eslint-disable no-console */\n consoleSandbox(() => {\n if (self._options.stringify) {\n console.log(JSON.stringify(event, null, 2));\n if (hint) {\n console.log(JSON.stringify(hint, null, 2));\n }\n } else {\n console.log(event);\n if (hint) {\n console.log(hint);\n }\n }\n });\n /* eslint-enable no-console */\n }\n return event;\n });\n }\n}\n","import { Event, EventProcessor, Exception, Hub, Integration, StackFrame } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nexport class Dedupe implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Dedupe';\n\n /**\n * @inheritDoc\n */\n public name: string = Dedupe.id;\n\n /**\n * @inheritDoc\n */\n private _previousEvent?: Event;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((currentEvent: Event) => {\n const self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, self._previousEvent)) {\n logger.warn(`Event dropped due to being a duplicate of previously captured event.`);\n return null;\n }\n } catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n }\n}\n\n/** JSDoc */\nexport function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n } else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n}\n","import { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, isInstanceOf, logger } from '@sentry/utils';\n\n/** JSDoc */\nexport class Ember implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Ember';\n\n /**\n * @inheritDoc\n */\n public name: string = Ember.id;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any\n private readonly _Ember: any;\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(options: { Ember?: any } = {}) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this._Ember = options.Ember || getGlobalObject().Ember;\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._Ember) {\n logger.error('EmberIntegration is missing an Ember instance');\n return;\n }\n\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n const oldOnError = this._Ember.onerror;\n\n this._Ember.onerror = (error: Error): void => {\n if (getCurrentHub().getIntegration(Ember)) {\n getCurrentHub().captureException(error, { originalException: error });\n }\n\n if (typeof oldOnError === 'function') {\n oldOnError.call(this._Ember, error);\n } else if (this._Ember.testing) {\n throw error;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._Ember.RSVP.on('error', (reason: unknown): void => {\n if (getCurrentHub().getIntegration(Ember)) {\n getCurrentHub().withScope(scope => {\n if (isInstanceOf(reason, Error)) {\n scope.setExtra('context', 'Unhandled Promise error detected');\n getCurrentHub().captureException(reason, { originalException: reason as Error });\n } else {\n scope.setExtra('reason', reason);\n getCurrentHub().captureMessage('Unhandled Promise error detected');\n }\n });\n }\n });\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n}\n","import { Event, EventHint, EventProcessor, ExtendedError, Hub, Integration } from '@sentry/types';\nimport { isError, isPlainObject, logger, normalize } from '@sentry/utils';\n\n/** JSDoc */\ninterface ExtraErrorDataOptions {\n depth?: number;\n}\n\n/** Patch toString calls to return proper name for wrapped functions */\nexport class ExtraErrorData implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ExtraErrorData';\n\n /**\n * @inheritDoc\n */\n public name: string = ExtraErrorData.id;\n\n /** JSDoc */\n private readonly _options: ExtraErrorDataOptions;\n\n /**\n * @inheritDoc\n */\n public constructor(options?: ExtraErrorDataOptions) {\n this._options = {\n depth: 3,\n ...options,\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor((event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(ExtraErrorData);\n if (!self) {\n return event;\n }\n return self.enhanceEventWithErrorData(event, hint);\n });\n }\n\n /**\n * Attaches extracted information from the Error object to extra field in the Event\n */\n public enhanceEventWithErrorData(event: Event, hint?: EventHint): Event {\n if (!hint || !hint.originalException || !isError(hint.originalException)) {\n return event;\n }\n const name = (hint.originalException as ExtendedError).name || hint.originalException.constructor.name;\n\n const errorData = this._extractErrorData(hint.originalException as ExtendedError);\n\n if (errorData) {\n let contexts = {\n ...event.contexts,\n };\n\n const normalizedErrorData = normalize(errorData, this._options.depth);\n if (isPlainObject(normalizedErrorData)) {\n contexts = {\n ...event.contexts,\n [name]: {\n ...normalizedErrorData,\n },\n };\n }\n\n return {\n ...event,\n contexts,\n };\n }\n\n return event;\n }\n\n /**\n * Extract extra information from the Error object\n */\n private _extractErrorData(error: ExtendedError): Record | null {\n // We are trying to enhance already existing event, so no harm done if it won't succeed\n try {\n const nativeKeys = [\n 'name',\n 'message',\n 'stack',\n 'line',\n 'column',\n 'fileName',\n 'lineNumber',\n 'columnNumber',\n 'toJSON',\n ];\n\n const extraErrorInfo: Record = {};\n\n // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n for (const key of Object.keys(error)) {\n if (nativeKeys.indexOf(key) !== -1) {\n continue;\n }\n const value = error[key];\n extraErrorInfo[key] = isError(value) ? (value as Error).toString() : value;\n }\n\n // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n if (typeof error.toJSON === 'function') {\n const serializedError = error.toJSON() as Record;\n\n for (const key of Object.keys(serializedError)) {\n const value = serializedError[key];\n extraErrorInfo[key] = isError(value) ? (value as Error).toString() : value;\n }\n }\n\n return extraErrorInfo;\n } catch (oO) {\n logger.error('Unable to extract extra data from the Error object:', oO);\n }\n\n return null;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, logger, normalize, uuid4 } from '@sentry/utils';\nimport localForage from 'localforage';\n\ntype LocalForage = {\n setItem(key: string, value: T, callback?: (err: any, value: T) => void): Promise;\n iterate(\n iteratee: (value: T, key: string, iterationNumber: number) => U,\n callback?: (err: any, result: U) => void,\n ): Promise;\n removeItem(key: string, callback?: (err: any) => void): Promise;\n};\n\n/**\n * cache offline errors and send when connected\n */\nexport class Offline implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Offline';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = Offline.id;\n\n /**\n * the global instance\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public global: any;\n\n /**\n * the current hub instance\n */\n public hub?: Hub;\n\n /**\n * maximum number of events to store while offline\n */\n public maxStoredEvents: number;\n\n /**\n * event cache\n */\n public offlineEventStore: LocalForage;\n\n /**\n * @inheritDoc\n */\n public constructor(options: { maxStoredEvents?: number } = {}) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.global = getGlobalObject();\n this.maxStoredEvents = options.maxStoredEvents || 30; // set a reasonable default\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this.offlineEventStore = localForage.createInstance({\n name: 'sentry/offlineEventStore',\n });\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n this.hub = getCurrentHub();\n\n if ('addEventListener' in this.global) {\n this.global.addEventListener('online', () => {\n void this._sendEvents().catch(() => {\n logger.warn('could not send cached events');\n });\n });\n }\n\n addGlobalEventProcessor((event: Event) => {\n if (this.hub && this.hub.getIntegration(Offline)) {\n // cache if we are positively offline\n if ('navigator' in this.global && 'onLine' in this.global.navigator && !this.global.navigator.onLine) {\n void this._cacheEvent(event)\n .then((_event: Event): Promise => this._enforceMaxEvents())\n .catch((_error): void => {\n logger.warn('could not cache event while offline');\n });\n\n // return null on success or failure, because being offline will still result in an error\n return null;\n }\n }\n\n return event;\n });\n\n // if online now, send any events stored in a previous offline session\n if ('navigator' in this.global && 'onLine' in this.global.navigator && this.global.navigator.onLine) {\n void this._sendEvents().catch(() => {\n logger.warn('could not send cached events');\n });\n }\n }\n\n /**\n * cache an event to send later\n * @param event an event\n */\n private async _cacheEvent(event: Event): Promise {\n return this.offlineEventStore.setItem(uuid4(), normalize(event));\n }\n\n /**\n * purge excess events if necessary\n */\n private async _enforceMaxEvents(): Promise {\n const events: Array<{ event: Event; cacheKey: string }> = [];\n\n return this.offlineEventStore\n .iterate((event: Event, cacheKey: string, _index: number): void => {\n // aggregate events\n events.push({ cacheKey, event });\n })\n .then(\n (): Promise =>\n // this promise resolves when the iteration is finished\n this._purgeEvents(\n // purge all events past maxStoredEvents in reverse chronological order\n events\n .sort((a, b) => (b.event.timestamp || 0) - (a.event.timestamp || 0))\n .slice(this.maxStoredEvents < events.length ? this.maxStoredEvents : events.length)\n .map(event => event.cacheKey),\n ),\n )\n .catch((_error): void => {\n logger.warn('could not enforce max events');\n });\n }\n\n /**\n * purge event from cache\n */\n private async _purgeEvent(cacheKey: string): Promise {\n return this.offlineEventStore.removeItem(cacheKey);\n }\n\n /**\n * purge events from cache\n */\n private async _purgeEvents(cacheKeys: string[]): Promise {\n // trail with .then to ensure the return type as void and not void|void[]\n return Promise.all(cacheKeys.map(cacheKey => this._purgeEvent(cacheKey))).then();\n }\n\n /**\n * send all events\n */\n private async _sendEvents(): Promise {\n return this.offlineEventStore.iterate((event: Event, cacheKey: string, _index: number): void => {\n if (this.hub) {\n this.hub.captureEvent(event);\n\n void this._purgeEvent(cacheKey).catch((_error): void => {\n logger.warn('could not purge event from cache');\n });\n } else {\n logger.warn('no hub found - could not send cached event');\n }\n });\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventProcessor, Hub, Integration } from '@sentry/types';\nimport { getGlobalObject, supportsReportingObserver } from '@sentry/utils';\n\n/** JSDoc */\ninterface Report {\n [key: string]: any;\n type: ReportTypes;\n url: string;\n body?: ReportBody;\n}\n\n/** JSDoc */\nconst enum ReportTypes {\n /** JSDoc */\n Crash = 'crash',\n /** JSDoc */\n Deprecation = 'deprecation',\n /** JSDoc */\n Intervention = 'intervention',\n}\n\n/** JSDoc */\ntype ReportBody = CrashReportBody | DeprecationReportBody | InterventionReportBody;\n\n/** JSDoc */\ninterface CrashReportBody {\n [key: string]: any;\n crashId: string;\n reason?: string;\n}\n\n/** JSDoc */\ninterface DeprecationReportBody {\n [key: string]: any;\n id: string;\n anticipatedRemoval?: Date;\n message: string;\n sourceFile?: string;\n lineNumber?: number;\n columnNumber?: number;\n}\n\n/** JSDoc */\ninterface InterventionReportBody {\n [key: string]: any;\n id: string;\n message: string;\n sourceFile?: string;\n lineNumber?: number;\n columnNumber?: number;\n}\n\n/** Reporting API integration - https://w3c.github.io/reporting/ */\nexport class ReportingObserver implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ReportingObserver';\n\n /**\n * @inheritDoc\n */\n public readonly name: string = ReportingObserver.id;\n\n /**\n * Returns current hub.\n */\n private _getCurrentHub?: () => Hub;\n\n /**\n * @inheritDoc\n */\n public constructor(\n private readonly _options: {\n types?: ReportTypes[];\n } = {\n types: [ReportTypes.Crash, ReportTypes.Deprecation, ReportTypes.Intervention],\n },\n ) {}\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!supportsReportingObserver()) {\n return;\n }\n\n this._getCurrentHub = getCurrentHub;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const observer = new (getGlobalObject().ReportingObserver)(this.handler.bind(this), {\n buffered: true,\n types: this._options.types,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n observer.observe();\n }\n\n /**\n * @inheritDoc\n */\n public handler(reports: Report[]): void {\n const hub = this._getCurrentHub && this._getCurrentHub();\n if (!hub || !hub.getIntegration(ReportingObserver)) {\n return;\n }\n for (const report of reports) {\n hub.withScope(scope => {\n scope.setExtra('url', report.url);\n\n const label = `ReportingObserver [${report.type}]`;\n let details = 'No details available';\n\n if (report.body) {\n // Object.keys doesn't work on ReportBody, as all properties are inheirted\n const plainBody: {\n [key: string]: any;\n } = {};\n\n // eslint-disable-next-line guard-for-in\n for (const prop in report.body) {\n plainBody[prop] = report.body[prop];\n }\n\n scope.setExtra('body', plainBody);\n\n if (report.type === ReportTypes.Crash) {\n const body = report.body as CrashReportBody;\n // A fancy way to create a message out of crashId OR reason OR both OR fallback\n details = [body.crashId || '', body.reason || ''].join(' ').trim() || details;\n } else {\n const body = report.body as DeprecationReportBody | InterventionReportBody;\n details = body.message || details;\n }\n }\n\n hub.captureMessage(`${label}: ${details}`);\n });\n }\n }\n}\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js\n\n/** JSDoc */\nfunction normalizeArray(parts: string[], allowAboveRoot?: boolean): string[] {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up++;\n } else if (up) {\n parts.splice(i, 1);\n // eslint-disable-next-line no-plusplus\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n // eslint-disable-next-line no-plusplus\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/;\n/** JSDoc */\nfunction splitPath(filename: string): string[] {\n const parts = splitPathRe.exec(filename);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nexport function resolve(...args: string[]): string {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(\n resolvedPath.split('/').filter(p => !!p),\n !resolvedAbsolute,\n ).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr: string[]): string[] {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nexport function relative(from: string, to: string): string {\n /* eslint-disable no-param-reassign */\n from = resolve(from).substr(1);\n to = resolve(to).substr(1);\n /* eslint-enable no-param-reassign */\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nexport function normalizePath(path: string): string {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.substr(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(\n path.split('/').filter(p => !!p),\n !isPathAbsolute,\n ).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nexport function isAbsolute(path: string): boolean {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nexport function join(...args: string[]): string {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nexport function dirname(path: string): string {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.substr(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nexport function basename(path: string, ext?: string): string {\n let f = splitPath(path)[2];\n if (ext && f.substr(ext.length * -1) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n}\n","import { Event, EventProcessor, Hub, Integration, StackFrame, Stacktrace } from '@sentry/types';\nimport { basename, relative } from '@sentry/utils';\n\ntype StackFrameIteratee = (frame: StackFrame) => StackFrame;\n\n/** Rewrite event frames paths */\nexport class RewriteFrames implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'RewriteFrames';\n\n /**\n * @inheritDoc\n */\n public name: string = RewriteFrames.id;\n\n /**\n * @inheritDoc\n */\n private readonly _root?: string;\n\n /**\n * @inheritDoc\n */\n private readonly _prefix: string = 'app:///';\n\n /**\n * @inheritDoc\n */\n public constructor(options: { root?: string; prefix?: string; iteratee?: StackFrameIteratee } = {}) {\n if (options.root) {\n this._root = options.root;\n }\n if (options.prefix) {\n this._prefix = options.prefix;\n }\n if (options.iteratee) {\n this._iteratee = options.iteratee;\n }\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(RewriteFrames);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /** JSDoc */\n public process(originalEvent: Event): Event {\n let processedEvent = originalEvent;\n\n if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n processedEvent = this._processExceptionsEvent(processedEvent);\n }\n\n if (originalEvent.stacktrace) {\n processedEvent = this._processStacktraceEvent(processedEvent);\n }\n\n return processedEvent;\n }\n\n /**\n * @inheritDoc\n */\n private readonly _iteratee: StackFrameIteratee = (frame: StackFrame) => {\n if (!frame.filename) {\n return frame;\n }\n // Check if the frame filename begins with `/` or a Windows-style prefix such as `C:\\`\n const isWindowsFrame = /^[A-Z]:\\\\/.test(frame.filename);\n const startsWithSlash = /^\\//.test(frame.filename);\n if (isWindowsFrame || startsWithSlash) {\n const filename = isWindowsFrame\n ? frame.filename\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n : frame.filename;\n const base = this._root ? relative(this._root, filename) : basename(filename);\n frame.filename = `${this._prefix}${base}`;\n }\n return frame;\n };\n\n /** JSDoc */\n private _processExceptionsEvent(event: Event): Event {\n try {\n return {\n ...event,\n exception: {\n ...event.exception,\n // The check for this is performed inside `process` call itself, safe to skip here\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n values: event.exception!.values!.map(value => ({\n ...value,\n stacktrace: this._processStacktrace(value.stacktrace),\n })),\n },\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n private _processStacktraceEvent(event: Event): Event {\n try {\n return {\n ...event,\n stacktrace: this._processStacktrace(event.stacktrace),\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n private _processStacktrace(stacktrace?: Stacktrace): Stacktrace {\n return {\n ...stacktrace,\n frames: stacktrace && stacktrace.frames && stacktrace.frames.map(f => this._iteratee(f)),\n };\n }\n}\n","import { Event, EventProcessor, Hub, Integration } from '@sentry/types';\n\n/** This function adds duration since Sentry was initialized till the time event was sent */\nexport class SessionTiming implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'SessionTiming';\n\n /**\n * @inheritDoc\n */\n public name: string = SessionTiming.id;\n\n /** Exact time Client was initialized expressed in milliseconds since Unix Epoch. */\n protected readonly _startTime: number = Date.now();\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(SessionTiming);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public process(event: Event): Event {\n const now = Date.now();\n\n return {\n ...event,\n extra: {\n ...event.extra,\n ['session:start']: this._startTime,\n ['session:duration']: now - this._startTime,\n ['session:end']: now,\n },\n };\n }\n}\n","import { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types';\n\n/** Add node transaction to the event */\nexport class Transaction implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Transaction';\n\n /**\n * @inheritDoc\n */\n public name: string = Transaction.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(event => {\n const self = getCurrentHub().getIntegration(Transaction);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /**\n * @inheritDoc\n */\n public process(event: Event): Event {\n const frames = this._getFramesFromEvent(event);\n\n // use for loop so we don't have to reverse whole frames array\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame.in_app === true) {\n event.transaction = this._getTransaction(frame);\n break;\n }\n }\n\n return event;\n }\n\n /** JSDoc */\n private _getFramesFromEvent(event: Event): StackFrame[] {\n const exception = event.exception && event.exception.values && event.exception.values[0];\n return (exception && exception.stacktrace && exception.stacktrace.frames) || [];\n }\n\n /** JSDoc */\n private _getTransaction(frame: StackFrame): string {\n return frame.module || frame.function ? `${frame.module || '?'}/${frame.function || '?'}` : '';\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventProcessor, Hub, Integration, IntegrationClass, Scope, Span, Transaction } from '@sentry/types';\nimport { basename, getGlobalObject, logger, timestampWithMs } from '@sentry/utils';\n\n/**\n * Used to extract Tracing integration from the current client,\n * without the need to import `Tracing` itself from the @sentry/apm package.\n * @deprecated as @sentry/tracing should be used over @sentry/apm.\n */\nconst TRACING_GETTER = {\n id: 'Tracing',\n} as any as IntegrationClass;\n\n/**\n * Used to extract BrowserTracing integration from @sentry/tracing\n */\nconst BROWSER_TRACING_GETTER = {\n id: 'BrowserTracing',\n} as any as IntegrationClass;\n\nconst VUE_OP = 'ui.vue';\n\n/** Global Vue object limited to the methods/attributes we require */\ninterface VueInstance {\n config: {\n errorHandler?(error: Error, vm?: ViewModel, info?: string): void;\n };\n util?: {\n warn(...input: any): void;\n };\n mixin(hooks: { [key: string]: () => void }): void;\n}\n\n/** Representation of Vue component internals */\ninterface ViewModel {\n [key: string]: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n $root: object;\n $options: {\n [key: string]: any;\n name?: string;\n propsData?: { [key: string]: any };\n _componentTag?: string;\n __file?: string;\n $_sentryPerfHook?: boolean;\n };\n $once(hook: string, cb: () => void): void;\n}\n\n/** Vue Integration configuration */\ninterface IntegrationOptions {\n /** Vue instance to be used inside the integration */\n Vue: VueInstance;\n\n /**\n * When set to `false`, Sentry will suppress reporting of all props data\n * from your Vue components for privacy concerns.\n */\n attachProps: boolean;\n /**\n * When set to `true`, original Vue's `logError` will be called as well.\n * https://github.com/vuejs/vue/blob/c2b1cfe9ccd08835f2d99f6ce60f67b4de55187f/src/core/util/error.js#L38-L48\n */\n logErrors: boolean;\n\n /**\n * When set to `true`, enables tracking of components lifecycle performance.\n * It requires `Tracing` integration to be also enabled.\n */\n tracing: boolean;\n\n /** {@link TracingOptions} */\n tracingOptions: TracingOptions;\n}\n\n/** Vue specific configuration for Tracing Integration */\ninterface TracingOptions {\n /**\n * Decides whether to track components by hooking into its lifecycle methods.\n * Can be either set to `boolean` to enable/disable tracking for all of them.\n * Or to an array of specific component names (case-sensitive).\n */\n trackComponents: boolean | string[];\n /** How long to wait until the tracked root activity is marked as finished and sent of to Sentry */\n timeout: number;\n /**\n * List of hooks to keep track of during component lifecycle.\n * Available hooks: 'activate' | 'create' | 'destroy' | 'mount' | 'update'\n * Based on https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\n */\n hooks: Operation[];\n}\n\n/** Optional metadata attached to Sentry Event */\ninterface Metadata {\n [key: string]: any;\n componentName?: string;\n propsData?: { [key: string]: any };\n lifecycleHook?: string;\n}\n\n// https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\ntype Hook =\n | 'activated'\n | 'beforeCreate'\n | 'beforeDestroy'\n | 'beforeMount'\n | 'beforeUpdate'\n | 'created'\n | 'deactivated'\n | 'destroyed'\n | 'mounted'\n | 'updated';\n\ntype Operation = 'activate' | 'create' | 'destroy' | 'mount' | 'update';\n\n// Mappings from operation to corresponding lifecycle hook.\nconst HOOKS: { [key in Operation]: Hook[] } = {\n activate: ['activated', 'deactivated'],\n create: ['beforeCreate', 'created'],\n destroy: ['beforeDestroy', 'destroyed'],\n mount: ['beforeMount', 'mounted'],\n update: ['beforeUpdate', 'updated'],\n};\n\nconst COMPONENT_NAME_REGEXP = /(?:^|[-_/])(\\w)/g;\nconst ROOT_COMPONENT_NAME = 'root';\nconst ANONYMOUS_COMPONENT_NAME = 'anonymous component';\n\n/** JSDoc */\nexport class Vue implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'Vue';\n\n /**\n * @inheritDoc\n */\n public name: string = Vue.id;\n\n private readonly _options: IntegrationOptions;\n\n /**\n * Cache holding already processed component names\n */\n private readonly _componentsCache: { [key: string]: string } = {};\n private _rootSpan?: Span;\n private _rootSpanTimer?: ReturnType;\n private _tracingActivity?: number;\n\n /**\n * @inheritDoc\n */\n public constructor(\n options: Partial & { tracingOptions: Partial }>,\n ) {\n logger.log('You are still using the Vue.js integration, consider moving to @sentry/vue');\n this._options = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Vue: getGlobalObject().Vue,\n attachProps: true,\n logErrors: false,\n tracing: false,\n ...options,\n tracingOptions: {\n hooks: ['mount', 'update'],\n timeout: 2000,\n trackComponents: false,\n ...options.tracingOptions,\n },\n };\n }\n\n /**\n * @inheritDoc\n */\n public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n if (!this._options.Vue) {\n logger.error('Vue integration is missing a Vue instance');\n return;\n }\n\n this._attachErrorHandler(getCurrentHub);\n\n if (this._options.tracing) {\n this._startTracing(getCurrentHub);\n }\n }\n\n /**\n * Extract component name from the ViewModel\n */\n private _getComponentName(vm: ViewModel): string {\n // Such level of granularity is most likely not necessary, but better safe than sorry. — Kamil\n if (!vm) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$root === vm) {\n return ROOT_COMPONENT_NAME;\n }\n\n if (!vm.$options) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$options.name) {\n return vm.$options.name;\n }\n\n if (vm.$options._componentTag) {\n return vm.$options._componentTag;\n }\n\n // injected by vue-loader\n if (vm.$options.__file) {\n const unifiedFile = vm.$options.__file.replace(/^[a-zA-Z]:/, '').replace(/\\\\/g, '/');\n const filename = basename(unifiedFile, '.vue');\n return (\n this._componentsCache[filename] ||\n (this._componentsCache[filename] = filename.replace(COMPONENT_NAME_REGEXP, (_, c: string) =>\n c ? c.toUpperCase() : '',\n ))\n );\n }\n\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n /** Keep it as attribute function, to keep correct `this` binding inside the hooks callbacks */\n // eslint-disable-next-line @typescript-eslint/typedef\n private readonly _applyTracingHooks = (vm: ViewModel, getCurrentHub: () => Hub): void => {\n // Don't attach twice, just in case\n if (vm.$options.$_sentryPerfHook) {\n return;\n }\n vm.$options.$_sentryPerfHook = true;\n\n const name = this._getComponentName(vm);\n const rootMount = name === ROOT_COMPONENT_NAME;\n const spans: { [key: string]: Span } = {};\n\n // Render hook starts after once event is emitted,\n // but it ends before the second event of the same type.\n //\n // Because of this, we start measuring inside the first event,\n // but finish it before it triggers, to skip the event emitter timing itself.\n const rootHandler = (hook: Hook): void => {\n const now = timestampWithMs();\n\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (this._rootSpan) {\n this._finishRootSpan(now, getCurrentHub);\n } else {\n vm.$once(`hook:${hook}`, () => {\n // Create an activity on the first event call. There'll be no second call, as rootSpan will be in place,\n // thus new event handler won't be attached.\n\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line deprecation/deprecation\n const tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n this._tracingActivity = (tracingIntegration as any).constructor.pushActivity('Vue Application Render');\n const transaction = (tracingIntegration as any).constructor.getTransaction();\n if (transaction) {\n this._rootSpan = transaction.startChild({\n description: 'Application Render',\n op: VUE_OP,\n });\n }\n // Use functionality from @sentry/tracing\n } else {\n const activeTransaction = getActiveTransaction(getCurrentHub());\n if (activeTransaction) {\n this._rootSpan = activeTransaction.startChild({\n description: 'Application Render',\n op: VUE_OP,\n });\n }\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n });\n }\n };\n\n const childHandler = (hook: Hook, operation: Operation): void => {\n // Skip components that we don't want to track to minimize the noise and give a more granular control to the user\n const shouldTrack = Array.isArray(this._options.tracingOptions.trackComponents)\n ? this._options.tracingOptions.trackComponents.indexOf(name) > -1\n : this._options.tracingOptions.trackComponents;\n\n if (!this._rootSpan || !shouldTrack) {\n return;\n }\n\n const now = timestampWithMs();\n const span = spans[operation];\n\n // On the first handler call (before), it'll be undefined, as `$once` will add it in the future.\n // However, on the second call (after), it'll be already in place.\n if (span) {\n span.finish();\n this._finishRootSpan(now, getCurrentHub);\n } else {\n vm.$once(`hook:${hook}`, () => {\n if (this._rootSpan) {\n spans[operation] = this._rootSpan.startChild({\n description: `Vue <${name}>`,\n op: `${VUE_OP}.${operation}`,\n });\n }\n });\n }\n };\n\n // Each component has it's own scope, so all activities are only related to one of them\n this._options.tracingOptions.hooks.forEach(operation => {\n // Retrieve corresponding hooks from Vue lifecycle.\n // eg. mount => ['beforeMount', 'mounted']\n const internalHooks = HOOKS[operation];\n\n if (!internalHooks) {\n logger.warn(`Unknown hook: ${operation}`);\n return;\n }\n\n internalHooks.forEach(internalHook => {\n const handler = rootMount\n ? rootHandler.bind(this, internalHook)\n : childHandler.bind(this, internalHook, operation);\n const currentValue = vm.$options[internalHook];\n\n if (Array.isArray(currentValue)) {\n vm.$options[internalHook] = [handler, ...currentValue];\n } else if (typeof currentValue === 'function') {\n vm.$options[internalHook] = [handler, currentValue];\n } else {\n vm.$options[internalHook] = [handler];\n }\n });\n });\n };\n\n /** Finish top-level span and activity with a debounce configured using `timeout` option */\n private _finishRootSpan(timestamp: number, getCurrentHub: () => Hub): void {\n if (this._rootSpanTimer) {\n clearTimeout(this._rootSpanTimer);\n }\n\n this._rootSpanTimer = setTimeout(() => {\n if (this._tracingActivity) {\n // We do this whole dance with `TRACING_GETTER` to prevent `@sentry/apm` from becoming a peerDependency.\n // We also need to ask for the `.constructor`, as `pushActivity` and `popActivity` are static, not instance methods.\n // eslint-disable-next-line deprecation/deprecation\n const tracingIntegration = getCurrentHub().getIntegration(TRACING_GETTER);\n if (tracingIntegration) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (tracingIntegration as any).constructor.popActivity(this._tracingActivity);\n }\n }\n\n // We should always finish the span, only should pop activity if using @sentry/apm\n if (this._rootSpan) {\n this._rootSpan.finish(timestamp);\n }\n }, this._options.tracingOptions.timeout);\n }\n\n /** Inject configured tracing hooks into Vue's component lifecycles */\n private _startTracing(getCurrentHub: () => Hub): void {\n const applyTracingHooks = this._applyTracingHooks;\n\n this._options.Vue.mixin({\n beforeCreate(this: ViewModel): void {\n // eslint-disable-next-line deprecation/deprecation\n if (getCurrentHub().getIntegration(TRACING_GETTER) || getCurrentHub().getIntegration(BROWSER_TRACING_GETTER)) {\n // `this` points to currently rendered component\n applyTracingHooks(this, getCurrentHub);\n } else {\n logger.error('Vue integration has tracing enabled, but Tracing integration is not configured');\n }\n },\n });\n }\n\n /** Inject Sentry's handler into owns Vue's error handler */\n private _attachErrorHandler(getCurrentHub: () => Hub): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const currentErrorHandler = this._options.Vue.config.errorHandler;\n\n this._options.Vue.config.errorHandler = (error: Error, vm?: ViewModel, info?: string): void => {\n const metadata: Metadata = {};\n\n if (vm) {\n try {\n metadata.componentName = this._getComponentName(vm);\n\n if (this._options.attachProps) {\n metadata.propsData = vm.$options.propsData;\n }\n } catch (_oO) {\n logger.warn('Unable to extract metadata from Vue component.');\n }\n }\n\n if (info) {\n metadata.lifecycleHook = info;\n }\n\n if (getCurrentHub().getIntegration(Vue)) {\n // Capture exception in the next event loop, to make sure that all breadcrumbs are recorded in time.\n setTimeout(() => {\n getCurrentHub().withScope(scope => {\n scope.setContext('vue', metadata);\n getCurrentHub().captureException(error);\n });\n });\n }\n\n if (typeof currentErrorHandler === 'function') {\n currentErrorHandler.call(this._options.Vue, error, vm, info);\n }\n\n if (this._options.logErrors) {\n if (this._options.Vue.util) {\n this._options.Vue.util.warn(`Error in ${info}: \"${error && error.toString()}\"`, vm);\n }\n // eslint-disable-next-line no-console\n console.error(error);\n }\n };\n }\n}\n\ninterface HubType extends Hub {\n getScope?(): Scope | undefined;\n}\n\n/** Grabs active transaction off scope */\nexport function getActiveTransaction(hub: HubType): T | undefined {\n if (hub && hub.getScope) {\n const scope = hub.getScope() as Scope;\n if (scope) {\n return scope.getTransaction() as T | undefined;\n }\n }\n\n return undefined;\n}\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport Connection, {PROGRESS} from './Connection';\nimport PropTypes from 'prop-types';\nimport * as Sentry from '@sentry/browser';\nimport * as SentryIntegrations from '@sentry/integrations';\n\nimport DialogError from './Dialogs/Error';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport IconClose from '@material-ui/icons/Close';\n\nimport printPrompt from './Prompt';\nimport theme from './Theme';\nimport Loader from './Components/Loader';\nimport Router from './Components/Router';\nimport Utils from './Components/Utils';\nimport SaveCloseButtons from './Components/SaveCloseButtons';\nimport I18n from './i18n';\n\nimport './index.css';\n\nif (!window.localStorage) {\n window.localStorage = {\n getItem: () => null,\n setItem: () => null,\n };\n}\n\n/**\n * @extends {Router}\n */\nclass GenericApp extends Router {\n /**\n * @param {import('./types').GenericAppProps} props\n * @param {import('./types').GenericAppSettings | undefined} settings\n */\n constructor(props, settings) {\n // Remove `!Connection.isWeb() && window.adapterName !== 'material'` when iobroker.socket will support native ws\n if (!Connection.isWeb() && window.io && window.location.port === '3000') {\n try {\n const io = new window.SocketClient();\n delete window.io;\n window.io = io;\n } catch (e) {\n // ignore\n }\n }\n\n super(props);\n\n printPrompt();\n\n let query = (window.location.search || '').replace(/^\\?/, '').replace(/#.*$/, '');\n let args = {};\n query.trim().split('&').filter(t => t.trim()).forEach(b => {\n const parts = b.split('=');\n args[parts[0]] = parts.length === 2 ? parts[1] : true;\n if (args[parts[0]] === 'true') {\n args[parts[0]] = true;\n } else if (args[parts[0]] === 'false') {\n args[parts[0]] = false;\n }\n });\n\n // extract instance from URL\n this.instance = args.instance !== undefined ? parseInt(args.instance, 10) || 0 : (parseInt(window.location.search.slice(1), 10) || 0);\n // extract adapter name from URL\n const tmp = window.location.pathname.split('/');\n this.adapterName = settings?.adapterName || props.adapterName || window.adapterName || tmp[tmp.length - 2] || 'iot';\n this.instanceId = `system.adapter.${this.adapterName}.${this.instance}`;\n this.newReact = args.newReact === true; // it is admin5\n\n const location = Router.getLocation();\n location.tab = location.tab || window.localStorage.getItem(this.adapterName + '-adapter') || '';\n\n const themeInstance = this.createTheme();\n\n this.state = {\n selectedTab: window.localStorage.getItem(this.adapterName + '-adapter') || '',\n selectedTabNum: -1,\n native: {},\n errorText: '',\n changed: false,\n connected: false,\n loaded: false,\n isConfigurationError: '',\n expertMode: false,\n toast: '',\n theme: themeInstance,\n themeName: this.getThemeName(themeInstance),\n themeType: this.getThemeType(themeInstance),\n bottomButtons: (settings && settings.bottomButtons) === false ? false : ((props && props.bottomButtons) === false ? false : true),\n width: GenericApp.getWidth(),\n };\n\n // init translations\n const translations = {\n 'en': require('./i18n/en.json'),\n 'de': require('./i18n/de.json'),\n 'ru': require('./i18n/ru.json'),\n 'pt': require('./i18n/pt.json'),\n 'nl': require('./i18n/nl.json'),\n 'fr': require('./i18n/fr.json'),\n 'it': require('./i18n/it.json'),\n 'es': require('./i18n/es.json'),\n 'pl': require('./i18n/pl.json'),\n 'zh-cn': require('./i18n/zh-cn.json'),\n };\n\n // merge together\n if (settings && settings.translations) {\n Object.keys(settings.translations).forEach(lang => translations[lang] = Object.assign(translations[lang], settings.translations[lang]));\n } else if (props.translations) {\n Object.keys(props.translations).forEach(lang => translations[lang] = Object.assign(translations[lang], props.translations[lang]));\n }\n\n I18n.setTranslations(translations);\n\n this.savedNative = {}; // to detect if the config changed\n\n this.encryptedFields = props.encryptedFields || settings?.encryptedFields || [];\n\n this.sentryDSN = (settings && settings.sentryDSN) || props.sentryDSN;\n\n this.socket = new Connection({\n ...(props?.socket || settings?.socket),\n name: this.adapterName,\n doNotLoadAllObjects: settings?.doNotLoadAllObjects,\n onProgress: progress => {\n if (progress === PROGRESS.CONNECTING) {\n this.setState({connected: false});\n } else if (progress === PROGRESS.READY) {\n this.setState({connected: true});\n } else {\n this.setState({connected: true});\n }\n },\n onReady: (objects, scripts) => {\n I18n.setLanguage(this.socket.systemLang);\n\n // subscribe because of language and expert mode\n this.socket.subscribeObject('system.config', this.onSystemConfigChanged)\n .then(() => this.getSystemConfig())\n .then(obj => {\n this._secret = (typeof obj !== 'undefined' && obj.native && obj.native.secret) || 'Zgfr56gFe87jJOM';\n this._systemConfig = obj?.common || {};\n return this.socket.getObject(this.instanceId);\n })\n .then(instanceObj => {\n let waitPromise;\n\n const sentryEnabled =\n this._systemConfig.diag !== 'none' &&\n instanceObj &&\n instanceObj.common &&\n instanceObj.common.name &&\n instanceObj.common.version &&\n !instanceObj.common.disableDataReporting &&\n window.location.host !== 'localhost:3000';\n\n // activate sentry plugin\n if (!this.sentryStarted && this.sentryDSN && sentryEnabled) {\n this.sentryStarted = true;\n\n Sentry.init({\n dsn: this.sentryDSN,\n release: `iobroker.${instanceObj.common.name}@${instanceObj.common.version}`,\n integrations: [\n new SentryIntegrations.Dedupe()\n ]\n });\n }\n\n // read UUID and init sentry with it.\n // for backward compatibility it will be processed separately from above logic: some adapters could still have this.sentryDSN as undefined\n if (!this.sentryInited && sentryEnabled) {\n this.sentryInited = true;\n\n waitPromise = this.socket.getObject('system.meta.uuid')\n .then(uuidObj => {\n if (uuidObj && uuidObj.native && uuidObj.native.uuid) {\n Sentry.configureScope(scope =>\n scope.setUser({id: uuidObj.native.uuid}));\n }\n });\n }\n\n waitPromise = waitPromise || Promise.resolve();\n\n waitPromise\n .then(() => {\n if (instanceObj) {\n this.common = instanceObj?.common;\n this.onPrepareLoad(instanceObj.native, instanceObj.encryptedNative); // decode all secrets\n this.savedNative = JSON.parse(JSON.stringify(instanceObj.native));\n this.setState({native: instanceObj.native, loaded: true, expertMode: this.getExpertMode()}, () =>\n this.onConnectionReady && this.onConnectionReady());\n } else {\n console.warn('Cannot load instance settings');\n this.setState({native: {}, loaded: true, expertMode: this.getExpertMode()}, () => this.onConnectionReady && this.onConnectionReady());\n }\n });\n });\n },\n onError: err => {\n console.error(err);\n this.showError(err);\n }\n });\n }\n\n onSystemConfigChanged = (id, obj) => {\n if (obj && id === 'system.config') {\n if (this.socket.systemLang !== obj?.common.language) {\n this.socket.systemLang = obj?.common.language || 'en';\n I18n.setLanguage(this.socket.systemLang);\n }\n\n if (this._systemConfig.expertMode !== !!obj?.common?.expertMode) {\n this._systemConfig = obj?.common || {};\n this.setState({expertMode: this.getExpertMode()});\n } else {\n this._systemConfig = obj?.common || {};\n }\n }\n }\n\n /**\n * Called immediately after a component is mounted. Setting state here will trigger re-rendering.\n */\n componentDidMount() {\n window.addEventListener('resize', this.onResize, true);\n window.addEventListener('message', this.onReceiveMessage, false);\n super.componentDidMount();\n }\n\n /**\n * Called immediately before a component is destroyed.\n */\n componentWillUnmount() {\n window.removeEventListener('resize', this.onResize, true);\n window.removeEventListener('message', this.onReceiveMessage, false);\n super.componentWillUnmount();\n }\n\n onReceiveMessage = message => {\n if (message?.data) {\n if (message.data === 'updateTheme') {\n const newThemeName = Utils.getThemeName()\n Utils.setThemeName(Utils.getThemeName());\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n }, () => {\n this.props.onThemeChange && this.props.onThemeChange(newThemeName);\n this.onThemeChanged && this.onThemeChanged(newThemeName);\n });\n } else if (message.data === 'updateExpertMode') {\n this.onToggleExpertMode && this.onToggleExpertMode(this.getExpertMode());\n } else {\n console.warn('Received unknown message: ' + JSON.stringify(message.data));\n }\n }\n };\n\n /**\n * @private\n */\n onResize = () => {\n this.resizeTimer && clearTimeout(this.resizeTimer);\n this.resizeTimer = setTimeout(() => {\n this.resizeTimer = null;\n this.setState({width: GenericApp.getWidth()});\n }, 200);\n };\n\n /**\n * Gets the width depending on the window inner width.\n * @returns {import('./types').Width}\n */\n static getWidth() {\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n const SIZES = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n };\n const width = window.innerWidth;\n const keys = Object.keys(SIZES).reverse();\n const widthComputed = keys.find(key => width >= SIZES[key]);\n\n return widthComputed || 'xs';\n }\n\n /**\n * Get a theme\n * @param {string} name Theme name\n * @returns {import('./types').Theme}\n */\n createTheme(name = '') {\n return theme(Utils.getThemeName(name));\n }\n\n /**\n * Get the theme name\n * @param {import('./types').Theme} theme Theme\n * @returns {string} Theme name\n */\n getThemeName(theme) {\n return theme.name;\n }\n\n /**\n * Get the theme type\n * @param {import('./types').Theme} theme Theme\n * @returns {string} Theme type\n */\n getThemeType(theme) {\n return theme.palette.type;\n }\n\n /**\n * Changes the current theme\n */\n toggleTheme() {\n const themeName = this.state.themeName;\n\n // dark => blue => colored => light => dark\n const newThemeName = themeName === 'dark' ? 'blue' :\n (themeName === 'blue' ? 'colored' :\n (themeName === 'colored' ? 'light' : 'dark'));\n\n Utils.setThemeName(newThemeName);\n\n const theme = this.createTheme(newThemeName);\n\n this.setState({\n theme,\n themeName: this.getThemeName(theme),\n themeType: this.getThemeType(theme)\n });\n }\n\n /**\n * Gets the system configuration.\n * @returns {Promise}\n */\n getSystemConfig() {\n return this.socket.getSystemConfig();\n }\n\n /**\n * Get current expert mode\n * @returns {boolean}\n */\n getExpertMode() {\n return window.sessionStorage.getItem('App.expertMode') === 'true' || !!this._systemConfig.expertMode;\n }\n\n /**\n * Gets called when the socket.io connection is ready.\n * You can overload this function to execute own commands.\n */\n onConnectionReady() {\n }\n\n /**\n * Encrypts a string.\n * @param {string} value\n * @returns {string}\n */\n encrypt(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(this._secret[i % this._secret.length].charCodeAt(0) ^ value.charCodeAt(i));\n }\n return result;\n }\n\n /**\n * Decrypts a string.\n * @param {string} value\n * @returns {string}\n */\n decrypt(value) {\n let result = '';\n for (let i = 0; i < value.length; i++) {\n result += String.fromCharCode(this._secret[i % this._secret.length].charCodeAt(0) ^ value.charCodeAt(i));\n }\n return result;\n }\n\n /**\n * Gets called when the navigation hash changes.\n * You may override this if needed.\n */\n onHashChanged() {\n const location = Router.getLocation();\n if (location.tab !== this.state.selectedTab) {\n this.selectTab(location.tab);\n }\n }\n\n /**\n * Selects the given tab.\n * @param {string} tab\n * @param {number} [index]\n */\n selectTab(tab, index) {\n window.localStorage[this.adapterName + '-adapter'] = tab;\n this.setState({selectedTab: tab, selectedTabNum: index})\n }\n\n /**\n * Gets called before the settings are saved.\n * You may override this if needed.\n * @param {Record} settings\n */\n onPrepareSave(settings) {\n // here you can encode values\n this.encryptedFields && this.encryptedFields.forEach(attr => {\n if (settings[attr]) {\n settings[attr] = this.encrypt(settings[attr]);\n }\n });\n\n return true;\n }\n\n /**\n * Gets called after the settings are loaded.\n * You may override this if needed.\n * @param {Record} settings\n * @param {string[]} encryptedNative optional list of fields to be decrypted\n */\n onPrepareLoad(settings, encryptedNative) {\n // here you can encode values\n this.encryptedFields && this.encryptedFields.forEach(attr => {\n if (settings[attr]) {\n settings[attr] = this.decrypt(settings[attr]);\n }\n });\n encryptedNative && encryptedNative.forEach(attr => {\n this.encryptedFields = this.encryptedFields || [];\n !this.encryptedFields.includes(attr) && this.encryptedFields.push(attr);\n if (settings[attr]) {\n settings[attr] = this.decrypt(settings[attr]);\n }\n });\n }\n\n /**\n * Gets the extendable instances.\n * @returns {Promise}\n */\n getExtendableInstances() {\n return new Promise(resolve => {\n this.socket._socket.emit('getObjectView', 'system', 'instance', null, (err, doc) => {\n if (err) {\n resolve([]);\n } else {\n resolve(doc.rows.filter(item => item.value.common.webExtendable).map(item => item.value));\n }\n });\n });\n }\n\n /**\n * Gets the IP addresses of the given host.\n * @param {string} host\n */\n getIpAddresses(host) {\n return new Promise((resolve, reject) => {\n this.socket._socket.emit('getHostByIp', host || this.common.host, (ip, _host) => {\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - ' + I18n.t('ra_Listen on all IPs'), address: '0.0.0.0', family: 'ipv4'}];\n const IPs6 = [{name: '[IPv6] ::', address: '::', family: 'ipv6'}];\n if (_host) {\n host = _host;\n if (host.native.hardware && host.native.hardware.networkInterfaces) {\n Object.keys(host.native.hardware.networkInterfaces).forEach(eth =>\n host.native.hardware.networkInterfaces[eth].forEach(inter => {\n if (inter.family !== 'IPv6') {\n IPs4.push({name: '[' + inter.family + '] ' + inter.address + ' - ' + eth, address: inter.address, family: 'ipv4'});\n } else {\n IPs6.push({name: '[' + inter.family + '] ' + inter.address + ' - ' + eth, address: inter.address, family: 'ipv6'});\n }\n }));\n }\n IPs6.forEach(ip => IPs4.push(ip));\n }\n resolve(IPs4);\n });\n });\n }\n\n /**\n * Saves the settings to the server.\n * @param {boolean} isClose True if the user is closing the dialog.\n */\n onSave(isClose) {\n let oldObj;\n if (this.state.isConfigurationError) {\n this.setState({errorText: this.state.isConfigurationError});\n return;\n }\n\n this.socket.getObject(this.instanceId)\n .then(_oldObj => {\n oldObj = _oldObj || {};\n\n for (const a in this.state.native) {\n if (this.state.native.hasOwnProperty(a)) {\n if (this.state.native[a] === null) {\n oldObj.native[a] = null;\n } else\n if (this.state.native[a] !== undefined) {\n oldObj.native[a] = JSON.parse(JSON.stringify(this.state.native[a]));\n } else {\n delete oldObj.native[a];\n }\n }\n }\n\n if (this.state.common) {\n for (const b in this.state.common) {\n if (this.state.common[b] === null) {\n oldObj.common[b] = null;\n } else\n if (this.state.common[b] !== undefined) {\n oldObj.common[b] = JSON.parse(JSON.stringify(this.state.common[b]));\n } else {\n delete oldObj.common[b];\n }\n }\n }\n\n if (this.onPrepareSave(oldObj.native) !== false) {\n return this.socket.setObject(this.instanceId, oldObj);\n } else {\n return Promise.reject('Invalid configuration');\n }\n })\n .then(() => {\n this.savedNative = oldObj.native;\n globalThis.changed = false;\n this.setState({changed: false});\n isClose && GenericApp.onClose();\n })\n .catch(e => {\n console.error(`Cannot save configuration: ${e}`);\n });\n }\n\n /**\n * Renders the toast.\n * @returns {JSX.Element | null} The JSX element.\n */\n renderToast() {\n if (!this.state.toast) return null;\n return (\n this.setState({toast: ''})}\n ContentProps={{\n 'aria-describedby': 'message-id',\n }}\n message={{this.state.toast}}\n action={[\n this.setState({toast: ''})}\n >\n \n ,\n ]}\n />);\n }\n\n /**\n * Closes the dialog.\n * @private\n */\n static onClose() {\n if (typeof window.parent !== 'undefined' && window.parent) {\n try {\n if (window.parent.$iframeDialog && typeof window.parent.$iframeDialog.close === 'function') {\n window.parent.$iframeDialog.close();\n } else {\n window.parent.postMessage('close', '*');\n }\n } catch (e) {\n window.parent.postMessage('close', '*');\n }\n }\n }\n\n /**\n * Renders the error dialog.\n * @returns {JSX.Element | null} The JSX element.\n */\n renderError() {\n if (!this.state.errorText) {\n return null;\n } else {\n return this.setState({errorText: ''})}/>;\n }\n }\n\n /**\n * Checks if the configuration has changed.\n * @param {Record} [native] the new state\n */\n getIsChanged(native) {\n native = native || this.state.native;\n const isChanged = JSON.stringify(native) !== JSON.stringify(this.savedNative);\n\n if(isChanged) {\n globalThis.changed = true;\n } else {\n globalThis.changed = false;\n }\n\n return isChanged;\n }\n\n /**\n * Gets called when loading the configuration.\n * @param {Record} newNative The new configuration object.\n */\n onLoadConfig(newNative) {\n if (JSON.stringify(newNative) !== JSON.stringify(this.state.native)) {\n this.setState({native: newNative, changed: this.getIsChanged(newNative)})\n }\n }\n\n /**\n * Sets the configuration error.\n * @param {string} errorText\n */\n setConfigurationError(errorText) {\n if (this.state.isConfigurationError !== errorText) {\n this.setState({isConfigurationError: errorText});\n }\n }\n\n /**\n * Renders the save and close buttons.\n * @returns {JSX.Element | undefined} The JSX element.\n */\n renderSaveCloseButtons() {\n if (this.state.bottomButtons) {\n return this.onSave(isClose)}\n onClose={() => GenericApp.onClose()}\n />;\n } else {\n return null;\n }\n }\n\n /**\n * @private\n * @param {Record} obj\n * @param {any} attrs\n * @param {any} value\n * @returns {boolean | undefined}\n */\n _updateNativeValue(obj, attrs, value) {\n if (typeof attrs !== 'object') {\n attrs = attrs.split('.');\n }\n const attr = attrs.shift();\n if (!attrs.length) {\n if (value && typeof value === 'object') {\n if (JSON.stringify(obj[attr]) !== JSON.stringify(value)) {\n obj[attr] = value;\n return true;\n }\n } else if (obj[attr] !== value) {\n obj[attr] = value;\n return true;\n } else {\n return false;\n }\n\n } else {\n obj[attr] = obj[attr] || {};\n if (typeof obj[attr] !== 'object') {\n throw new Error('attribute ' + attr + ' is no object, but ' + typeof obj[attr]);\n }\n return this._updateNativeValue(obj[attr], attrs, value);\n }\n }\n\n /**\n * Update the native value\n * @param {string} attr The attribute name with dots as delimiter.\n * @param {any} value The new value.\n * @param {(() => void)} [cb] Callback which will be called upon completion.\n */\n updateNativeValue(attr, value, cb) {\n const native = JSON.parse(JSON.stringify(this.state.native));\n if (this._updateNativeValue(native, attr, value)) {\n const changed = this.getIsChanged(native);\n this.setState({native, changed}, cb);\n }\n }\n\n /**\n * Set the error text to be shown.\n * @param {string | JSX.Element} text\n */\n showError(text) {\n this.setState({errorText: text});\n }\n\n /**\n * Sets the toast to be shown.\n * @param {string} toast\n */\n showToast(toast) {\n this.setState({toast});\n }\n\n /**\n * Renders this component.\n * @returns {JSX.Element} The JSX element.\n */\n render() {\n if (!this.state.loaded) {\n return ;\n }\n\n return
\n {this.renderError()}\n {this.renderToast()}\n {this.renderSaveCloseButtons()}\n
;\n }\n}\n\nGenericApp.propTypes = {\n adapterName: PropTypes.string, // (optional) name of adapter\n onThemeChange: PropTypes.func, // (optional) called by theme change\n socket: PropTypes.object, // (optional) socket information (host, port)\n encryptedFields: PropTypes.array, // (optional) list of native attributes, that must be encrypted\n bottomButtons: PropTypes.bool, // If the bottom buttons (Save/Close) must be shown\n};\n\nexport default GenericApp;\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport type MemoFunc = [(obj: any) => boolean, (obj: any) => void];\n\n/**\n * Helper to decycle json objects\n */\nexport function memoBuilder(): MemoFunc {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner: any = hasWeakSet ? new WeakSet() : [];\n function memoize(obj: any): boolean {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj: any): void {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n","/*!\n localForage -- Offline Storage, Improved\n Version 1.10.0\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {\n return;\n }\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb || !idb.open) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support\n // (see: https://github.com/pouchdb/pouchdb/issues/5572).\n // Safari 10.1 shipped with fetch, we can use that to detect it.\n // Note: this creates issues with `window.fetch` polyfills and\n // overrides; see:\n // https://github.com/localForage/localForage/issues/856\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n // See: https://github.com/mozilla/localForage/issues/128\n // See: https://github.com/mozilla/localForage/issues/272\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\nfunction normalizeKey(key) {\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n return key;\n}\n\nfunction getCallback() {\n if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n return arguments[arguments.length - 1];\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs = void 0;\nvar dbContexts = {};\nvar toString = Object.prototype.toString;\n\n// Transaction Modes\nvar READ_ONLY = 'readonly';\nvar READ_WRITE = 'readwrite';\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve, reject) {\n deferredOperation.resolve = resolve;\n deferredOperation.reject = reject;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n return deferredOperation.promise;\n }\n}\n\nfunction _rejectReadiness(dbInfo, err) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Reject its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.reject(err);\n return deferredOperation.promise;\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n var db = openreq.result;\n db.onversionchange = function (e) {\n // Triggered when the database is modified (e.g. adding an objectStore) or\n // deleted (even when initiated by other sessions in different tabs).\n // Closing the connection here prevents those operations from being blocked.\n // If the database is accessed again later by this instance, the connection\n // will be reopened or the database recreated as needed.\n e.target.close();\n };\n resolve(db);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Try to establish a new db connection to replace the\n// current one which is broken (i.e. experiencing\n// InvalidStateError while creating a transaction).\nfunction _tryReconnect(dbInfo) {\n _deferReadiness(dbInfo);\n\n var dbContext = dbContexts[dbInfo.name];\n var forages = dbContext.forages;\n\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n if (forage._dbInfo.db) {\n forage._dbInfo.db.close();\n forage._dbInfo.db = null;\n }\n }\n dbInfo.db = null;\n\n return _getOriginalConnection(dbInfo).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n // store the latest db reference\n // in case the db was upgraded\n dbInfo.db = dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n })[\"catch\"](function (err) {\n _rejectReadiness(dbInfo, err);\n throw err;\n });\n}\n\n// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n// so we have to do it with callbacks\nfunction createTransaction(dbInfo, mode, callback, retries) {\n if (retries === undefined) {\n retries = 1;\n }\n\n try {\n var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n callback(null, tx);\n } catch (err) {\n if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n return Promise$1.resolve().then(function () {\n if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n // increase the db version, to create the new ObjectStore\n if (dbInfo.db) {\n dbInfo.version = dbInfo.db.version + 1;\n }\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n }).then(function () {\n return _tryReconnect(dbInfo).then(function () {\n createTransaction(dbInfo, mode, callback, retries - 1);\n });\n })[\"catch\"](callback);\n }\n\n callback(err);\n }\n}\n\nfunction createDbContext() {\n return {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = createDbContext();\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n // when the iterator callback returns any\n // (non-`undefined`) value, then we stop\n // the iteration immediately\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n var req = store.put(value, key);\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var advanced = false;\n var req = store.openKeyCursor();\n\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openKeyCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\n var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n return db;\n });\n\n if (!options.storeName) {\n promise = dbPromise.then(function (db) {\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n }\n\n var dropDBPromise = new Promise$1(function (resolve, reject) {\n var req = idb.deleteDatabase(options.name);\n\n req.onerror = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n reject(req.error);\n };\n\n req.onblocked = function () {\n // Closing all open connections in onversionchange handler should prevent this situation, but if\n // we do get here, it just means the request remains pending - eventually it will succeed or error\n console.warn('dropInstance blocked for database \"' + options.name + '\" until all open connections are closed');\n };\n\n req.onsuccess = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n resolve(db);\n };\n });\n\n return dropDBPromise.then(function (db) {\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n var _forage = forages[i];\n _advanceReadiness(_forage._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n } else {\n promise = dbPromise.then(function (db) {\n if (!db.objectStoreNames.contains(options.storeName)) {\n return;\n }\n\n var newVersion = db.version + 1;\n\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n forage._dbInfo.version = newVersion;\n }\n\n var dropObjectPromise = new Promise$1(function (resolve, reject) {\n var req = idb.open(options.name, newVersion);\n\n req.onerror = function (err) {\n var db = req.result;\n db.close();\n reject(err);\n };\n\n req.onupgradeneeded = function () {\n var db = req.result;\n db.deleteObjectStore(options.storeName);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n db.close();\n resolve(db);\n };\n });\n\n return dropObjectPromise.then(function (db) {\n dbContext.db = db;\n for (var j = 0; j < forages.length; j++) {\n var _forage2 = forages[j];\n _forage2._dbInfo.db = db;\n _advanceReadiness(_forage2._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n }\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n _support: isIndexedDBValid(),\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys,\n dropInstance: dropInstance\n};\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n\nfunction createDbTable(t, dbInfo, callback, errorCallback) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n}\n\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n createDbTable(t, dbInfo, function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n }, reject);\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n t.executeSql(sqlStatement, args, callback, function (t, error) {\n if (error.code === error.SYNTAX_ERR) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n if (!results.rows.length) {\n // if the table is missing (was deleted)\n // re-create it table and retry\n createDbTable(t, dbInfo, function () {\n t.executeSql(sqlStatement, args, callback, errorCallback);\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// https://www.w3.org/TR/webdatabase/#databases\n// > There is no way to enumerate or delete the databases available for an origin from this API.\nfunction getAllStoreNames(db) {\n return new Promise$1(function (resolve, reject) {\n db.transaction(function (t) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n var storeNames = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n storeNames.push(results.rows.item(i).name);\n }\n\n resolve({\n db: db,\n storeNames: storeNames\n });\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n}\n\nfunction dropInstance$1(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n var db;\n if (options.name === currentConfig.name) {\n // use the db reference of the current instance\n db = self._dbInfo.db;\n } else {\n db = openDatabase(options.name, '', '', 0);\n }\n\n if (!options.storeName) {\n // drop all database tables\n resolve(getAllStoreNames(db));\n } else {\n resolve({\n db: db,\n storeNames: [options.storeName]\n });\n }\n }).then(function (operationInfo) {\n return new Promise$1(function (resolve, reject) {\n operationInfo.db.transaction(function (t) {\n function dropTable(storeName) {\n return new Promise$1(function (resolve, reject) {\n t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n }\n\n var operations = [];\n for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n operations.push(dropTable(operationInfo.storeNames[i]));\n }\n\n Promise$1.all(operations).then(function () {\n resolve();\n })[\"catch\"](function (e) {\n reject(e);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n _support: isWebSQLValid(),\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1,\n dropInstance: dropInstance$1\n};\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n // in IE8 typeof localStorage.setItem === 'object'\n !!localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getKeyPrefix(options, defaultConfig) {\n var keyPrefix = options.name + '/';\n\n if (options.storeName !== defaultConfig.storeName) {\n keyPrefix += options.storeName + '/';\n }\n return keyPrefix;\n}\n\n// Check if localStorage throws when saving an item\nfunction checkIfLocalStorageThrows() {\n var localStorageTestKey = '_localforage_support_test';\n\n try {\n localStorage.setItem(localStorageTestKey, true);\n localStorage.removeItem(localStorageTestKey);\n\n return false;\n } catch (e) {\n return true;\n }\n}\n\n// Check if localStorage is usable and allows to save an item\n// This method checks if localStorage is usable in Safari Private Browsing\n// mode, or in any other case where the available quota for localStorage\n// is 0 and there wasn't any saved items yet.\nfunction _isLocalStorageUsable() {\n return !checkIfLocalStorageThrows() || localStorage.length > 0;\n}\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\n if (!_isLocalStorageUsable()) {\n return Promise$1.reject();\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n var itemKey = localStorage.key(i);\n if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance$2(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n var currentConfig = this.config();\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n if (!options.storeName) {\n resolve(options.name + '/');\n } else {\n resolve(_getKeyPrefix(options, self._defaultConfig));\n }\n }).then(function (keyPrefix) {\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n _support: isLocalStorageValid(),\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2,\n dropInstance: dropInstance$2\n};\n\nvar sameValue = function sameValue(x, y) {\n return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n};\n\nvar includes = function includes(array, searchElement) {\n var len = array.length;\n var i = 0;\n while (i < len) {\n if (sameValue(array[i], searchElement)) {\n return true;\n }\n i++;\n }\n\n return false;\n};\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\n// Drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar DefinedDrivers = {};\n\nvar DriverSupport = {};\n\nvar DefaultDrivers = {\n INDEXEDDB: asyncStorage,\n WEBSQL: webSQLStorage,\n LOCALSTORAGE: localStorageWrapper\n};\n\nvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\nvar OptionalDriverMethods = ['dropInstance'];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var _key in arg) {\n if (arg.hasOwnProperty(_key)) {\n if (isArray(arg[_key])) {\n arguments[0][_key] = arg[_key].slice();\n } else {\n arguments[0][_key] = arg[_key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n for (var driverTypeKey in DefaultDrivers) {\n if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n var driver = DefaultDrivers[driverTypeKey];\n var driverName = driver._driver;\n this[driverTypeKey] = driverName;\n\n if (!DefinedDrivers[driverName]) {\n // we don't need to wait for the promise,\n // since the default drivers can be defined\n // in a blocking manner\n this.defineDriver(driver);\n }\n }\n }\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n\n var driverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0, len = driverMethods.length; i < len; i++) {\n var driverMethodName = driverMethods[i];\n\n // when the property is there,\n // it should be a method even when optional\n var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var configureMissingMethods = function configureMissingMethods() {\n var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n return function () {\n var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n var promise = Promise$1.reject(error);\n executeCallback(promise, arguments[arguments.length - 1]);\n return promise;\n };\n };\n\n for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n var optionalDriverMethod = OptionalDriverMethods[_i];\n if (!driverObject[optionalDriverMethod]) {\n driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n }\n }\n };\n\n configureMissingMethods();\n\n var setDriverSupport = function setDriverSupport(support) {\n if (DefinedDrivers[driverName]) {\n console.info('Redefining LocalForage driver: ' + driverName);\n }\n DefinedDrivers[driverName] = driverObject;\n DriverSupport[driverName] = support;\n // don't use a then, so that we can define\n // drivers that have simple _support methods\n // in a blocking manner\n resolve();\n };\n\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n driverObject._support().then(setDriverSupport, reject);\n } else {\n setDriverSupport(!!driverObject._support);\n }\n } else {\n setDriverSupport(true);\n }\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!DriverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (file, acceptedFiles) {\n if (file && acceptedFiles) {\n var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');\n var fileName = file.name || '';\n var mimeType = (file.type || '').toLowerCase();\n var baseMimeType = mimeType.replace(/\\/.*$/, '');\n return acceptedFilesArray.some(function (type) {\n var validType = type.trim().toLowerCase();\n\n if (validType.charAt(0) === '.') {\n return fileName.toLowerCase().endsWith(validType);\n } else if (validType.endsWith('/*')) {\n // This is something like a image/* mime type\n return baseMimeType === validType.replace(/\\/.*$/, '');\n }\n\n return mimeType === validType;\n });\n }\n\n return true;\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport NativeSelectInput from './NativeSelectInput';\nimport withStyles from '../styles/withStyles';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the select component `root` class. */\n root: {},\n\n /* Styles applied to the select component `select` class. */\n select: {\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n minWidth: 16,\n // So it doesn't collapse.\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE 11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n '&$disabled': {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n '&&': {\n paddingRight: 24\n }\n },\n\n /* Styles applied to the select component if `variant=\"filled\"`. */\n filled: {\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component if `variant=\"outlined\"`. */\n outlined: {\n borderRadius: theme.shape.borderRadius,\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component `selectMenu` class. */\n selectMenu: {\n height: 'auto',\n // Resets for multpile select with chips\n minHeight: '1.1876em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n\n /* Pseudo-class applied to the select component `disabled` class. */\n disabled: {},\n\n /* Styles applied to the icon component. */\n icon: {\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - 12px)',\n // Center vertically\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the icon component if the popup is open. */\n iconOpen: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the icon component if `variant=\"filled\"`. */\n iconFilled: {\n right: 7\n },\n\n /* Styles applied to the icon component if `variant=\"outlined\"`. */\n iconOutlined: {\n right: 7\n },\n\n /* Styles applied to the underlying native input component. */\n nativeInput: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%'\n }\n };\n};\nvar defaultInput = /*#__PURE__*/React.createElement(Input, null);\n/**\n * An alternative to `;\n\n if (this.props.dense) {\n return select;\n } else {\n return \n {this.props.label}\n {select}\n ;\n\n }\n }\n}\n\nSelectWithIcon.propTypes = {\n t: PropTypes.func,\n lang: PropTypes.string,\n themeType: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n list: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n options: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n label: PropTypes.string,\n different: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n fullWidth: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n removePrefix: PropTypes.string,\n allowNone: PropTypes.bool,\n inputProps: PropTypes.object,\n};\n\nexport default withStyles(styles)(SelectWithIcon);","export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n","import isBrowser from './isBrowser';\n\nconst timeoutDuration = (function(){\n const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}());\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nexport default function getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`]) +\n parseFloat(styles[`border${sideB}Width`])\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.width;\n const height =\n sizes.height || element.clientHeight || result.height;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop);\n const marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getReferenceNode from './getReferenceNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\nimport getReferenceNode from './getReferenceNode';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n constructor(reference, popper, options = {}) {\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = { ...Popper.Defaults, ...options };\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: [],\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n scheduleUpdate = () => requestAnimationFrame(this.update);\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\n}\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z\"\n}), 'FileCopy');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z\"\n}), 'ImportExport');\n\nexports.default = _default;","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,"function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport accepts from \"attr-accept\"; // Error codes\n\nexport var FILE_INVALID_TYPE = \"file-invalid-type\";\nexport var FILE_TOO_LARGE = \"file-too-large\";\nexport var FILE_TOO_SMALL = \"file-too-small\";\nexport var TOO_MANY_FILES = \"too-many-files\";\nexport var ErrorCode = {\n FileInvalidType: FILE_INVALID_TYPE,\n FileTooLarge: FILE_TOO_LARGE,\n FileTooSmall: FILE_TOO_SMALL,\n TooManyFiles: TOO_MANY_FILES\n}; // File Errors\n\nexport var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr(accept) {\n accept = Array.isArray(accept) && accept.length === 1 ? accept[0] : accept;\n var messageSuffix = Array.isArray(accept) ? \"one of \".concat(accept.join(\", \")) : accept;\n return {\n code: FILE_INVALID_TYPE,\n message: \"File type must be \".concat(messageSuffix)\n };\n};\nexport var getTooLargeRejectionErr = function getTooLargeRejectionErr(maxSize) {\n return {\n code: FILE_TOO_LARGE,\n message: \"File is larger than \".concat(maxSize, \" \").concat(maxSize === 1 ? \"byte\" : \"bytes\")\n };\n};\nexport var getTooSmallRejectionErr = function getTooSmallRejectionErr(minSize) {\n return {\n code: FILE_TOO_SMALL,\n message: \"File is smaller than \".concat(minSize, \" \").concat(minSize === 1 ? \"byte\" : \"bytes\")\n };\n};\nexport var TOO_MANY_FILES_REJECTION = {\n code: TOO_MANY_FILES,\n message: \"Too many files\"\n}; // Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with\n// that MIME type will always be accepted\n\nexport function fileAccepted(file, accept) {\n var isAcceptable = file.type === \"application/x-moz-file\" || accepts(file, accept);\n return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];\n}\nexport function fileMatchSize(file, minSize, maxSize) {\n if (isDefined(file.size)) {\n if (isDefined(minSize) && isDefined(maxSize)) {\n if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];\n } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n }\n\n return [true, null];\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n\nexport function allFilesAccepted(_ref) {\n var files = _ref.files,\n accept = _ref.accept,\n minSize = _ref.minSize,\n maxSize = _ref.maxSize,\n multiple = _ref.multiple,\n maxFiles = _ref.maxFiles;\n\n if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {\n return false;\n }\n\n return files.every(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 1),\n accepted = _fileAccepted2[0];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 1),\n sizeMatch = _fileMatchSize2[0];\n\n return accepted && sizeMatch;\n });\n} // React's synthetic events has event.isPropagationStopped,\n// but to remain compatibility with other libs (Preact) fall back\n// to check event.cancelBubble\n\nexport function isPropagationStopped(event) {\n if (typeof event.isPropagationStopped === \"function\") {\n return event.isPropagationStopped();\n } else if (typeof event.cancelBubble !== \"undefined\") {\n return event.cancelBubble;\n }\n\n return false;\n}\nexport function isEvtWithFiles(event) {\n if (!event.dataTransfer) {\n return !!event.target && !!event.target.files;\n } // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file\n\n\n return Array.prototype.some.call(event.dataTransfer.types, function (type) {\n return type === \"Files\" || type === \"application/x-moz-file\";\n });\n}\nexport function isKindFile(item) {\n return _typeof(item) === \"object\" && item !== null && item.kind === \"file\";\n} // allow the entire document to be a drag target\n\nexport function onDocumentDragOver(event) {\n event.preventDefault();\n}\n\nfunction isIe(userAgent) {\n return userAgent.indexOf(\"MSIE\") !== -1 || userAgent.indexOf(\"Trident/\") !== -1;\n}\n\nfunction isEdge(userAgent) {\n return userAgent.indexOf(\"Edge/\") !== -1;\n}\n\nexport function isIeOrEdge() {\n var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.navigator.userAgent;\n return isIe(userAgent) || isEdge(userAgent);\n}\n/**\n * This is intended to be used to compose event handlers\n * They are executed in order until one of them calls `event.isPropagationStopped()`.\n * Note that the check is done on the first invoke too,\n * meaning that if propagation was stopped before invoking the fns,\n * no handlers will be executed.\n *\n * @param {Function} fns the event hanlder functions\n * @return {Function} the event handler to add to an element\n */\n\nexport function composeEventHandlers() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return fns.some(function (fn) {\n if (!isPropagationStopped(event) && fn) {\n fn.apply(void 0, [event].concat(args));\n }\n\n return isPropagationStopped(event);\n });\n };\n}\n/**\n * canUseFileSystemAccessAPI checks if the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)\n * is supported by the browser.\n * @returns {boolean}\n */\n\nexport function canUseFileSystemAccessAPI() {\n return \"showOpenFilePicker\" in window;\n}\n/**\n * filePickerOptionsTypes returns the {types} option for https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n * based on the accept attr (see https://github.com/react-dropzone/attr-accept)\n * E.g: converts ['image/*', 'text/*'] to {'image/*': [], 'text/*': []}\n * @param {string|string[]} accept\n */\n\nexport function filePickerOptionsTypes(accept) {\n accept = typeof accept === \"string\" ? accept.split(\",\") : accept;\n return [{\n description: \"everything\",\n // TODO: Need to handle filtering more elegantly than this!\n accept: Array.isArray(accept) ? // Accept just MIME types as per spec\n // NOTE: accept can be https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers\n accept.filter(function (item) {\n return item === \"audio/*\" || item === \"video/*\" || item === \"image/*\" || item === \"text/*\" || /\\w+\\/[-+.\\w]+/g.test(item);\n }).reduce(function (a, b) {\n return _objectSpread(_objectSpread({}, a), {}, _defineProperty({}, b, []));\n }, {}) : {}\n }];\n}\n/**\n * Check if v is an exception caused by aborting a request (e.g window.showOpenFilePicker()).\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException.\n * @param {any} v\n * @returns {boolean} True if v is an abort exception.\n */\n\nexport function isAbort(v) {\n return v instanceof DOMException && (v.name === \"AbortError\" || v.code === v.ABORT_ERR);\n}\n/**\n * Check if v is a security error.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException.\n * @param {any} v\n * @returns {boolean} True if v is a security error.\n */\n\nexport function isSecurityError(v) {\n return v instanceof DOMException && (v.name === \"SecurityError\" || v.code === v.SECURITY_ERR);\n}","var _excluded = [\"children\"],\n _excluded2 = [\"open\"],\n _excluded3 = [\"refKey\", \"role\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"onClick\", \"onDragEnter\", \"onDragOver\", \"onDragLeave\", \"onDrop\"],\n _excluded4 = [\"refKey\", \"onChange\", \"onClick\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* eslint prefer-template: 0 */\nimport React, { forwardRef, Fragment, useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { fromEvent } from \"file-selector\";\nimport { allFilesAccepted, composeEventHandlers, fileAccepted, fileMatchSize, filePickerOptionsTypes, canUseFileSystemAccessAPI, isAbort, isEvtWithFiles, isIeOrEdge, isPropagationStopped, isSecurityError, onDocumentDragOver, TOO_MANY_FILES_REJECTION } from \"./utils/index\";\n/**\n * Convenience wrapper component for the `useDropzone` hook\n *\n * ```jsx\n * \n * {({getRootProps, getInputProps}) => (\n *
\n * \n *

Drag 'n' drop some files here, or click to select files

\n *
\n * )}\n *
\n * ```\n */\n\nvar Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n params = _objectWithoutProperties(_ref, _excluded);\n\n var _useDropzone = useDropzone(params),\n open = _useDropzone.open,\n props = _objectWithoutProperties(_useDropzone, _excluded2);\n\n useImperativeHandle(ref, function () {\n return {\n open: open\n };\n }, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element\n\n return /*#__PURE__*/React.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {\n open: open\n })));\n});\nDropzone.displayName = \"Dropzone\"; // Add default props for react-docgen\n\nvar defaultProps = {\n disabled: false,\n getFilesFromEvent: fromEvent,\n maxSize: Infinity,\n minSize: 0,\n multiple: true,\n maxFiles: 0,\n preventDropOnDocument: true,\n noClick: false,\n noKeyboard: false,\n noDrag: false,\n noDragEventsBubbling: false,\n validator: null,\n useFsAccessApi: true\n};\nDropzone.defaultProps = defaultProps;\nDropzone.propTypes = {\n /**\n * Render function that exposes the dropzone state and prop getter fns\n *\n * @param {object} params\n * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render\n * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render\n * @param {Function} params.open Open the native file selection dialog\n * @param {boolean} params.isFocused Dropzone area is in focus\n * @param {boolean} params.isFileDialogActive File dialog is opened\n * @param {boolean} params.isDragActive Active drag is in progress\n * @param {boolean} params.isDragAccept Dragged files are accepted\n * @param {boolean} params.isDragReject Some dragged files are rejected\n * @param {File[]} params.draggedFiles Files in active drag\n * @param {File[]} params.acceptedFiles Accepted files\n * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected\n */\n children: PropTypes.func,\n\n /**\n * Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n */\n accept: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * If true, disables click to open the native file selection dialog\n */\n noClick: PropTypes.bool,\n\n /**\n * If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n */\n noKeyboard: PropTypes.bool,\n\n /**\n * If true, disables drag 'n' drop\n */\n noDrag: PropTypes.bool,\n\n /**\n * If true, stops drag event propagation to parents\n */\n noDragEventsBubbling: PropTypes.bool,\n\n /**\n * Minimum file size (in bytes)\n */\n minSize: PropTypes.number,\n\n /**\n * Maximum file size (in bytes)\n */\n maxSize: PropTypes.number,\n\n /**\n * Maximum accepted number of files\n * The default value is 0 which means there is no limitation to how many files are accepted.\n */\n maxFiles: PropTypes.number,\n\n /**\n * Enable/disable the dropzone\n */\n disabled: PropTypes.bool,\n\n /**\n * Use this to provide a custom file aggregator\n *\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n getFilesFromEvent: PropTypes.func,\n\n /**\n * Cb for when closing the file dialog with no selection\n */\n onFileDialogCancel: PropTypes.func,\n\n /**\n * Cb for when opening the file dialog\n */\n onFileDialogOpen: PropTypes.func,\n\n /**\n * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `` click event.\n */\n useFsAccessApi: PropTypes.bool,\n\n /**\n * Cb for when the `dragenter` event occurs.\n *\n * @param {DragEvent} event\n */\n onDragEnter: PropTypes.func,\n\n /**\n * Cb for when the `dragleave` event occurs\n *\n * @param {DragEvent} event\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Cb for when the `dragover` event occurs\n *\n * @param {DragEvent} event\n */\n onDragOver: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n *\n * @param {File[]} acceptedFiles\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n onDrop: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n *\n * @param {File[]} files\n * @param {(DragEvent|Event)} event\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n *\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event\n */\n onDropRejected: PropTypes.func,\n\n /**\n * Custom validation function\n * @param {File} file\n * @returns {FileError|FileError[]}\n */\n validator: PropTypes.func\n};\nexport default Dropzone;\n/**\n * A function that is invoked for the `dragenter`,\n * `dragover` and `dragleave` events.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dragCb\n * @param {DragEvent} event\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dropCb\n * @param {File[]} acceptedFiles List of accepted files\n * @param {FileRejection[]} fileRejections List of rejected files and why they were rejected\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are files (such as link, text, etc.).\n *\n * @callback dropAcceptedCb\n * @param {File[]} files List of accepted files that meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n *\n * @callback dropRejectedCb\n * @param {File[]} files List of rejected files that do not meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is used aggregate files,\n * in a asynchronous fashion, from drag or input change events.\n *\n * @callback getFilesFromEvent\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n * @returns {(File[]|Promise)}\n */\n\n/**\n * An object with the current dropzone state and some helper functions.\n *\n * @typedef {object} DropzoneState\n * @property {Function} getRootProps Returns the props you should apply to the root drop container you render\n * @property {Function} getInputProps Returns the props you should apply to hidden file input you render\n * @property {Function} open Open the native file selection dialog\n * @property {boolean} isFocused Dropzone area is in focus\n * @property {boolean} isFileDialogActive File dialog is opened\n * @property {boolean} isDragActive Active drag is in progress\n * @property {boolean} isDragAccept Dragged files are accepted\n * @property {boolean} isDragReject Some dragged files are rejected\n * @property {File[]} draggedFiles Files in active drag\n * @property {File[]} acceptedFiles Accepted files\n * @property {FileRejection[]} fileRejections Rejected files and why they were rejected\n */\n\nvar initialState = {\n isFocused: false,\n isFileDialogActive: false,\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false,\n draggedFiles: [],\n acceptedFiles: [],\n fileRejections: []\n};\n/**\n * A React hook that creates a drag 'n' drop area.\n *\n * ```jsx\n * function MyDropzone(props) {\n * const {getRootProps, getInputProps} = useDropzone({\n * onDrop: acceptedFiles => {\n * // do something with the File objects, e.g. upload to some server\n * }\n * });\n * return (\n *
\n * \n *

Drag and drop some files here, or click to select files

\n *
\n * )\n * }\n * ```\n *\n * @function useDropzone\n *\n * @param {object} props\n * @param {string|string[]} [props.accept] Set accepted file types.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n * @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window\n * @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog\n * @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n * @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop\n * @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents\n * @param {number} [props.minSize=0] Minimum file size (in bytes)\n * @param {number} [props.maxSize=Infinity] Maximum file size (in bytes)\n * @param {boolean} [props.disabled=false] Enable/disable the dropzone\n * @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator\n * @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection\n * @param {boolean} [props.useFsAccessApi] Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `` click event.\n * @param {Function} [props.onFileDialogOpen] Cb for when opening the file dialog\n * @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs.\n * @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs\n * @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs\n * @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n * @param {dropAcceptedCb} [props.onDropAccepted]\n * @param {dropRejectedCb} [props.onDropRejected]\n *\n * @returns {DropzoneState}\n */\n\nexport function useDropzone() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _defaultProps$options = _objectSpread(_objectSpread({}, defaultProps), options),\n accept = _defaultProps$options.accept,\n disabled = _defaultProps$options.disabled,\n getFilesFromEvent = _defaultProps$options.getFilesFromEvent,\n maxSize = _defaultProps$options.maxSize,\n minSize = _defaultProps$options.minSize,\n multiple = _defaultProps$options.multiple,\n maxFiles = _defaultProps$options.maxFiles,\n onDragEnter = _defaultProps$options.onDragEnter,\n onDragLeave = _defaultProps$options.onDragLeave,\n onDragOver = _defaultProps$options.onDragOver,\n onDrop = _defaultProps$options.onDrop,\n onDropAccepted = _defaultProps$options.onDropAccepted,\n onDropRejected = _defaultProps$options.onDropRejected,\n onFileDialogCancel = _defaultProps$options.onFileDialogCancel,\n onFileDialogOpen = _defaultProps$options.onFileDialogOpen,\n useFsAccessApi = _defaultProps$options.useFsAccessApi,\n preventDropOnDocument = _defaultProps$options.preventDropOnDocument,\n noClick = _defaultProps$options.noClick,\n noKeyboard = _defaultProps$options.noKeyboard,\n noDrag = _defaultProps$options.noDrag,\n noDragEventsBubbling = _defaultProps$options.noDragEventsBubbling,\n validator = _defaultProps$options.validator;\n\n var onFileDialogOpenCb = useMemo(function () {\n return typeof onFileDialogOpen === \"function\" ? onFileDialogOpen : noop;\n }, [onFileDialogOpen]);\n var onFileDialogCancelCb = useMemo(function () {\n return typeof onFileDialogCancel === \"function\" ? onFileDialogCancel : noop;\n }, [onFileDialogCancel]);\n var rootRef = useRef(null);\n var inputRef = useRef(null);\n\n var _useReducer = useReducer(reducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n var isFocused = state.isFocused,\n isFileDialogActive = state.isFileDialogActive,\n draggedFiles = state.draggedFiles;\n var fsAccessApiWorksRef = useRef(typeof window !== \"undefined\" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI()); // Update file dialog active state when the window is focused on\n\n var onWindowFocus = function onWindowFocus() {\n // Execute the timeout only if the file dialog is opened in the browser\n if (!fsAccessApiWorksRef.current && isFileDialogActive) {\n setTimeout(function () {\n if (inputRef.current) {\n var files = inputRef.current.files;\n\n if (!files.length) {\n dispatch({\n type: \"closeDialog\"\n });\n onFileDialogCancelCb();\n }\n }\n }, 300);\n }\n };\n\n useEffect(function () {\n window.addEventListener(\"focus\", onWindowFocus, false);\n return function () {\n window.removeEventListener(\"focus\", onWindowFocus, false);\n };\n }, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);\n var dragTargetsRef = useRef([]);\n\n var onDocumentDrop = function onDocumentDrop(event) {\n if (rootRef.current && rootRef.current.contains(event.target)) {\n // If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return;\n }\n\n event.preventDefault();\n dragTargetsRef.current = [];\n };\n\n useEffect(function () {\n if (preventDropOnDocument) {\n document.addEventListener(\"dragover\", onDocumentDragOver, false);\n document.addEventListener(\"drop\", onDocumentDrop, false);\n }\n\n return function () {\n if (preventDropOnDocument) {\n document.removeEventListener(\"dragover\", onDocumentDragOver);\n document.removeEventListener(\"drop\", onDocumentDrop);\n }\n };\n }, [rootRef, preventDropOnDocument]);\n var onDragEnterCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (draggedFiles) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n dispatch({\n draggedFiles: draggedFiles,\n isDragActive: true,\n type: \"setDraggedFiles\"\n });\n\n if (onDragEnter) {\n onDragEnter(event);\n }\n });\n }\n }, [getFilesFromEvent, onDragEnter, noDragEventsBubbling]);\n var onDragOverCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event);\n var hasFiles = isEvtWithFiles(event);\n\n if (hasFiles && event.dataTransfer) {\n try {\n event.dataTransfer.dropEffect = \"copy\";\n } catch (_unused) {}\n /* eslint-disable-line no-empty */\n\n }\n\n if (hasFiles && onDragOver) {\n onDragOver(event);\n }\n\n return false;\n }, [onDragOver, noDragEventsBubbling]);\n var onDragLeaveCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event); // Only deactivate once the dropzone and all children have been left\n\n var targets = dragTargetsRef.current.filter(function (target) {\n return rootRef.current && rootRef.current.contains(target);\n }); // Make sure to remove a target present multiple times only once\n // (Firefox may fire dragenter/dragleave multiple times on the same element)\n\n var targetIdx = targets.indexOf(event.target);\n\n if (targetIdx !== -1) {\n targets.splice(targetIdx, 1);\n }\n\n dragTargetsRef.current = targets;\n\n if (targets.length > 0) {\n return;\n }\n\n dispatch({\n isDragActive: false,\n type: \"setDraggedFiles\",\n draggedFiles: []\n });\n\n if (isEvtWithFiles(event) && onDragLeave) {\n onDragLeave(event);\n }\n }, [rootRef, onDragLeave, noDragEventsBubbling]);\n var setFiles = useCallback(function (files, event) {\n var acceptedFiles = [];\n var fileRejections = [];\n files.forEach(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 2),\n accepted = _fileAccepted2[0],\n acceptError = _fileAccepted2[1];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2),\n sizeMatch = _fileMatchSize2[0],\n sizeError = _fileMatchSize2[1];\n\n var customErrors = validator ? validator(file) : null;\n\n if (accepted && sizeMatch && !customErrors) {\n acceptedFiles.push(file);\n } else {\n var errors = [acceptError, sizeError];\n\n if (customErrors) {\n errors = errors.concat(customErrors);\n }\n\n fileRejections.push({\n file: file,\n errors: errors.filter(function (e) {\n return e;\n })\n });\n }\n });\n\n if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {\n // Reject everything and empty accepted files\n acceptedFiles.forEach(function (file) {\n fileRejections.push({\n file: file,\n errors: [TOO_MANY_FILES_REJECTION]\n });\n });\n acceptedFiles.splice(0);\n }\n\n dispatch({\n acceptedFiles: acceptedFiles,\n fileRejections: fileRejections,\n type: \"setFiles\"\n });\n\n if (onDrop) {\n onDrop(acceptedFiles, fileRejections, event);\n }\n\n if (fileRejections.length > 0 && onDropRejected) {\n onDropRejected(fileRejections, event);\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted(acceptedFiles, event);\n }\n }, [dispatch, multiple, accept, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);\n var onDropCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [];\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n setFiles(files, event);\n });\n }\n\n dispatch({\n type: \"reset\"\n });\n }, [getFilesFromEvent, setFiles, noDragEventsBubbling]); // Fn for opening the file dialog programmatically\n\n var openFileDialog = useCallback(function () {\n // No point to use FS access APIs if context is not secure\n // https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#feature_detection\n if (fsAccessApiWorksRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb(); // https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n\n var opts = {\n multiple: multiple,\n types: filePickerOptionsTypes(accept)\n };\n window.showOpenFilePicker(opts).then(function (handles) {\n return getFilesFromEvent(handles);\n }).then(function (files) {\n setFiles(files, null);\n dispatch({\n type: \"closeDialog\"\n });\n }).catch(function (e) {\n // AbortError means the user canceled\n if (isAbort(e)) {\n onFileDialogCancelCb(e);\n dispatch({\n type: \"closeDialog\"\n });\n } else if (isSecurityError(e)) {\n fsAccessApiWorksRef.current = false; // CORS, so cannot use this API\n // Try using the input\n\n if (inputRef.current) {\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }\n });\n return;\n }\n\n if (inputRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb();\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, accept, multiple]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone\n\n var onKeyDownCb = useCallback(function (event) {\n // Ignore keyboard events bubbling up the DOM tree\n if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {\n return;\n }\n\n if (event.keyCode === 32 || event.keyCode === 13) {\n event.preventDefault();\n openFileDialog();\n }\n }, [rootRef, openFileDialog]); // Update focus state for the dropzone\n\n var onFocusCb = useCallback(function () {\n dispatch({\n type: \"focus\"\n });\n }, []);\n var onBlurCb = useCallback(function () {\n dispatch({\n type: \"blur\"\n });\n }, []); // Cb to open the file dialog when click occurs on the dropzone\n\n var onClickCb = useCallback(function () {\n if (noClick) {\n return;\n } // In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()\n // to ensure React can handle state changes\n // See: https://github.com/react-dropzone/react-dropzone/issues/450\n\n\n if (isIeOrEdge()) {\n setTimeout(openFileDialog, 0);\n } else {\n openFileDialog();\n }\n }, [noClick, openFileDialog]);\n\n var composeHandler = function composeHandler(fn) {\n return disabled ? null : fn;\n };\n\n var composeKeyboardHandler = function composeKeyboardHandler(fn) {\n return noKeyboard ? null : composeHandler(fn);\n };\n\n var composeDragHandler = function composeDragHandler(fn) {\n return noDrag ? null : composeHandler(fn);\n };\n\n var stopPropagation = function stopPropagation(event) {\n if (noDragEventsBubbling) {\n event.stopPropagation();\n }\n };\n\n var getRootProps = useMemo(function () {\n return function () {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$refKey = _ref2.refKey,\n refKey = _ref2$refKey === void 0 ? \"ref\" : _ref2$refKey,\n role = _ref2.role,\n onKeyDown = _ref2.onKeyDown,\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick,\n onDragEnter = _ref2.onDragEnter,\n onDragOver = _ref2.onDragOver,\n onDragLeave = _ref2.onDragLeave,\n onDrop = _ref2.onDrop,\n rest = _objectWithoutProperties(_ref2, _excluded3);\n\n return _objectSpread(_objectSpread(_defineProperty({\n onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),\n onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),\n onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),\n onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter, onDragEnterCb)),\n onDragOver: composeDragHandler(composeEventHandlers(onDragOver, onDragOverCb)),\n onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave, onDragLeaveCb)),\n onDrop: composeDragHandler(composeEventHandlers(onDrop, onDropCb)),\n role: typeof role === \"string\" && role !== \"\" ? role : \"button\"\n }, refKey, rootRef), !disabled && !noKeyboard ? {\n tabIndex: 0\n } : {}), rest);\n };\n }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);\n var onInputElementClick = useCallback(function (event) {\n event.stopPropagation();\n }, []);\n var getInputProps = useMemo(function () {\n return function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? \"ref\" : _ref3$refKey,\n onChange = _ref3.onChange,\n onClick = _ref3.onClick,\n rest = _objectWithoutProperties(_ref3, _excluded4);\n\n var inputProps = _defineProperty({\n accept: accept,\n multiple: multiple,\n type: \"file\",\n style: {\n display: \"none\"\n },\n onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),\n autoComplete: \"off\",\n tabIndex: -1\n }, refKey, inputRef);\n\n return _objectSpread(_objectSpread({}, inputProps), rest);\n };\n }, [inputRef, accept, multiple, onDropCb, disabled]);\n var fileCount = draggedFiles.length;\n var isDragAccept = fileCount > 0 && allFilesAccepted({\n files: draggedFiles,\n accept: accept,\n minSize: minSize,\n maxSize: maxSize,\n multiple: multiple,\n maxFiles: maxFiles\n });\n var isDragReject = fileCount > 0 && !isDragAccept;\n return _objectSpread(_objectSpread({}, state), {}, {\n isDragAccept: isDragAccept,\n isDragReject: isDragReject,\n isFocused: isFocused && !disabled,\n getRootProps: getRootProps,\n getInputProps: getInputProps,\n rootRef: rootRef,\n inputRef: inputRef,\n open: composeHandler(openFileDialog)\n });\n}\n\nfunction reducer(state, action) {\n /* istanbul ignore next */\n switch (action.type) {\n case \"focus\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: true\n });\n\n case \"blur\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: false\n });\n\n case \"openDialog\":\n return _objectSpread(_objectSpread({}, initialState), {}, {\n isFileDialogActive: true\n });\n\n case \"closeDialog\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: false\n });\n\n case \"setDraggedFiles\":\n /* eslint no-case-declarations: 0 */\n var isDragActive = action.isDragActive,\n draggedFiles = action.draggedFiles;\n return _objectSpread(_objectSpread({}, state), {}, {\n draggedFiles: draggedFiles,\n isDragActive: isDragActive\n });\n\n case \"setFiles\":\n return _objectSpread(_objectSpread({}, state), {}, {\n acceptedFiles: action.acceptedFiles,\n fileRejections: action.fileRejections\n });\n\n case \"reset\":\n return _objectSpread({}, initialState);\n\n default:\n return state;\n }\n}\n\nfunction noop() {}\n\nexport { ErrorCode } from \"./utils\";","import getPrototypeOf from \"./getPrototypeOf.js\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","import superPropBase from \"./superPropBase.js\";\nexport default function _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get.apply(this, arguments);\n}","import nested from '../ThemeProvider/nested';\n/**\n * This is the list of the style rule name we use as drop in replacement for the built-in\n * pseudo classes (:checked, :disabled, :focused, etc.).\n *\n * Why do they exist in the first place?\n * These classes are used at a specificity of 2.\n * It allows them to override previously definied styles as well as\n * being untouched by simple user overrides.\n */\n\nvar pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters.\n// When new generator function is created, rule counter is reset.\n// We need to reset the rule counter for SSR for each request.\n//\n// It's inspired by\n// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js\n\nexport default function createGenerateClassName() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$disableGloba = options.disableGlobal,\n disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,\n _options$productionPr = options.productionPrefix,\n productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,\n _options$seed = options.seed,\n seed = _options$seed === void 0 ? '' : _options$seed;\n var seedPrefix = seed === '' ? '' : \"\".concat(seed, \"-\");\n var ruleCounter = 0;\n\n var getNextCounterId = function getNextCounterId() {\n ruleCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (ruleCounter >= 1e10) {\n console.warn(['Material-UI: You might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join(''));\n }\n }\n\n return ruleCounter;\n };\n\n return function (rule, styleSheet) {\n var name = styleSheet.options.name; // Is a global static MUI style?\n\n if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {\n // We can use a shorthand class name, we never use the keys to style the components.\n if (pseudoClasses.indexOf(rule.key) !== -1) {\n return \"Mui-\".concat(rule.key);\n }\n\n var prefix = \"\".concat(seedPrefix).concat(name, \"-\").concat(rule.key);\n\n if (!styleSheet.options.theme[nested] || seed !== '') {\n return prefix;\n }\n\n return \"\".concat(prefix, \"-\").concat(getNextCounterId());\n }\n\n if (process.env.NODE_ENV === 'production') {\n return \"\".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId());\n }\n\n var suffix = \"\".concat(rule.key, \"-\").concat(getNextCounterId()); // Help with debuggability.\n\n if (styleSheet.options.classNamePrefix) {\n return \"\".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, \"-\").concat(suffix);\n }\n\n return \"\".concat(seedPrefix).concat(suffix);\n };\n}","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport { elementAcceptingRef, exactProp } from '@material-ui/utils';\n\nfunction mapEventPropToEvent(eventProp) {\n return eventProp.substring(2).toLowerCase();\n}\n\nfunction clickedRootScrollbar(event) {\n return document.documentElement.clientWidth < event.clientX || document.documentElement.clientHeight < event.clientY;\n}\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n */\n\n\nfunction ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = React.useRef(false);\n var nodeRef = React.useRef(null);\n var activatedRef = React.useRef(false);\n var syntheticEventRef = React.useRef(false);\n React.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = useEventCallback(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = ownerDocument(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n React.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = ownerDocument(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n React.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = ownerDocument(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ClickAwayListener.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The wrapped element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * If `true`, the React tree is ignored and only the DOM tree is considered.\n * This prop changes how portaled elements are handled.\n */\n disableReactTree: PropTypes.bool,\n\n /**\n * The mouse event to listen to. You can disable the listener by providing `false`.\n */\n mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]),\n\n /**\n * Callback fired when a \"click away\" event is detected.\n */\n onClickAway: PropTypes.func.isRequired,\n\n /**\n * The touch event to listen to. You can disable the listener by providing `false`.\n */\n touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);\n}\n\nexport default ClickAwayListener;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nvar styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\nvar defaultTimeout = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The Fade transition is used by the [Modal](/components/modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"TransitionComponent\", \"timeout\"]);\n\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport InputBase from '../InputBase';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {\n 'label + &': {\n marginTop: 16\n }\n },\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if color secondary. */\n colorSecondary: {\n '&$underline:after': {\n borderBottomColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if `disableUnderline={false}`. */\n underline: {\n '&:after': {\n borderBottom: \"2px solid \".concat(theme.palette.primary.main),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&$focused:after': {\n transform: 'scaleX(1)'\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: \"1px solid \".concat(bottomLineColor),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&:hover:not($disabled):before': {\n borderBottom: \"2px solid \".concat(theme.palette.text.primary),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: \"1px solid \".concat(bottomLineColor)\n }\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted'\n }\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {},\n\n /* Styles applied to the `input` element. */\n input: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {},\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {},\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {}\n };\n};\nvar Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {\n var disableUnderline = props.disableUnderline,\n classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = _objectWithoutProperties(props, [\"disableUnderline\", \"classes\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"]);\n\n return /*#__PURE__*/React.createElement(InputBase, _extends({\n classes: _extends({}, classes, {\n root: clsx(classes.root, !disableUnderline && classes.underline),\n underline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nInput.muiName = 'Input';\nexport default withStyles(styles, {\n name: 'MuiInput'\n})(Input);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n\n/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport formControlState from '../FormControl/formControlState';\nimport FormControlContext, { useFormControl } from '../FormControl/FormControlContext';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport useForkRef from '../utils/useForkRef';\nimport TextareaAutosize from '../TextareaAutosize';\nimport { isFilled } from './utils';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n var placeholderHidden = {\n opacity: '0 !important'\n };\n var placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return {\n '@global': {\n '@keyframes mui-auto-fill': {},\n '@keyframes mui-auto-fill-cancel': {}\n },\n\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.1876em',\n // Reset (19px), match the native input line-height\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n '&$disabled': {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n }),\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {},\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {},\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n '&$marginDense': {\n paddingTop: 4 - 1\n }\n },\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the `input` element. */\n input: {\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.1876em',\n // Reset (19px), match the native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE 11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE 11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n '-webkit-appearance': 'none'\n },\n // Show and hide the placeholder logic\n 'label[data-shrink=false] + $formControl &': {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE 11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE 11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n '&$disabled': {\n opacity: 1 // Reset iOS opacity\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 4 - 1\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n height: 'auto',\n resize: 'none',\n padding: 0\n },\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {\n // Improve type search style.\n '-moz-appearance': 'textfield',\n '-webkit-appearance': 'textfield'\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {},\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {},\n\n /* Styles applied to the `input` element if `hiddenLabel={true}`. */\n inputHiddenLabel: {}\n };\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\nvar InputBase = /*#__PURE__*/React.forwardRef(function InputBase(props, ref) {\n var ariaDescribedby = props['aria-describedby'],\n autoComplete = props.autoComplete,\n autoFocus = props.autoFocus,\n classes = props.classes,\n className = props.className,\n color = props.color,\n defaultValue = props.defaultValue,\n disabled = props.disabled,\n endAdornment = props.endAdornment,\n error = props.error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n id = props.id,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$inputProps = props.inputProps,\n inputPropsProp = _props$inputProps === void 0 ? {} : _props$inputProps,\n inputRefProp = props.inputRef,\n margin = props.margin,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n placeholder = props.placeholder,\n readOnly = props.readOnly,\n renderSuffix = props.renderSuffix,\n rows = props.rows,\n rowsMax = props.rowsMax,\n rowsMin = props.rowsMin,\n maxRows = props.maxRows,\n minRows = props.minRows,\n startAdornment = props.startAdornment,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n valueProp = props.value,\n other = _objectWithoutProperties(props, [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"classes\", \"className\", \"color\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"rowsMax\", \"rowsMin\", \"maxRows\", \"minRows\", \"startAdornment\", \"type\", \"value\"]);\n\n var value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n\n var _React$useRef = React.useRef(value != null),\n isControlled = _React$useRef.current;\n\n var inputRef = React.useRef();\n var handleInputRefWarning = React.useCallback(function (instance) {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['Material-UI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `inputRef` prop.', 'Make sure the `inputRef` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n var handleInputPropsRefProp = useForkRef(inputPropsProp.ref, handleInputRefWarning);\n var handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);\n var handleInputRef = useForkRef(inputRef, handleInputRefProp);\n\n var _React$useState = React.useState(false),\n focused = _React$useState[0],\n setFocused = _React$useState[1];\n\n var muiFormControl = useFormControl();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(function () {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'margin', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n React.useEffect(function () {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n var onFilled = muiFormControl && muiFormControl.onFilled;\n var onEmpty = muiFormControl && muiFormControl.onEmpty;\n var checkDirty = React.useCallback(function (obj) {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(function () {\n if (isControlled) {\n checkDirty({\n value: value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n var handleFocus = function handleFocus(event) {\n // Fix a bug with IE 11 where the focus/blur events are triggered\n // while the input is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n var handleChange = function handleChange(event) {\n if (!isControlled) {\n var element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.\" : _formatMuiErrorMessage(1));\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange.apply(inputPropsProp, [event].concat(args));\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange.apply(void 0, [event].concat(args));\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n React.useEffect(function () {\n checkDirty(inputRef.current);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n var handleClick = function handleClick(event) {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var InputComponent = inputComponent;\n\n var inputProps = _extends({}, inputPropsProp, {\n ref: handleInputRef\n });\n\n if (typeof InputComponent !== 'string') {\n inputProps = _extends({\n // Rename ref to inputRef as we don't know the\n // provided `inputComponent` structure.\n inputRef: handleInputRef,\n type: type\n }, inputProps, {\n ref: null\n });\n } else if (multiline) {\n if (rows && !maxRows && !minRows && !rowsMax && !rowsMin) {\n InputComponent = 'textarea';\n } else {\n inputProps = _extends({\n minRows: rows || minRows,\n rowsMax: rowsMax,\n maxRows: maxRows\n }, inputProps);\n InputComponent = TextareaAutosize;\n }\n } else {\n inputProps = _extends({\n type: type\n }, inputProps);\n }\n\n var handleAutoFill = function handleAutoFill(event) {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n React.useEffect(function () {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fullWidth && classes.fullWidth, fcs.focused && classes.focused, muiFormControl && classes.formControl, multiline && classes.multiline, startAdornment && classes.adornedStart, endAdornment && classes.adornedEnd, fcs.margin === 'dense' && classes.marginDense),\n onClick: handleClick,\n ref: ref\n }, other), startAdornment, /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: null\n }, /*#__PURE__*/React.createElement(InputComponent, _extends({\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp\n }, inputProps, {\n className: clsx(classes.input, inputPropsProp.className, fcs.disabled && classes.disabled, multiline && classes.inputMultiline, fcs.hiddenLabel && classes.inputHiddenLabel, startAdornment && classes.inputAdornedStart, endAdornment && classes.inputAdornedEnd, type === 'search' && classes.inputTypeSearch, fcs.margin === 'dense' && classes.inputMarginDense),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))), endAdornment, renderSuffix ? renderSuffix(_extends({}, fcs, {\n startAdornment: startAdornment\n })) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the input is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Maximum number of rows to display.\n * @deprecated Use `maxRows` instead.\n */\n rowsMax: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display.\n * @deprecated Use `minRows` instead.\n */\n rowsMin: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiInputBase'\n})(InputBase);","import warning from 'tiny-warning';\nimport { createRule } from 'jss';\n\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\n\nvar functionPlugin = function functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = createRule(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n }\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule;\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (process.env.NODE_ENV === 'development') {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;\n break;\n }\n }\n }\n }\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n};\n\nexport default functionPlugin;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { RuleList } from 'jss';\n\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule =\n/*#__PURE__*/\nfunction () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (rule) this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Replace rule, run plugins.\n */\n ;\n\n _proto.replaceRule = function replaceRule(name, style, options) {\n var newRule = this.rules.replace(name, style, options);\n if (newRule) this.options.jss.plugins.onProcessRule(newRule);\n return newRule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule =\n/*#__PURE__*/\nfunction () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, _extends({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n sheet.addRule(name, rules[name], _extends({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n sheet.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (!options.selector && options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule, sheet) {\n if (rule.type !== 'style' || !sheet) return;\n handleNestedGlobalContainerRule(rule, sheet);\n handlePrefixedGlobalRule(rule, sheet);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\nexport default jssGlobal;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport warning from 'tiny-warning';\n\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n return rule.selector;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : void 0;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return _extends({}, prevOptions, {\n index: prevOptions.index + 1\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = _extends({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n var name = styleRule.key + \"-\" + prop;\n\n if ('replaceRule' in container) {\n // for backward compatibility\n container.replaceRule(name, style[prop], _extends({}, options, {\n selector: selector\n }));\n } else {\n container.addRule(name, style[prop], _extends({}, options, {\n selector: selector\n }));\n }\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\nexport default jssNested;\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n","import { hasCSSTOMSupport } from 'jss';\n\nvar px = hasCSSTOMSupport && CSS ? CSS.px : 'px';\nvar ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';\nvar percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n 'border-block': px,\n 'border-block-end': px,\n 'border-block-end-width': px,\n 'border-block-start': px,\n 'border-block-start-width': px,\n 'border-block-width': px,\n 'border-inline': px,\n 'border-inline-end': px,\n 'border-inline-end-width': px,\n 'border-inline-start': px,\n 'border-inline-start-width': px,\n 'border-inline-width': px,\n 'border-start-start-radius': px,\n 'border-start-end-radius': px,\n 'border-end-start-radius': px,\n 'border-end-end-radius': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n 'margin-block': px,\n 'margin-block-end': px,\n 'margin-block-start': px,\n 'margin-inline': px,\n 'margin-inline-end': px,\n 'margin-inline-start': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n 'padding-block': px,\n 'padding-block-end': px,\n 'padding-block-start': px,\n 'padding-inline': px,\n 'padding-inline-end': px,\n 'padding-inline-start': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n inset: px,\n 'inset-block': px,\n 'inset-block-end': px,\n 'inset-block-start': px,\n 'inset-inline': px,\n 'inset-inline-end': px,\n 'inset-inline-start': px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-decoration-thickness': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n gap: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'row-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n\n/**\n * Clones the object and adds a camel cased property version.\n */\n\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (value == null) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n } // eslint-disable-next-line no-restricted-globals\n\n } else if (typeof value === 'number' && isNaN(value) === false) {\n var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.\n\n if (unit && !(value === 0 && unit === px)) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default defaultUnit;\n","import isInBrowser from 'is-in-browser';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\n\n// Export javascript style and css style vendor prefixes.\nvar js = '';\nvar css = '';\nvar vendor = '';\nvar browser = '';\nvar isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.\n\nif (isInBrowser) {\n // Order matters. We need to check Webkit the last one because\n // other vendors use to add Webkit prefixes to some properties\n var jsCssMap = {\n Moz: '-moz-',\n ms: '-ms-',\n O: '-o-',\n Webkit: '-webkit-'\n };\n\n var _document$createEleme = document.createElement('p'),\n style = _document$createEleme.style;\n\n var testProp = 'Transform';\n\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n js = key;\n css = jsCssMap[key];\n break;\n }\n } // Correctly detect the Edge browser.\n\n\n if (js === 'Webkit' && 'msHyphens' in style) {\n js = 'ms';\n css = jsCssMap.ms;\n browser = 'edge';\n } // Correctly detect the Safari browser.\n\n\n if (js === 'Webkit' && '-apple-trailing-word' in style) {\n vendor = 'apple';\n }\n}\n/**\n * Vendor prefix string for the current browser.\n *\n * @type {{js: String, css: String, vendor: String, browser: String}}\n * @api public\n */\n\n\nvar prefix = {\n js: js,\n css: css,\n vendor: vendor,\n browser: browser,\n isTouch: isTouch\n};\n\n/**\n * Test if a keyframe at-rule should be prefixed or not\n *\n * @param {String} vendor prefix string for the current browser.\n * @return {String}\n * @api public\n */\n\nfunction supportedKeyframes(key) {\n // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'\n if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.\n // https://caniuse.com/#search=keyframes\n\n if (prefix.js === 'ms') return key;\n return \"@\" + prefix.css + \"keyframes\" + key.substr(10);\n}\n\n// https://caniuse.com/#search=appearance\n\nvar appearence = {\n noPrefill: ['appearance'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'appearance') return false;\n if (prefix.js === 'ms') return \"-webkit-\" + prop;\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=color-adjust\n\nvar colorAdjust = {\n noPrefill: ['color-adjust'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'color-adjust') return false;\n if (prefix.js === 'Webkit') return prefix.css + \"print-\" + prop;\n return prop;\n }\n};\n\nvar regExp = /[-\\s]+(.)?/g;\n/**\n * Replaces the letter with the capital letter\n *\n * @param {String} match\n * @param {String} c\n * @return {String}\n * @api private\n */\n\nfunction toUpper(match, c) {\n return c ? c.toUpperCase() : '';\n}\n/**\n * Convert dash separated strings to camel-cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction camelize(str) {\n return str.replace(regExp, toUpper);\n}\n\n/**\n * Convert dash separated strings to pascal cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction pascalize(str) {\n return camelize(\"-\" + str);\n}\n\n// but we can use a longhand property instead.\n// https://caniuse.com/#search=mask\n\nvar mask = {\n noPrefill: ['mask'],\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^mask/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var longhand = 'mask-image';\n\n if (camelize(longhand) in style) {\n return prop;\n }\n\n if (prefix.js + pascalize(longhand) in style) {\n return prefix.css + prop;\n }\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=text-orientation\n\nvar textOrientation = {\n noPrefill: ['text-orientation'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'text-orientation') return false;\n\n if (prefix.vendor === 'apple' && !prefix.isTouch) {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=transform\n\nvar transform = {\n noPrefill: ['transform'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transform') return false;\n\n if (options.transform) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=transition\n\nvar transition = {\n noPrefill: ['transition'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transition') return false;\n\n if (options.transition) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=writing-mode\n\nvar writingMode = {\n noPrefill: ['writing-mode'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'writing-mode') return false;\n\n if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=user-select\n\nvar userSelect = {\n noPrefill: ['user-select'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'user-select') return false;\n\n if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=multicolumn\n// https://github.com/postcss/autoprefixer/issues/491\n// https://github.com/postcss/autoprefixer/issues/177\n\nvar breakPropsOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^break-/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var jsProp = \"WebkitColumn\" + pascalize(prop);\n return jsProp in style ? prefix.css + \"column-\" + prop : false;\n }\n\n if (prefix.js === 'Moz') {\n var _jsProp = \"page\" + pascalize(prop);\n\n return _jsProp in style ? \"page-\" + prop : false;\n }\n\n return false;\n }\n};\n\n// See https://github.com/postcss/autoprefixer/issues/324.\n\nvar inlineLogicalOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^(border|margin|padding)-inline/.test(prop)) return false;\n if (prefix.js === 'Moz') return prop;\n var newProp = prop.replace('-inline', '');\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\n// Camelization is required because we can't test using.\n// CSS syntax for e.g. in FF.\n\nvar unprefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n return camelize(prop) in style ? prop : false;\n }\n};\n\nvar prefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.\n\n if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.\n\n if (prop[0] === '-' && prop[1] === '-') return prop;\n if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.\n\n if (prefix.js !== 'Webkit' && \"Webkit\" + pascalized in style) return \"-webkit-\" + prop;\n return false;\n }\n};\n\n// https://caniuse.com/#search=scroll-snap\n\nvar scrollSnap = {\n supportedProperty: function supportedProperty(prop) {\n if (prop.substring(0, 11) !== 'scroll-snap') return false;\n\n if (prefix.js === 'ms') {\n return \"\" + prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=overscroll-behavior\n\nvar overscrollBehavior = {\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'overscroll-behavior') return false;\n\n if (prefix.js === 'ms') {\n return prefix.css + \"scroll-chaining\";\n }\n\n return prop;\n }\n};\n\nvar propMap = {\n 'flex-grow': 'flex-positive',\n 'flex-shrink': 'flex-negative',\n 'flex-basis': 'flex-preferred-size',\n 'justify-content': 'flex-pack',\n order: 'flex-order',\n 'align-items': 'flex-align',\n 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.\n\n}; // Support old flex spec from 2012.\n\nvar flex2012 = {\n supportedProperty: function supportedProperty(prop, style) {\n var newProp = propMap[prop];\n if (!newProp) return false;\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\nvar propMap$1 = {\n flex: 'box-flex',\n 'flex-grow': 'box-flex',\n 'flex-direction': ['box-orient', 'box-direction'],\n order: 'box-ordinal-group',\n 'align-items': 'box-align',\n 'flex-flow': ['box-orient', 'box-direction'],\n 'justify-content': 'box-pack'\n};\nvar propKeys = Object.keys(propMap$1);\n\nvar prefixCss = function prefixCss(p) {\n return prefix.css + p;\n}; // Support old flex spec from 2009.\n\n\nvar flex2009 = {\n supportedProperty: function supportedProperty(prop, style, _ref) {\n var multiple = _ref.multiple;\n\n if (propKeys.indexOf(prop) > -1) {\n var newProp = propMap$1[prop];\n\n if (!Array.isArray(newProp)) {\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n\n if (!multiple) return false;\n\n for (var i = 0; i < newProp.length; i++) {\n if (!(prefix.js + pascalize(newProp[0]) in style)) {\n return false;\n }\n }\n\n return newProp.map(prefixCss);\n }\n\n return false;\n }\n};\n\n// plugins = [\n// ...plugins,\n// breakPropsOld,\n// inlineLogicalOld,\n// unprefixed,\n// prefixed,\n// scrollSnap,\n// flex2012,\n// flex2009\n// ]\n// Plugins without 'noPrefill' value, going last.\n// 'flex-*' plugins should be at the bottom.\n// 'flex2009' going after 'flex2012'.\n// 'prefixed' going after 'unprefixed'\n\nvar plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];\nvar propertyDetectors = plugins.filter(function (p) {\n return p.supportedProperty;\n}).map(function (p) {\n return p.supportedProperty;\n});\nvar noPrefill = plugins.filter(function (p) {\n return p.noPrefill;\n}).reduce(function (a, p) {\n a.push.apply(a, _toConsumableArray(p.noPrefill));\n return a;\n}, []);\n\nvar el;\nvar cache = {};\n\nif (isInBrowser) {\n el = document.createElement('p'); // We test every property on vendor prefix requirement.\n // Once tested, result is cached. It gives us up to 70% perf boost.\n // http://jsperf.com/element-style-object-access-vs-plain-object\n //\n // Prefill cache with known css properties to reduce amount of\n // properties we need to feature test at runtime.\n // http://davidwalsh.name/vendor-prefix\n\n var computed = window.getComputedStyle(document.documentElement, '');\n\n for (var key$1 in computed) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];\n } // Properties that cannot be correctly detected using the\n // cache prefill method.\n\n\n noPrefill.forEach(function (x) {\n return delete cache[x];\n });\n}\n/**\n * Test if a property is supported, returns supported property with vendor\n * prefix if required. Returns `false` if not supported.\n *\n * @param {String} prop dash separated\n * @param {Object} [options]\n * @return {String|Boolean}\n * @api public\n */\n\n\nfunction supportedProperty(prop, options) {\n if (options === void 0) {\n options = {};\n }\n\n // For server-side rendering.\n if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {\n return cache[prop];\n } // Check if 'transition' or 'transform' natively supported in browser.\n\n\n if (prop === 'transition' || prop === 'transform') {\n options[prop] = prop in el.style;\n } // Find a plugin for current prefix property.\n\n\n for (var i = 0; i < propertyDetectors.length; i++) {\n cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.\n\n if (cache[prop]) break;\n } // Reset styles for current property.\n // Firefox can even throw an error for invalid properties, e.g., \"0\".\n\n\n try {\n el.style[prop] = '';\n } catch (err) {\n return false;\n }\n\n return cache[prop];\n}\n\nvar cache$1 = {};\nvar transitionProperties = {\n transition: 1,\n 'transition-property': 1,\n '-webkit-transition': 1,\n '-webkit-transition-property': 1\n};\nvar transPropsRegExp = /(^\\s*[\\w-]+)|, (\\s*[\\w-]+)(?![^()]*\\))/g;\nvar el$1;\n/**\n * Returns prefixed value transition/transform if needed.\n *\n * @param {String} match\n * @param {String} p1\n * @param {String} p2\n * @return {String}\n * @api private\n */\n\nfunction prefixTransitionCallback(match, p1, p2) {\n if (p1 === 'var') return 'var';\n if (p1 === 'all') return 'all';\n if (p2 === 'all') return ', all';\n var prefixedValue = p1 ? supportedProperty(p1) : \", \" + supportedProperty(p2);\n if (!prefixedValue) return p1 || p2;\n return prefixedValue;\n}\n\nif (isInBrowser) el$1 = document.createElement('p');\n/**\n * Returns prefixed value if needed. Returns `false` if value is not supported.\n *\n * @param {String} property\n * @param {String} value\n * @return {String|Boolean}\n * @api public\n */\n\nfunction supportedValue(property, value) {\n // For server-side rendering.\n var prefixedValue = value;\n if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.\n // We want only prefixable values here.\n // eslint-disable-next-line no-restricted-globals\n\n if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {\n return prefixedValue;\n } // Create cache key for current value.\n\n\n var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {\n return cache$1[cacheKey];\n } // IE can even throw an error in some cases, for e.g. style.content = 'bar'.\n\n\n try {\n // Test value as it is.\n el$1.style[property] = prefixedValue;\n } catch (err) {\n // Return false if value not supported.\n cache$1[cacheKey] = false;\n return false;\n } // If 'transition' or 'transition-property' property.\n\n\n if (transitionProperties[property]) {\n prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);\n } else if (el$1.style[property] === '') {\n // Value with a vendor prefix.\n prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert \"flex\" to \"-ms-flexbox\" for IE10.\n\n if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.\n\n el$1.style[property] = prefixedValue; // Return false if value not supported.\n\n if (el$1.style[property] === '') {\n cache$1[cacheKey] = false;\n return false;\n }\n } // Reset styles for current property.\n\n\n el$1.style[property] = ''; // Write current value to cache.\n\n cache$1[cacheKey] = prefixedValue;\n return cache$1[cacheKey];\n}\n\nexport { prefix, supportedKeyframes, supportedProperty, supportedValue };\n","import { supportedKeyframes, supportedValue, supportedProperty } from 'css-vendor';\nimport { toCssValue } from 'jss';\n\n/**\n * Add vendor prefix to a property name when needed.\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = supportedKeyframes(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = supportedProperty(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return supportedValue(prop, toCssValue(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default jssVendorPrefixer;\n","/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;\n","import functions from 'jss-plugin-rule-value-function';\nimport global from 'jss-plugin-global';\nimport nested from 'jss-plugin-nested';\nimport camelCase from 'jss-plugin-camel-case';\nimport defaultUnit from 'jss-plugin-default-unit';\nimport vendorPrefixer from 'jss-plugin-vendor-prefixer';\nimport propsSort from 'jss-plugin-props-sort'; // Subset of jss-preset-default with only the plugins the Material-UI components are using.\n\nexport default function jssPreset() {\n return {\n plugins: [functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing.\n // This way, we can get a performance boost.\n // In the documentation, we are using `autoprefixer` to solve this problem.\n typeof window === 'undefined' ? null : vendorPrefixer(), propsSort()]\n };\n}","/** @license React v17.0.2\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=require(\"object-assign\"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;\nif(\"function\"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w(\"react.element\");p=w(\"react.portal\");exports.Fragment=w(\"react.fragment\");exports.StrictMode=w(\"react.strict_mode\");exports.Profiler=w(\"react.profiler\");q=w(\"react.provider\");r=w(\"react.context\");t=w(\"react.forward_ref\");exports.Suspense=w(\"react.suspense\");u=w(\"react.memo\");v=w(\"react.lazy\")}var x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){if(null===a||\"object\"!==typeof a)return null;a=x&&a[x]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function z(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"\"+b.valueOf().toString()+\"\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0c?98:c,function(){a(!0)});gg(97\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/**\r\n * Copyright 2020-2021, bluefox \r\n *\r\n * MIT License\r\n *\r\n **/\r\nimport PropTypes from 'prop-types';\r\n\r\n/** Possible progress states. */\r\nexport const PROGRESS = {\r\n /** The socket is connecting. */\r\n CONNECTING: 0,\r\n /** The socket is successfully connected. */\r\n CONNECTED: 1,\r\n /** All objects are loaded. */\r\n OBJECTS_LOADED: 2,\r\n /** The socket is ready for use. */\r\n READY: 3\r\n};\r\n\r\nconst PERMISSION_ERROR = 'permissionError';\r\nconst NOT_CONNECTED = 'notConnectedError';\r\nconst TIMEOUT_FOR_ADMIN4 = 1300;\r\n\r\nexport const ERRORS = {\r\n PERMISSION_ERROR,\r\n NOT_CONNECTED\r\n};\r\n\r\nfunction fixAdminUI(obj) {\r\n if (obj && obj.common && !obj.common.adminUI) {\r\n if (obj.common.noConfig) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'none';\r\n } else if (obj.common.jsonConfig) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'json';\r\n } else if (obj.common.materialize) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'materialize';\r\n } else {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.config = 'html';\r\n }\r\n\r\n if (obj.common.jsonCustom) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.custom = 'json';\r\n } else if (obj.common.supportCustoms) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.custom = 'json';\r\n }\r\n\r\n if (obj.common.materializeTab && obj.common.adminTab) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.tab = 'materialize';\r\n } else if (obj.common.adminTab) {\r\n obj.common.adminUI = obj.common.adminUI || {};\r\n obj.common.adminUI.tab = 'html';\r\n }\r\n\r\n obj.common.adminUI && console.debug(`Please add to \"${obj._id.replace(/\\.\\d+$/, '')}\" common.adminUI=${JSON.stringify(obj.common.adminUI)}`);\r\n }\r\n return obj;\r\n}\r\n\r\nclass Connection {\r\n /**\r\n * @param {import('./types').ConnectionProps} props\r\n */\r\n constructor(props) {\r\n props = props || { protocol: window.location.protocol, host: window.location.hostname };\r\n this.props = props;\r\n\r\n this.autoSubscribes = this.props.autoSubscribes || [];\r\n this.autoSubscribeLog = this.props.autoSubscribeLog;\r\n\r\n this.props.protocol = this.props.protocol || window.location.protocol;\r\n this.props.host = this.props.host || window.location.hostname;\r\n this.props.port = this.props.port || (window.location.port === '3000' ? (Connection.isWeb() ? 8082 : 8081) : window.location.port);\r\n this.props.ioTimeout = Math.max(this.props.ioTimeout || 20000, 20000);\r\n this.props.cmdTimeout = Math.max(this.props.cmdTimeout || 5000, 5000);\r\n\r\n // breaking change. Do not load all objects by default is true\r\n this.doNotLoadAllObjects = this.props.doNotLoadAllObjects === undefined ? true : this.props.doNotLoadAllObjects;\r\n this.doNotLoadACL = this.props.doNotLoadACL === undefined ? true : this.props.doNotLoadACL;\r\n\r\n /** @type {Record} */\r\n this.states = {};\r\n this.objects = null;\r\n this.acl = null;\r\n this.firstConnect = true;\r\n this.waitForRestart = false;\r\n /** @type {ioBroker.Languages} */\r\n this.systemLang = 'en';\r\n this.connected = false;\r\n this._waitForFirstConnection = new Promise(resolve => { this._waitForFirstConnectionResolve = resolve });\r\n\r\n /** @type {Record} */\r\n this.statesSubscribes = {}; // subscribe for states\r\n\r\n /** @type {Record} */\r\n this.objectsSubscribes = {}; // subscribe for objects\r\n this.onProgress = this.props.onProgress || function () { };\r\n this.onError = this.props.onError || function (err) { console.error(err); };\r\n this.loaded = false;\r\n this.loadTimer = null;\r\n this.loadCounter = 0;\r\n this.admin5only = this.props.admin5only || false;\r\n\r\n /** @type {((connected: boolean) => void)[]} */\r\n this.onConnectionHandlers = [];\r\n /** @type {((message: string) => void)[]} */\r\n this.onLogHandlers = [];\r\n\r\n /** @type {Record>} */\r\n this._promises = {};\r\n this.startSocket();\r\n }\r\n\r\n /**\r\n * Checks if this connection is running in a web adapter and not in an admin.\r\n * @returns {boolean} True if running in a web adapter or in a socketio adapter.\r\n */\r\n static isWeb() {\r\n return window.adapterName === 'material' || window.adapterName === 'vis' || window.socketUrl !== undefined;\r\n }\r\n\r\n /**\r\n * Starts the socket.io connection.\r\n * @returns {void}\r\n */\r\n startSocket() {\r\n // if socket io is not yet loaded\r\n if (typeof window.io === 'undefined') {\r\n // if in index.html the onLoad function not defined\r\n if (typeof window.registerSocketOnLoad !== 'function') {\r\n // poll if loaded\r\n this.scriptLoadCounter = this.scriptLoadCounter || 0;\r\n this.scriptLoadCounter++;\r\n\r\n if (this.scriptLoadCounter < 30) {\r\n // wait till the script loaded\r\n setTimeout(() => this.startSocket(), 100);\r\n return;\r\n } else {\r\n window.alert('Cannot load socket.io.js!');\r\n }\r\n } else {\r\n // register on load\r\n window.registerSocketOnLoad(() => this.startSocket());\r\n }\r\n return;\r\n } else {\r\n // socket was initialized, do not repeat\r\n if (this._socket) {\r\n return;\r\n }\r\n }\r\n\r\n let host = this.props.host;\r\n let port = this.props.port;\r\n let protocol = this.props.protocol.replace(':', '');\r\n\r\n // if web adapter, socket io could be on other port or even host\r\n if (window.socketUrl) {\r\n let parts = window.socketUrl.split(':');\r\n host = parts[0] || host;\r\n port = parts[1] || port;\r\n if (host.includes('://')) {\r\n parts = host.split('://');\r\n protocol = parts[0];\r\n host = parts[1];\r\n }\r\n }\r\n\r\n const url = port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`;\r\n\r\n this._socket = window.io.connect(\r\n url,\r\n {\r\n query: 'ws=true',\r\n name: this.props.name,\r\n timeout: this.props.ioTimeout\r\n }\r\n );\r\n\r\n this._socket.on('connect', noTimeout => {\r\n // If the user is not admin it takes some time to install the handlers, because all rights must be checked\r\n if (noTimeout !== true) {\r\n setTimeout(() =>\r\n this.getVersion()\r\n .then(info => {\r\n const [major, minor, patch] = info.version.split('.');\r\n const v = parseInt(major, 10) * 10000 + parseInt(minor, 10) * 100 + parseInt(patch, 10);\r\n if (v < 40102) {\r\n this._authTimer = null;\r\n // possible this is old version of admin\r\n this.onPreConnect(false, false);\r\n } else {\r\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\r\n }\r\n }), 500);\r\n } else {\r\n // iobroker websocket waits, till all handlers are installed\r\n this._socket.emit('authenticate', (isOk, isSecure) => this.onPreConnect(isOk, isSecure));\r\n }\r\n });\r\n\r\n this._socket.on('reconnect', () => {\r\n this.onProgress(PROGRESS.READY);\r\n this.connected = true;\r\n\r\n if (this.waitForRestart) {\r\n window.location.reload(false);\r\n } else {\r\n this._subscribe(true);\r\n this.onConnectionHandlers.forEach(cb => cb(true));\r\n }\r\n });\r\n\r\n this._socket.on('disconnect', () => {\r\n this.connected = false;\r\n this.subscribed = false;\r\n this.onProgress(PROGRESS.CONNECTING);\r\n this.onConnectionHandlers.forEach(cb => cb(false));\r\n });\r\n\r\n this._socket.on('reauthenticate', () =>\r\n this.authenticate());\r\n\r\n this._socket.on('log', message => {\r\n this.props.onLog && this.props.onLog(message);\r\n this.onLogHandlers.forEach(cb => cb(message));\r\n });\r\n\r\n this._socket.on('error', err => {\r\n let _err = err || '';\r\n if (typeof _err.toString !== 'function') {\r\n _err = JSON.stringify(_err);\r\n console.error(`Received strange error: ${_err}`);\r\n }\r\n _err = _err.toString();\r\n if (_err.includes('User not authorized')) {\r\n this.authenticate();\r\n } else {\r\n window.alert(`Socket Error: ${err}`);\r\n }\r\n });\r\n\r\n this._socket.on('connect_error', err =>\r\n console.error(`Connect error: ${err}`));\r\n\r\n this._socket.on('permissionError', err =>\r\n this.onError({ message: 'no permission', operation: err.operation, type: err.type, id: (err.id || '') }));\r\n\r\n this._socket.on('objectChange', (id, obj) =>\r\n setTimeout(() => this.objectChange(id, obj), 0));\r\n\r\n this._socket.on('stateChange', (id, state) =>\r\n setTimeout(() => this.stateChange(id, state), 0));\r\n\r\n this._socket.on('cmdStdout', (id, text) =>\r\n this.onCmdStdoutHandler && this.onCmdStdoutHandler(id, text));\r\n\r\n this._socket.on('cmdStderr', (id, text) =>\r\n this.onCmdStderrHandler && this.onCmdStderrHandler(id, text));\r\n\r\n this._socket.on('cmdExit', (id, exitCode) =>\r\n this.onCmdExitHandler && this.onCmdExitHandler(id, exitCode));\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {boolean} isOk\r\n * @param {boolean} isSecure\r\n */\r\n onPreConnect(isOk, isSecure) {\r\n if (this._authTimer) {\r\n clearTimeout(this._authTimer);\r\n this._authTimer = null;\r\n }\r\n\r\n this.connected = true;\r\n this.isSecure = isSecure;\r\n\r\n if (this.waitForRestart) {\r\n window.location.reload(false);\r\n } else {\r\n if (this.firstConnect) {\r\n // retry strategy\r\n this.loadTimer = setTimeout(() => {\r\n this.loadTimer = null;\r\n this.loadCounter++;\r\n if (this.loadCounter < 10) {\r\n this.onConnect();\r\n }\r\n }, 1000);\r\n\r\n if (!this.loaded) {\r\n this.onConnect();\r\n }\r\n } else {\r\n this.onProgress(PROGRESS.READY);\r\n }\r\n\r\n this._subscribe(true);\r\n this.onConnectionHandlers.forEach(cb => cb(true));\r\n }\r\n\r\n if (this._waitForFirstConnectionResolve) {\r\n this._waitForFirstConnectionResolve();\r\n this._waitForFirstConnectionResolve = null;\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the socket is connected.\r\n * @returns {boolean} true if connected.\r\n */\r\n isConnected() {\r\n return this.connected;\r\n }\r\n\r\n /**\r\n * Checks if the socket is connected.\r\n * @returns {Promise} Promise resolves if once connected.\r\n */\r\n waitForFirstConnection() {\r\n return this._waitForFirstConnection;\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n _getUserPermissions(cb) {\r\n if (this.doNotLoadACL) {\r\n return cb && cb();\r\n } else {\r\n this._socket.emit('getUserPermissions', cb);\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n onConnect() {\r\n this._getUserPermissions((err, acl) => {\r\n if (err) {\r\n return this.onError('Cannot read user permissions: ' + err);\r\n } else\r\n if (!this.doNotLoadACL) {\r\n if (this.loaded) {\r\n return;\r\n }\r\n this.loaded = true;\r\n clearTimeout(this.loadTimer);\r\n this.loadTimer = null;\r\n\r\n this.onProgress(PROGRESS.CONNECTED);\r\n this.firstConnect = false;\r\n\r\n this.acl = acl;\r\n }\r\n\r\n // Read system configuration\r\n return (this.admin5only && !window.vendorPrefix ? this.getCompactSystemConfig() : this.getSystemConfig())\r\n .then(data => {\r\n if (this.doNotLoadACL) {\r\n if (this.loaded) {\r\n return undefined;\r\n }\r\n this.loaded = true;\r\n clearTimeout(this.loadTimer);\r\n this.loadTimer = null;\r\n\r\n this.onProgress(PROGRESS.CONNECTED);\r\n this.firstConnect = false;\r\n }\r\n\r\n this.systemConfig = data;\r\n if (this.systemConfig && this.systemConfig.common) {\r\n this.systemLang = this.systemConfig.common.language;\r\n } else {\r\n this.systemLang = window.navigator.userLanguage || window.navigator.language;\r\n\r\n if (this.systemLang !== 'en' && this.systemLang !== 'de' && this.systemLang !== 'ru') {\r\n this.systemConfig.common.language = 'en';\r\n this.systemLang = 'en';\r\n }\r\n }\r\n\r\n this.props.onLanguage && this.props.onLanguage(this.systemLang);\r\n\r\n if (!this.doNotLoadAllObjects) {\r\n return this.getObjects()\r\n .then(() => {\r\n this.onProgress(PROGRESS.READY);\r\n this.props.onReady && this.props.onReady(this.objects);\r\n });\r\n } else {\r\n this.objects = this.admin5only ? {} : { 'system.config': data };\r\n this.onProgress(PROGRESS.READY);\r\n this.props.onReady && this.props.onReady(this.objects);\r\n }\r\n return undefined;\r\n })\r\n .catch(e => this.onError('Cannot read system config: ' + e));\r\n });\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n */\r\n authenticate() {\r\n if (window.location.search.includes('&href=')) {\r\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}${window.location.hash}`;\r\n } else {\r\n window.location = `${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${window.location.search}${window.location.hash}`;\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n /**\r\n * Subscribe to changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {boolean} binary Set to true if the given state is binary and requires Base64 decoding.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n subscribeState(id, binary, cb) {\r\n if (typeof binary === 'function') {\r\n cb = binary;\r\n binary = false;\r\n }\r\n\r\n if (!this.statesSubscribes[id]) {\r\n let reg = id\r\n .replace(/\\./g, '\\\\.')\r\n .replace(/\\*/g, '.*')\r\n .replace(/\\(/g, '\\\\(')\r\n .replace(/\\)/g, '\\\\)')\r\n .replace(/\\+/g, '\\\\+')\r\n .replace(/\\[/g, '\\\\[');\r\n\r\n if (reg.indexOf('*') === -1) {\r\n reg += '$';\r\n }\r\n this.statesSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\r\n this.statesSubscribes[id].cbs.push(cb);\r\n if (this.connected) {\r\n this._socket.emit('subscribe', id);\r\n }\r\n } else {\r\n !this.statesSubscribes[id].cbs.includes(cb) && this.statesSubscribes[id].cbs.push(cb);\r\n }\r\n if (typeof cb === 'function' && this.connected) {\r\n if (binary) {\r\n this.getBinaryState(id)\r\n .then(base64 => cb(id, base64))\r\n .catch(e => console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(e)}`));\r\n } else {\r\n if (Connection.isWeb()) {\r\n this._socket.emit('getStates', id, (err, states) => {\r\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\r\n states && Object.keys(states).forEach(id => cb(id, states[id]));\r\n });\r\n } else {\r\n this._socket.emit('getForeignStates', id, (err, states) => {\r\n err && console.error(`Cannot getForeignStates \"${id}\": ${JSON.stringify(err)}`);\r\n states && Object.keys(states).forEach(id => cb(id, states[id]));\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Unsubscribes all callbacks from changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n */\r\n /**\r\n * Unsubscribes the given callback from changes of the given state.\r\n * @param {string} id The ioBroker state ID.\r\n * @param {ioBroker.StateChangeHandler} cb The callback.\r\n */\r\n unsubscribeState(id, cb) {\r\n if (this.statesSubscribes[id]) {\r\n if (cb) {\r\n const pos = this.statesSubscribes[id].cbs.indexOf(cb);\r\n pos !== -1 && this.statesSubscribes[id].cbs.splice(pos, 1);\r\n } else {\r\n this.statesSubscribes[id].cbs = [];\r\n }\r\n\r\n if (!this.statesSubscribes[id].cbs || !this.statesSubscribes[id].cbs.length) {\r\n delete this.statesSubscribes[id];\r\n this.connected && this._socket.emit('unsubscribe', id);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Subscribe to changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @param {import('./types').ObjectChangeHandler} cb The callback.\r\n * @returns {Promise}\r\n */\r\n subscribeObject(id, cb) {\r\n if (!this.objectsSubscribes[id]) {\r\n let reg = id.replace(/\\./g, '\\\\.').replace(/\\*/g, '.*');\r\n if (!reg.includes('*')) {\r\n reg += '$';\r\n }\r\n this.objectsSubscribes[id] = { reg: new RegExp(reg), cbs: [] };\r\n this.objectsSubscribes[id].cbs.push(cb);\r\n this.connected && this._socket.emit('subscribeObjects', id);\r\n } else {\r\n !this.objectsSubscribes[id].cbs.includes(cb) && this.objectsSubscribes[id].cbs.push(cb);\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Unsubscribes all callbacks from changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Unsubscribes the given callback from changes of the given object.\r\n * @param {string} id The ioBroker object ID.\r\n * @param {import('./types').ObjectChangeHandler} cb The callback.\r\n * @returns {Promise}\r\n */\r\n unsubscribeObject(id, cb) {\r\n if (this.objectsSubscribes[id]) {\r\n if (cb) {\r\n const pos = this.objectsSubscribes[id].cbs.indexOf(cb);\r\n pos !== -1 && this.objectsSubscribes[id].cbs.splice(pos, 1);\r\n } else {\r\n this.objectsSubscribes[id].cbs = [];\r\n }\r\n\r\n if (this.connected && (!this.objectsSubscribes[id].cbs || !this.objectsSubscribes[id].cbs.length)) {\r\n delete this.objectsSubscribes[id];\r\n this.connected && this._socket.emit('unsubscribeObjects', id);\r\n }\r\n }\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {string} id\r\n * @param {ioBroker.Object | null | undefined} obj\r\n */\r\n objectChange(id, obj) {\r\n // update main.objects cache\r\n if (!this.objects) {\r\n return;\r\n }\r\n\r\n /** @type {import(\"./types\").OldObject} */\r\n let oldObj;\r\n\r\n let changed = false;\r\n if (obj) {\r\n if (obj._rev && this.objects[id]) {\r\n this.objects[id]._rev = obj._rev;\r\n }\r\n\r\n if (this.objects[id]) {\r\n oldObj = { _id: id, type: this.objects[id].type };\r\n }\r\n\r\n if (!this.objects[id] || JSON.stringify(this.objects[id]) !== JSON.stringify(obj)) {\r\n this.objects[id] = obj;\r\n changed = true;\r\n }\r\n } else if (this.objects[id]) {\r\n oldObj = { _id: id, type: this.objects[id].type };\r\n delete this.objects[id];\r\n changed = true;\r\n }\r\n\r\n Object.keys(this.objectsSubscribes).forEach(_id => {\r\n if (_id === id || this.objectsSubscribes[_id].reg.test(id)) {\r\n //@ts-ignore\r\n this.objectsSubscribes[_id].cbs.forEach(cb => cb(id, obj, oldObj));\r\n }\r\n });\r\n\r\n if (changed && this.props.onObjectChange) {\r\n this.props.onObjectChange(id, obj);\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {string} id\r\n * @param {ioBroker.State | null | undefined} state\r\n */\r\n stateChange(id, state) {\r\n for (const task in this.statesSubscribes) {\r\n if (this.statesSubscribes.hasOwnProperty(task) && this.statesSubscribes[task].reg.test(id)) {\r\n this.statesSubscribes[task].cbs.forEach(cb => cb(id, state));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets all states.\r\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\r\n * @returns {Promise>}\r\n */\r\n getStates(disableProgressUpdate) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getStates', (err, res) => {\r\n this.states = res;\r\n //@ts-ignore\r\n !disableProgressUpdate && this.onProgress(PROGRESS.STATES_LOADED);\r\n return err ? reject(err) : resolve(this.states);\r\n }));\r\n }\r\n\r\n /**\r\n * Gets the given state.\r\n * @param {string} id The state ID.\r\n * @returns {Promise}\r\n */\r\n getState(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getState', id, (err, state) => err ? reject(err) : resolve(state)));\r\n }\r\n\r\n /**\r\n * Gets the given binary state.\r\n * @param {string} id The state ID.\r\n * @returns {Promise}\r\n */\r\n getBinaryState(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n // the data will come in base64\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getBinaryState', id, (err, state) => err ? reject(err) : resolve(state)));\r\n }\r\n\r\n /**\r\n * Sets the given binary state.\r\n * @param {string} id The state ID.\r\n * @param {string} base64 The Base64 encoded binary data.\r\n * @returns {Promise}\r\n */\r\n setBinaryState(id, base64) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n // the data will come in base64\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setBinaryState', id, base64, err => err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Sets the given state value.\r\n * @param {string} id The state ID.\r\n * @param {string | number | boolean | ioBroker.State | ioBroker.SettableState | null} val The state value.\r\n * @returns {Promise}\r\n */\r\n setState(id, val) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setState', id, val, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Gets all objects.\r\n * @param {(objects?: Record) => void} update Callback that is executed when all objects are retrieved.\r\n * @returns {void}\r\n */\r\n /**\r\n * Gets all objects.\r\n * @param {boolean} update Set to true to retrieve all objects from the server (instead of using the local cache).\r\n * @param {boolean} disableProgressUpdate don't call onProgress() when done\r\n * @returns {Promise> | undefined}\r\n */\r\n getObjects(update, disableProgressUpdate) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n } else {\r\n return new Promise((resolve, reject) => {\r\n if (!update && this.objects) {\r\n return resolve(this.objects);\r\n }\r\n\r\n this._socket.emit(Connection.isWeb() ? 'getObjects' : 'getAllObjects', (err, res) => {\r\n this.objects = res;\r\n disableProgressUpdate && this.onProgress(PROGRESS.OBJECTS_LOADED);\r\n err ? reject(err) : resolve(this.objects);\r\n });\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {boolean} isEnable\r\n */\r\n _subscribe(isEnable) {\r\n if (isEnable && !this.subscribed) {\r\n this.subscribed = true;\r\n this.autoSubscribes.forEach(id => this._socket.emit('subscribeObjects', id));\r\n // re subscribe objects\r\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('subscribeObjects', id));\r\n // re-subscribe logs\r\n this.autoSubscribeLog && this._socket.emit('requireLog', true);\r\n // re subscribe states\r\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('subscribe', id));\r\n } else if (!isEnable && this.subscribed) {\r\n this.subscribed = false;\r\n // un-subscribe objects\r\n this.autoSubscribes.forEach(id => this._socket.emit('unsubscribeObjects', id));\r\n Object.keys(this.objectsSubscribes).forEach(id => this._socket.emit('unsubscribeObjects', id));\r\n // un-subscribe logs\r\n this.autoSubscribeLog && this._socket.emit('requireLog', false);\r\n\r\n // un-subscribe states\r\n Object.keys(this.statesSubscribes).forEach(id => this._socket.emit('unsubscribe', id));\r\n }\r\n }\r\n\r\n /**\r\n * Requests log updates.\r\n * @param {boolean} isEnabled Set to true to get logs.\r\n * @returns {Promise}\r\n */\r\n requireLog(isEnabled) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('requireLog', isEnabled, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Deletes the given object.\r\n * @param {string} id The object ID.\r\n * @param {boolean} maintenance Force deletion of non conform IDs.\r\n * @returns {Promise}\r\n */\r\n delObject(id, maintenance) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('delObject', id, { maintenance: !!maintenance }, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Deletes the given object and all its children.\r\n * @param {string} id The object ID.\r\n * @param {boolean} maintenance Force deletion of non conform IDs.\r\n * @returns {Promise}\r\n */\r\n delObjects(id, maintenance) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('delObjects', id, {maintenance: !!maintenance}, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Sets the object.\r\n * @param {string} id The object ID.\r\n * @param {ioBroker.SettableObject} obj The object.\r\n * @returns {Promise}\r\n */\r\n setObject(id, obj) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!obj) {\r\n return Promise.reject('Null object is not allowed');\r\n }\r\n\r\n obj = JSON.parse(JSON.stringify(obj));\r\n\r\n if (obj.hasOwnProperty('from')) {\r\n delete obj.from;\r\n }\r\n if (obj.hasOwnProperty('user')) {\r\n delete obj.user;\r\n }\r\n if (obj.hasOwnProperty('ts')) {\r\n delete obj.ts;\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('setObject', id, obj, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Gets the object with the given id from the server.\r\n * @param {string} id The object ID.\r\n * @returns {ioBroker.GetObjectPromise} The object.\r\n */\r\n getObject(id) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getObject', id, (err, obj) =>\r\n err ? reject(err) : resolve(obj)));\r\n }\r\n\r\n /**\r\n * Get all adapter instances.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Get all instances of the given adapter.\r\n * @param {string} adapter The name of the adapter.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getAdapterInstances(adapter, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (typeof adapter === 'boolean') {\r\n update = adapter;\r\n adapter = '';\r\n }\r\n adapter = adapter || '';\r\n\r\n if (!update && this._promises['instances_' + adapter]) {\r\n return this._promises['instances_' + adapter];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['instances_' + adapter] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n timeout = null;\r\n this.getObjectView(\r\n `system.adapter.${adapter}.`,\r\n `system.adapter.${adapter}.\\u9999`,\r\n 'instance'\r\n )\r\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\r\n .catch(e => reject(e));\r\n }, TIMEOUT_FOR_ADMIN4);\r\n\r\n this._socket.emit('getAdapterInstances', adapter, (err, instances) => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n return err ? reject(err) : resolve(instances);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['instances_' + adapter];\r\n }\r\n\r\n /**\r\n * Get all adapters.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n /**\r\n * Get adapters with the given name.\r\n * @param {string} adapter The name of the adapter.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getAdapters(adapter, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (typeof adapter === 'boolean') {\r\n update = adapter;\r\n adapter = '';\r\n }\r\n\r\n adapter = adapter || '';\r\n\r\n if (!update && this._promises['adapter_' + adapter]) {\r\n return this._promises['adapter_' + adapter];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['adapter_' + adapter] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n timeout = null;\r\n this.getObjectView(\r\n `system.adapter.${adapter}.`,\r\n `system.adapter.${adapter}.\\u9999`,\r\n 'adapter'\r\n )\r\n .then(items => resolve(Object.keys(items).map(id => fixAdminUI(items[id]))))\r\n .catch(e => reject(e));\r\n }, TIMEOUT_FOR_ADMIN4);\r\n\r\n this._socket.emit('getAdapters', adapter, (err, adapters) => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n return err ? reject(err) : resolve(adapters);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['adapter_' + adapter];\r\n }\r\n\r\n /**\r\n * Called internally.\r\n * @private\r\n * @param {any[]} objs\r\n * @param {(err?: any) => void} cb\r\n */\r\n _renameGroups(objs, cb) {\r\n if (!objs || !objs.length) {\r\n cb && cb();\r\n } else {\r\n let obj = objs.pop();\r\n let oldId = obj._id;\r\n obj._id = obj.newId;\r\n delete obj.newId;\r\n\r\n this.setObject(obj._id, obj)\r\n .then(() => this.delObject(oldId))\r\n .then(() => setTimeout(() => this._renameGroups(objs, cb), 0))\r\n .catch(err => cb && cb(err));\r\n }\r\n }\r\n\r\n /**\r\n * Rename a group.\r\n * @param {string} id The id.\r\n * @param {string} newId The new id.\r\n * @param {string | { [lang in ioBroker.Languages]?: string; }} newName The new name.\r\n */\r\n renameGroup(id, newId, newName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n return this.getGroups(true)\r\n .then(groups => {\r\n if (groups.length) {\r\n // find all elements\r\n const groupsToRename = groups\r\n .filter(group => group._id.startsWith(id + '.'));\r\n\r\n groupsToRename.forEach(group => group.newId = newId + group._id.substring(id.length));\r\n\r\n return new Promise((resolve, reject) =>\r\n this._renameGroups(groupsToRename, err => err ? reject(err) : resolve()))\r\n .then(() => {\r\n const obj = groups.find(group => group._id === id);\r\n\r\n if (obj) {\r\n obj._id = newId;\r\n if (newName !== undefined) {\r\n obj.common = obj.common || {};\r\n obj.common.name = newName;\r\n }\r\n\r\n return this.setObject(obj._id, obj)\r\n .then(() => this.delObject(id));\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Sends a message to a specific instance or all instances of some specific adapter.\r\n * @param {string} instance The instance to send this message to.\r\n * @param {string} [command] Command name of the target instance.\r\n * @param {ioBroker.MessagePayload} [data] The message data to send.\r\n * @returns {Promise}\r\n */\r\n sendTo(instance, command, data) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendTo', instance, command, data, result =>\r\n resolve(result)));\r\n }\r\n\r\n /**\r\n * Extend an object and create it if it might not exist.\r\n * @param {string} id The id.\r\n * @param {ioBroker.PartialObject} obj The object.\r\n */\r\n extendObject(id, obj) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n obj = JSON.parse(JSON.stringify(obj));\r\n\r\n if (obj.hasOwnProperty('from')) {\r\n delete obj.from;\r\n }\r\n if (obj.hasOwnProperty('user')) {\r\n delete obj.user;\r\n }\r\n if (obj.hasOwnProperty('ts')) {\r\n delete obj.ts;\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('extendObject', id, obj, err => err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Register a handler for log messages.\r\n * @param {(message: string) => void} handler The handler.\r\n */\r\n registerLogHandler(handler) {\r\n !this.onLogHandlers.includes(handler) && this.onLogHandlers.push(handler);\r\n }\r\n\r\n /**\r\n * Unregister a handler for log messages.\r\n * @param {(message: string) => void} handler The handler.\r\n */\r\n unregisterLogHandler(handler) {\r\n const pos = this.onLogHandlers.indexOf(handler);\r\n pos !== -1 && this.onLogHandlers.splice(pos, 1);\r\n }\r\n\r\n /**\r\n * Register a handler for the connection state.\r\n * @param {(connected: boolean) => void} handler The handler.\r\n */\r\n registerConnectionHandler(handler) {\r\n !this.onConnectionHandlers.includes(handler) && this.onConnectionHandlers.push(handler);\r\n }\r\n\r\n /**\r\n * Unregister a handler for the connection state.\r\n * @param {(connected: boolean) => void} handler The handler.\r\n */\r\n unregisterConnectionHandler(handler) {\r\n const pos = this.onConnectionHandlers.indexOf(handler);\r\n pos !== -1 && this.onConnectionHandlers.splice(pos, 1);\r\n }\r\n\r\n /**\r\n * Set the handler for standard output of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n registerCmdStdoutHandler(handler) {\r\n this.onCmdStdoutHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for standard output of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n unregisterCmdStdoutHandler(handler) {\r\n this.onCmdStdoutHandler = null;\r\n }\r\n\r\n /**\r\n * Set the handler for standard error of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n registerCmdStderrHandler(handler) {\r\n this.onCmdStderrHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for standard error of a command.\r\n * @param {(id: string, text: string) => void} handler The handler.\r\n */\r\n unregisterCmdStderrHandler(handler) {\r\n this.onCmdStderrHandler = null;\r\n }\r\n\r\n /**\r\n * Set the handler for exit of a command.\r\n * @param {(id: string, exitCode: number) => void} handler The handler.\r\n */\r\n registerCmdExitHandler(handler) {\r\n this.onCmdExitHandler = handler;\r\n }\r\n\r\n /**\r\n * Unset the handler for exit of a command.\r\n * @param {(id: string, exitCode: number) => void} handler The handler.\r\n */\r\n unregisterCmdExitHandler(handler) {\r\n this.onCmdExitHandler = null;\r\n }\r\n\r\n /**\r\n * Get all enums with the given name.\r\n * @param {string} [_enum] The name of the enum\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise>}\r\n */\r\n getEnums(_enum, update) {\r\n if (!update && this._promises['enums_' + (_enum || 'all')]) {\r\n return this._promises['enums_' + (_enum || 'all')];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['enums_' + (_enum || 'all')] = new Promise((resolve, reject) => {\r\n this._socket.emit('getObjectView', 'system', 'enum', { startkey: 'enum.' + (_enum || ''), endkey: 'enum.' + (_enum ? (_enum + '.') : '') + '\\u9999' }, (err, res) => {\r\n if (!err && res) {\r\n const _res = {};\r\n for (let i = 0; i < res.rows.length; i++) {\r\n if (_enum && res.rows[i].id === 'enum.' + _enum) {\r\n continue;\r\n }\r\n _res[res.rows[i].id] = res.rows[i].value;\r\n }\r\n resolve(_res);\r\n } else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n\r\n return this._promises['enums_' + (_enum || 'all')];\r\n }\r\n\r\n /**\r\n * Query a predefined object view.\r\n * @param {string} start The start ID.\r\n * @param {string} end The end ID.\r\n * @param {string} type The type of object.\r\n * @returns {Promise>}\r\n */\r\n getObjectView(start, end, type) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n start = start || '';\r\n end = end || '\\u9999';\r\n\r\n return new Promise((resolve, reject) => {\r\n this._socket.emit('getObjectView', 'system', type, { startkey: start, endkey: end }, (err, res) => {\r\n if (!err) {\r\n const _res = {};\r\n if (res && res.rows) {\r\n for (let i = 0; i < res.rows.length; i++) {\r\n _res[res.rows[i].id] = res.rows[i].value;\r\n }\r\n }\r\n resolve(_res);\r\n } else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Get the stored certificates.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise<{name: string; type: 'public' | 'private' | 'chained'}[]>}\r\n */\r\n getCertificates(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (this._promises.cert && !update) {\r\n return this._promises.cert;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.cert = this.getObject('system.certificates')\r\n .then(res => {\r\n const certs = [];\r\n if (res && res.native && res.native.certificates) {\r\n Object.keys(res.native.certificates).forEach(c => {\r\n const cert = res.native.certificates[c];\r\n if (!cert) {\r\n return;\r\n }\r\n const _cert = {\r\n name: c,\r\n type: ''\r\n };\r\n // If it is filename, it could be everything\r\n if (cert.length < 700 && (cert.indexOf('/') !== -1 || cert.indexOf('\\\\') !== -1)) {\r\n if (c.toLowerCase().includes('private')) {\r\n _cert.type = 'private';\r\n } else if (cert.toLowerCase().includes('private')) {\r\n _cert.type = 'private';\r\n } else if (c.toLowerCase().includes('public')) {\r\n _cert.type = 'public';\r\n } else if (cert.toLowerCase().includes('public')) {\r\n _cert.type = 'public';\r\n }\r\n certs.push(_cert);\r\n } else {\r\n _cert.type = (cert.substring(0, '-----BEGIN RSA PRIVATE KEY'.length) === '-----BEGIN RSA PRIVATE KEY' || cert.substring(0, '-----BEGIN PRIVATE KEY'.length) === '-----BEGIN PRIVATE KEY') ? 'private' : 'public';\r\n\r\n if (_cert.type === 'public') {\r\n const m = cert.split('-----END CERTIFICATE-----');\r\n if (m.filter(t => t.replace(/\\r\\n|\\r|\\n/, '').trim()).length > 1) {\r\n _cert.type = 'chained';\r\n }\r\n }\r\n\r\n certs.push(_cert);\r\n }\r\n });\r\n }\r\n return certs;\r\n });\r\n\r\n return this._promises.cert;\r\n }\r\n\r\n /**\r\n * Get the logs from a host (only for admin connection).\r\n * @param {string} host\r\n * @param {number} [linesNumber]\r\n * @returns {Promise}\r\n */\r\n getLogs(host, linesNumber) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'getLogs', linesNumber || 200, lines =>\r\n resolve(lines)));\r\n }\r\n\r\n /**\r\n * Get the log files (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getLogsFiles(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('readLogs', host, (err, files) =>\r\n err ? reject(err) : resolve(files)));\r\n }\r\n\r\n /**\r\n * Delete the logs from a host (only for admin connection).\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n delLogs(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('sendToHost', host, 'delLogs', null, error =>\r\n error ? reject(error) : resolve()));\r\n }\r\n\r\n /**\r\n * Read the meta items.\r\n * @returns {Promise}\r\n */\r\n readMetaItems() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getObjectView', 'system', 'meta', { startkey: '', endkey: '\\u9999' }, (err, objs) =>\r\n err ? reject(err) : resolve(objs.rows && objs.rows.map(obj => obj.value))));\r\n }\r\n\r\n /**\r\n * Read the directory of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The directory name.\r\n * @returns {Promise}\r\n */\r\n readDir(adapter, fileName) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('readDir', adapter, fileName, (err, files) =>\r\n err ? reject(err) : resolve(files)));\r\n }\r\n\r\n /**\r\n * Read a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @param {boolean} base64 If it must be a base64 format\r\n * @returns {Promise}\r\n */\r\n readFile(adapter, fileName, base64) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (!base64) {\r\n this._socket.emit('readFile', adapter, fileName, (err, data, type) => {\r\n //@ts-ignore\r\n err ? reject(err) : resolve(data, type);\r\n });\r\n } else {\r\n this._socket.emit('readFile64', adapter, fileName, base64, (err, data) =>\r\n err ? reject(err) : resolve(data));\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Write a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @param {Buffer | string} data The data (if it's a Buffer, it will be converted to Base64).\r\n * @returns {Promise}\r\n */\r\n writeFile64(adapter, fileName, data) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (typeof data === 'string') {\r\n this._socket.emit('writeFile', adapter, fileName, data, err =>\r\n err ? reject(err) : resolve());\r\n } else {\r\n const base64 = btoa(\r\n new Uint8Array(data)\r\n .reduce((data, byte) => data + String.fromCharCode(byte), '')\r\n );\r\n\r\n this._socket.emit('writeFile64', adapter, fileName, base64, err =>\r\n err ? reject(err) : resolve());\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Delete a file of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} fileName The file name.\r\n * @returns {Promise}\r\n */\r\n deleteFile(adapter, fileName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('deleteFile', adapter, fileName, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Delete a folder of an adapter.\r\n * @param {string} adapter The adapter name.\r\n * @param {string} folderName The folder name.\r\n * @returns {Promise}\r\n */\r\n deleteFolder(adapter, folderName) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('deleteFolder', adapter, folderName, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Get the list of all hosts.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getHosts(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.hosts) {\r\n return this._promises.hosts;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.hosts = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'host',\r\n {startkey: 'system.host.', endkey: 'system.host.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.hosts;\r\n }\r\n\r\n /**\r\n * Get the list of all users.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getUsers(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.users) {\r\n return this._promises.users;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.users = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'user',\r\n {startkey: 'system.user.', endkey: 'system.user.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.users;\r\n }\r\n\r\n /**\r\n * Get the list of all groups.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getGroups(update) {\r\n if (!update && this._promises.groups) {\r\n return this._promises.groups;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.groups = new Promise((resolve, reject) =>\r\n this._socket.emit(\r\n 'getObjectView',\r\n 'system',\r\n 'group',\r\n {startkey: 'system.group.', endkey: 'system.group.\\u9999'},\r\n (err, doc) => {\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve(doc.rows.map(item => item.value));\r\n }\r\n }));\r\n\r\n return this._promises.groups;\r\n }\r\n\r\n /**\r\n * Get the host information.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] optional read timeout.\r\n * @returns {Promise}\r\n */\r\n getHostInfo(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['hostInfo' + host]) {\r\n return this._promises['hostInfo' + host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['hostInfo' + host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getHostInfo timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getHostInfo', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getHostInfo\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getHostInfo\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises['hostInfo' + host];\r\n }\r\n\r\n /**\r\n * Get the host information (short version).\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] optional read timeout.\r\n * @returns {Promise}\r\n */\r\n getHostInfoShort(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['hostInfoShort' + host]) {\r\n return this._promises['hostInfoShort' + host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['hostInfoShort' + host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('hostInfoShort timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getHostInfoShort', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getHostInfoShort\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getHostInfoShort\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises['hostInfoShort' + host];\r\n }\r\n\r\n /**\r\n * Get the repository.\r\n * @param {string} host\r\n * @param {any} [args]\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] timeout in ms.\r\n * @returns {Promise}\r\n */\r\n getRepository(host, args, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.repo) {\r\n return this._promises.repo;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.repo = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getRepository timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getRepository', args, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getRepository\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getRepository\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.repo;\r\n }\r\n\r\n /**\r\n * Get the installed.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [cmdTimeout] timeout in ms (optional)\r\n * @returns {Promise}\r\n */\r\n getInstalled(host, update, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n this._promises.installed = this._promises.installed || {};\r\n\r\n if (!update && this._promises.installed[host]) {\r\n return this._promises.installed[host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.installed[host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getInstalled timeout');\r\n }\r\n }, cmdTimeout || this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'getInstalled', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getInstalled\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getInstalled\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.installed[host];\r\n }\r\n\r\n /**\r\n * Execute a command on a host.\r\n * @param {string} host The host name.\r\n * @param {string} cmd The command.\r\n * @param {string} cmdId The command ID.\r\n * @param {number} cmdTimeout Timeout of command in ms\r\n * @returns {Promise}\r\n */\r\n cmdExec(host, cmd, cmdId, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith(host)) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n let timeout = cmdTimeout && setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('cmdExec timeout');\r\n }\r\n }, cmdTimeout);\r\n\r\n this._socket.emit('cmdExec', host, cmdId, cmd, null, err => {\r\n if (!cmdTimeout || timeout) {\r\n timeout && clearTimeout(timeout);\r\n timeout = null;\r\n if (err) {\r\n reject(err);\r\n } else {\r\n resolve();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a given feature is supported.\r\n * @param {string} feature The feature to check.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n checkFeatureSupported(feature, update) {\r\n if (!update && this._promises['supportedFeatures_' + feature]) {\r\n return this._promises['supportedFeatures_' + feature];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises['supportedFeatures_' + feature] = new Promise((resolve, reject) =>\r\n this._socket.emit('checkFeatureSupported', feature, (err, features) => {\r\n err ? reject(err) : resolve(features)\r\n }));\r\n\r\n return this._promises['supportedFeatures_' + feature];\r\n }\r\n\r\n /**\r\n * Read the base settings of a given host.\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n readBaseSettings(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\r\n .then(result => {\r\n if (result) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('readBaseSettings timeout');\r\n }\r\n }, this.props.cmdTimeout);\r\n\r\n if (host.startsWith('system.host.')) {\r\n host = host.replace(/^system\\.host\\./, '');\r\n }\r\n\r\n this._socket.emit('sendToHost', host, 'readBaseSettings', null, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"BaseSettings\"');\r\n } else if (!data) {\r\n reject('Cannot read \"BaseSettings\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n return Promise.reject('Not supported');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Write the base settings of a given host.\r\n * @param {string} host\r\n * @param {any} config\r\n * @returns {Promise}\r\n */\r\n writeBaseSettings(host, config) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return this.checkFeatureSupported('CONTROLLER_READWRITE_BASE_SETTINGS')\r\n .then(result => {\r\n if (result) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('writeBaseSettings timeout');\r\n }\r\n }, this.props.cmdTimeout);\r\n\r\n this._socket.emit('sendToHost', host, 'writeBaseSettings', config, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not write \"BaseSettings\"');\r\n } else if (!data) {\r\n reject('Cannot write \"BaseSettings\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n return Promise.reject('Not supported');\r\n }\r\n })\r\n }\r\n\r\n /**\r\n * Send command to restart the iobroker on host\r\n * @param {string} host\r\n * @returns {Promise}\r\n */\r\n restartController(host) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) => {\r\n this._socket.emit('sendToHost', host, 'restartController', null, error => {\r\n error ? reject(error) : resolve(true);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Read statistics information from host\r\n * @param {string} host\r\n * @param {string} typeOfDiag one of none, normal, no-city, extended\r\n * @returns {Promise}\r\n */\r\n getDiagData(host, typeOfDiag) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise(resolve => {\r\n this._socket.emit('sendToHost', host, 'getDiagData', typeOfDiag, result =>\r\n resolve(result));\r\n });\r\n }\r\n\r\n /**\r\n * Read all states (which might not belong to this adapter) which match the given pattern.\r\n * @param {string} pattern\r\n * @returns {ioBroker.GetStatesPromise}\r\n */\r\n getForeignStates(pattern) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n if (Connection.isWeb()) {\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getStates', pattern || '*', (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n } else {\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getForeignStates', pattern || '*', (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n }\r\n }\r\n\r\n /**\r\n * Get foreign objects by pattern, by specific type and resolve their enums.\r\n * @param {string} pattern\r\n * @param {string} [type]\r\n * @returns {ioBroker.GetObjectsPromise}\r\n */\r\n getForeignObjects(pattern, type) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getForeignObjects', pattern || '*', type, (err, states) =>\r\n err ? reject(err) : resolve(states)));\r\n }\r\n\r\n /**\r\n * Gets the system configuration.\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getSystemConfig(update) {\r\n if (!update && this._promises.systemConfig) {\r\n return this._promises.systemConfig;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.systemConfig = this.getObject('system.config')\r\n .then(systemConfig => {\r\n //@ts-ignore\r\n systemConfig = systemConfig || {};\r\n //@ts-ignore\r\n systemConfig.common = systemConfig.common || {};\r\n //@ts-ignore\r\n systemConfig.native = systemConfig.native || {};\r\n return systemConfig;\r\n });\r\n\r\n return this._promises.systemConfig;\r\n }\r\n\r\n /**\r\n * Sets the system configuration.\r\n * @param {ioBroker.SettableObjectWorker} obj\r\n * @returns {Promise>}\r\n */\r\n setSystemConfig(obj) {\r\n return this.setObject('system.config', obj)\r\n .then(() => this._promises.systemConfig = Promise.resolve(obj));\r\n }\r\n\r\n /**\r\n * Get the raw socket.io socket.\r\n * @returns {any}\r\n */\r\n getRawSocket() {\r\n return this._socket;\r\n }\r\n\r\n /**\r\n * Get the history of a given state.\r\n * @param {string} id\r\n * @param {ioBroker.GetHistoryOptions} options\r\n * @returns {Promise}\r\n */\r\n getHistory(id, options) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getHistory', id, options, (err, values) =>\r\n err ? reject(err) : resolve(values)));\r\n }\r\n\r\n /**\r\n * Get the history of a given state.\r\n * @param {string} id\r\n * @param {ioBroker.GetHistoryOptions} options\r\n * @returns {Promise<{values: ioBroker.GetHistoryResult; sesionId: string; stepIgnore: number}>}\r\n */\r\n getHistoryEx(id, options) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getHistory', id, options, (err, values, stepIgnore, sessionId) =>\r\n err ? reject(err) : resolve({ values, sessionId, stepIgnore })));\r\n }\r\n\r\n /**\r\n * Change the password of the given user.\r\n * @param {string} user\r\n * @param {string} password\r\n * @returns {Promise}\r\n */\r\n changePassword(user, password) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('changePassword', user, password, err =>\r\n err ? reject(err) : resolve()));\r\n }\r\n\r\n /**\r\n * Get the IP addresses of the given host.\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getIpAddresses(host, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!host.startsWith('system.host.')) {\r\n host = 'system.host.' + host;\r\n }\r\n\r\n if (!update && this._promises['IPs_' + host]) {\r\n return this._promises['IPs_' + host];\r\n }\r\n this._promises['IPs_' + host] = this.getObject(host)\r\n .then(obj => obj && obj.common ? obj.common.address || [] : []);\r\n\r\n return this._promises['IPs_' + host];\r\n }\r\n\r\n /**\r\n * Get the IP addresses with interface names of the given host or find host by IP.\r\n * @param {string} ipOrHostName\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise]>}\r\n */\r\n getHostByIp(ipOrHostName, update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (ipOrHostName.startsWith('system.host.')) {\r\n ipOrHostName = ipOrHostName.replace(/^system\\.host\\./, '');\r\n }\r\n\r\n if (!update && this._promises['rIPs_' + ipOrHostName]) {\r\n return this._promises['rIPs_' + ipOrHostName];\r\n }\r\n this._promises['rIPs_' + ipOrHostName] = new Promise(resolve =>\r\n this._socket.emit('getHostByIp', ipOrHostName, (ip, host) => {\r\n const IPs4 = [{name: '[IPv4] 0.0.0.0 - Listen on all IPs', address: '0.0.0.0', family: 'ipv4'}];\r\n const IPs6 = [{name: '[IPv6] :: - Listen on all IPs', address: '::', family: 'ipv6'}];\r\n if (host.native?.hardware?.networkInterfaces) {\r\n for (const eth in host.native.hardware.networkInterfaces) {\r\n if (!host.native.hardware.networkInterfaces.hasOwnProperty(eth)) {\r\n continue;\r\n }\r\n for (let num = 0; num < host.native.hardware.networkInterfaces[eth].length; num++) {\r\n if (host.native.hardware.networkInterfaces[eth][num].family !== 'IPv6') {\r\n IPs4.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv4'});\r\n } else {\r\n IPs6.push({name: `[${host.native.hardware.networkInterfaces[eth][num].family}] ${host.native.hardware.networkInterfaces[eth][num].address} - ${eth}`, address: host.native.hardware.networkInterfaces[eth][num].address, family: 'ipv6'});\r\n }\r\n }\r\n }\r\n }\r\n for (let i = 0; i < IPs6.length; i++) {\r\n IPs4.push(IPs6[i]);\r\n }\r\n resolve(IPs4);\r\n }));\r\n\r\n return this._promises['rIPs_' + ipOrHostName];\r\n }\r\n\r\n /**\r\n * Encrypt a text\r\n * @param {string} text\r\n * @returns {Promise}\r\n */\r\n encrypt(text) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('encrypt', text, (err, text) =>\r\n err ? reject(err) : resolve(text)));\r\n }\r\n\r\n /**\r\n * Decrypt a text\r\n * @param {string} encryptedText\r\n * @returns {Promise}\r\n */\r\n decrypt(encryptedText) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('decrypt', encryptedText, (err, text) =>\r\n err ? reject(err) : resolve(text)));\r\n }\r\n\r\n /**\r\n * Gets the version.\r\n * @returns {Promise<{version: string; serverName: string}>}\r\n */\r\n getVersion() {\r\n this._promises.version = this._promises.version || new Promise((resolve, reject) =>\r\n this._socket.emit('getVersion', (err, version, serverName) => {\r\n // support of old socket.io\r\n if (err && !version && typeof err === 'string' && err.match(/\\d+\\.\\d+\\.\\d+/)) {\r\n resolve({ version: err, serverName: 'socketio' });\r\n } else {\r\n return err ? reject(err) : resolve({ version, serverName });\r\n }\r\n }));\r\n\r\n return this._promises.version;\r\n }\r\n\r\n /**\r\n * Gets the web server name.\r\n * @returns {Promise}\r\n */\r\n getWebServerName() {\r\n this._promises.webName = this._promises.webName || new Promise((resolve, reject) =>\r\n this._socket.emit('getAdapterName', (err, name) =>\r\n err ? reject(err) : resolve(name)));\r\n\r\n return this._promises.webName;\r\n }\r\n\r\n /**\r\n * Gets the admin version.\r\n * @deprecated use getVersion()\r\n * @returns {Promise<{version: string; serverName: string}>}\r\n */\r\n getAdminVersion() {\r\n console.log('Deprecated: use getVersion');\r\n return this.getVersion();\r\n }\r\n\r\n /**\r\n * Change access rights for file\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @param {object} [options] like {mode: 0x644}\r\n * @returns {Promise<{entries: array}>}\r\n */\r\n chmodFile(adapter, filename, options) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('chmodFile', adapter, filename, options, (err, entries, id) =>\r\n err ? reject(err) : resolve({entries, id})));\r\n }\r\n\r\n /**\r\n * Change owner or/and owner group for file\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @param {object} [options] like {owner: 'newOwner', ownerGroup: 'newGroup'}\r\n * @returns {Promise<{entries: array}>}\r\n */\r\n chownFile(adapter, filename, options) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('chownFile', adapter, filename, options, (err, entries, id) =>\r\n err ? reject(err) : resolve({entries, id})));\r\n }\r\n\r\n /**\r\n * Check if the file exists\r\n * @param {string} [adapter] adapter name\r\n * @param {string} [filename] file name with full path. it could be like vis.0/*\r\n * @returns {Promise}\r\n */\r\n fileExists(adapter, filename) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('fileExists', adapter, filename, (err, exists) =>\r\n err ? reject(err) : resolve(exists)));\r\n }\r\n\r\n /**\r\n * Get the alarm notifications from a host (only for admin connection).\r\n * @param {string} host\r\n * @param {string} [category] - optional\r\n * @returns {Promise}\r\n */\r\n getNotifications(host, category) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'getNotifications', {category}, notifications =>\r\n resolve(notifications)));\r\n }\r\n\r\n /**\r\n * Clear the alarm notifications on a host (only for admin connection).\r\n * @param {string} host\r\n * @param {string} [category] - optional\r\n * @returns {Promise}\r\n */\r\n clearNotifications(host, category) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise(resolve =>\r\n this._socket.emit('sendToHost', host, 'clearNotifications', {category}, notifications =>\r\n resolve(notifications)));\r\n }\r\n\r\n /**\r\n * Read if only easy mode is allowed (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getIsEasyModeStrict() {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getIsEasyModeStrict', (error, isStrict) =>\r\n error ? reject(error) : resolve(isStrict)));\r\n }\r\n\r\n /**\r\n * Read easy mode configuration (only for admin connection).\r\n * @returns {Promise}\r\n */\r\n getEasyMode() {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getEasyMode', (error, config) =>\r\n error ? reject(error) : resolve(config)));\r\n }\r\n\r\n /**\r\n * Read current user\r\n * @returns {Promise}\r\n */\r\n getCurrentUser() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise(resolve =>\r\n this._socket.emit('authEnabled', (isSecure, user) =>\r\n resolve(user)));\r\n }\r\n\r\n getCurrentSession(cmdTimeout) {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const controller = new AbortController();\r\n\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n controller.abort();\r\n reject('getCurrentSession timeout');\r\n }\r\n }, cmdTimeout || 5000);\r\n\r\n return fetch('./session', { signal: controller.signal })\r\n .then(res => res.json())\r\n .then(json => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n resolve(json);\r\n }\r\n })\r\n .catch(e => {\r\n reject('getCurrentSession: ' + e);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Read adapter ratings\r\n * @returns {Promise}\r\n */\r\n getRatings(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('getRatings', update, (err, ratings) =>\r\n err ? reject(err) : resolve(ratings)));\r\n }\r\n\r\n /**\r\n * Read current web, socketio or admin namespace, like admin.0\r\n * @returns {Promise}\r\n */\r\n getCurrentInstance() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.currentInstance = this._promises.currentInstance ||\r\n new Promise((resolve, reject) =>\r\n this._socket.emit('getCurrentInstance', (err, namespace) =>\r\n err ? reject(err) : resolve(namespace)));\r\n\r\n return this._promises.currentInstance;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactAdapters(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.compactAdapters) {\r\n return this._promises.compactAdapters;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n this._promises.compactAdapters = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactAdapters', (err, adapters) =>\r\n err ? reject(err) : resolve(adapters)));\r\n\r\n return this._promises.compactAdapters;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactInstances(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.compactInstances) {\r\n return this._promises.compactInstances;\r\n }\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.compactInstances = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactInstances', (err, instances) =>\r\n err ? reject(err) : resolve(instances)));\r\n\r\n return this._promises.compactInstances;\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n // reads only version of installed adapter\r\n getCompactInstalled(host, update, cmdTimeout) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n\r\n this._promises.installedCompact = this._promises.installedCompact || {};\r\n\r\n if (!update && this._promises.installedCompact[host]) {\r\n return this._promises.installedCompact[host];\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.installedCompact[host] = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getCompactInstalled timeout');\r\n }\r\n }, cmdTimeout || this.props.cmdTimeout);\r\n\r\n this._socket.emit('getCompactInstalled', host, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getCompactInstalled\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getCompactInstalled\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.installedCompact[host];\r\n }\r\n\r\n // returns very optimized information for adapters to minimize connection load\r\n getCompactSystemConfig(update) {\r\n if (!update && this._promises.systemConfigCommon) {\r\n return this._promises.systemConfigCommon;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.systemConfigCommon = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactSystemConfig', (err, systemConfig) =>\r\n err ? reject(err) : resolve(systemConfig)));\r\n\r\n return this._promises.systemConfigCommon;\r\n }\r\n\r\n /**\r\n * Get the repository in compact form (only version and icon).\r\n * @param {string} host\r\n * @param {boolean} [update] Force update.\r\n * @param {number} [timeoutMs] timeout in ms.\r\n * @returns {Promise}\r\n */\r\n getCompactRepository(host, update, timeoutMs) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.repoCompact) {\r\n return this._promises.repoCompact;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n if (!host.startsWith('system.host.')) {\r\n host += 'system.host.' + host;\r\n }\r\n\r\n this._promises.repoCompact = new Promise((resolve, reject) => {\r\n let timeout = setTimeout(() => {\r\n if (timeout) {\r\n timeout = null;\r\n reject('getCompactRepository timeout');\r\n }\r\n }, timeoutMs || this.props.cmdTimeout);\r\n\r\n this._socket.emit('getCompactRepository', host, data => {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n if (data === PERMISSION_ERROR) {\r\n reject('May not read \"getCompactRepository\"');\r\n } else if (!data) {\r\n reject('Cannot read \"getCompactRepository\"');\r\n } else {\r\n resolve(data);\r\n }\r\n }\r\n });\r\n });\r\n\r\n return this._promises.repoCompact;\r\n }\r\n\r\n /**\r\n * Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)\r\n * @param {boolean} [update] Force update.\r\n * @returns {Promise}\r\n */\r\n getCompactHosts(update) {\r\n if (Connection.isWeb()) {\r\n return Promise.reject('Allowed only in admin');\r\n }\r\n if (!update && this._promises.hostsCompact) {\r\n return this._promises.hostsCompact;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.hostsCompact = new Promise((resolve, reject) =>\r\n this._socket.emit('getCompactHosts', (err, hosts) =>\r\n err ? reject(err) : resolve(hosts)));\r\n\r\n return this._promises.hostsCompact;\r\n }\r\n\r\n /**\r\n * Get uuid\r\n * @returns {Promise}\r\n */\r\n getUuid() {\r\n if (this._promises.uuid) {\r\n return this._promises.uuid;\r\n }\r\n\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n this._promises.uuid = this.getObject('system.meta.uuid')\r\n //@ts-ignore\r\n .then(obj => obj?.native?.uuid);\r\n\r\n return this._promises.uuid;\r\n }\r\n\r\n /**\r\n * Logout current user\r\n * @returns {Promise}\r\n */\r\n logout() {\r\n if (!this.connected) {\r\n return Promise.reject(NOT_CONNECTED);\r\n }\r\n\r\n return new Promise((resolve, reject) =>\r\n this._socket.emit('logout', err =>\r\n err ? reject(err) : resolve(null)));\r\n }\r\n}\r\n\r\nConnection.Connection = {\r\n onLog: PropTypes.func,\r\n onReady: PropTypes.func,\r\n onProgress: PropTypes.func,\r\n};\r\n\r\nexport default Connection;\r\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * Copyright 2018-2021 bluefox \n *\n * MIT License\n *\n **/\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '@material-ui/core/styles/withStyles';\n\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\n\nimport IconCheck from '@material-ui/icons/Check';\n\nimport I18n from '../i18n';\n\nconst styles = theme => ({\n titleBackground: {\n\n },\n titleColor: {\n\n }\n});\n\n/**\n * @typedef {object} DialogErrorProps\n * @property {string} [key] The key to identify this component.\n * @property {string} [title] The dialog title; default: Error (translated)\n * @property {string | JSX.Element} text The dialog text.\n * @property {() => void} [onClose] Close handler.\n * @property {{titleBackground: string; titleColor: string}} classes The styling class names.\n *\n * @extends {React.Component}\n */\nclass DialogError extends React.Component {\n handleOk() {\n this.props.onClose && this.props.onClose();\n };\n\n render() {\n return this.handleOk()}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n {this.props.title || I18n.t('ra_Error')}\n \n \n {this.props.text || I18n.t('ra_Unknown error!')}\n \n \n \n \n \n ;\n }\n}\n\nDialogError.propTypes = {\n onClose: PropTypes.func,\n title: PropTypes.string,\n text: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element\n ]),\n icon: PropTypes.object\n};\n\n/** @type {typeof DialogError} */\nconst _export = withStyles(styles)(DialogError);\nexport default _export;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createTheme = _interopRequireDefault(require(\"./createTheme\"));\n\nvar defaultTheme = (0, _createTheme.default)();\nvar _default = defaultTheme;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createMuiTheme = createMuiTheme;\nexports.default = void 0;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _createBreakpoints = _interopRequireDefault(require(\"./createBreakpoints\"));\n\nvar _createMixins = _interopRequireDefault(require(\"./createMixins\"));\n\nvar _createPalette = _interopRequireDefault(require(\"./createPalette\"));\n\nvar _createTypography = _interopRequireDefault(require(\"./createTypography\"));\n\nvar _shadows = _interopRequireDefault(require(\"./shadows\"));\n\nvar _shape = _interopRequireDefault(require(\"./shape\"));\n\nvar _createSpacing = _interopRequireDefault(require(\"./createSpacing\"));\n\nvar _transitions = _interopRequireDefault(require(\"./transitions\"));\n\nvar _zIndex = _interopRequireDefault(require(\"./zIndex\"));\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = (0, _objectWithoutProperties2.default)(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n var palette = (0, _createPalette.default)(paletteInput);\n var breakpoints = (0, _createBreakpoints.default)(breakpointsInput);\n var spacing = (0, _createSpacing.default)(spacingInput);\n var muiTheme = (0, _utils.deepmerge)({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: (0, _createMixins.default)(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: _shadows.default,\n typography: (0, _createTypography.default)(palette, typographyInput),\n spacing: spacing,\n shape: _shape.default,\n transitions: _transitions.default,\n zIndex: _zIndex.default\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return (0, _utils.deepmerge)(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: (0, _defineProperty2.default)({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\n\nfunction createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\n\nvar _default = createTheme;\nexports.default = _default;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createBreakpoints;\nexports.keys = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nvar keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.\n\nexports.keys = keys;\n\nfunction createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n } : _breakpoints$values,\n _breakpoints$unit = breakpoints.unit,\n unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,\n _breakpoints$step = breakpoints.step,\n step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,\n other = (0, _objectWithoutProperties2.default)(breakpoints, [\"values\", \"unit\", \"step\"]);\n\n function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n }\n\n function down(key) {\n var endIndex = keys.indexOf(key) + 1;\n var upperbound = values[keys[endIndex]];\n\n if (endIndex === keys.length) {\n // xl down applies to all sizes\n return up('xs');\n }\n\n var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;\n return \"@media (max-width:\".concat(value - step / 100).concat(unit, \")\");\n }\n\n function between(start, end) {\n var endIndex = keys.indexOf(end);\n\n if (endIndex === keys.length - 1) {\n return up(start);\n }\n\n return \"@media (min-width:\".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, \") and \") + \"(max-width:\".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, \")\");\n }\n\n function only(key) {\n return between(key, key);\n }\n\n var warnedOnce = false;\n\n function width(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn([\"Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.\", 'Use the `theme.breakpoints.values` instead.'].join('\\n'));\n }\n }\n\n return values[key];\n }\n\n return (0, _extends2.default)({\n keys: keys,\n values: values,\n up: up,\n down: down,\n between: between,\n only: only,\n width: width\n }, other);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createMixins;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _extends3 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nfunction createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return (0, _extends3.default)({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return (0, _extends3.default)({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, (0, _defineProperty2.default)({}, breakpoints.up('sm'), (0, _extends3.default)({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, (0, _defineProperty2.default)(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), (0, _defineProperty2.default)(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPalette;\nexports.dark = exports.light = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nvar _common = _interopRequireDefault(require(\"../colors/common\"));\n\nvar _grey = _interopRequireDefault(require(\"../colors/grey\"));\n\nvar _indigo = _interopRequireDefault(require(\"../colors/indigo\"));\n\nvar _pink = _interopRequireDefault(require(\"../colors/pink\"));\n\nvar _red = _interopRequireDefault(require(\"../colors/red\"));\n\nvar _orange = _interopRequireDefault(require(\"../colors/orange\"));\n\nvar _blue = _interopRequireDefault(require(\"../colors/blue\"));\n\nvar _green = _interopRequireDefault(require(\"../colors/green\"));\n\nvar _colorManipulator = require(\"./colorManipulator\");\n\nvar light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: _common.default.white,\n default: _grey.default[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexports.light = light;\nvar dark = {\n text: {\n primary: _common.default.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: _grey.default[800],\n default: '#303030'\n },\n action: {\n active: _common.default.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nexports.dark = dark;\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = (0, _colorManipulator.lighten)(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = (0, _colorManipulator.darken)(intent.main, tonalOffsetDark);\n }\n }\n}\n\nfunction createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: _indigo.default[300],\n main: _indigo.default[500],\n dark: _indigo.default[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: _pink.default.A200,\n main: _pink.default.A400,\n dark: _pink.default.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: _red.default[300],\n main: _red.default[500],\n dark: _red.default[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: _orange.default[300],\n main: _orange.default[500],\n dark: _orange.default[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: _blue.default[300],\n main: _blue.default[500],\n dark: _blue.default[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: _green.default[300],\n main: _green.default[500],\n dark: _green.default[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = (0, _objectWithoutProperties2.default)(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n function getContrastText(background) {\n var contrastText = (0, _colorManipulator.getContrastRatio)(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = (0, _colorManipulator.getContrastRatio)(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = (0, _extends2.default)({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : (0, _utils.formatMuiErrorMessage)(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = (0, _utils.deepmerge)((0, _extends2.default)({\n // A collection of common colors.\n common: _common.default,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: _grey.default,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar common = {\n black: '#000',\n white: '#fff'\n};\nvar _default = common;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nvar _default = grey;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nvar _default = indigo;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nvar _default = pink;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nvar _default = red;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nvar _default = blue;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nvar _default = green;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hexToRgb = hexToRgb;\nexports.rgbToHex = rgbToHex;\nexports.hslToRgb = hslToRgb;\nexports.decomposeColor = decomposeColor;\nexports.recomposeColor = recomposeColor;\nexports.getContrastRatio = getContrastRatio;\nexports.getLuminance = getLuminance;\nexports.emphasize = emphasize;\nexports.fade = fade;\nexports.alpha = alpha;\nexports.darken = darken;\nexports.lighten = lighten;\n\nvar _utils = require(\"@material-ui/utils\");\n\n/* eslint-disable no-use-before-define */\n\n/**\n * Returns a number whose value is limited to the given range.\n *\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(\"Material-UI: The value provided \".concat(value, \" is out of range [\").concat(min, \", \").concat(max, \"].\"));\n }\n }\n\n return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n *\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nfunction hexToRgb(color) {\n color = color.substr(1);\n var re = new RegExp(\".{1,\".concat(color.length >= 6 ? 2 : 1, \"}\"), 'g');\n var colors = color.match(re);\n\n if (colors && colors[0].length === 1) {\n colors = colors.map(function (n) {\n return n + n;\n });\n }\n\n return colors ? \"rgb\".concat(colors.length === 4 ? 'a' : '', \"(\").concat(colors.map(function (n, index) {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', '), \")\") : '';\n}\n\nfunction intToHex(int) {\n var hex = int.toString(16);\n return hex.length === 1 ? \"0\".concat(hex) : hex;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n *\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\n\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n\n var _decomposeColor = decomposeColor(color),\n values = _decomposeColor.values;\n\n return \"#\".concat(values.map(function (n) {\n return intToHex(n);\n }).join(''));\n}\n/**\n * Converts a color from hsl format to rgb format.\n *\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\n\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n var _color = color,\n values = _color.values;\n var h = values[0];\n var s = values[1] / 100;\n var l = values[2] / 100;\n var a = s * Math.min(l, 1 - l);\n\n var f = function f(n) {\n var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n };\n\n var type = 'rgb';\n var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n\n return recomposeColor({\n type: type,\n values: rgb\n });\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\n\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n var marker = color.indexOf('(');\n var type = color.substring(0, marker);\n\n if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Unsupported `\".concat(color, \"` color.\\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().\") : (0, _utils.formatMuiErrorMessage)(3, color));\n }\n\n var values = color.substring(marker + 1, color.length - 1).split(',');\n values = values.map(function (value) {\n return parseFloat(value);\n });\n return {\n type: type,\n values: values\n };\n}\n/**\n * Converts a color object with type and values to a string.\n *\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\n\nfunction recomposeColor(color) {\n var type = color.type;\n var values = color.values;\n\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map(function (n, i) {\n return i < 3 ? parseInt(n, 10) : n;\n });\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = \"\".concat(values[1], \"%\");\n values[2] = \"\".concat(values[2], \"%\");\n }\n\n return \"\".concat(type, \"(\").concat(values.join(', '), \")\");\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\n\nfunction getContrastRatio(foreground, background) {\n var lumA = getLuminance(foreground);\n var lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\n\nfunction getLuminance(color) {\n color = decomposeColor(color);\n var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(function (val) {\n val /= 255; // normalized\n\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }); // Truncate at 3 digits\n\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction emphasize(color) {\n var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\n\nvar warnedOnce = false;\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0 -1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n *\n * @deprecated\n * Use `import { alpha } from '@material-ui/core/styles'` instead.\n */\n\nfunction fade(color, value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The `fade` color utility was renamed to `alpha` to better describe its functionality.', '', \"You should use `import { alpha } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return alpha(color, value);\n}\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha value is overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0-1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clamp(value);\n\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n\n color.values[3] = value;\n return recomposeColor(color);\n}\n/**\n * Darkens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Lightens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\n\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n }\n\n return recomposeColor(color);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createTypography;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\nvar _utils = require(\"@material-ui/utils\");\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nfunction createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = (0, _objectWithoutProperties2.default)(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return (0, _extends2.default)({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return (0, _utils.deepmerge)((0, _extends2.default)({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nvar _default = shadows;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar shape = {\n borderRadius: 4\n};\nvar _default = shape;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createSpacing;\n\nvar _system = require(\"@material-ui/system\");\n\nvar warnOnce;\n\nfunction createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = (0, _system.createUnarySpacing)({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.duration = exports.easing = void 0;\n\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\n\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nvar easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\n\nexports.easing = easing;\nvar duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nexports.duration = duration;\n\nfunction formatMs(milliseconds) {\n return \"\".concat(Math.round(milliseconds), \"ms\");\n}\n/**\n * @param {string|Array} props\n * @param {object} param\n * @param {string} param.prop\n * @param {number} param.duration\n * @param {string} param.easing\n * @param {number} param.delay\n */\n\n\nvar _default = {\n easing: easing,\n duration: duration,\n create: function create() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$duration = options.duration,\n durationOption = _options$duration === void 0 ? duration.standard : _options$duration,\n _options$easing = options.easing,\n easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 0 : _options$delay,\n other = (0, _objectWithoutProperties2.default)(options, [\"duration\", \"easing\", \"delay\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n var isString = function isString(value) {\n return typeof value === 'string';\n };\n\n var isNumber = function isNumber(value) {\n return !isNaN(parseFloat(value));\n };\n\n if (!isString(props) && !Array.isArray(props)) {\n console.error('Material-UI: Argument \"props\" must be a string or Array.');\n }\n\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(\"Material-UI: Argument \\\"duration\\\" must be a number or a string but found \".concat(durationOption, \".\"));\n }\n\n if (!isString(easingOption)) {\n console.error('Material-UI: Argument \"easing\" must be a string.');\n }\n\n if (!isNumber(delay) && !isString(delay)) {\n console.error('Material-UI: Argument \"delay\" must be a number or a string.');\n }\n\n if (Object.keys(other).length !== 0) {\n console.error(\"Material-UI: Unrecognized argument(s) [\".concat(Object.keys(other).join(','), \"].\"));\n }\n }\n\n return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {\n return \"\".concat(animatedProp, \" \").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), \" \").concat(easingOption, \" \").concat(typeof delay === 'string' ? delay : formatMs(delay));\n }).join(',');\n },\n getAutoHeightDuration: function getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n\n var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n\n return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);\n }\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nvar zIndex = {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nvar _default = zIndex;\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"\n}), 'Check');\n\nexports.default = _default;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\n/**\n * Print the ioBroker welcome screen to the developer console.\n */\nfunction printPrompt() {\n const prompt = `\n██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ \n██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗\n██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝\n██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗\n██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║\n╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝\n`;\n\n console.log(prompt);\n console.log('Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters');\n console.log('Help us to create open source project with reactJS!');\n console.log('See you :)');\n}\n\nexport default printPrompt;","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\r\nimport React from 'react';\r\n\r\n/**\r\n * @template P Type of the properties object.\r\n * @template S Type of the internal state object.\r\n * @extends {React.Component}\r\n */\r\nclass Router extends React.Component {\r\n /**\r\n * @param {P} props The React properties of this component.\r\n */\r\n constructor(props) {\r\n super(props);\r\n this.onHashChangedBound = this.onHashChanged.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n window.addEventListener('hashchange', this.onHashChangedBound);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('hashchange', this.onHashChangedBound);\r\n }\r\n\r\n onHashChanged() {\r\n // override this function\r\n }\r\n\r\n /**\r\n * Gets the location object.\r\n * @returns {{ tab: string; dialog: string; id: string; arg: string; }}\r\n */\r\n static getLocation() {\r\n let hash = window.location.hash;\r\n hash = hash.replace(/^#/, '');\r\n const parts = hash.split('/').map(item => {\r\n try {\r\n return item ? decodeURIComponent(item) : ''\r\n } catch (e) {\r\n console.error('Router: Cannot decode ' + item);\r\n return item || '';\r\n }\r\n });\r\n // #tabName/dialogName/deviceId\r\n return {\r\n tab: parts[0] || '',\r\n dialog: parts[1] || '',\r\n id: parts[2] || '',\r\n arg: parts[3] || ''\r\n };\r\n }\r\n\r\n /**\r\n * Navigate to a new location. Any parameters that are not set will be taken from the current location.\r\n * @param {string | undefined} [tab]\r\n * @param {string | undefined} [dialog]\r\n * @param {string | undefined} [id]\r\n * @param {string | undefined} [arg]\r\n */\r\n static doNavigate(tab, dialog, id, arg) {\r\n let hash = '';\r\n const location = Router.getLocation();\r\n if (arg !== undefined && !id) {\r\n id = location.id;\r\n }\r\n if (id && !dialog) {\r\n dialog = location.dialog;\r\n }\r\n if (dialog && !tab) {\r\n tab = location.tab;\r\n } else\r\n if (tab === null) {\r\n tab = location.tab;\r\n }\r\n\r\n if (tab) {\r\n hash = '#' + tab;\r\n if (dialog) {\r\n hash += '/' + dialog;\r\n\r\n if (id) {\r\n hash += '/' + id;\r\n if (arg !== undefined) {\r\n hash += '/' + arg;\r\n }\r\n }\r\n }\r\n }\r\n if (window.location.hash !== hash) {\r\n window.location.hash = hash;\r\n }\r\n }\r\n}\r\n\r\nexport default Router;","// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport withStyles from '@material-ui/core/styles/withStyles';\nimport Fab from '@material-ui/core/Fab';\nimport PropTypes from 'prop-types';\n\nimport Toolbar from '@material-ui/core/Toolbar';\n\nimport I18n from '../i18n';\n\nimport IconSave from '@material-ui/icons/Save';\nimport IconClose from '@material-ui/icons/Close';\n\nconst styles = theme => ({\n buttonIcon: {\n marginRight: 8\n },\n});\n\n/**\n * @typedef {object} LogoProps\n * @property {boolean} noTextOnButtons Are the buttons without text\n * @property {any} theme Theme object (from this.state.theme)\n * @property {boolean} isIFrame bottom position 0 or 38 for iFrame\n * @property {function} onSave on Save handler\n * @property {function} onClose on Close handler\n *\n * @extends {React.Component}\n */\nclass SaveCloseButtons extends React.Component {\n constructor(props) {\n super(props);\n try {\n this.isIFrame = !props.newReact && window.self !== window.top;\n } catch (e) {\n this.isIFrame = !props.newReact;\n }\n }\n\n render() {\n const noTextOnButtons = this.props.noTextOnButtons;\n const buttonStyle = {\n borderRadius: this.props.theme.saveToolbar.button.borderRadius || 3,\n height: this.props.theme.saveToolbar.button.height || 32,\n };\n\n const style = {\n bottom: this.isIFrame ? 38 : 0,\n left: this.props.paddingLeft || 0,\n right: 0,\n position: 'absolute',\n background: this.props.theme.saveToolbar.background\n };\n if (this.props.dense) {\n style.minHeight = 48;\n }\n\n if (this.props.error) {\n buttonStyle.border = '1px solid red';\n }\n\n return \n this.props.onSave(false)}\n style={buttonStyle}\n >\n {!noTextOnButtons && I18n.t('ra_Save')}\n \n this.props.onSave(true)}\n style={Object.assign({}, buttonStyle, {marginLeft: 10})}>\n \n {!noTextOnButtons ? I18n.t('ra_Save and close') : '+'}\n {noTextOnButtons && }\n \n
\n this.props.onClose()} style={buttonStyle}>\n {!noTextOnButtons && I18n.t('ra_Close')}\n \n ;\n }\n}\n\nSaveCloseButtons.propTypes = {\n dense: PropTypes.bool,\n paddingLeft: PropTypes.number,\n noTextOnButtons: PropTypes.bool,\n theme: PropTypes.object,\n isIFrame: PropTypes.bool,\n changed: PropTypes.bool.isRequired,\n error: PropTypes.bool,\n onSave: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n newReact: PropTypes.bool,\n};\n\n/** @type {typeof SaveCloseButtons} */\nconst _export = withStyles(styles)(SaveCloseButtons);\nexport default _export;","/** @license React v17.0.2\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"object-assign\");var f=require(\"react\"),g=60103;exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h(\"react.element\");exports.Fragment=h(\"react.fragment\")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=\"\"+k);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z\"\n}), 'SettingsApplications');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"\n}), 'Photo');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm3.61 6.34c1.07 0 1.93.86 1.93 1.93 0 1.07-.86 1.93-1.93 1.93-1.07 0-1.93-.86-1.93-1.93-.01-1.07.86-1.93 1.93-1.93zm-6-1.58c1.3 0 2.36 1.06 2.36 2.36 0 1.3-1.06 2.36-2.36 2.36s-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36zm0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68zM11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09z\"\n}), 'SupervisedUserCircle');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'PersonOutlined');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.2 5.9l.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7zm-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1l.8-.8zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM8 18H6v-2h2v2zm3.5 0h-2v-2h2v2zm3.5 0h-2v-2h2v2z\"\n}), 'Router');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z\"\n}), 'Wifi');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\"\n}), 'Info');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z\"\n}), 'Description');\n\nexports.default = _default;","import React from 'react';\nimport PropTypes from 'prop-types';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nconst IconAlias = props => {\n return props.onClick && props.onClick(e)} viewBox=\"0 0 512 512\" width={props.width || 20} height={props.height || props.width || 20} xmlns=\"http://www.w3.org/2000/svg\" className={ props.className }>\n \n ;\n}\n\nIconAlias.propTypes = {\n onClick: PropTypes.func,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\n\nexport default IconAlias;","var unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nmodule.exports = _createForOfIteratorHelper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",null,null,"ace.define(\"ace/split\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/editor\",\"ace/virtual_renderer\",\"ace/edit_session\"], function(require, exports, module) {\n\"use strict\";\n\nvar oop = require(\"./lib/oop\");\nvar lang = require(\"./lib/lang\");\nvar EventEmitter = require(\"./lib/event_emitter\").EventEmitter;\n\nvar Editor = require(\"./editor\").Editor;\nvar Renderer = require(\"./virtual_renderer\").VirtualRenderer;\nvar EditSession = require(\"./edit_session\").EditSession;\n\n\nvar Split = function(container, theme, splits) {\n this.BELOW = 1;\n this.BESIDE = 0;\n\n this.$container = container;\n this.$theme = theme;\n this.$splits = 0;\n this.$editorCSS = \"\";\n this.$editors = [];\n this.$orientation = this.BESIDE;\n\n this.setSplits(splits || 1);\n this.$cEditor = this.$editors[0];\n\n\n this.on(\"focus\", function(editor) {\n this.$cEditor = editor;\n }.bind(this));\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$createEditor = function() {\n var el = document.createElement(\"div\");\n el.className = this.$editorCSS;\n el.style.cssText = \"position: absolute; top:0px; bottom:0px\";\n this.$container.appendChild(el);\n var editor = new Editor(new Renderer(el, this.$theme));\n\n editor.on(\"focus\", function() {\n this._emit(\"focus\", editor);\n }.bind(this));\n\n this.$editors.push(editor);\n editor.setFontSize(this.$fontSize);\n return editor;\n };\n\n this.setSplits = function(splits) {\n var editor;\n if (splits < 1) {\n throw \"The number of splits have to be > 0!\";\n }\n\n if (splits == this.$splits) {\n return;\n } else if (splits > this.$splits) {\n while (this.$splits < this.$editors.length && this.$splits < splits) {\n editor = this.$editors[this.$splits];\n this.$container.appendChild(editor.container);\n editor.setFontSize(this.$fontSize);\n this.$splits ++;\n }\n while (this.$splits < splits) {\n this.$createEditor();\n this.$splits ++;\n }\n } else {\n while (this.$splits > splits) {\n editor = this.$editors[this.$splits - 1];\n this.$container.removeChild(editor.container);\n this.$splits --;\n }\n }\n this.resize();\n };\n this.getSplits = function() {\n return this.$splits;\n };\n this.getEditor = function(idx) {\n return this.$editors[idx];\n };\n this.getCurrentEditor = function() {\n return this.$cEditor;\n };\n this.focus = function() {\n this.$cEditor.focus();\n };\n this.blur = function() {\n this.$cEditor.blur();\n };\n this.setTheme = function(theme) {\n this.$editors.forEach(function(editor) {\n editor.setTheme(theme);\n });\n };\n this.setKeyboardHandler = function(keybinding) {\n this.$editors.forEach(function(editor) {\n editor.setKeyboardHandler(keybinding);\n });\n };\n this.forEach = function(callback, scope) {\n this.$editors.forEach(callback, scope);\n };\n\n\n this.$fontSize = \"\";\n this.setFontSize = function(size) {\n this.$fontSize = size;\n this.forEach(function(editor) {\n editor.setFontSize(size);\n });\n };\n\n this.$cloneSession = function(session) {\n var s = new EditSession(session.getDocument(), session.getMode());\n\n var undoManager = session.getUndoManager();\n s.setUndoManager(undoManager);\n s.setTabSize(session.getTabSize());\n s.setUseSoftTabs(session.getUseSoftTabs());\n s.setOverwrite(session.getOverwrite());\n s.setBreakpoints(session.getBreakpoints());\n s.setUseWrapMode(session.getUseWrapMode());\n s.setUseWorker(session.getUseWorker());\n s.setWrapLimitRange(session.$wrapLimitRange.min,\n session.$wrapLimitRange.max);\n s.$foldData = session.$cloneFoldData();\n\n return s;\n };\n this.setSession = function(session, idx) {\n var editor;\n if (idx == null) {\n editor = this.$cEditor;\n } else {\n editor = this.$editors[idx];\n }\n var isUsed = this.$editors.some(function(editor) {\n return editor.session === session;\n });\n\n if (isUsed) {\n session = this.$cloneSession(session);\n }\n editor.setSession(session);\n return session;\n };\n this.getOrientation = function() {\n return this.$orientation;\n };\n this.setOrientation = function(orientation) {\n if (this.$orientation == orientation) {\n return;\n }\n this.$orientation = orientation;\n this.resize();\n };\n this.resize = function() {\n var width = this.$container.clientWidth;\n var height = this.$container.clientHeight;\n var editor;\n\n if (this.$orientation == this.BESIDE) {\n var editorWidth = width / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = editorWidth + \"px\";\n editor.container.style.top = \"0px\";\n editor.container.style.left = i * editorWidth + \"px\";\n editor.container.style.height = height + \"px\";\n editor.resize();\n }\n } else {\n var editorHeight = height / this.$splits;\n for (var i = 0; i < this.$splits; i++) {\n editor = this.$editors[i];\n editor.container.style.width = width + \"px\";\n editor.container.style.top = i * editorHeight + \"px\";\n editor.container.style.left = \"0px\";\n editor.container.style.height = editorHeight + \"px\";\n editor.resize();\n }\n }\n };\n\n}).call(Split.prototype);\n\nexports.Split = Split;\n});\n\nace.define(\"ace/ext/split\",[\"require\",\"exports\",\"module\",\"ace/split\"], function(require, exports, module) {\n\"use strict\";\nmodule.exports = require(\"../split\");\n\n}); (function() {\n ace.require([\"ace/ext/split\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n ","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * Diff Match and Patch\n * Copyright 2018 The diff-match-patch Authors.\n * https://github.com/google/diff-match-patch\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Computes the difference between two texts to create a patch.\n * Applies the patch onto another text, allowing for errors.\n * @author fraser@google.com (Neil Fraser)\n */\n\n/**\n * Class containing the diff, match and patch methods.\n * @constructor\n */\nvar diff_match_patch = function() {\n\n // Defaults.\n // Redefine these in your program to override the defaults.\n\n // Number of seconds to map a diff before giving up (0 for infinity).\n this.Diff_Timeout = 1.0;\n // Cost of an empty edit operation in terms of edit characters.\n this.Diff_EditCost = 4;\n // At what point is no match declared (0.0 = perfection, 1.0 = very loose).\n this.Match_Threshold = 0.5;\n // How far to search for a match (0 = exact location, 1000+ = broad match).\n // A match this many characters away from the expected location will add\n // 1.0 to the score (0.0 is a perfect match).\n this.Match_Distance = 1000;\n // When deleting a large block of text (over ~64 characters), how close do\n // the contents have to be to match the expected contents. (0.0 = perfection,\n // 1.0 = very loose). Note that Match_Threshold controls how closely the\n // end points of a delete need to match.\n this.Patch_DeleteThreshold = 0.5;\n // Chunk size for context length.\n this.Patch_Margin = 4;\n\n // The number of bits in an int.\n this.Match_MaxBits = 32;\n};\n\n\n// DIFF FUNCTIONS\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Class representing one diff tuple.\n * ~Attempts to look like a two-element array (which is what this used to be).~\n * Constructor returns an actual two-element array, to allow destructing @JackuB\n * See https://github.com/JackuB/diff-match-patch/issues/14 for details\n * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.\n * @param {string} text Text to be deleted, inserted, or retained.\n * @constructor\n */\ndiff_match_patch.Diff = function(op, text) {\n return [op, text];\n};\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean=} opt_checklines Optional speedup flag. If present and false,\n * then don't run a line-level diff first to identify the changed areas.\n * Defaults to true, which does a faster, slightly less optimal diff.\n * @param {number=} opt_deadline Optional time when the diff should be complete\n * by. Used internally for recursive calls. Users should set DiffTimeout\n * instead.\n * @return {!Array.} Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,\n opt_deadline) {\n // Set a deadline by which time the diff must be complete.\n if (typeof opt_deadline == 'undefined') {\n if (this.Diff_Timeout <= 0) {\n opt_deadline = Number.MAX_VALUE;\n } else {\n opt_deadline = (new Date).getTime() + this.Diff_Timeout * 1000;\n }\n }\n var deadline = opt_deadline;\n\n // Check for null inputs.\n if (text1 == null || text2 == null) {\n throw new Error('Null input. (diff_main)');\n }\n\n // Check for equality (speedup).\n if (text1 == text2) {\n if (text1) {\n return [new diff_match_patch.Diff(DIFF_EQUAL, text1)];\n }\n return [];\n }\n\n if (typeof opt_checklines == 'undefined') {\n opt_checklines = true;\n }\n var checklines = opt_checklines;\n\n // Trim off common prefix (speedup).\n var commonlength = this.diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = this.diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = this.diff_compute_(text1, text2, checklines, deadline);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, commonprefix));\n }\n if (commonsuffix) {\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, commonsuffix));\n }\n this.diff_cleanupMerge(diffs);\n return diffs;\n};\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {boolean} checklines Speedup flag. If false, then don't run a\n * line-level diff first to identify the changed areas.\n * If true, then run a faster, slightly less optimal diff.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,\n deadline) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [new diff_match_patch.Diff(DIFF_DELETE, text1)];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i != -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [new diff_match_patch.Diff(DIFF_INSERT, longtext.substring(0, i)),\n new diff_match_patch.Diff(DIFF_EQUAL, shorttext),\n new diff_match_patch.Diff(DIFF_INSERT,\n longtext.substring(i + shorttext.length))];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length == 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n }\n\n // Check to see if the problem can be split in two.\n var hm = this.diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = this.diff_main(text1_a, text2_a, checklines, deadline);\n var diffs_b = this.diff_main(text1_b, text2_b, checklines, deadline);\n // Merge the results.\n return diffs_a.concat([new diff_match_patch.Diff(DIFF_EQUAL, mid_common)],\n diffs_b);\n }\n\n if (checklines && text1.length > 100 && text2.length > 100) {\n return this.diff_lineMode_(text1, text2, deadline);\n }\n\n return this.diff_bisect_(text1, text2, deadline);\n};\n\n\n/**\n * Do a quick line-level diff on both strings, then rediff the parts for\n * greater accuracy.\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time when the diff should be complete by.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {\n // Scan the text on a line-by-line basis first.\n var a = this.diff_linesToChars_(text1, text2);\n text1 = a.chars1;\n text2 = a.chars2;\n var linearray = a.lineArray;\n\n var diffs = this.diff_main(text1, text2, false, deadline);\n\n // Convert the diff back to original text.\n this.diff_charsToLines_(diffs, linearray);\n // Eliminate freak matches (e.g. blank lines)\n this.diff_cleanupSemantic(diffs);\n\n // Rediff any replacement blocks, this time character-by-character.\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete >= 1 && count_insert >= 1) {\n // Delete the offending records and add the merged ones.\n diffs.splice(pointer - count_delete - count_insert,\n count_delete + count_insert);\n pointer = pointer - count_delete - count_insert;\n var subDiff =\n this.diff_main(text_delete, text_insert, false, deadline);\n for (var j = subDiff.length - 1; j >= 0; j--) {\n diffs.splice(pointer, 0, subDiff[j]);\n }\n pointer = pointer + subDiff.length;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n pointer++;\n }\n diffs.pop(); // Remove the dummy entry at the end.\n\n return diffs;\n};\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisect_ = function(text1, text2, deadline) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = (delta % 2 != 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Bail out if deadline is reached.\n if ((new Date()).getTime() > deadline) {\n break;\n }\n\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 == -d || (k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) == text2.charAt(y1)) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 == -d || (k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ==\n text2.charAt(text2_length - y2 - 1)) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [new diff_match_patch.Diff(DIFF_DELETE, text1),\n new diff_match_patch.Diff(DIFF_INSERT, text2)];\n};\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @param {number} deadline Time at which to bail if not yet complete.\n * @return {!Array.} Array of diff tuples.\n * @private\n */\ndiff_match_patch.prototype.diff_bisectSplit_ = function(text1, text2, x, y,\n deadline) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = this.diff_main(text1a, text2a, false, deadline);\n var diffsb = this.diff_main(text1b, text2b, false, deadline);\n\n return diffs.concat(diffsb);\n};\n\n\n/**\n * Split two texts into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {{chars1: string, chars2: string, lineArray: !Array.}}\n * An object containing the encoded text1, the encoded text2 and\n * the array of unique strings.\n * The zeroth element of the array of unique strings is intentionally blank.\n * @private\n */\ndiff_match_patch.prototype.diff_linesToChars_ = function(text1, text2) {\n var lineArray = []; // e.g. lineArray[4] == 'Hello\\n'\n var lineHash = {}; // e.g. lineHash['Hello\\n'] == 4\n\n // '\\x00' is a valid character, but various debuggers don't like it.\n // So we'll insert a junk entry to avoid generating a null character.\n lineArray[0] = '';\n\n /**\n * Split a text into an array of strings. Reduce the texts to a string of\n * hashes where each Unicode character represents one line.\n * Modifies linearray and linehash through being a closure.\n * @param {string} text String to encode.\n * @return {string} Encoded string.\n * @private\n */\n function diff_linesToCharsMunge_(text) {\n var chars = '';\n // Walk the text, pulling out a substring for each line.\n // text.split('\\n') would would temporarily double our memory footprint.\n // Modifying text would create many large strings to garbage collect.\n var lineStart = 0;\n var lineEnd = -1;\n // Keeping our own length variable is faster than looking it up.\n var lineArrayLength = lineArray.length;\n while (lineEnd < text.length - 1) {\n lineEnd = text.indexOf('\\n', lineStart);\n if (lineEnd == -1) {\n lineEnd = text.length - 1;\n }\n var line = text.substring(lineStart, lineEnd + 1);\n\n if (lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) :\n (lineHash[line] !== undefined)) {\n chars += String.fromCharCode(lineHash[line]);\n } else {\n if (lineArrayLength == maxLines) {\n // Bail out at 65535 because\n // String.fromCharCode(65536) == String.fromCharCode(0)\n line = text.substring(lineStart);\n lineEnd = text.length;\n }\n chars += String.fromCharCode(lineArrayLength);\n lineHash[line] = lineArrayLength;\n lineArray[lineArrayLength++] = line;\n }\n lineStart = lineEnd + 1;\n }\n return chars;\n }\n // Allocate 2/3rds of the space for text1, the rest for text2.\n var maxLines = 40000;\n var chars1 = diff_linesToCharsMunge_(text1);\n maxLines = 65535;\n var chars2 = diff_linesToCharsMunge_(text2);\n return {chars1: chars1, chars2: chars2, lineArray: lineArray};\n};\n\n\n/**\n * Rehydrate the text in a diff from a string of line hashes to real lines of\n * text.\n * @param {!Array.} diffs Array of diff tuples.\n * @param {!Array.} lineArray Array of unique strings.\n * @private\n */\ndiff_match_patch.prototype.diff_charsToLines_ = function(diffs, lineArray) {\n for (var i = 0; i < diffs.length; i++) {\n var chars = diffs[i][1];\n var text = [];\n for (var j = 0; j < chars.length; j++) {\n text[j] = lineArray[chars.charCodeAt(j)];\n }\n diffs[i][1] = text.join('');\n }\n};\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\ndiff_match_patch.prototype.diff_commonPrefix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\ndiff_match_patch.prototype.diff_commonSuffix = function(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 ||\n text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n return pointermid;\n};\n\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\ndiff_match_patch.prototype.diff_commonOverlap_ = function(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: https://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (found == 0 || text1.substring(text_length - length) ==\n text2.substring(0, length)) {\n best = length;\n length++;\n }\n }\n};\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n * @private\n */\ndiff_match_patch.prototype.diff_halfMatch_ = function(text1, text2) {\n if (this.Diff_Timeout <= 0) {\n // Don't risk returning a non-optimal diff if we have unlimited time.\n return null;\n }\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = '';\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) != -1) {\n var prefixLength = dmp.diff_commonPrefix(longtext.substring(i),\n shorttext.substring(j));\n var suffixLength = dmp.diff_commonSuffix(longtext.substring(0, i),\n shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(longtext, shorttext,\n Math.ceil(longtext.length / 2));\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n};\n\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = diffs[pointer][1];\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (lastEquality && (lastEquality.length <=\n Math.max(length_insertions1, length_deletions1)) &&\n (lastEquality.length <= Math.max(length_insertions2,\n length_deletions2))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastEquality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n this.diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = this.diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = this.diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n insertion.substring(0, overlap_length1)));\n diffs[pointer - 1][1] =\n deletion.substring(0, deletion.length - overlap_length1);\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n deletion.substring(0, overlap_length2)));\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] =\n insertion.substring(0, insertion.length - overlap_length2);\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] =\n deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n};\n\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupSemanticLossless = function(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(diff_match_patch.nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(diff_match_patch.nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 &&\n char1.match(diff_match_patch.whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 &&\n char2.match(diff_match_patch.whitespaceRegex_);\n var lineBreak1 = whitespace1 &&\n char1.match(diff_match_patch.linebreakRegex_);\n var lineBreak2 = whitespace2 &&\n char2.match(diff_match_patch.linebreakRegex_);\n var blankLine1 = lineBreak1 &&\n one.match(diff_match_patch.blanklineEndRegex_);\n var blankLine2 = lineBreak2 &&\n two.match(diff_match_patch.blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = this.diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score = diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n};\n\n// Define some regex patterns for matching boundaries.\ndiff_match_patch.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\ndiff_match_patch.whitespaceRegex_ = /\\s/;\ndiff_match_patch.linebreakRegex_ = /[\\r\\n]/;\ndiff_match_patch.blanklineEndRegex_ = /\\n\\r?\\n$/;\ndiff_match_patch.blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Reduce the number of edits by eliminating operationally trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupEfficiency = function(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastEquality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Is there an insertion operation before the last equality.\n var pre_ins = false;\n // Is there a deletion operation before the last equality.\n var pre_del = false;\n // Is there an insertion operation after the last equality.\n var post_ins = false;\n // Is there a deletion operation after the last equality.\n var post_del = false;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.\n if (diffs[pointer][1].length < this.Diff_EditCost &&\n (post_ins || post_del)) {\n // Candidate found.\n equalities[equalitiesLength++] = pointer;\n pre_ins = post_ins;\n pre_del = post_del;\n lastEquality = diffs[pointer][1];\n } else {\n // Not a candidate, and can never become one.\n equalitiesLength = 0;\n lastEquality = null;\n }\n post_ins = post_del = false;\n } else { // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_DELETE) {\n post_del = true;\n } else {\n post_ins = true;\n }\n /*\n * Five types to be split:\n * ABXYCD\n * AXCD\n * ABXC\n * AXCD\n * ABXC\n */\n if (lastEquality && ((pre_ins && pre_del && post_ins && post_del) ||\n ((lastEquality.length < this.Diff_EditCost / 2) &&\n (pre_ins + pre_del + post_ins + post_del) == 3))) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0,\n new diff_match_patch.Diff(DIFF_DELETE, lastEquality));\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n equalitiesLength--; // Throw away the equality we just deleted;\n lastEquality = null;\n if (pre_ins && pre_del) {\n // No changes made which could affect previous entry, keep going.\n post_ins = post_del = true;\n equalitiesLength = 0;\n } else {\n equalitiesLength--; // Throw away the previous equality.\n pointer = equalitiesLength > 0 ?\n equalities[equalitiesLength - 1] : -1;\n post_ins = post_del = false;\n }\n changes = true;\n }\n }\n pointer++;\n }\n\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {!Array.} diffs Array of diff tuples.\n */\ndiff_match_patch.prototype.diff_cleanupMerge = function(diffs) {\n // Add a dummy entry at the end.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, ''));\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = '';\n var text_insert = '';\n var commonlength;\n while (pointer < diffs.length) {\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n // Upon reaching an equality, check for prior redundancies.\n if (count_delete + count_insert > 1) {\n if (count_delete !== 0 && count_insert !== 0) {\n // Factor out any common prefixies.\n commonlength = this.diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if ((pointer - count_delete - count_insert) > 0 &&\n diffs[pointer - count_delete - count_insert - 1][0] ==\n DIFF_EQUAL) {\n diffs[pointer - count_delete - count_insert - 1][1] +=\n text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, new diff_match_patch.Diff(DIFF_EQUAL,\n text_insert.substring(0, commonlength)));\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixies.\n commonlength = this.diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] = text_insert.substring(text_insert.length -\n commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length -\n commonlength);\n text_delete = text_delete.substring(0, text_delete.length -\n commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n pointer -= count_delete + count_insert;\n diffs.splice(pointer, count_delete + count_insert);\n if (text_delete.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_DELETE, text_delete));\n pointer++;\n }\n if (text_insert.length) {\n diffs.splice(pointer, 0,\n new diff_match_patch.Diff(DIFF_INSERT, text_insert));\n pointer++;\n }\n pointer++;\n } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n this.diff_cleanupMerge(diffs);\n }\n};\n\n\n/**\n * loc is a location in text1, compute and return the equivalent location in\n * text2.\n * e.g. 'The cat' vs 'The big cat', 1->1, 5->8\n * @param {!Array.} diffs Array of diff tuples.\n * @param {number} loc Location within text1.\n * @return {number} Location within text2.\n */\ndiff_match_patch.prototype.diff_xIndex = function(diffs, loc) {\n var chars1 = 0;\n var chars2 = 0;\n var last_chars1 = 0;\n var last_chars2 = 0;\n var x;\n for (x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) { // Equality or deletion.\n chars1 += diffs[x][1].length;\n }\n if (diffs[x][0] !== DIFF_DELETE) { // Equality or insertion.\n chars2 += diffs[x][1].length;\n }\n if (chars1 > loc) { // Overshot the location.\n break;\n }\n last_chars1 = chars1;\n last_chars2 = chars2;\n }\n // Was the location was deleted?\n if (diffs.length != x && diffs[x][0] === DIFF_DELETE) {\n return last_chars2;\n }\n // Add the remaining character length.\n return last_chars2 + (loc - last_chars1);\n};\n\n\n/**\n * Convert a diff array into a pretty HTML report.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} HTML representation.\n */\ndiff_match_patch.prototype.diff_prettyHtml = function(diffs) {\n var html = [];\n var pattern_amp = /&/g;\n var pattern_lt = //g;\n var pattern_para = /\\n/g;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0]; // Operation (insert, delete, equal)\n var data = diffs[x][1]; // Text of change.\n var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')\n .replace(pattern_gt, '>').replace(pattern_para, '¶
');\n switch (op) {\n case DIFF_INSERT:\n html[x] = '' + text + '';\n break;\n case DIFF_DELETE:\n html[x] = '' + text + '';\n break;\n case DIFF_EQUAL:\n html[x] = '' + text + '';\n break;\n }\n }\n return html.join('');\n};\n\n\n/**\n * Compute and return the source text (all equalities and deletions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Source text.\n */\ndiff_match_patch.prototype.diff_text1 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_INSERT) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute and return the destination text (all equalities and insertions).\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Destination text.\n */\ndiff_match_patch.prototype.diff_text2 = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n if (diffs[x][0] !== DIFF_DELETE) {\n text[x] = diffs[x][1];\n }\n }\n return text.join('');\n};\n\n\n/**\n * Compute the Levenshtein distance; the number of inserted, deleted or\n * substituted characters.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {number} Number of changes.\n */\ndiff_match_patch.prototype.diff_levenshtein = function(diffs) {\n var levenshtein = 0;\n var insertions = 0;\n var deletions = 0;\n for (var x = 0; x < diffs.length; x++) {\n var op = diffs[x][0];\n var data = diffs[x][1];\n switch (op) {\n case DIFF_INSERT:\n insertions += data.length;\n break;\n case DIFF_DELETE:\n deletions += data.length;\n break;\n case DIFF_EQUAL:\n // A deletion and an insertion is one substitution.\n levenshtein += Math.max(insertions, deletions);\n insertions = 0;\n deletions = 0;\n break;\n }\n }\n levenshtein += Math.max(insertions, deletions);\n return levenshtein;\n};\n\n\n/**\n * Crush the diff into an encoded string which describes the operations\n * required to transform text1 into text2.\n * E.g. =3\\t-2\\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'.\n * Operations are tab-separated. Inserted text is escaped using %xx notation.\n * @param {!Array.} diffs Array of diff tuples.\n * @return {string} Delta text.\n */\ndiff_match_patch.prototype.diff_toDelta = function(diffs) {\n var text = [];\n for (var x = 0; x < diffs.length; x++) {\n switch (diffs[x][0]) {\n case DIFF_INSERT:\n text[x] = '+' + encodeURI(diffs[x][1]);\n break;\n case DIFF_DELETE:\n text[x] = '-' + diffs[x][1].length;\n break;\n case DIFF_EQUAL:\n text[x] = '=' + diffs[x][1].length;\n break;\n }\n }\n return text.join('\\t').replace(/%20/g, ' ');\n};\n\n\n/**\n * Given the original text1, and an encoded string which describes the\n * operations required to transform text1 into text2, compute the full diff.\n * @param {string} text1 Source string for the diff.\n * @param {string} delta Delta text.\n * @return {!Array.} Array of diff tuples.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.diff_fromDelta = function(text1, delta) {\n var diffs = [];\n var diffsLength = 0; // Keeping our own length var is faster in JS.\n var pointer = 0; // Cursor in text1\n var tokens = delta.split(/\\t/g);\n for (var x = 0; x < tokens.length; x++) {\n // Each token begins with a one character parameter which specifies the\n // operation of this token (delete, insert, equality).\n var param = tokens[x].substring(1);\n switch (tokens[x].charAt(0)) {\n case '+':\n try {\n diffs[diffsLength++] =\n new diff_match_patch.Diff(DIFF_INSERT, decodeURI(param));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in diff_fromDelta: ' + param);\n }\n break;\n case '-':\n // Fall through.\n case '=':\n var n = parseInt(param, 10);\n if (isNaN(n) || n < 0) {\n throw new Error('Invalid number in diff_fromDelta: ' + param);\n }\n var text = text1.substring(pointer, pointer += n);\n if (tokens[x].charAt(0) == '=') {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_EQUAL, text);\n } else {\n diffs[diffsLength++] = new diff_match_patch.Diff(DIFF_DELETE, text);\n }\n break;\n default:\n // Blank tokens are ok (from a trailing \\t).\n // Anything else is an error.\n if (tokens[x]) {\n throw new Error('Invalid diff operation in diff_fromDelta: ' +\n tokens[x]);\n }\n }\n }\n if (pointer != text1.length) {\n throw new Error('Delta length (' + pointer +\n ') does not equal source text length (' + text1.length + ').');\n }\n return diffs;\n};\n\n\n// MATCH FUNCTIONS\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc'.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n */\ndiff_match_patch.prototype.match_main = function(text, pattern, loc) {\n // Check for null inputs.\n if (text == null || pattern == null || loc == null) {\n throw new Error('Null input. (match_main)');\n }\n\n loc = Math.max(0, Math.min(loc, text.length));\n if (text == pattern) {\n // Shortcut (potentially not guaranteed by the algorithm)\n return 0;\n } else if (!text.length) {\n // Nothing to match.\n return -1;\n } else if (text.substring(loc, loc + pattern.length) == pattern) {\n // Perfect match at the perfect spot! (Includes case of null pattern)\n return loc;\n } else {\n // Do a fuzzy compare.\n return this.match_bitap_(text, pattern, loc);\n }\n};\n\n\n/**\n * Locate the best instance of 'pattern' in 'text' near 'loc' using the\n * Bitap algorithm.\n * @param {string} text The text to search.\n * @param {string} pattern The pattern to search for.\n * @param {number} loc The location to search around.\n * @return {number} Best match index or -1.\n * @private\n */\ndiff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {\n if (pattern.length > this.Match_MaxBits) {\n throw new Error('Pattern too long for this browser.');\n }\n\n // Initialise the alphabet.\n var s = this.match_alphabet_(pattern);\n\n var dmp = this; // 'this' becomes 'window' in a closure.\n\n /**\n * Compute and return the score for a match with e errors and x location.\n * Accesses loc and pattern through being a closure.\n * @param {number} e Number of errors in match.\n * @param {number} x Location of match.\n * @return {number} Overall score for match (0.0 = good, 1.0 = bad).\n * @private\n */\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length;\n var proximity = Math.abs(loc - x);\n if (!dmp.Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy;\n }\n return accuracy + (proximity / dmp.Match_Distance);\n }\n\n // Highest score beyond which we give up.\n var score_threshold = this.Match_Threshold;\n // Is there a nearby exact match? (speedup)\n var best_loc = text.indexOf(pattern, loc);\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length);\n if (best_loc != -1) {\n score_threshold =\n Math.min(match_bitapScore_(0, best_loc), score_threshold);\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1);\n best_loc = -1;\n\n var bin_min, bin_mid;\n var bin_max = pattern.length + text.length;\n var last_rd;\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0;\n bin_mid = bin_max;\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid;\n } else {\n bin_max = bin_mid;\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid;\n var start = Math.max(1, loc - bin_mid + 1);\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length;\n\n var rd = Array(finish + 2);\n rd[finish + 1] = (1 << d) - 1;\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)];\n if (d === 0) { // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;\n } else { // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) |\n (((last_rd[j + 1] | last_rd[j]) << 1) | 1) |\n last_rd[j + 1];\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1);\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score;\n best_loc = j - 1;\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc);\n } else {\n // Already passed loc, downhill from here on in.\n break;\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break;\n }\n last_rd = rd;\n }\n return best_loc;\n};\n\n\n/**\n * Initialise the alphabet for the Bitap algorithm.\n * @param {string} pattern The text to encode.\n * @return {!Object} Hash of character locations.\n * @private\n */\ndiff_match_patch.prototype.match_alphabet_ = function(pattern) {\n var s = {};\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] = 0;\n }\n for (var i = 0; i < pattern.length; i++) {\n s[pattern.charAt(i)] |= 1 << (pattern.length - i - 1);\n }\n return s;\n};\n\n\n// PATCH FUNCTIONS\n\n\n/**\n * Increase the context until it is unique,\n * but don't let the pattern expand beyond Match_MaxBits.\n * @param {!diff_match_patch.patch_obj} patch The patch to grow.\n * @param {string} text Source text.\n * @private\n */\ndiff_match_patch.prototype.patch_addContext_ = function(patch, text) {\n if (text.length == 0) {\n return;\n }\n if (patch.start2 === null) {\n throw Error('patch not initialized');\n }\n var pattern = text.substring(patch.start2, patch.start2 + patch.length1);\n var padding = 0;\n\n // Look for the first and last matches of pattern in text. If two different\n // matches are found, increase the pattern length.\n while (text.indexOf(pattern) != text.lastIndexOf(pattern) &&\n pattern.length < this.Match_MaxBits - this.Patch_Margin -\n this.Patch_Margin) {\n padding += this.Patch_Margin;\n pattern = text.substring(patch.start2 - padding,\n patch.start2 + patch.length1 + padding);\n }\n // Add one chunk for good luck.\n padding += this.Patch_Margin;\n\n // Add the prefix.\n var prefix = text.substring(patch.start2 - padding, patch.start2);\n if (prefix) {\n patch.diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, prefix));\n }\n // Add the suffix.\n var suffix = text.substring(patch.start2 + patch.length1,\n patch.start2 + patch.length1 + padding);\n if (suffix) {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, suffix));\n }\n\n // Roll back the start points.\n patch.start1 -= prefix.length;\n patch.start2 -= prefix.length;\n // Extend the lengths.\n patch.length1 += prefix.length + suffix.length;\n patch.length2 += prefix.length + suffix.length;\n};\n\n\n/**\n * Compute a list of patches to turn text1 into text2.\n * Use diffs if provided, otherwise compute it ourselves.\n * There are four ways to call this function, depending on what data is\n * available to the caller:\n * Method 1:\n * a = text1, b = text2\n * Method 2:\n * a = diffs\n * Method 3 (optimal):\n * a = text1, b = diffs\n * Method 4 (deprecated, use method 3):\n * a = text1, b = text2, c = diffs\n *\n * @param {string|!Array.} a text1 (methods 1,3,4) or\n * Array of diff tuples for text1 to text2 (method 2).\n * @param {string|!Array.=} opt_b text2 (methods 1,4) or\n * Array of diff tuples for text1 to text2 (method 3) or undefined (method 2).\n * @param {string|!Array.=} opt_c Array of diff tuples\n * for text1 to text2 (method 4) or undefined (methods 1,2,3).\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_make = function(a, opt_b, opt_c) {\n var text1, diffs;\n if (typeof a == 'string' && typeof opt_b == 'string' &&\n typeof opt_c == 'undefined') {\n // Method 1: text1, text2\n // Compute diffs from text1 and text2.\n text1 = /** @type {string} */(a);\n diffs = this.diff_main(text1, /** @type {string} */(opt_b), true);\n if (diffs.length > 2) {\n this.diff_cleanupSemantic(diffs);\n this.diff_cleanupEfficiency(diffs);\n }\n } else if (a && typeof a == 'object' && typeof opt_b == 'undefined' &&\n typeof opt_c == 'undefined') {\n // Method 2: diffs\n // Compute text1 from diffs.\n diffs = /** @type {!Array.} */(a);\n text1 = this.diff_text1(diffs);\n } else if (typeof a == 'string' && opt_b && typeof opt_b == 'object' &&\n typeof opt_c == 'undefined') {\n // Method 3: text1, diffs\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_b);\n } else if (typeof a == 'string' && typeof opt_b == 'string' &&\n opt_c && typeof opt_c == 'object') {\n // Method 4: text1, text2, diffs\n // text2 is not used.\n text1 = /** @type {string} */(a);\n diffs = /** @type {!Array.} */(opt_c);\n } else {\n throw new Error('Unknown call format to patch_make.');\n }\n\n if (diffs.length === 0) {\n return []; // Get rid of the null case.\n }\n var patches = [];\n var patch = new diff_match_patch.patch_obj();\n var patchDiffLength = 0; // Keeping our own length var is faster in JS.\n var char_count1 = 0; // Number of characters into the text1 string.\n var char_count2 = 0; // Number of characters into the text2 string.\n // Start with text1 (prepatch_text) and apply the diffs until we arrive at\n // text2 (postpatch_text). We recreate the patches one by one to determine\n // context info.\n var prepatch_text = text1;\n var postpatch_text = text1;\n for (var x = 0; x < diffs.length; x++) {\n var diff_type = diffs[x][0];\n var diff_text = diffs[x][1];\n\n if (!patchDiffLength && diff_type !== DIFF_EQUAL) {\n // A new patch starts here.\n patch.start1 = char_count1;\n patch.start2 = char_count2;\n }\n\n switch (diff_type) {\n case DIFF_INSERT:\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length2 += diff_text.length;\n postpatch_text = postpatch_text.substring(0, char_count2) + diff_text +\n postpatch_text.substring(char_count2);\n break;\n case DIFF_DELETE:\n patch.length1 += diff_text.length;\n patch.diffs[patchDiffLength++] = diffs[x];\n postpatch_text = postpatch_text.substring(0, char_count2) +\n postpatch_text.substring(char_count2 +\n diff_text.length);\n break;\n case DIFF_EQUAL:\n if (diff_text.length <= 2 * this.Patch_Margin &&\n patchDiffLength && diffs.length != x + 1) {\n // Small equality inside a patch.\n patch.diffs[patchDiffLength++] = diffs[x];\n patch.length1 += diff_text.length;\n patch.length2 += diff_text.length;\n } else if (diff_text.length >= 2 * this.Patch_Margin) {\n // Time for a new patch.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n patch = new diff_match_patch.patch_obj();\n patchDiffLength = 0;\n // Unlike Unidiff, our patch lists have a rolling context.\n // https://github.com/google/diff-match-patch/wiki/Unidiff\n // Update prepatch text & pos to reflect the application of the\n // just completed patch.\n prepatch_text = postpatch_text;\n char_count1 = char_count2;\n }\n }\n break;\n }\n\n // Update the current character count.\n if (diff_type !== DIFF_INSERT) {\n char_count1 += diff_text.length;\n }\n if (diff_type !== DIFF_DELETE) {\n char_count2 += diff_text.length;\n }\n }\n // Pick up the leftover patch if not empty.\n if (patchDiffLength) {\n this.patch_addContext_(patch, prepatch_text);\n patches.push(patch);\n }\n\n return patches;\n};\n\n\n/**\n * Given an array of patches, return another array that is identical.\n * @param {!Array.} patches Array of Patch objects.\n * @return {!Array.} Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_deepCopy = function(patches) {\n // Making deep copies is hard in JavaScript.\n var patchesCopy = [];\n for (var x = 0; x < patches.length; x++) {\n var patch = patches[x];\n var patchCopy = new diff_match_patch.patch_obj();\n patchCopy.diffs = [];\n for (var y = 0; y < patch.diffs.length; y++) {\n patchCopy.diffs[y] =\n new diff_match_patch.Diff(patch.diffs[y][0], patch.diffs[y][1]);\n }\n patchCopy.start1 = patch.start1;\n patchCopy.start2 = patch.start2;\n patchCopy.length1 = patch.length1;\n patchCopy.length2 = patch.length2;\n patchesCopy[x] = patchCopy;\n }\n return patchesCopy;\n};\n\n\n/**\n * Merge a set of patches onto the text. Return a patched text, as well\n * as a list of true/false values indicating which patches were applied.\n * @param {!Array.} patches Array of Patch objects.\n * @param {string} text Old text.\n * @return {!Array.>} Two element Array, containing the\n * new text and an array of boolean values.\n */\ndiff_match_patch.prototype.patch_apply = function(patches, text) {\n if (patches.length == 0) {\n return [text, []];\n }\n\n // Deep copy the patches so that no changes are made to originals.\n patches = this.patch_deepCopy(patches);\n\n var nullPadding = this.patch_addPadding(patches);\n text = nullPadding + text + nullPadding;\n\n this.patch_splitMax(patches);\n // delta keeps track of the offset between the expected and actual location\n // of the previous patch. If there are patches expected at positions 10 and\n // 20, but the first patch was found at 12, delta is 2 and the second patch\n // has an effective expected position of 22.\n var delta = 0;\n var results = [];\n for (var x = 0; x < patches.length; x++) {\n var expected_loc = patches[x].start2 + delta;\n var text1 = this.diff_text1(patches[x].diffs);\n var start_loc;\n var end_loc = -1;\n if (text1.length > this.Match_MaxBits) {\n // patch_splitMax will only provide an oversized pattern in the case of\n // a monster delete.\n start_loc = this.match_main(text, text1.substring(0, this.Match_MaxBits),\n expected_loc);\n if (start_loc != -1) {\n end_loc = this.match_main(text,\n text1.substring(text1.length - this.Match_MaxBits),\n expected_loc + text1.length - this.Match_MaxBits);\n if (end_loc == -1 || start_loc >= end_loc) {\n // Can't find valid trailing context. Drop this patch.\n start_loc = -1;\n }\n }\n } else {\n start_loc = this.match_main(text, text1, expected_loc);\n }\n if (start_loc == -1) {\n // No match found. :(\n results[x] = false;\n // Subtract the delta for this failed patch from subsequent patches.\n delta -= patches[x].length2 - patches[x].length1;\n } else {\n // Found a match. :)\n results[x] = true;\n delta = start_loc - expected_loc;\n var text2;\n if (end_loc == -1) {\n text2 = text.substring(start_loc, start_loc + text1.length);\n } else {\n text2 = text.substring(start_loc, end_loc + this.Match_MaxBits);\n }\n if (text1 == text2) {\n // Perfect match, just shove the replacement text in.\n text = text.substring(0, start_loc) +\n this.diff_text2(patches[x].diffs) +\n text.substring(start_loc + text1.length);\n } else {\n // Imperfect match. Run a diff to get a framework of equivalent\n // indices.\n var diffs = this.diff_main(text1, text2, false);\n if (text1.length > this.Match_MaxBits &&\n this.diff_levenshtein(diffs) / text1.length >\n this.Patch_DeleteThreshold) {\n // The end points match, but the content is unacceptably bad.\n results[x] = false;\n } else {\n this.diff_cleanupSemanticLossless(diffs);\n var index1 = 0;\n var index2;\n for (var y = 0; y < patches[x].diffs.length; y++) {\n var mod = patches[x].diffs[y];\n if (mod[0] !== DIFF_EQUAL) {\n index2 = this.diff_xIndex(diffs, index1);\n }\n if (mod[0] === DIFF_INSERT) { // Insertion\n text = text.substring(0, start_loc + index2) + mod[1] +\n text.substring(start_loc + index2);\n } else if (mod[0] === DIFF_DELETE) { // Deletion\n text = text.substring(0, start_loc + index2) +\n text.substring(start_loc + this.diff_xIndex(diffs,\n index1 + mod[1].length));\n }\n if (mod[0] !== DIFF_DELETE) {\n index1 += mod[1].length;\n }\n }\n }\n }\n }\n }\n // Strip the padding off.\n text = text.substring(nullPadding.length, text.length - nullPadding.length);\n return [text, results];\n};\n\n\n/**\n * Add some padding on text start and end so that edges can match something.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} The padding string added to each side.\n */\ndiff_match_patch.prototype.patch_addPadding = function(patches) {\n var paddingLength = this.Patch_Margin;\n var nullPadding = '';\n for (var x = 1; x <= paddingLength; x++) {\n nullPadding += String.fromCharCode(x);\n }\n\n // Bump all the patches forward.\n for (var x = 0; x < patches.length; x++) {\n patches[x].start1 += paddingLength;\n patches[x].start2 += paddingLength;\n }\n\n // Add some padding on start of first diff.\n var patch = patches[0];\n var diffs = patch.diffs;\n if (diffs.length == 0 || diffs[0][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.unshift(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.start1 -= paddingLength; // Should be 0.\n patch.start2 -= paddingLength; // Should be 0.\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[0][1].length) {\n // Grow first equality.\n var extraLength = paddingLength - diffs[0][1].length;\n diffs[0][1] = nullPadding.substring(diffs[0][1].length) + diffs[0][1];\n patch.start1 -= extraLength;\n patch.start2 -= extraLength;\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n // Add some padding on end of last diff.\n patch = patches[patches.length - 1];\n diffs = patch.diffs;\n if (diffs.length == 0 || diffs[diffs.length - 1][0] != DIFF_EQUAL) {\n // Add nullPadding equality.\n diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, nullPadding));\n patch.length1 += paddingLength;\n patch.length2 += paddingLength;\n } else if (paddingLength > diffs[diffs.length - 1][1].length) {\n // Grow last equality.\n var extraLength = paddingLength - diffs[diffs.length - 1][1].length;\n diffs[diffs.length - 1][1] += nullPadding.substring(0, extraLength);\n patch.length1 += extraLength;\n patch.length2 += extraLength;\n }\n\n return nullPadding;\n};\n\n\n/**\n * Look through the patches and break up any which are longer than the maximum\n * limit of the match algorithm.\n * Intended to be called only from within patch_apply.\n * @param {!Array.} patches Array of Patch objects.\n */\ndiff_match_patch.prototype.patch_splitMax = function(patches) {\n var patch_size = this.Match_MaxBits;\n for (var x = 0; x < patches.length; x++) {\n if (patches[x].length1 <= patch_size) {\n continue;\n }\n var bigpatch = patches[x];\n // Remove the big old patch.\n patches.splice(x--, 1);\n var start1 = bigpatch.start1;\n var start2 = bigpatch.start2;\n var precontext = '';\n while (bigpatch.diffs.length !== 0) {\n // Create one of several smaller patches.\n var patch = new diff_match_patch.patch_obj();\n var empty = true;\n patch.start1 = start1 - precontext.length;\n patch.start2 = start2 - precontext.length;\n if (precontext !== '') {\n patch.length1 = patch.length2 = precontext.length;\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, precontext));\n }\n while (bigpatch.diffs.length !== 0 &&\n patch.length1 < patch_size - this.Patch_Margin) {\n var diff_type = bigpatch.diffs[0][0];\n var diff_text = bigpatch.diffs[0][1];\n if (diff_type === DIFF_INSERT) {\n // Insertions are harmless.\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n patch.diffs.push(bigpatch.diffs.shift());\n empty = false;\n } else if (diff_type === DIFF_DELETE && patch.diffs.length == 1 &&\n patch.diffs[0][0] == DIFF_EQUAL &&\n diff_text.length > 2 * patch_size) {\n // This is a large deletion. Let it pass in one chunk.\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n empty = false;\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n bigpatch.diffs.shift();\n } else {\n // Deletion or equality. Only take as much as we can stomach.\n diff_text = diff_text.substring(0,\n patch_size - patch.length1 - this.Patch_Margin);\n patch.length1 += diff_text.length;\n start1 += diff_text.length;\n if (diff_type === DIFF_EQUAL) {\n patch.length2 += diff_text.length;\n start2 += diff_text.length;\n } else {\n empty = false;\n }\n patch.diffs.push(new diff_match_patch.Diff(diff_type, diff_text));\n if (diff_text == bigpatch.diffs[0][1]) {\n bigpatch.diffs.shift();\n } else {\n bigpatch.diffs[0][1] =\n bigpatch.diffs[0][1].substring(diff_text.length);\n }\n }\n }\n // Compute the head context for the next patch.\n precontext = this.diff_text2(patch.diffs);\n precontext =\n precontext.substring(precontext.length - this.Patch_Margin);\n // Append the end context for this patch.\n var postcontext = this.diff_text1(bigpatch.diffs)\n .substring(0, this.Patch_Margin);\n if (postcontext !== '') {\n patch.length1 += postcontext.length;\n patch.length2 += postcontext.length;\n if (patch.diffs.length !== 0 &&\n patch.diffs[patch.diffs.length - 1][0] === DIFF_EQUAL) {\n patch.diffs[patch.diffs.length - 1][1] += postcontext;\n } else {\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, postcontext));\n }\n }\n if (!empty) {\n patches.splice(++x, 0, patch);\n }\n }\n }\n};\n\n\n/**\n * Take a list of patches and return a textual representation.\n * @param {!Array.} patches Array of Patch objects.\n * @return {string} Text representation of patches.\n */\ndiff_match_patch.prototype.patch_toText = function(patches) {\n var text = [];\n for (var x = 0; x < patches.length; x++) {\n text[x] = patches[x];\n }\n return text.join('');\n};\n\n\n/**\n * Parse a textual representation of patches and return a list of Patch objects.\n * @param {string} textline Text representation of patches.\n * @return {!Array.} Array of Patch objects.\n * @throws {!Error} If invalid input.\n */\ndiff_match_patch.prototype.patch_fromText = function(textline) {\n var patches = [];\n if (!textline) {\n return patches;\n }\n var text = textline.split('\\n');\n var textPointer = 0;\n var patchHeader = /^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$/;\n while (textPointer < text.length) {\n var m = text[textPointer].match(patchHeader);\n if (!m) {\n throw new Error('Invalid patch string: ' + text[textPointer]);\n }\n var patch = new diff_match_patch.patch_obj();\n patches.push(patch);\n patch.start1 = parseInt(m[1], 10);\n if (m[2] === '') {\n patch.start1--;\n patch.length1 = 1;\n } else if (m[2] == '0') {\n patch.length1 = 0;\n } else {\n patch.start1--;\n patch.length1 = parseInt(m[2], 10);\n }\n\n patch.start2 = parseInt(m[3], 10);\n if (m[4] === '') {\n patch.start2--;\n patch.length2 = 1;\n } else if (m[4] == '0') {\n patch.length2 = 0;\n } else {\n patch.start2--;\n patch.length2 = parseInt(m[4], 10);\n }\n textPointer++;\n\n while (textPointer < text.length) {\n var sign = text[textPointer].charAt(0);\n try {\n var line = decodeURI(text[textPointer].substring(1));\n } catch (ex) {\n // Malformed URI sequence.\n throw new Error('Illegal escape in patch_fromText: ' + line);\n }\n if (sign == '-') {\n // Deletion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_DELETE, line));\n } else if (sign == '+') {\n // Insertion.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_INSERT, line));\n } else if (sign == ' ') {\n // Minor equality.\n patch.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL, line));\n } else if (sign == '@') {\n // Start of next patch.\n break;\n } else if (sign === '') {\n // Blank line? Whatever.\n } else {\n // WTF?\n throw new Error('Invalid patch mode \"' + sign + '\" in: ' + line);\n }\n textPointer++;\n }\n }\n return patches;\n};\n\n\n/**\n * Class representing one patch operation.\n * @constructor\n */\ndiff_match_patch.patch_obj = function() {\n /** @type {!Array.} */\n this.diffs = [];\n /** @type {?number} */\n this.start1 = null;\n /** @type {?number} */\n this.start2 = null;\n /** @type {number} */\n this.length1 = 0;\n /** @type {number} */\n this.length2 = 0;\n};\n\n\n/**\n * Emulate GNU diff's format.\n * Header: @@ -382,8 +481,9 @@\n * Indices are printed as 1-based, not 0-based.\n * @return {string} The GNU diff string.\n */\ndiff_match_patch.patch_obj.prototype.toString = function() {\n var coords1, coords2;\n if (this.length1 === 0) {\n coords1 = this.start1 + ',0';\n } else if (this.length1 == 1) {\n coords1 = this.start1 + 1;\n } else {\n coords1 = (this.start1 + 1) + ',' + this.length1;\n }\n if (this.length2 === 0) {\n coords2 = this.start2 + ',0';\n } else if (this.length2 == 1) {\n coords2 = this.start2 + 1;\n } else {\n coords2 = (this.start2 + 1) + ',' + this.length2;\n }\n var text = ['@@ -' + coords1 + ' +' + coords2 + ' @@\\n'];\n var op;\n // Escape the body of the patch with %xx notation.\n for (var x = 0; x < this.diffs.length; x++) {\n switch (this.diffs[x][0]) {\n case DIFF_INSERT:\n op = '+';\n break;\n case DIFF_DELETE:\n op = '-';\n break;\n case DIFF_EQUAL:\n op = ' ';\n break;\n }\n text[x + 1] = op + encodeURI(this.diffs[x][1]) + '\\n';\n }\n return text.join('').replace(/%20/g, ' ');\n};\n\n\n// The following export code was added by @ForbesLindesay\nmodule.exports = diff_match_patch;\nmodule.exports['diff_match_patch'] = diff_match_patch;\nmodule.exports['DIFF_DELETE'] = DIFF_DELETE;\nmodule.exports['DIFF_INSERT'] = DIFF_INSERT;\nmodule.exports['DIFF_EQUAL'] = DIFF_EQUAL;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","var purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","var deepPurple = {\n 50: '#ede7f6',\n 100: '#d1c4e9',\n 200: '#b39ddb',\n 300: '#9575cd',\n 400: '#7e57c2',\n 500: '#673ab7',\n 600: '#5e35b1',\n 700: '#512da8',\n 800: '#4527a0',\n 900: '#311b92',\n A100: '#b388ff',\n A200: '#7c4dff',\n A400: '#651fff',\n A700: '#6200ea'\n};\nexport default deepPurple;","var lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","var cyan = {\n 50: '#e0f7fa',\n 100: '#b2ebf2',\n 200: '#80deea',\n 300: '#4dd0e1',\n 400: '#26c6da',\n 500: '#00bcd4',\n 600: '#00acc1',\n 700: '#0097a7',\n 800: '#00838f',\n 900: '#006064',\n A100: '#84ffff',\n A200: '#18ffff',\n A400: '#00e5ff',\n A700: '#00b8d4'\n};\nexport default cyan;","var teal = {\n 50: '#e0f2f1',\n 100: '#b2dfdb',\n 200: '#80cbc4',\n 300: '#4db6ac',\n 400: '#26a69a',\n 500: '#009688',\n 600: '#00897b',\n 700: '#00796b',\n 800: '#00695c',\n 900: '#004d40',\n A100: '#a7ffeb',\n A200: '#64ffda',\n A400: '#1de9b6',\n A700: '#00bfa5'\n};\nexport default teal;","var lightGreen = {\n 50: '#f1f8e9',\n 100: '#dcedc8',\n 200: '#c5e1a5',\n 300: '#aed581',\n 400: '#9ccc65',\n 500: '#8bc34a',\n 600: '#7cb342',\n 700: '#689f38',\n 800: '#558b2f',\n 900: '#33691e',\n A100: '#ccff90',\n A200: '#b2ff59',\n A400: '#76ff03',\n A700: '#64dd17'\n};\nexport default lightGreen;","var lime = {\n 50: '#f9fbe7',\n 100: '#f0f4c3',\n 200: '#e6ee9c',\n 300: '#dce775',\n 400: '#d4e157',\n 500: '#cddc39',\n 600: '#c0ca33',\n 700: '#afb42b',\n 800: '#9e9d24',\n 900: '#827717',\n A100: '#f4ff81',\n A200: '#eeff41',\n A400: '#c6ff00',\n A700: '#aeea00'\n};\nexport default lime;","var yellow = {\n 50: '#fffde7',\n 100: '#fff9c4',\n 200: '#fff59d',\n 300: '#fff176',\n 400: '#ffee58',\n 500: '#ffeb3b',\n 600: '#fdd835',\n 700: '#fbc02d',\n 800: '#f9a825',\n 900: '#f57f17',\n A100: '#ffff8d',\n A200: '#ffff00',\n A400: '#ffea00',\n A700: '#ffd600'\n};\nexport default yellow;","var amber = {\n 50: '#fff8e1',\n 100: '#ffecb3',\n 200: '#ffe082',\n 300: '#ffd54f',\n 400: '#ffca28',\n 500: '#ffc107',\n 600: '#ffb300',\n 700: '#ffa000',\n 800: '#ff8f00',\n 900: '#ff6f00',\n A100: '#ffe57f',\n A200: '#ffd740',\n A400: '#ffc400',\n A700: '#ffab00'\n};\nexport default amber;","var deepOrange = {\n 50: '#fbe9e7',\n 100: '#ffccbc',\n 200: '#ffab91',\n 300: '#ff8a65',\n 400: '#ff7043',\n 500: '#ff5722',\n 600: '#f4511e',\n 700: '#e64a19',\n 800: '#d84315',\n 900: '#bf360c',\n A100: '#ff9e80',\n A200: '#ff6e40',\n A400: '#ff3d00',\n A700: '#dd2c00'\n};\nexport default deepOrange;","var brown = {\n 50: '#efebe9',\n 100: '#d7ccc8',\n 200: '#bcaaa4',\n 300: '#a1887f',\n 400: '#8d6e63',\n 500: '#795548',\n 600: '#6d4c41',\n 700: '#5d4037',\n 800: '#4e342e',\n 900: '#3e2723',\n A100: '#d7ccc8',\n A200: '#bcaaa4',\n A400: '#8d6e63',\n A700: '#5d4037'\n};\nexport default brown;","var blueGrey = {\n 50: '#eceff1',\n 100: '#cfd8dc',\n 200: '#b0bec5',\n 300: '#90a4ae',\n 400: '#78909c',\n 500: '#607d8b',\n 600: '#546e7a',\n 700: '#455a64',\n 800: '#37474f',\n 900: '#263238',\n A100: '#cfd8dc',\n A200: '#b0bec5',\n A400: '#78909c',\n A700: '#455a64'\n};\nexport default blueGrey;","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar AccordionContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n AccordionContext.displayName = 'AccordionContext';\n}\n\nexport default AccordionContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from './AccordionContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar Accordion = /*#__PURE__*/React.forwardRef(function Accordion(props, ref) {\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'Accordion',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(AccordionContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Accordion.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The Accordion doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the accordion by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the accordion will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the accordion.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordion'\n})(Accordion);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionActions'\n})(AccordionActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionDetails'\n})(AccordionDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from '../Accordion/AccordionContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused, &$focusVisible': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focused: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$IconButtonProp = props.IconButtonProps,\n IconButtonProps = _props$IconButtonProp === void 0 ? {} : _props$IconButtonProp,\n onClick = props.onClick,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"focusVisibleClassName\", \"IconButtonProps\", \"onClick\"]);\n\n var _React$useContext = React.useContext(AccordionContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded),\n focusVisibleClassName: clsx(classes.focusVisible, classes.focused, focusVisibleClassName),\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n // Guard against when generation of classes is disabled in the stylesheets (`disableGeneration`).\n // For `disableGeneration` we don't have an accurate warning but `disableGeneration` is an advanced use case anyway.\n if (props.classes.focused !== undefined && props.classes.focused.indexOf(' ') !== -1) {\n return new Error(['Material-UI: The `classes.focused` key is deprecated.', 'Use `classes.focusVisible` instead.', 'The name of the pseudo-class was changed for consistency.'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionSummary'\n})(AccordionSummary);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport Person from '../internal/svg-icons/Person';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 40,\n height: 40,\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(20),\n lineHeight: 1,\n borderRadius: '50%',\n overflow: 'hidden',\n userSelect: 'none'\n },\n\n /* Styles applied to the root element if not `src` or `srcSet`. */\n colorDefault: {\n color: theme.palette.background.default,\n backgroundColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `variant=\"circle\"`. */\n circle: {},\n\n /* Styles applied to the root element if `variant=\"circular\"`. */\n circular: {},\n\n /* Styles applied to the root element if `variant=\"rounded\"`. */\n rounded: {\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"square\"`. */\n square: {\n borderRadius: 0\n },\n\n /* Styles applied to the img element if either `src` or `srcSet` is defined. */\n img: {\n width: '100%',\n height: '100%',\n textAlign: 'center',\n // Handle non-square image. The property isn't supported by IE 11.\n objectFit: 'cover',\n // Hide alt text.\n color: 'transparent',\n // Hide the image broken icon, only works on Chrome.\n textIndent: 10000\n },\n\n /* Styles applied to the fallback icon */\n fallback: {\n width: '75%',\n height: '75%'\n }\n };\n};\n\nfunction useLoaded(_ref) {\n var src = _ref.src,\n srcSet = _ref.srcSet;\n\n var _React$useState = React.useState(false),\n loaded = _React$useState[0],\n setLoaded = _React$useState[1];\n\n React.useEffect(function () {\n if (!src && !srcSet) {\n return undefined;\n }\n\n setLoaded(false);\n var active = true;\n var image = new Image();\n image.src = src;\n image.srcSet = srcSet;\n\n image.onload = function () {\n if (!active) {\n return;\n }\n\n setLoaded('loaded');\n };\n\n image.onerror = function () {\n if (!active) {\n return;\n }\n\n setLoaded('error');\n };\n\n return function () {\n active = false;\n };\n }, [src, srcSet]);\n return loaded;\n}\n\nvar Avatar = /*#__PURE__*/React.forwardRef(function Avatar(props, ref) {\n var alt = props.alt,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n imgProps = props.imgProps,\n sizes = props.sizes,\n src = props.src,\n srcSet = props.srcSet,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circular' : _props$variant,\n other = _objectWithoutProperties(props, [\"alt\", \"children\", \"classes\", \"className\", \"component\", \"imgProps\", \"sizes\", \"src\", \"srcSet\", \"variant\"]);\n\n var children = null; // Use a hook instead of onError on the img element to support server-side rendering.\n\n var loaded = useLoaded({\n src: src,\n srcSet: srcSet\n });\n var hasImg = src || srcSet;\n var hasImgNotFailing = hasImg && loaded !== 'error';\n\n if (hasImgNotFailing) {\n children = /*#__PURE__*/React.createElement(\"img\", _extends({\n alt: alt,\n src: src,\n srcSet: srcSet,\n sizes: sizes,\n className: classes.img\n }, imgProps));\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n children = alt[0];\n } else {\n children = /*#__PURE__*/React.createElement(Person, {\n className: classes.fallback\n });\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes.system, classes[variant], className, !hasImgNotFailing && classes.colorDefault),\n ref: ref\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? Avatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Used in combination with `src` or `srcSet` to\n * provide an alt attribute for the rendered `img` element.\n */\n alt: PropTypes.string,\n\n /**\n * Used to render icon or text elements inside the Avatar if `src` is not set.\n * This can be an element, or just a string.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n var classes = props.classes;\n\n if (classes == null) {\n return null;\n }\n\n if (classes.circle != null && // 2 classnames? one from withStyles the other must be custom\n classes.circle.split(' ').length > 1) {\n throw new Error(\"Material-UI: The `circle` class is deprecated. Use `circular` instead.\");\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Attributes applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps: PropTypes.object,\n\n /**\n * The `sizes` attribute for the `img` element.\n */\n sizes: PropTypes.string,\n\n /**\n * The `src` attribute for the `img` element.\n */\n src: PropTypes.string,\n\n /**\n * The `srcSet` attribute for the `img` element.\n * Use this attribute for responsive image display.\n */\n srcSet: PropTypes.string,\n\n /**\n * The shape of the avatar.\n */\n variant: chainPropTypes(PropTypes.oneOf(['circle', 'circular', 'rounded', 'square']), function (props) {\n var variant = props.variant;\n\n if (variant === 'circle') {\n throw new Error('Material-UI: `variant=\"circle\"` is deprecated. Use `variant=\"circular\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAvatar'\n})(Avatar);","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar RADIUS_STANDARD = 10;\nvar RADIUS_DOT = 4;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'inline-flex',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n flexShrink: 0\n },\n\n /* Styles applied to the badge `span` element. */\n badge: {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n boxSizing: 'border-box',\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(12),\n minWidth: RADIUS_STANDARD * 2,\n lineHeight: 1,\n padding: '0 6px',\n height: RADIUS_STANDARD * 2,\n borderRadius: RADIUS_STANDARD,\n zIndex: 1,\n // Render the badge on top of potential ripples.\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.enteringScreen\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.error.contrastText\n },\n\n /* Styles applied to the root element if `variant=\"dot\"`. */\n dot: {\n borderRadius: RADIUS_DOT,\n height: RADIUS_DOT * 2,\n minWidth: RADIUS_DOT * 2,\n padding: 0\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginTopRightRectangle: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangular\"`. */\n anchorOriginTopRightRectangular: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginBottomRightRectangle: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangular\"`. */\n anchorOriginBottomRightRectangular: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginTopLeftRectangle: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangular\"`. */\n anchorOriginTopLeftRectangular: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginBottomLeftRectangle: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangular\"`. */\n anchorOriginBottomLeftRectangular: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circle\"`. */\n anchorOriginTopRightCircle: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circular\"`. */\n anchorOriginTopRightCircular: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circle\"`. */\n anchorOriginBottomRightCircle: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circular\"`. */\n anchorOriginBottomRightCircular: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circle\"`. */\n anchorOriginTopLeftCircle: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circular\"`. */\n anchorOriginTopLeftCircular: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circle\"`. */\n anchorOriginBottomLeftCircle: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circular\"`. */\n anchorOriginBottomLeftCircular: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Pseudo-class to the badge `span` element if `invisible={true}`. */\n invisible: {\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.leavingScreen\n })\n }\n };\n};\nvar Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {\n var _props$anchorOrigin = props.anchorOrigin,\n anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'top',\n horizontal: 'right'\n } : _props$anchorOrigin,\n badgeContent = props.badgeContent,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n ComponentProp = _props$component === void 0 ? 'span' : _props$component,\n invisibleProp = props.invisible,\n _props$max = props.max,\n max = _props$max === void 0 ? 99 : _props$max,\n _props$overlap = props.overlap,\n overlap = _props$overlap === void 0 ? 'rectangle' : _props$overlap,\n _props$showZero = props.showZero,\n showZero = _props$showZero === void 0 ? false : _props$showZero,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchorOrigin\", \"badgeContent\", \"children\", \"classes\", \"className\", \"color\", \"component\", \"invisible\", \"max\", \"overlap\", \"showZero\", \"variant\"]);\n\n var invisible = invisibleProp;\n\n if (invisibleProp == null && (badgeContent === 0 && !showZero || badgeContent == null && variant !== 'dot')) {\n invisible = true;\n }\n\n var displayValue = '';\n\n if (variant !== 'dot') {\n displayValue = badgeContent > max ? \"\".concat(max, \"+\") : badgeContent;\n }\n\n return /*#__PURE__*/React.createElement(ComponentProp, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), children, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.badge, classes[\"\".concat(anchorOrigin.horizontal).concat(capitalize(anchorOrigin.vertical), \"}\")], classes[\"anchorOrigin\".concat(capitalize(anchorOrigin.vertical)).concat(capitalize(anchorOrigin.horizontal)).concat(capitalize(overlap))], color !== 'default' && classes[\"color\".concat(capitalize(color))], invisible && classes.invisible, variant === 'dot' && classes.dot)\n }, displayValue));\n});\nprocess.env.NODE_ENV !== \"production\" ? Badge.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The anchor of the badge.\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'right']).isRequired,\n vertical: PropTypes.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The content rendered within the badge.\n */\n badgeContent: PropTypes.node,\n\n /**\n * The badge will be added relative to this node.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n var classes = props.classes;\n\n if (classes == null) {\n return null;\n }\n\n [['anchorOriginTopRightRectangle', 'anchorOriginTopRightRectangular'], ['anchorOriginBottomRightRectangle', 'anchorOriginBottomRightRectangular'], ['anchorOriginTopLeftRectangle', 'anchorOriginTopLeftRectangular'], ['anchorOriginBottomLeftRectangle', 'anchorOriginBottomLeftRectangular'], ['anchorOriginTopRightCircle', 'anchorOriginTopRightCircular'], ['anchorOriginBottomRightCircle', 'anchorOriginBottomRightCircular'], ['anchorOriginTopLeftCircle', 'anchorOriginTopLeftCircular']].forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n deprecatedClassKey = _ref2[0],\n newClassKey = _ref2[1];\n\n if (classes[deprecatedClassKey] != null && // 2 classnames? one from withStyles the other must be custom\n classes[deprecatedClassKey].split(' ').length > 1) {\n throw new Error(\"Material-UI: The `\".concat(deprecatedClassKey, \"` class was deprecated. Use `\").concat(newClassKey, \"` instead.\"));\n }\n });\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'error', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the badge will be invisible.\n */\n invisible: PropTypes.bool,\n\n /**\n * Max count to show.\n */\n max: PropTypes.number,\n\n /**\n * Wrapped shape the badge should overlap.\n */\n overlap: chainPropTypes(PropTypes.oneOf(['circle', 'rectangle', 'circular', 'rectangular']), function (props) {\n var overlap = props.overlap;\n\n if (overlap === 'rectangle') {\n throw new Error('Material-UI: `overlap=\"rectangle\"` was deprecated. Use `overlap=\"rectangular\"` instead.');\n }\n\n if (overlap === 'circle') {\n throw new Error('Material-UI: `overlap=\"circle\"` was deprecated. Use `overlap=\"circular\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Controls whether the badge is hidden when `badgeContent` is zero.\n */\n showZero: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['dot', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBadge'\n})(Badge);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n justifyContent: 'center',\n height: 56,\n backgroundColor: theme.palette.background.paper\n }\n };\n};\nvar BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n onChange = props.onChange,\n _props$showLabels = props.showLabels,\n showLabels = _props$showLabels === void 0 ? false : _props$showLabels,\n value = props.value,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"onChange\", \"showLabels\", \"value\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), React.Children.map(children, function (child, childIndex) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The BottomNavigation component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n return /*#__PURE__*/React.cloneElement(child, {\n selected: childValue === value,\n showLabel: child.props.showLabel !== undefined ? child.props.showLabel : showLabels,\n value: childValue,\n onChange: onChange\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? BottomNavigation.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback.\n * @param {any} value We default to the index of the child.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, all `BottomNavigationAction`s will show their labels.\n * By default, only the selected `BottomNavigationAction` will show its label.\n */\n showLabels: PropTypes.bool,\n\n /**\n * The value of the currently selected `BottomNavigationAction`.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBottomNavigation'\n})(BottomNavigation);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport unsupportedProp from '../utils/unsupportedProp';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n transition: theme.transitions.create(['color', 'padding-top'], {\n duration: theme.transitions.duration.short\n }),\n padding: '6px 12px 8px',\n minWidth: 80,\n maxWidth: 168,\n color: theme.palette.text.secondary,\n flex: '1',\n '&$iconOnly': {\n paddingTop: 16\n },\n '&$selected': {\n paddingTop: 6,\n color: theme.palette.primary.main\n }\n },\n\n /* Pseudo-class applied to the root element if selected. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `showLabel={false}` and not selected. */\n iconOnly: {},\n\n /* Styles applied to the span element that wraps the icon and label. */\n wrapper: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n flexDirection: 'column'\n },\n\n /* Styles applied to the label's span element. */\n label: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(12),\n opacity: 1,\n transition: 'font-size 0.2s, opacity 0.2s',\n transitionDelay: '0.1s',\n '&$iconOnly': {\n opacity: 0,\n transitionDelay: '0s'\n },\n '&$selected': {\n fontSize: theme.typography.pxToRem(14)\n }\n }\n };\n};\nvar BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavigationAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n icon = props.icon,\n label = props.label,\n onChange = props.onChange,\n onClick = props.onClick,\n selected = props.selected,\n showLabel = props.showLabel,\n value = props.value,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"icon\", \"label\", \"onChange\", \"onClick\", \"selected\", \"showLabel\", \"value\"]);\n\n var handleChange = function handleChange(event) {\n if (onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n ref: ref,\n className: clsx(classes.root, className, selected ? classes.selected : !showLabel && classes.iconOnly),\n focusRipple: true,\n onClick: handleChange\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.wrapper\n }, icon, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.label, selected ? classes.selected : !showLabel && classes.iconOnly)\n }, label)));\n});\nprocess.env.NODE_ENV !== \"production\" ? BottomNavigationAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon element.\n */\n icon: PropTypes.node,\n\n /**\n * The label element.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n selected: PropTypes.bool,\n\n /**\n * If `true`, the `BottomNavigationAction` will show its label.\n * By default, only the selected `BottomNavigationAction`\n * inside `BottomNavigation` will show its label.\n */\n showLabel: PropTypes.bool,\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBottomNavigationAction'\n})(BottomNavigationAction);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'MoreHoriz');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport { emphasize } from '../styles/colorManipulator';\nimport MoreHorizIcon from '../internal/svg-icons/MoreHoriz';\nimport ButtonBase from '../ButtonBase';\n\nvar styles = function styles(theme) {\n return {\n root: {\n display: 'flex',\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n backgroundColor: theme.palette.grey[100],\n color: theme.palette.grey[700],\n borderRadius: 2,\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: theme.palette.grey[200]\n },\n '&:active': {\n boxShadow: theme.shadows[0],\n backgroundColor: emphasize(theme.palette.grey[200], 0.12)\n }\n },\n icon: {\n width: 24,\n height: 16\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction BreadcrumbCollapsed(props) {\n var classes = props.classes,\n other = _objectWithoutProperties(props, [\"classes\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"li\",\n className: classes.root,\n focusRipple: true\n }, other), /*#__PURE__*/React.createElement(MoreHorizIcon, {\n className: classes.icon\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? BreadcrumbCollapsed.propTypes = {\n /**\n * @ignore\n */\n classes: PropTypes.object.isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateBreadcrumbCollapsed'\n})(BreadcrumbCollapsed);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport BreadcrumbCollapsed from './BreadcrumbCollapsed';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the ol element. */\n ol: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n padding: 0,\n margin: 0,\n listStyle: 'none'\n },\n\n /* Styles applied to the li element. */\n li: {},\n\n /* Styles applied to the separator element. */\n separator: {\n display: 'flex',\n userSelect: 'none',\n marginLeft: 8,\n marginRight: 8\n }\n};\n\nfunction insertSeparators(items, className, separator) {\n return items.reduce(function (acc, current, index) {\n if (index < items.length - 1) {\n acc = acc.concat(current, /*#__PURE__*/React.createElement(\"li\", {\n \"aria-hidden\": true,\n key: \"separator-\".concat(index),\n className: className\n }, separator));\n } else {\n acc.push(current);\n }\n\n return acc;\n }, []);\n}\n\nvar Breadcrumbs = /*#__PURE__*/React.forwardRef(function Breadcrumbs(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'nav' : _props$component,\n _props$expandText = props.expandText,\n expandText = _props$expandText === void 0 ? 'Show path' : _props$expandText,\n _props$itemsAfterColl = props.itemsAfterCollapse,\n itemsAfterCollapse = _props$itemsAfterColl === void 0 ? 1 : _props$itemsAfterColl,\n _props$itemsBeforeCol = props.itemsBeforeCollapse,\n itemsBeforeCollapse = _props$itemsBeforeCol === void 0 ? 1 : _props$itemsBeforeCol,\n _props$maxItems = props.maxItems,\n maxItems = _props$maxItems === void 0 ? 8 : _props$maxItems,\n _props$separator = props.separator,\n separator = _props$separator === void 0 ? '/' : _props$separator,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"expandText\", \"itemsAfterCollapse\", \"itemsBeforeCollapse\", \"maxItems\", \"separator\"]);\n\n var _React$useState = React.useState(false),\n expanded = _React$useState[0],\n setExpanded = _React$useState[1];\n\n var renderItemsBeforeAndAfter = function renderItemsBeforeAndAfter(allItems) {\n var handleClickExpand = function handleClickExpand(event) {\n setExpanded(true); // The clicked element received the focus but gets removed from the DOM.\n // Let's keep the focus in the component after expanding.\n\n var focusable = event.currentTarget.parentNode.querySelector('a[href],button,[tabindex]');\n\n if (focusable) {\n focusable.focus();\n }\n }; // This defends against someone passing weird input, to ensure that if all\n // items would be shown anyway, we just show all items without the EllipsisItem\n\n\n if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['Material-UI: You have provided an invalid combination of props to the Breadcrumbs.', \"itemsAfterCollapse={\".concat(itemsAfterCollapse, \"} + itemsBeforeCollapse={\").concat(itemsBeforeCollapse, \"} >= maxItems={\").concat(maxItems, \"}\")].join('\\n'));\n }\n\n return allItems;\n }\n\n return [].concat(_toConsumableArray(allItems.slice(0, itemsBeforeCollapse)), [/*#__PURE__*/React.createElement(BreadcrumbCollapsed, {\n \"aria-label\": expandText,\n key: \"ellipsis\",\n onClick: handleClickExpand\n })], _toConsumableArray(allItems.slice(allItems.length - itemsAfterCollapse, allItems.length)));\n };\n\n var allItems = React.Children.toArray(children).filter(function (child) {\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Breadcrumbs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.isValidElement(child);\n }).map(function (child, index) {\n return /*#__PURE__*/React.createElement(\"li\", {\n className: classes.li,\n key: \"child-\".concat(index)\n }, child);\n });\n return /*#__PURE__*/React.createElement(Typography, _extends({\n ref: ref,\n component: Component,\n color: \"textSecondary\",\n className: clsx(classes.root, className)\n }, other), /*#__PURE__*/React.createElement(\"ol\", {\n className: classes.ol\n }, insertSeparators(expanded || maxItems && allItems.length <= maxItems ? allItems : renderItemsBeforeAndAfter(allItems), classes.separator, separator)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Breadcrumbs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The breadcrumb children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default label for the expand button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n expandText: PropTypes.string,\n\n /**\n * If max items is exceeded, the number of items to show after the ellipsis.\n */\n itemsAfterCollapse: PropTypes.number,\n\n /**\n * If max items is exceeded, the number of items to show before the ellipsis.\n */\n itemsBeforeCollapse: PropTypes.number,\n\n /**\n * Specifies the maximum number of breadcrumbs to display. When there are more\n * than the maximum number, only the first `itemsBeforeCollapse` and last `itemsAfterCollapse`\n * will be shown, with an ellipsis in between.\n */\n maxItems: PropTypes.number,\n\n /**\n * Custom separator node.\n */\n separator: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiBreadcrumbs'\n})(Breadcrumbs);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport { alpha } from '../styles/colorManipulator';\nimport withStyles from '../styles/withStyles';\nimport Button from '../Button'; // Force a side effect so we don't have any override priority issue.\n// eslint-disable-next-line no-unused-expressions\n\nButton.styles;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n boxShadow: theme.shadows[2]\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none'\n },\n\n /* Pseudo-class applied to child elements if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the children. */\n grouped: {\n minWidth: 40\n },\n\n /* Styles applied to the children if `orientation=\"horizontal\"`. */\n groupedHorizontal: {\n '&:not(:first-child)': {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n }\n },\n\n /* Styles applied to the children if `orientation=\"vertical\"`. */\n groupedVertical: {\n '&:not(:first-child)': {\n borderTopRightRadius: 0,\n borderTopLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"`. */\n groupedText: {},\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"horizontal\"`. */\n groupedTextHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"vertical\"`. */\n groupedTextVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"primary\"`. */\n groupedTextPrimary: {\n '&:not(:last-child)': {\n borderColor: alpha(theme.palette.primary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"secondary\"`. */\n groupedTextSecondary: {\n '&:not(:last-child)': {\n borderColor: alpha(theme.palette.secondary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"`. */\n groupedOutlined: {},\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"horizontal\"`. */\n groupedOutlinedHorizontal: {\n '&:not(:first-child)': {\n marginLeft: -1\n },\n '&:not(:last-child)': {\n borderRightColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"vertical\"`. */\n groupedOutlinedVertical: {\n '&:not(:first-child)': {\n marginTop: -1\n },\n '&:not(:last-child)': {\n borderBottomColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"primary\"`. */\n groupedOutlinedPrimary: {\n '&:hover': {\n borderColor: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"secondary\"`. */\n groupedOutlinedSecondary: {\n '&:hover': {\n borderColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"`. */\n groupedContained: {\n boxShadow: 'none'\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"horizontal\"`. */\n groupedContainedHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderRight: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"vertical\"`. */\n groupedContainedVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderBottom: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"primary\"`. */\n groupedContainedPrimary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.primary.dark\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"secondary\"`. */\n groupedContainedSecondary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.secondary.dark\n }\n }\n };\n};\nvar ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'outlined' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"disableRipple\", \"fullWidth\", \"orientation\", \"size\", \"variant\"]);\n\n var buttonClassName = clsx(classes.grouped, classes[\"grouped\".concat(capitalize(orientation))], classes[\"grouped\".concat(capitalize(variant))], classes[\"grouped\".concat(capitalize(variant)).concat(capitalize(orientation))], classes[\"grouped\".concat(capitalize(variant)).concat(color !== 'default' ? capitalize(color) : '')], disabled && classes.disabled);\n return /*#__PURE__*/React.createElement(Component, _extends({\n role: \"group\",\n className: clsx(classes.root, className, fullWidth && classes.fullWidth, disableElevation && classes.disableElevation, variant === 'contained' && classes.contained, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The ButtonGroup component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.cloneElement(child, {\n className: clsx(buttonClassName, child.props.className),\n color: child.props.color || color,\n disabled: child.props.disabled || disabled,\n disableElevation: child.props.disableElevation || disableElevation,\n disableFocusRipple: disableFocusRipple,\n disableRipple: disableRipple,\n fullWidth: fullWidth,\n size: child.props.size || size,\n variant: child.props.variant || variant\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ButtonGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button group.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the buttons will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the button keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the button ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If `true`, the buttons will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The group orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButtonGroup'\n})(ButtonGroup);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden'\n }\n};\nvar Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$raised = props.raised,\n raised = _props$raised === void 0 ? false : _props$raised,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"raised\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className),\n elevation: raised ? 8 : 1,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Card.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the card will use raised styling.\n */\n raised: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCard'\n})(Card);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n textAlign: 'inherit',\n width: '100%',\n '&:hover $focusHighlight': {\n opacity: theme.palette.action.hoverOpacity\n },\n '&$focusVisible $focusHighlight': {\n opacity: 0.12\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the action area is keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the overlay that covers the action area when it is keyboard focused. */\n focusHighlight: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n opacity: 0,\n backgroundColor: 'currentcolor',\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.short\n })\n }\n };\n};\nvar CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n focusVisibleClassName = props.focusVisibleClassName,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"focusVisibleClassName\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className),\n focusVisibleClassName: clsx(focusVisibleClassName, classes.focusVisible),\n ref: ref\n }, other), children, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.focusHighlight\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActionArea.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActionArea'\n})(CardActionArea);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar CardActions = /*#__PURE__*/React.forwardRef(function CardActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActions'\n})(CardActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n padding: 16,\n '&:last-child': {\n paddingBottom: 24\n }\n }\n};\nvar CardContent = /*#__PURE__*/React.forwardRef(function CardContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardContent'\n})(CardContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 16\n },\n\n /* Styles applied to the avatar element. */\n avatar: {\n flex: '0 0 auto',\n marginRight: 16\n },\n\n /* Styles applied to the action element. */\n action: {\n flex: '0 0 auto',\n alignSelf: 'flex-start',\n marginTop: -8,\n marginRight: -8\n },\n\n /* Styles applied to the content wrapper element. */\n content: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the title Typography element. */\n title: {},\n\n /* Styles applied to the subheader Typography element. */\n subheader: {}\n};\nvar CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader(props, ref) {\n var action = props.action,\n avatar = props.avatar,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n subheaderProp = props.subheader,\n subheaderTypographyProps = props.subheaderTypographyProps,\n titleProp = props.title,\n titleTypographyProps = props.titleTypographyProps,\n other = _objectWithoutProperties(props, [\"action\", \"avatar\", \"classes\", \"className\", \"component\", \"disableTypography\", \"subheader\", \"subheaderTypographyProps\", \"title\", \"titleTypographyProps\"]);\n\n var title = titleProp;\n\n if (title != null && title.type !== Typography && !disableTypography) {\n title = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: avatar ? 'body2' : 'h5',\n className: classes.title,\n component: \"span\",\n display: \"block\"\n }, titleTypographyProps), title);\n }\n\n var subheader = subheaderProp;\n\n if (subheader != null && subheader.type !== Typography && !disableTypography) {\n subheader = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: avatar ? 'body2' : 'body1',\n className: classes.subheader,\n color: \"textSecondary\",\n component: \"span\",\n display: \"block\"\n }, subheaderTypographyProps), subheader);\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), avatar && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.avatar\n }, avatar), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.content\n }, title, subheader), action && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.action\n }, action));\n});\nprocess.env.NODE_ENV !== \"production\" ? CardHeader.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display in the card header.\n */\n action: PropTypes.node,\n\n /**\n * The Avatar for the Card Header.\n */\n avatar: PropTypes.node,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, `subheader` and `title` won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `title` text, and optional `subheader` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n subheader: PropTypes.node,\n\n /**\n * These props will be forwarded to the subheader\n * (as long as disableTypography is not `true`).\n */\n subheaderTypographyProps: PropTypes.object,\n\n /**\n * The content of the Card Title.\n */\n title: PropTypes.node,\n\n /**\n * These props will be forwarded to the title\n * (as long as disableTypography is not `true`).\n */\n titleTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardHeader'\n})(CardHeader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { chainPropTypes } from '@material-ui/utils';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'center'\n },\n\n /* Styles applied to the root element if `component=\"video, audio, picture, iframe, or img\"`. */\n media: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `component=\"picture or img\"`. */\n img: {\n // ⚠️ object-fit is not supported by IE 11.\n objectFit: 'cover'\n }\n};\nvar MEDIA_COMPONENTS = ['video', 'audio', 'picture', 'iframe', 'img'];\nvar CardMedia = /*#__PURE__*/React.forwardRef(function CardMedia(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n image = props.image,\n src = props.src,\n style = props.style,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"image\", \"src\", \"style\"]);\n\n var isMediaComponent = MEDIA_COMPONENTS.indexOf(Component) !== -1;\n var composedStyle = !isMediaComponent && image ? _extends({\n backgroundImage: \"url(\\\"\".concat(image, \"\\\")\")\n }, style) : style;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, isMediaComponent && classes.media, \"picture img\".indexOf(Component) !== -1 && classes.img),\n ref: ref,\n style: composedStyle,\n src: isMediaComponent ? image || src : undefined\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? CardMedia.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n if (!props.children && !props.image && !props.src && !props.component) {\n return new Error('Material-UI: Either `children`, `image`, `src` or `component` prop must be specified.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Image to be displayed as a background image.\n * Either `image` or `src` prop must be specified.\n * Note that caller must specify height otherwise the image will not be visible.\n */\n image: PropTypes.string,\n\n /**\n * An alias for `image` property.\n * Available only with media components.\n * Media components: `video`, `audio`, `picture`, `iframe`, `img`.\n */\n src: PropTypes.string,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardMedia'\n})(CardMedia);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport CancelIcon from '../internal/svg-icons/Cancel';\nimport withStyles from '../styles/withStyles';\nimport { emphasize, alpha } from '../styles/colorManipulator';\nimport useForkRef from '../utils/useForkRef';\nimport unsupportedProp from '../utils/unsupportedProp';\nimport capitalize from '../utils/capitalize';\nimport ButtonBase from '../ButtonBase';\nexport var styles = function styles(theme) {\n var backgroundColor = theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700];\n var deleteIconColor = alpha(theme.palette.text.primary, 0.26);\n return {\n /* Styles applied to the root element. */\n root: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(13),\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32,\n color: theme.palette.getContrastText(backgroundColor),\n backgroundColor: backgroundColor,\n borderRadius: 32 / 2,\n whiteSpace: 'nowrap',\n transition: theme.transitions.create(['background-color', 'box-shadow']),\n // label will inherit this from root, then `clickable` class overrides this for both\n cursor: 'default',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n textDecoration: 'none',\n border: 'none',\n // Remove `button` border\n padding: 0,\n // Remove `button` padding\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n '&$disabled': {\n opacity: 0.5,\n pointerEvents: 'none'\n },\n '& $avatar': {\n marginLeft: 5,\n marginRight: -6,\n width: 24,\n height: 24,\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n fontSize: theme.typography.pxToRem(12)\n },\n '& $avatarColorPrimary': {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.dark\n },\n '& $avatarColorSecondary': {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.dark\n },\n '& $avatarSmall': {\n marginLeft: 4,\n marginRight: -4,\n width: 18,\n height: 18,\n fontSize: theme.typography.pxToRem(10)\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n height: 24\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */\n clickable: {\n userSelect: 'none',\n WebkitTapHighlightColor: 'transparent',\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: emphasize(backgroundColor, 0.08)\n },\n '&:active': {\n boxShadow: theme.shadows[1]\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"primary\"` is defined or `clickable={true}`. */\n clickableColorPrimary: {\n '&:hover, &:focus': {\n backgroundColor: emphasize(theme.palette.primary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"secondary\"` is defined or `clickable={true}`. */\n clickableColorSecondary: {\n '&:hover, &:focus': {\n backgroundColor: emphasize(theme.palette.secondary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` is defined. */\n deletable: {\n '&:focus': {\n backgroundColor: emphasize(backgroundColor, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"primary\"` is defined. */\n deletableColorPrimary: {\n '&:focus': {\n backgroundColor: emphasize(theme.palette.primary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"secondary\"` is defined. */\n deletableColorSecondary: {\n '&:focus': {\n backgroundColor: emphasize(theme.palette.secondary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n backgroundColor: 'transparent',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity)\n },\n '& $avatar': {\n marginLeft: 4\n },\n '& $avatarSmall': {\n marginLeft: 2\n },\n '& $icon': {\n marginLeft: 4\n },\n '& $iconSmall': {\n marginLeft: 2\n },\n '& $deleteIcon': {\n marginRight: 5\n },\n '& $deleteIconSmall': {\n marginRight: 3\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(theme.palette.primary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(theme.palette.secondary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity)\n }\n },\n // TODO v5: remove\n\n /* Styles applied to the `avatar` element. */\n avatar: {},\n\n /* Styles applied to the `avatar` element if `size=\"small\"`. */\n avatarSmall: {},\n\n /* Styles applied to the `avatar` element if `color=\"primary\"`. */\n avatarColorPrimary: {},\n\n /* Styles applied to the `avatar` element if `color=\"secondary\"`. */\n avatarColorSecondary: {},\n\n /* Styles applied to the `icon` element. */\n icon: {\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n marginLeft: 5,\n marginRight: -6\n },\n\n /* Styles applied to the `icon` element if `size=\"small\"`. */\n iconSmall: {\n width: 18,\n height: 18,\n marginLeft: 4,\n marginRight: -4\n },\n\n /* Styles applied to the `icon` element if `color=\"primary\"`. */\n iconColorPrimary: {\n color: 'inherit'\n },\n\n /* Styles applied to the `icon` element if `color=\"secondary\"`. */\n iconColorSecondary: {\n color: 'inherit'\n },\n\n /* Styles applied to the label `span` element. */\n label: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingLeft: 12,\n paddingRight: 12,\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the label `span` element if `size=\"small\"`. */\n labelSmall: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the `deleteIcon` element. */\n deleteIcon: {\n WebkitTapHighlightColor: 'transparent',\n color: deleteIconColor,\n height: 22,\n width: 22,\n cursor: 'pointer',\n margin: '0 5px 0 -6px',\n '&:hover': {\n color: alpha(deleteIconColor, 0.4)\n }\n },\n\n /* Styles applied to the `deleteIcon` element if `size=\"small\"`. */\n deleteIconSmall: {\n height: 16,\n width: 16,\n marginRight: 4,\n marginLeft: -4\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"default\"`. */\n deleteIconColorPrimary: {\n color: alpha(theme.palette.primary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"default\"`. */\n deleteIconColorSecondary: {\n color: alpha(theme.palette.secondary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorPrimary: {\n color: alpha(theme.palette.primary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorSecondary: {\n color: alpha(theme.palette.secondary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.main\n }\n }\n };\n};\n\nfunction isDeleteKeyboardEvent(keyboardEvent) {\n return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';\n}\n/**\n * Chips represent complex entities in small blocks, such as a contact.\n */\n\n\nvar Chip = /*#__PURE__*/React.forwardRef(function Chip(props, ref) {\n var avatarProp = props.avatar,\n classes = props.classes,\n className = props.className,\n clickableProp = props.clickable,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n ComponentProp = props.component,\n deleteIconProp = props.deleteIcon,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n iconProp = props.icon,\n label = props.label,\n onClick = props.onClick,\n onDelete = props.onDelete,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'default' : _props$variant,\n other = _objectWithoutProperties(props, [\"avatar\", \"classes\", \"className\", \"clickable\", \"color\", \"component\", \"deleteIcon\", \"disabled\", \"icon\", \"label\", \"onClick\", \"onDelete\", \"onKeyDown\", \"onKeyUp\", \"size\", \"variant\"]);\n\n var chipRef = React.useRef(null);\n var handleRef = useForkRef(chipRef, ref);\n\n var handleDeleteIconClick = function handleDeleteIconClick(event) {\n // Stop the event from bubbling up to the `Chip`\n event.stopPropagation();\n\n if (onDelete) {\n onDelete(event);\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {\n // will be handled in keyUp, otherwise some browsers\n // might init navigation\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n var handleKeyUp = function handleKeyUp(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target) {\n if (onDelete && isDeleteKeyboardEvent(event)) {\n onDelete(event);\n } else if (event.key === 'Escape' && chipRef.current) {\n chipRef.current.blur();\n }\n }\n\n if (onKeyUp) {\n onKeyUp(event);\n }\n };\n\n var clickable = clickableProp !== false && onClick ? true : clickableProp;\n var small = size === 'small';\n var Component = ComponentProp || (clickable ? ButtonBase : 'div');\n var moreProps = Component === ButtonBase ? {\n component: 'div'\n } : {};\n var deleteIcon = null;\n\n if (onDelete) {\n var customClasses = clsx(color !== 'default' && (variant === \"default\" ? classes[\"deleteIconColor\".concat(capitalize(color))] : classes[\"deleteIconOutlinedColor\".concat(capitalize(color))]), small && classes.deleteIconSmall);\n deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? /*#__PURE__*/React.cloneElement(deleteIconProp, {\n className: clsx(deleteIconProp.props.className, classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n }) : /*#__PURE__*/React.createElement(CancelIcon, {\n className: clsx(classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n });\n }\n\n var avatar = null;\n\n if (avatarProp && /*#__PURE__*/React.isValidElement(avatarProp)) {\n avatar = /*#__PURE__*/React.cloneElement(avatarProp, {\n className: clsx(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes[\"avatarColor\".concat(capitalize(color))])\n });\n }\n\n var icon = null;\n\n if (iconProp && /*#__PURE__*/React.isValidElement(iconProp)) {\n icon = /*#__PURE__*/React.cloneElement(iconProp, {\n className: clsx(classes.icon, iconProp.props.className, small && classes.iconSmall, color !== 'default' && classes[\"iconColor\".concat(capitalize(color))])\n });\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (avatar && icon) {\n console.error('Material-UI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n role: clickable || onDelete ? 'button' : undefined,\n className: clsx(classes.root, className, color !== 'default' && [classes[\"color\".concat(capitalize(color))], clickable && classes[\"clickableColor\".concat(capitalize(color))], onDelete && classes[\"deletableColor\".concat(capitalize(color))]], variant !== \"default\" && [classes.outlined, {\n 'primary': classes.outlinedPrimary,\n 'secondary': classes.outlinedSecondary\n }[color]], disabled && classes.disabled, small && classes.sizeSmall, clickable && classes.clickable, onDelete && classes.deletable),\n \"aria-disabled\": disabled ? true : undefined,\n tabIndex: clickable || onDelete ? 0 : undefined,\n onClick: onClick,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n ref: handleRef\n }, moreProps, other), avatar || icon, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.label, small && classes.labelSmall)\n }, label), deleteIcon);\n});\nprocess.env.NODE_ENV !== \"production\" ? Chip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Avatar element.\n */\n avatar: PropTypes.element,\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the chip will appear clickable, and will raise when pressed,\n * even if the onClick prop is not defined.\n * If false, the chip will not be clickable, even if onClick prop is defined.\n * This can be used, for example,\n * along with the component prop to indicate an anchor Chip is clickable.\n */\n clickable: PropTypes.bool,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default delete icon element. Shown only if `onDelete` is set.\n */\n deleteIcon: PropTypes.element,\n\n /**\n * If `true`, the chip should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * Icon element.\n */\n icon: PropTypes.element,\n\n /**\n * The content of the label.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * Callback function fired when the delete icon is clicked.\n * If set, the delete icon will be shown.\n */\n onDelete: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The size of the chip.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['default', 'outlined'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiChip'\n})(Chip);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar SIZE = 44;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-block'\n },\n\n /* Styles applied to the root element if `variant=\"static\"`. */\n static: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {\n animation: '$circular-rotate 1.4s linear infinite'\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the `svg` element. */\n svg: {\n display: 'block' // Keeps the progress centered\n\n },\n\n /* Styles applied to the `circle` svg path. */\n circle: {\n stroke: 'currentColor' // Use butt to follow the specification, by chance, it's already the default CSS value.\n // strokeLinecap: 'butt',\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"static\"`. */\n circleStatic: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"indeterminate\"`. */\n circleIndeterminate: {\n animation: '$circular-dash 1.4s ease-in-out infinite',\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: '0px' // Add the unit to fix a Edge 16 and below bug.\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"determinate\"`. */\n circleDeterminate: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n '@keyframes circular-rotate': {\n '0%': {\n // Fix IE 11 wobbly\n transformOrigin: '50% 50%'\n },\n '100%': {\n transform: 'rotate(360deg)'\n }\n },\n '@keyframes circular-dash': {\n '0%': {\n strokeDasharray: '1px, 200px',\n strokeDashoffset: '0px'\n },\n '50%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-15px'\n },\n '100%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-125px'\n }\n },\n\n /* Styles applied to the `circle` svg path if `disableShrink={true}`. */\n circleDisableShrink: {\n animation: 'none'\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$disableShrink = props.disableShrink,\n disableShrink = _props$disableShrink === void 0 ? false : _props$disableShrink,\n _props$size = props.size,\n size = _props$size === void 0 ? 40 : _props$size,\n style = props.style,\n _props$thickness = props.thickness,\n thickness = _props$thickness === void 0 ? 3.6 : _props$thickness,\n _props$value = props.value,\n value = _props$value === void 0 ? 0 : _props$value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"disableShrink\", \"size\", \"style\", \"thickness\", \"value\", \"variant\"]);\n\n var circleStyle = {};\n var rootStyle = {};\n var rootProps = {};\n\n if (variant === 'determinate' || variant === 'static') {\n var circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = \"\".concat(((100 - value) / 100 * circumference).toFixed(3), \"px\");\n rootStyle.transform = 'rotate(-90deg)';\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'static': classes.static\n }[variant]),\n style: _extends({\n width: size,\n height: size\n }, rootStyle, style),\n ref: ref,\n role: \"progressbar\"\n }, rootProps, other), /*#__PURE__*/React.createElement(\"svg\", {\n className: classes.svg,\n viewBox: \"\".concat(SIZE / 2, \" \").concat(SIZE / 2, \" \").concat(SIZE, \" \").concat(SIZE)\n }, /*#__PURE__*/React.createElement(\"circle\", {\n className: clsx(classes.circle, disableShrink && classes.circleDisableShrink, {\n 'determinate': classes.circleDeterminate,\n 'indeterminate': classes.circleIndeterminate,\n 'static': classes.circleStatic\n }[variant]),\n style: circleStyle,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n */\n disableShrink: chainPropTypes(PropTypes.bool, function (props) {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('Material-UI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n\n return null;\n }),\n\n /**\n * The size of the circle.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, e.g '3rem'.\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The thickness of the circle.\n */\n thickness: PropTypes.number,\n\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n */\n variant: chainPropTypes(PropTypes.oneOf(['determinate', 'indeterminate', 'static']), function (props) {\n var variant = props.variant;\n\n if (variant === 'static') {\n throw new Error('Material-UI: `variant=\"static\"` was deprecated. Use `variant=\"determinate\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCircularProgress',\n flip: false\n})(CircularProgress);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _defineProperty({\n width: '100%',\n marginLeft: 'auto',\n boxSizing: 'border-box',\n marginRight: 'auto',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n display: 'block'\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `disableGutters={true}`. */\n disableGutters: {\n paddingLeft: 0,\n paddingRight: 0\n },\n\n /* Styles applied to the root element if `fixed={true}`. */\n fixed: Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {\n var value = theme.breakpoints.values[breakpoint];\n\n if (value !== 0) {\n acc[theme.breakpoints.up(breakpoint)] = {\n maxWidth: value\n };\n }\n\n return acc;\n }, {}),\n\n /* Styles applied to the root element if `maxWidth=\"xs\"`. */\n maxWidthXs: _defineProperty({}, theme.breakpoints.up('xs'), {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444)\n }),\n\n /* Styles applied to the root element if `maxWidth=\"sm\"`. */\n maxWidthSm: _defineProperty({}, theme.breakpoints.up('sm'), {\n maxWidth: theme.breakpoints.values.sm\n }),\n\n /* Styles applied to the root element if `maxWidth=\"md\"`. */\n maxWidthMd: _defineProperty({}, theme.breakpoints.up('md'), {\n maxWidth: theme.breakpoints.values.md\n }),\n\n /* Styles applied to the root element if `maxWidth=\"lg\"`. */\n maxWidthLg: _defineProperty({}, theme.breakpoints.up('lg'), {\n maxWidth: theme.breakpoints.values.lg\n }),\n\n /* Styles applied to the root element if `maxWidth=\"xl\"`. */\n maxWidthXl: _defineProperty({}, theme.breakpoints.up('xl'), {\n maxWidth: theme.breakpoints.values.xl\n })\n };\n};\nvar Container = /*#__PURE__*/React.forwardRef(function Container(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$fixed = props.fixed,\n fixed = _props$fixed === void 0 ? false : _props$fixed,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"fixed\", \"maxWidth\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, fixed && classes.fixed, disableGutters && classes.disableGutters, maxWidth !== false && classes[\"maxWidth\".concat(capitalize(String(maxWidth)))]),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Container.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * Set the max-width to match the min-width of the current breakpoint.\n * This is useful if you'd prefer to design for a fixed set of sizes\n * instead of trying to accommodate a fully fluid viewport.\n * It's fluid by default.\n */\n fixed: PropTypes.bool,\n\n /**\n * Determine the max-width of the container.\n * The container width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: PropTypes.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiContainer'\n})(Container);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withStyles from '../styles/withStyles';\nimport { exactProp } from '@material-ui/utils';\nexport var html = {\n WebkitFontSmoothing: 'antialiased',\n // Antialiasing.\n MozOsxFontSmoothing: 'grayscale',\n // Antialiasing.\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: 'border-box'\n};\nexport var body = function body(theme) {\n return _extends({\n color: theme.palette.text.primary\n }, theme.typography.body2, {\n backgroundColor: theme.palette.background.default,\n '@media print': {\n // Save printer ink.\n backgroundColor: theme.palette.common.white\n }\n });\n};\nexport var styles = function styles(theme) {\n return {\n '@global': {\n html: html,\n '*, *::before, *::after': {\n boxSizing: 'inherit'\n },\n 'strong, b': {\n fontWeight: theme.typography.fontWeightBold\n },\n body: _extends({\n margin: 0\n }, body(theme), {\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n '&::backdrop': {\n backgroundColor: theme.palette.background.default\n }\n })\n }\n };\n};\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n */\n\nfunction CssBaseline(props) {\n /* eslint-disable no-unused-vars */\n var _props$children = props.children,\n children = _props$children === void 0 ? null : _props$children,\n classes = props.classes;\n /* eslint-enable no-unused-vars */\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? CssBaseline.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n CssBaseline['propTypes' + ''] = exactProp(CssBaseline.propTypes);\n}\n\nexport default withStyles(styles, {\n name: 'MuiCssBaseline'\n})(CssBaseline);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 1,\n margin: 0,\n // Reset browser default style.\n border: 'none',\n flexShrink: 0,\n backgroundColor: theme.palette.divider\n },\n\n /* Styles applied to the root element if `absolute={true}`. */\n absolute: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n },\n\n /* Styles applied to the root element if `variant=\"inset\"`. */\n inset: {\n marginLeft: 72\n },\n\n /* Styles applied to the root element if `light={true}`. */\n light: {\n backgroundColor: alpha(theme.palette.divider, 0.08)\n },\n\n /* Styles applied to the root element if `variant=\"middle\"`. */\n middle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n height: '100%',\n width: 1\n },\n\n /* Styles applied to the root element if `flexItem={true}`. */\n flexItem: {\n alignSelf: 'stretch',\n height: 'auto'\n }\n };\n};\nvar Divider = /*#__PURE__*/React.forwardRef(function Divider(props, ref) {\n var _props$absolute = props.absolute,\n absolute = _props$absolute === void 0 ? false : _props$absolute,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'hr' : _props$component,\n _props$flexItem = props.flexItem,\n flexItem = _props$flexItem === void 0 ? false : _props$flexItem,\n _props$light = props.light,\n light = _props$light === void 0 ? false : _props$light,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$role = props.role,\n role = _props$role === void 0 ? Component !== 'hr' ? 'separator' : undefined : _props$role,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'fullWidth' : _props$variant,\n other = _objectWithoutProperties(props, [\"absolute\", \"classes\", \"className\", \"component\", \"flexItem\", \"light\", \"orientation\", \"role\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, variant !== 'fullWidth' && classes[variant], absolute && classes.absolute, flexItem && classes.flexItem, light && classes.light, orientation === 'vertical' && classes.vertical),\n role: role,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Absolutely position the element.\n */\n absolute: PropTypes.bool,\n\n /**\n * @ignore\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n */\n flexItem: PropTypes.bool,\n\n /**\n * If `true`, the divider will have a lighter color.\n */\n light: PropTypes.bool,\n\n /**\n * The divider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * @ignore\n */\n role: PropTypes.string,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['fullWidth', 'inset', 'middle'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDivider'\n})(Divider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Modal from '../Modal';\nimport Backdrop from '../Backdrop';\nimport withStyles from '../styles/withStyles';\nimport Slide from '../Slide';\nimport Paper from '../Paper';\nimport capitalize from '../utils/capitalize';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `variant=\"permanent or persistent\"`. */\n docked: {\n flex: '0 0 auto'\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n flex: '1 0 auto',\n zIndex: theme.zIndex.drawer,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n // temporary style\n position: 'fixed',\n top: 0,\n // We disable the focus ring for mouse, touch and keyboard users.\n // At some point, it would be better to keep it for keyboard users.\n // :focus-ring CSS pseudo-class will help.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"`. */\n paperAnchorLeft: {\n left: 0,\n right: 'auto'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"`. */\n paperAnchorRight: {\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"`. */\n paperAnchorTop: {\n top: 0,\n left: 0,\n bottom: 'auto',\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"`. */\n paperAnchorBottom: {\n top: 'auto',\n left: 0,\n bottom: 0,\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"` and `variant` is not \"temporary\". */\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"` and `variant` is not \"temporary\". */\n paperAnchorDockedTop: {\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"` and `variant` is not \"temporary\". */\n paperAnchorDockedRight: {\n borderLeft: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"` and `variant` is not \"temporary\". */\n paperAnchorDockedBottom: {\n borderTop: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Modal` component. */\n modal: {}\n };\n};\nvar oppositeDirection = {\n left: 'right',\n right: 'left',\n top: 'down',\n bottom: 'up'\n};\nexport function isHorizontal(anchor) {\n return ['left', 'right'].indexOf(anchor) !== -1;\n}\nexport function getAnchor(theme, anchor) {\n return theme.direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor;\n}\nvar defaultTransitionDuration = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The props of the [Modal](/api/modal/) component are available\n * when `variant=\"temporary\"` is set.\n */\n\nvar Drawer = /*#__PURE__*/React.forwardRef(function Drawer(props, ref) {\n var _props$anchor = props.anchor,\n anchorProp = _props$anchor === void 0 ? 'left' : _props$anchor,\n BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 16 : _props$elevation,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropPropsProp = _props$ModalProps.BackdropProps,\n ModalProps = _objectWithoutProperties(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n _props$open = props.open,\n open = _props$open === void 0 ? false : _props$open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SlideProps = props.SlideProps,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Slide : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchor\", \"BackdropProps\", \"children\", \"classes\", \"className\", \"elevation\", \"ModalProps\", \"onClose\", \"open\", \"PaperProps\", \"SlideProps\", \"TransitionComponent\", \"transitionDuration\", \"variant\"]);\n\n var theme = useTheme(); // Let's assume that the Drawer will always be rendered on user space.\n // We use this state is order to skip the appear transition during the\n // initial mount of the component.\n\n var mounted = React.useRef(false);\n React.useEffect(function () {\n mounted.current = true;\n }, []);\n var anchor = getAnchor(theme, anchorProp);\n var drawer = /*#__PURE__*/React.createElement(Paper, _extends({\n elevation: variant === 'temporary' ? elevation : 0,\n square: true\n }, PaperProps, {\n className: clsx(classes.paper, classes[\"paperAnchor\".concat(capitalize(anchor))], PaperProps.className, variant !== 'temporary' && classes[\"paperAnchorDocked\".concat(capitalize(anchor))])\n }), children);\n\n if (variant === 'permanent') {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes.docked, className),\n ref: ref\n }, other), drawer);\n }\n\n var slidingDrawer = /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: open,\n direction: oppositeDirection[anchor],\n timeout: transitionDuration,\n appear: mounted.current\n }, SlideProps), drawer);\n\n if (variant === 'persistent') {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes.docked, className),\n ref: ref\n }, other), slidingDrawer);\n } // variant === temporary\n\n\n return /*#__PURE__*/React.createElement(Modal, _extends({\n BackdropProps: _extends({}, BackdropProps, BackdropPropsProp, {\n transitionDuration: transitionDuration\n }),\n BackdropComponent: Backdrop,\n className: clsx(classes.root, classes.modal, className),\n open: open,\n onClose: onClose,\n ref: ref\n }, other, ModalProps), slidingDrawer);\n});\nprocess.env.NODE_ENV !== \"production\" ? Drawer.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Side from which the drawer will appear.\n */\n anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),\n\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n\n /**\n * The contents of the drawer.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The elevation of the drawer.\n */\n elevation: PropTypes.number,\n\n /**\n * Props applied to the [`Modal`](/api/modal/) element.\n */\n ModalProps: PropTypes.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * If `true`, the drawer is open.\n */\n open: PropTypes.bool,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes.object,\n\n /**\n * Props applied to the [`Slide`](/api/slide/) element.\n */\n SlideProps: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiDrawer',\n flip: false\n})(Drawer);","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar ExpansionPanelContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ExpansionPanelContext.displayName = 'ExpansionPanelContext';\n}\n\nexport default ExpansionPanelContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport ExpansionPanelContext from './ExpansionPanelContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanel component was renamed to Accordion to use a more common naming convention.\n *\n * You should use `import { Accordion } from '@material-ui/core'`\n * or `import Accordion from '@material-ui/core/Accordion'`.\n */\n\nvar ExpansionPanel = /*#__PURE__*/React.forwardRef(function ExpansionPanel(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanel component was renamed to Accordion to use a more common naming convention.', '', \"You should use `import { Accordion } from '@material-ui/core'`\", \"or `import Accordion from '@material-ui/core/Accordion'`\"].join('\\n'));\n }\n }\n\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'ExpansionPanel',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(ExpansionPanelContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The ExpansionPanel doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of ExpansionPanel to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the panel by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the panel will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the panel, otherwise collapse it.\n * Setting this prop enables control over the panel.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the panel.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanel'\n})(ExpansionPanel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.\n *\n * You should use `import { AccordionActions } from '@material-ui/core'`\n * or `import AccordionActions from '@material-ui/core/AccordionActions'`.\n */\n\nvar ExpansionPanelActions = /*#__PURE__*/React.forwardRef(function ExpansionPanelActions(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.', '', \"You should use `import { AccordionActions } from '@material-ui/core'`\", \"or `import AccordionActions from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelActions'\n})(ExpansionPanelActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.\n *\n * You should use `import { AccordionDetails } from '@material-ui/core'`\n * or `import AccordionDetails from '@material-ui/core/AccordionDetails'`.\n */\n\nvar ExpansionPanelDetails = /*#__PURE__*/React.forwardRef(function ExpansionPanelDetails(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.', '', \"You should use `import { AccordionDetails } from '@material-ui/core'`\", \"or `import AccordionDetails from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelDetails'\n})(ExpansionPanelDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport ExpansionPanelContext from '../ExpansionPanel/ExpansionPanelContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.\n *\n * You should use `import { AccordionSummary } from '@material-ui/core'`\n * or `import AccordionSummary from '@material-ui/core/AccordionSummary'`.\n */\n\nvar ExpansionPanelSummary = /*#__PURE__*/React.forwardRef(function ExpansionPanelSummary(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.', '', \"You should use `import { AccordionSummary } from '@material-ui/core'`\", \"or `import AccordionSummary from '@material-ui/core/AccordionSummary'`\"].join('\\n'));\n }\n }\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n IconButtonProps = props.IconButtonProps,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocusVisible = props.onFocusVisible,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"IconButtonProps\", \"onBlur\", \"onClick\", \"onFocusVisible\"]);\n\n var _React$useState = React.useState(false),\n focusedState = _React$useState[0],\n setFocusedState = _React$useState[1];\n\n var handleFocusVisible = function handleFocusVisible(event) {\n setFocusedState(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n setFocusedState(false);\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var _React$useContext = React.useContext(ExpansionPanelContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded, focusedState && classes.focused),\n onFocusVisible: handleFocusVisible,\n onBlur: handleBlur,\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? ExpansionPanelSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiExpansionPanelSummary'\n})(ExpansionPanelSummary);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'wrap'\n },\n\n /* Styles applied to the root element if `row={true}`. */\n row: {\n flexDirection: 'row'\n }\n};\n/**\n * `FormGroup` wraps controls such as `Checkbox` and `Switch`.\n * It provides compact row layout.\n * For the `Radio`, you should be using the `RadioGroup` component instead of this one.\n */\n\nvar FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$row = props.row,\n row = _props$row === void 0 ? false : _props$row,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"row\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, row && classes.row),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Display group of elements in a compact row.\n */\n row: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormGroup'\n})(FormGroup);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.\n *\n * You should use `import { ImageList } from '@material-ui/core'`\n * or `import ImageList from '@material-ui/core/ImageList'`.\n */\n\nvar GridList = /*#__PURE__*/React.forwardRef(function GridList(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridList component was renamed to ImageList to align with the current Material Design naming.', '', \"You should use `import { ImageList } from '@material-ui/core'`\", \"or `import ImageList from '@material-ui/core/ImageList'`.\"].join('\\n'));\n }\n }\n\n var _props$cellHeight = props.cellHeight,\n cellHeight = _props$cellHeight === void 0 ? 180 : _props$cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? 4 : _props$spacing,\n style = props.style,\n other = _objectWithoutProperties(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"spacing\", \"style\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n style: _extends({\n margin: -spacing / 2\n }, style)\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The GridList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/React.cloneElement(child, {\n style: _extends({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: cellHeight === 'auto' ? 'auto' : cellHeight * childRows + spacing,\n padding: spacing / 2\n }, child.props.style)\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridList.propTypes = {\n /**\n * Number of px for one cell height.\n * You can set `'auto'` if you want to let the children determine the height.\n */\n cellHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]),\n\n /**\n * Grid Tiles that will be in Grid List.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Number of columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Number of px for the spacing between tiles.\n */\n spacing: PropTypes.number,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridList'\n})(GridList);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport debounce from '../utils/debounce';\nimport withStyles from '../styles/withStyles';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n tile: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, _toConsumableArray(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, _toConsumableArray(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, _toConsumableArray(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, _toConsumableArray(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar warnedOnce = false;\n/**\n * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.\n *\n * You should use `import { ImageListItem } from '@material-ui/core'`\n * or `import ImageListItem from '@material-ui/core/ImageListItem'`.\n */\n\nvar GridListTile = /*#__PURE__*/React.forwardRef(function GridListTile(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridListTile component was renamed to ImageListItem to align with the current Material Design naming.', '', \"You should use `import { ImageListItem } from '@material-ui/core'`\", \"or `import ImageListItem from '@material-ui/core/ImageListItem'`.\"].join('\\n'));\n }\n } // cols rows default values are for docs only\n\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = React.useRef(null);\n React.useEffect(function () {\n ensureImageCover(imgRef.current, classes);\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.tile\n }, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTile.propTypes = {\n /**\n * Theoretically you can pass any node as children, but the main use case is to pass an img,\n * in which case GridListTile takes care of making the image \"cover\" available space\n * (similar to `background-size: cover` or to `object-fit: cover`).\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Width of the tile in number of grid cells.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the tile in number of grid cells.\n */\n rows: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTile'\n})(GridListTile);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `titlePosition=\"bottom\"`. */\n titlePositionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `titlePosition=\"top\"`. */\n titlePositionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.\n *\n * You should use `import { ImageListItemBar } from '@material-ui/core'`\n * or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.\n */\n\nvar GridListTileBar = /*#__PURE__*/React.forwardRef(function GridListTileBar(props, ref) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.', '', \"You should use `import { ImageListItemBar } from '@material-ui/core'`\", \"or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.\"].join('\\n'));\n }\n }\n\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$titlePosition = props.titlePosition,\n titlePosition = _props$titlePosition === void 0 ? 'bottom' : _props$titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"titlePosition\"]);\n\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, titlePosition === 'top' ? classes.titlePositionTop : classes.titlePositionBottom, subtitle && classes.rootSubtitle),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? GridListTileBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the tile itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on tile.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n */\n titlePosition: PropTypes.oneOf(['bottom', 'top'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiGridListTileBar'\n})(GridListTileBar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { getThemeProps, useTheme } from '@material-ui/styles';\nexport default function useMediaQuery(queryInput) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var theme = useTheme();\n var props = getThemeProps({\n theme: theme,\n name: 'MuiUseMediaQuery',\n props: {}\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['Material-UI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n var query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, ''); // Wait for jsdom to support the match media feature.\n // All the browsers Material-UI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n\n var supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n\n var _props$options = _extends({}, props, options),\n _props$options$defaul = _props$options.defaultMatches,\n defaultMatches = _props$options$defaul === void 0 ? false : _props$options$defaul,\n _props$options$matchM = _props$options.matchMedia,\n matchMedia = _props$options$matchM === void 0 ? supportMatchMedia ? window.matchMedia : null : _props$options$matchM,\n _props$options$noSsr = _props$options.noSsr,\n noSsr = _props$options$noSsr === void 0 ? false : _props$options$noSsr,\n _props$options$ssrMat = _props$options.ssrMatchMedia,\n ssrMatchMedia = _props$options$ssrMat === void 0 ? null : _props$options$ssrMat;\n\n var _React$useState = React.useState(function () {\n if (noSsr && supportMatchMedia) {\n return matchMedia(query).matches;\n }\n\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n } // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n\n\n return defaultMatches;\n }),\n match = _React$useState[0],\n setMatch = _React$useState[1];\n\n React.useEffect(function () {\n var active = true;\n\n if (!supportMatchMedia) {\n return undefined;\n }\n\n var queryList = matchMedia(query);\n\n var updateMatch = function updateMatch() {\n // Workaround Safari wrong implementation of matchMedia\n // TODO can we remove it?\n // https://github.com/mui-org/material-ui/pull/17315#issuecomment-528286677\n if (active) {\n setMatch(queryList.matches);\n }\n };\n\n updateMatch();\n queryList.addListener(updateMatch);\n return function () {\n active = false;\n queryList.removeListener(updateMatch);\n };\n }, [query, matchMedia, supportMatchMedia]);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue({\n query: query,\n match: match\n });\n }\n\n return match;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { getDisplayName } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport useTheme from '../styles/useTheme';\nimport { keys as breakpointKeys } from '../styles/createBreakpoints';\nimport useMediaQuery from '../useMediaQuery'; // By default, returns true if screen width is the same or greater than the given breakpoint.\n\nexport var isWidthUp = function isWidthUp(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return breakpointKeys.indexOf(breakpoint) <= breakpointKeys.indexOf(width);\n }\n\n return breakpointKeys.indexOf(breakpoint) < breakpointKeys.indexOf(width);\n}; // By default, returns true if screen width is the same or less than the given breakpoint.\n\nexport var isWidthDown = function isWidthDown(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return breakpointKeys.indexOf(width) <= breakpointKeys.indexOf(breakpoint);\n }\n\n return breakpointKeys.indexOf(width) < breakpointKeys.indexOf(breakpoint);\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nvar withWidth = function withWidth() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (Component) {\n var _options$withTheme = options.withTheme,\n withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme,\n _options$noSSR = options.noSSR,\n noSSR = _options$noSSR === void 0 ? false : _options$noSSR,\n initialWidthOption = options.initialWidth;\n\n function WithWidth(props) {\n var contextTheme = useTheme();\n var theme = props.theme || contextTheme;\n\n var _getThemeProps = getThemeProps({\n theme: theme,\n name: 'MuiWithWidth',\n props: _extends({}, props)\n }),\n initialWidth = _getThemeProps.initialWidth,\n width = _getThemeProps.width,\n other = _objectWithoutProperties(_getThemeProps, [\"initialWidth\", \"width\"]);\n\n var _React$useState = React.useState(false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n setMountedState(true);\n }, []);\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n var keys = theme.breakpoints.keys.slice().reverse();\n var widthComputed = keys.reduce(function (output, key) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var matches = useMediaQuery(theme.breakpoints.up(key));\n return !output && matches ? key : output;\n }, null);\n\n var more = _extends({\n width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption\n }, withThemeOption ? {\n theme: theme\n } : {}, other); // When rendering the component on the server,\n // we have no idea about the client browser screen width.\n // In order to prevent blinks and help the reconciliation of the React tree\n // we are not rendering the child component.\n //\n // An alternative is to use the `initialWidth` property.\n\n\n if (more.width === undefined) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(Component, more);\n }\n\n process.env.NODE_ENV !== \"production\" ? WithWidth.propTypes = {\n /**\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * @ignore\n */\n theme: PropTypes.object,\n\n /**\n * Bypass the width calculation logic.\n */\n width: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithWidth.displayName = \"WithWidth(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithWidth, Component);\n return WithWidth;\n };\n};\n\nexport default withWidth;","import PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport withWidth, { isWidthDown, isWidthUp } from '../withWidth';\nimport useTheme from '../styles/useTheme';\n/**\n * @ignore - internal component.\n */\n\nfunction HiddenJs(props) {\n var children = props.children,\n only = props.only,\n width = props.width;\n var theme = useTheme();\n var visible = true; // `only` check is faster to get out sooner if used.\n\n if (only) {\n if (Array.isArray(only)) {\n for (var i = 0; i < only.length; i += 1) {\n var breakpoint = only[i];\n\n if (width === breakpoint) {\n visible = false;\n break;\n }\n }\n } else if (only && width === only) {\n visible = false;\n }\n } // Allow `only` to be combined with other props. If already hidden, no need to check others.\n\n\n if (visible) {\n // determine visibility based on the smallest size up\n for (var _i = 0; _i < theme.breakpoints.keys.length; _i += 1) {\n var _breakpoint = theme.breakpoints.keys[_i];\n var breakpointUp = props[\"\".concat(_breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(_breakpoint, \"Down\")];\n\n if (breakpointUp && isWidthUp(_breakpoint, width) || breakpointDown && isWidthDown(_breakpoint, width)) {\n visible = false;\n break;\n }\n }\n }\n\n if (!visible) {\n return null;\n }\n\n return children;\n}\n\nHiddenJs.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * @ignore\n * width prop provided by withWidth decorator.\n */\n width: PropTypes.string.isRequired,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n};\n\nif (process.env.NODE_ENV !== 'production') {\n HiddenJs.propTypes = exactProp(HiddenJs.propTypes);\n}\n\nexport default withWidth()(HiddenJs);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\n\nvar styles = function styles(theme) {\n var hidden = {\n display: 'none'\n };\n return theme.breakpoints.keys.reduce(function (acc, key) {\n acc[\"only\".concat(capitalize(key))] = _defineProperty({}, theme.breakpoints.only(key), hidden);\n acc[\"\".concat(key, \"Up\")] = _defineProperty({}, theme.breakpoints.up(key), hidden);\n acc[\"\".concat(key, \"Down\")] = _defineProperty({}, theme.breakpoints.down(key), hidden);\n return acc;\n }, {});\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction HiddenCss(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n only = props.only,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"only\"]);\n\n var theme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n var unknownProps = Object.keys(other).filter(function (propName) {\n var isUndeclaredBreakpoint = !theme.breakpoints.keys.some(function (breakpoint) {\n return \"\".concat(breakpoint, \"Up\") === propName || \"\".concat(breakpoint, \"Down\") === propName;\n });\n return isUndeclaredBreakpoint;\n });\n\n if (unknownProps.length > 0) {\n console.error(\"Material-UI: Unsupported props received by ``: \".concat(unknownProps.join(', '), \". Did you forget to wrap this component in a ThemeProvider declaring these breakpoints?\"));\n }\n }\n\n var clsx = [];\n\n if (className) {\n clsx.push(className);\n }\n\n for (var i = 0; i < theme.breakpoints.keys.length; i += 1) {\n var breakpoint = theme.breakpoints.keys[i];\n var breakpointUp = props[\"\".concat(breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(breakpoint, \"Down\")];\n\n if (breakpointUp) {\n clsx.push(classes[\"\".concat(breakpoint, \"Up\")]);\n }\n\n if (breakpointDown) {\n clsx.push(classes[\"\".concat(breakpoint, \"Down\")]);\n }\n }\n\n if (only) {\n var onlyBreakpoints = Array.isArray(only) ? only : [only];\n onlyBreakpoints.forEach(function (breakpoint) {\n clsx.push(classes[\"only\".concat(capitalize(breakpoint))]);\n });\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: clsx.join(' ')\n }, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? HiddenCss.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateHiddenCss'\n})(HiddenCss);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport HiddenJs from './HiddenJs';\nimport HiddenCss from './HiddenCss';\n/**\n * Responsively hides children based on the selected implementation.\n */\n\nfunction Hidden(props) {\n var _props$implementation = props.implementation,\n implementation = _props$implementation === void 0 ? 'js' : _props$implementation,\n _props$lgDown = props.lgDown,\n lgDown = _props$lgDown === void 0 ? false : _props$lgDown,\n _props$lgUp = props.lgUp,\n lgUp = _props$lgUp === void 0 ? false : _props$lgUp,\n _props$mdDown = props.mdDown,\n mdDown = _props$mdDown === void 0 ? false : _props$mdDown,\n _props$mdUp = props.mdUp,\n mdUp = _props$mdUp === void 0 ? false : _props$mdUp,\n _props$smDown = props.smDown,\n smDown = _props$smDown === void 0 ? false : _props$smDown,\n _props$smUp = props.smUp,\n smUp = _props$smUp === void 0 ? false : _props$smUp,\n _props$xlDown = props.xlDown,\n xlDown = _props$xlDown === void 0 ? false : _props$xlDown,\n _props$xlUp = props.xlUp,\n xlUp = _props$xlUp === void 0 ? false : _props$xlUp,\n _props$xsDown = props.xsDown,\n xsDown = _props$xsDown === void 0 ? false : _props$xsDown,\n _props$xsUp = props.xsUp,\n xsUp = _props$xsUp === void 0 ? false : _props$xsUp,\n other = _objectWithoutProperties(props, [\"implementation\", \"lgDown\", \"lgUp\", \"mdDown\", \"mdUp\", \"smDown\", \"smUp\", \"xlDown\", \"xlUp\", \"xsDown\", \"xsUp\"]);\n\n if (implementation === 'js') {\n return /*#__PURE__*/React.createElement(HiddenJs, _extends({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n }\n\n return /*#__PURE__*/React.createElement(HiddenCss, _extends({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Hidden.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: PropTypes.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: PropTypes.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: PropTypes.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), PropTypes.arrayOf(PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: PropTypes.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: PropTypes.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: PropTypes.bool\n} : void 0;\nexport default Hidden;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n fontSize: theme.typography.pxToRem(24),\n width: '1em',\n height: '1em',\n // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541\n // To remove at some point.\n overflow: 'hidden',\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(36)\n }\n };\n};\nvar Icon = /*#__PURE__*/React.forwardRef(function Icon(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"fontSize\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx('material-icons', classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n \"aria-hidden\": true,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Icon.propTypes = {\n /**\n * The name of the icon font ligature.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nIcon.muiName = 'Icon';\nexport default withStyles(styles, {\n name: 'MuiIcon'\n})(Icon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar ImageList = /*#__PURE__*/React.forwardRef(function ImageList(props, ref) {\n var cellHeight = props.cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$gap = props.gap,\n gapProp = _props$gap === void 0 ? 4 : _props$gap,\n _props$rowHeight = props.rowHeight,\n rowHeightProp = _props$rowHeight === void 0 ? 180 : _props$rowHeight,\n spacing = props.spacing,\n style = props.style,\n other = _objectWithoutProperties(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"gap\", \"rowHeight\", \"spacing\", \"style\"]);\n\n var gap = spacing || gapProp;\n var rowHeight = cellHeight || rowHeightProp;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n style: _extends({\n margin: -gap / 2\n }, style)\n }, other), React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The ImageList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/React.cloneElement(child, {\n style: _extends({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: rowHeight === 'auto' ? 'auto' : rowHeight * childRows + gap,\n padding: gap / 2\n }, child.props.style)\n });\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageList.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Cell height in `px`.\n * Set to `'auto'` to let the children determine the height.\n * @deprecated Use rowHeight instead.\n */\n cellHeight: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]), 'Use the `rowHeight` prop instead.'),\n\n /**\n * Items that will be in the image list.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Number of columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The gap between items in `px`.\n */\n gap: PropTypes.number,\n\n /**\n * The height of one row in `px`.\n */\n rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),\n\n /**\n * The spacing between items in `px`.\n * @deprecated Use gap instead.\n */\n spacing: deprecatedPropType(PropTypes.number, 'Use the `gap` prop instead.'),\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageList'\n})(ImageList);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport debounce from '../utils/debounce';\nimport withStyles from '../styles/withStyles';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n item: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the item. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the item. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, _toConsumableArray(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, _toConsumableArray(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, _toConsumableArray(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, _toConsumableArray(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(props, ref) {\n // cols rows default values are for docs only\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = React.useRef(null);\n React.useEffect(function () {\n ensureImageCover(imgRef.current, classes);\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.item\n }, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItem.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * While you can pass any node as children, the main use case is for an img.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Width of the item in number of grid columns.\n */\n cols: PropTypes.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the item in number of grid rows.\n */\n rows: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageListItem'\n})(ImageListItem);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar ImageListItemBar = /*#__PURE__*/React.forwardRef(function ImageListItemBar(props, ref) {\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$position = props.position,\n positionProp = _props$position === void 0 ? 'bottom' : _props$position,\n titlePosition = props.titlePosition,\n other = _objectWithoutProperties(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"position\", \"titlePosition\"]);\n\n var position = titlePosition || positionProp;\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, subtitle && classes.rootSubtitle, {\n 'bottom': classes.positionBottom,\n 'top': classes.positionTop\n }[position]),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/React.createElement(\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItemBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the item itself).\n */\n actionIcon: PropTypes.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: PropTypes.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Position of the title bar.\n */\n position: PropTypes.oneOf(['bottom', 'top']),\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: PropTypes.node,\n\n /**\n * Title to be displayed on item.\n */\n title: PropTypes.node,\n\n /**\n * Position of the title bar.\n * @deprecated Use position instead.\n */\n titlePosition: deprecatedPropType(PropTypes.oneOf(['bottom', 'top']), 'Use the `position` prop instead.')\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiImageListItemBar'\n})(ImageListItemBar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { darken, lighten } from '../styles/colorManipulator';\nimport useTheme from '../styles/useTheme';\nvar TRANSITION_DURATION = 4; // seconds\n\nexport var styles = function styles(theme) {\n var getColor = function getColor(color) {\n return theme.palette.type === 'light' ? lighten(color, 0.62) : darken(color, 0.5);\n };\n\n var backgroundPrimary = getColor(theme.palette.primary.main);\n var backgroundSecondary = getColor(theme.palette.secondary.main);\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n overflow: 'hidden',\n height: 4,\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root and bar2 element if `color=\"primary\"`; bar2 if `variant=\"buffer\"`. */\n colorPrimary: {\n backgroundColor: backgroundPrimary\n },\n\n /* Styles applied to the root and bar2 elements if `color=\"secondary\"`; bar2 if `variant=\"buffer\"`. */\n colorSecondary: {\n backgroundColor: backgroundSecondary\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {},\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `variant=\"buffer\"`. */\n buffer: {\n backgroundColor: 'transparent'\n },\n\n /* Styles applied to the root element if `variant=\"query\"`. */\n query: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"`. */\n dashed: {\n position: 'absolute',\n marginTop: 0,\n height: '100%',\n width: '100%',\n animation: '$buffer 3s infinite linear'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"primary\"`. */\n dashedColorPrimary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundPrimary, \" 0%, \").concat(backgroundPrimary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"secondary\"`. */\n dashedColorSecondary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundSecondary, \" 0%, \").concat(backgroundSecondary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the layered bar1 and bar2 elements. */\n bar: {\n width: '100%',\n position: 'absolute',\n left: 0,\n bottom: 0,\n top: 0,\n transition: 'transform 0.2s linear',\n transformOrigin: 'left'\n },\n\n /* Styles applied to the bar elements if `color=\"primary\"`; bar2 if `variant` not \"buffer\". */\n barColorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the bar elements if `color=\"secondary\"`; bar2 if `variant` not \"buffer\". */\n barColorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n\n /* Styles applied to the bar1 element if `variant=\"indeterminate or query\"`. */\n bar1Indeterminate: {\n width: 'auto',\n animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite'\n },\n\n /* Styles applied to the bar1 element if `variant=\"determinate\"`. */\n bar1Determinate: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar1 element if `variant=\"buffer\"`. */\n bar1Buffer: {\n zIndex: 1,\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar2 element if `variant=\"indeterminate or query\"`. */\n bar2Indeterminate: {\n width: 'auto',\n animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite'\n },\n\n /* Styles applied to the bar2 element if `variant=\"buffer\"`. */\n bar2Buffer: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n // Legends:\n // || represents the viewport\n // - represents a light background\n // x represents a dark background\n '@keyframes indeterminate1': {\n // |-----|---x-||-----||-----|\n '0%': {\n left: '-35%',\n right: '100%'\n },\n // |-----|-----||-----||xxxx-|\n '60%': {\n left: '100%',\n right: '-90%'\n },\n '100%': {\n left: '100%',\n right: '-90%'\n }\n },\n '@keyframes indeterminate2': {\n // |xxxxx|xxxxx||-----||-----|\n '0%': {\n left: '-200%',\n right: '100%'\n },\n // |-----|-----||-----||-x----|\n '60%': {\n left: '107%',\n right: '-8%'\n },\n '100%': {\n left: '107%',\n right: '-8%'\n }\n },\n '@keyframes buffer': {\n '0%': {\n opacity: 1,\n backgroundPosition: '0 -23px'\n },\n '50%': {\n opacity: 0,\n backgroundPosition: '0 -23px'\n },\n '100%': {\n opacity: 1,\n backgroundPosition: '-200px -23px'\n }\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n value = props.value,\n valueBuffer = props.valueBuffer,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"value\", \"valueBuffer\", \"variant\"]);\n\n var theme = useTheme();\n var rootProps = {};\n var inlineStyles = {\n bar1: {},\n bar2: {}\n };\n\n if (variant === 'determinate' || variant === 'buffer') {\n if (value !== undefined) {\n rootProps['aria-valuenow'] = Math.round(value);\n rootProps['aria-valuemin'] = 0;\n rootProps['aria-valuemax'] = 100;\n var transform = value - 100;\n\n if (theme.direction === 'rtl') {\n transform = -transform;\n }\n\n inlineStyles.bar1.transform = \"translateX(\".concat(transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');\n }\n }\n\n if (variant === 'buffer') {\n if (valueBuffer !== undefined) {\n var _transform = (valueBuffer || 0) - 100;\n\n if (theme.direction === 'rtl') {\n _transform = -_transform;\n }\n\n inlineStyles.bar2.transform = \"translateX(\".concat(_transform, \"%)\");\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');\n }\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'buffer': classes.buffer,\n 'query': classes.query\n }[variant]),\n role: \"progressbar\"\n }, rootProps, {\n ref: ref\n }, other), variant === 'buffer' ? /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.dashed, classes[\"dashedColor\".concat(capitalize(color))])\n }) : null, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, classes[\"barColor\".concat(capitalize(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, {\n 'determinate': classes.bar1Determinate,\n 'buffer': classes.bar1Buffer\n }[variant]),\n style: inlineStyles.bar1\n }), variant === 'determinate' ? null : /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes[\"color\".concat(capitalize(color))], classes.bar2Buffer] : classes[\"barColor\".concat(capitalize(color))]),\n style: inlineStyles.bar2\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? LinearProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The value of the progress indicator for the determinate and buffer variants.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The value for the buffer variant.\n * Value between 0 and 100.\n */\n valueBuffer: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate or query when there is no progress value.\n */\n variant: PropTypes.oneOf(['buffer', 'determinate', 'indeterminate', 'query'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLinearProgress'\n})(LinearProgress);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useForkRef from '../utils/useForkRef';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `underline=\"none\"`. */\n underlineNone: {\n textDecoration: 'none'\n },\n\n /* Styles applied to the root element if `underline=\"hover\"`. */\n underlineHover: {\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline'\n }\n },\n\n /* Styles applied to the root element if `underline=\"always\"`. */\n underlineAlways: {\n textDecoration: 'underline'\n },\n // Same reset as ButtonBase.root\n\n /* Styles applied to the root element if `component=\"button\"`. */\n button: {\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$focusVisible': {\n outline: 'auto'\n }\n },\n\n /* Pseudo-class applied to the root element if the link is keyboard focused. */\n focusVisible: {}\n};\nvar Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'a' : _props$component,\n onBlur = props.onBlur,\n onFocus = props.onFocus,\n TypographyClasses = props.TypographyClasses,\n _props$underline = props.underline,\n underline = _props$underline === void 0 ? 'hover' : _props$underline,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'inherit' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"onBlur\", \"onFocus\", \"TypographyClasses\", \"underline\", \"variant\"]);\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n var handlerRef = useForkRef(ref, focusVisibleRef);\n\n var handleBlur = function handleBlur(event) {\n if (focusVisible) {\n onBlurVisible();\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var handleFocus = function handleFocus(event) {\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(Typography, _extends({\n className: clsx(classes.root, classes[\"underline\".concat(capitalize(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button),\n classes: TypographyClasses,\n color: color,\n component: component,\n onBlur: handleBlur,\n onFocus: handleFocus,\n ref: handlerRef,\n variant: variant\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n /**\n * The content of the link.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the link.\n */\n color: PropTypes.oneOf(['initial', 'inherit', 'primary', 'secondary', 'textPrimary', 'textSecondary', 'error']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * `classes` prop applied to the [`Typography`](/api/typography/) element.\n */\n TypographyClasses: PropTypes.object,\n\n /**\n * Controls when the link should have an underline.\n */\n underline: PropTypes.oneOf(['none', 'hover', 'always']),\n\n /**\n * Applies the theme typography styles.\n */\n variant: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLink'\n})(Link);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n flexShrink: 0\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n};\n/**\n * A simple wrapper to apply `List` styles to an `Avatar`.\n */\n\nvar ListItemAvatar = /*#__PURE__*/React.forwardRef(function ListItemAvatar(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n var context = React.useContext(ListContext);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemAvatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component – normally `Avatar`.\n */\n children: PropTypes.element.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemAvatar'\n})(ListItemAvatar);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from '../List/ListContext';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n };\n};\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nvar ListItemIcon = /*#__PURE__*/React.forwardRef(function ListItemIcon(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n var context = React.useContext(ListContext);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@material-ui/icons` SVG icon element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemIcon'\n})(ListItemIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n right: 16,\n top: '50%',\n transform: 'translateY(-50%)'\n }\n};\n/**\n * Must be used as the last child of ListItem to function properly.\n */\n\nvar ListItemSecondaryAction = /*#__PURE__*/React.forwardRef(function ListItemSecondaryAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemSecondaryAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally an `IconButton` or selection control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nListItemSecondaryAction.muiName = 'ListItemSecondaryAction';\nexport default withStyles(styles, {\n name: 'MuiListItemSecondaryAction'\n})(ListItemSecondaryAction);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport ListContext from '../List/ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n },\n\n /* Styles applied to the `Typography` components if primary and secondary are set. */\n multiline: {\n marginTop: 6,\n marginBottom: 6\n },\n\n /* Styles applied to the `Typography` components if dense. */\n dense: {},\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 56\n },\n\n /* Styles applied to the primary `Typography` component. */\n primary: {},\n\n /* Styles applied to the secondary `Typography` component. */\n secondary: {}\n};\nvar ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n primaryProp = props.primary,\n primaryTypographyProps = props.primaryTypographyProps,\n secondaryProp = props.secondary,\n secondaryTypographyProps = props.secondaryTypographyProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"]);\n\n var _React$useContext = React.useContext(ListContext),\n dense = _React$useContext.dense;\n\n var primary = primaryProp != null ? primaryProp : children;\n\n if (primary != null && primary.type !== Typography && !disableTypography) {\n primary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps), primary);\n }\n\n var secondary = secondaryProp;\n\n if (secondary != null && secondary.type !== Typography && !disableTypography) {\n secondary = /*#__PURE__*/React.createElement(Typography, _extends({\n variant: \"body2\",\n className: classes.secondary,\n color: \"textSecondary\",\n display: \"block\"\n }, secondaryTypographyProps), secondary);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline),\n ref: ref\n }, other), primary, secondary);\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n */\n disableTypography: PropTypes.bool,\n\n /**\n * If `true`, the children will be indented.\n * This should be used if there is no left avatar or left icon.\n */\n inset: PropTypes.bool,\n\n /**\n * The main content element.\n */\n primary: PropTypes.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: PropTypes.object,\n\n /**\n * The secondary content element.\n */\n secondary: PropTypes.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItemText'\n})(ListItemText);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n lineHeight: '48px',\n listStyle: 'none',\n color: theme.palette.text.secondary,\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(14)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the inner `component` element if `disableGutters={false}`. */\n gutters: {\n paddingLeft: 16,\n paddingRight: 16\n },\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 72\n },\n\n /* Styles applied to the root element if `disableSticky={false}`. */\n sticky: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n backgroundColor: 'inherit'\n }\n };\n};\nvar ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$disableSticky = props.disableSticky,\n disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"disableGutters\", \"disableSticky\", \"inset\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListSubheader.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'inherit']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the List Subheader will not have gutters.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will not stick to the top during scroll.\n */\n disableSticky: PropTypes.bool,\n\n /**\n * If `true`, the List Subheader will be indented.\n */\n inset: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListSubheader'\n})(ListSubheader);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Paper from '../Paper';\nimport capitalize from '../utils/capitalize';\nimport LinearProgress from '../LinearProgress';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n background: theme.palette.background.default,\n padding: 8\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n position: 'fixed',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {},\n\n /* Styles applied to the dots container if `variant=\"dots\"`. */\n dots: {\n display: 'flex',\n flexDirection: 'row'\n },\n\n /* Styles applied to each dot if `variant=\"dots\"`. */\n dot: {\n backgroundColor: theme.palette.action.disabled,\n borderRadius: '50%',\n width: 8,\n height: 8,\n margin: '0 2px'\n },\n\n /* Styles applied to a dot if `variant=\"dots\"` and this is the active step. */\n dotActive: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the Linear Progress component if `variant=\"progress\"`. */\n progress: {\n width: '50%'\n }\n };\n};\nvar MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n backButton = props.backButton,\n classes = props.classes,\n className = props.className,\n LinearProgressProps = props.LinearProgressProps,\n nextButton = props.nextButton,\n _props$position = props.position,\n position = _props$position === void 0 ? 'bottom' : _props$position,\n steps = props.steps,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'dots' : _props$variant,\n other = _objectWithoutProperties(props, [\"activeStep\", \"backButton\", \"classes\", \"className\", \"LinearProgressProps\", \"nextButton\", \"position\", \"steps\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[\"position\".concat(capitalize(position))], className),\n ref: ref\n }, other), backButton, variant === 'text' && /*#__PURE__*/React.createElement(React.Fragment, null, activeStep + 1, \" / \", steps), variant === 'dots' && /*#__PURE__*/React.createElement(\"div\", {\n className: classes.dots\n }, _toConsumableArray(new Array(steps)).map(function (_, index) {\n return /*#__PURE__*/React.createElement(\"div\", {\n key: index,\n className: clsx(classes.dot, index === activeStep && classes.dotActive)\n });\n })), variant === 'progress' && /*#__PURE__*/React.createElement(LinearProgress, _extends({\n className: classes.progress,\n variant: \"determinate\",\n value: Math.ceil(activeStep / (steps - 1) * 100)\n }, LinearProgressProps)), nextButton);\n});\nprocess.env.NODE_ENV !== \"production\" ? MobileStepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Defines which dot is highlighted when the variant is 'dots'.\n */\n activeStep: PropTypes.number,\n\n /**\n * A back button element. For instance, it can be a `Button` or an `IconButton`.\n */\n backButton: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Props applied to the `LinearProgress` element.\n */\n LinearProgressProps: PropTypes.object,\n\n /**\n * A next button element. For instance, it can be a `Button` or an `IconButton`.\n */\n nextButton: PropTypes.node,\n\n /**\n * Set the positioning type.\n */\n position: PropTypes.oneOf(['bottom', 'static', 'top']),\n\n /**\n * The total steps.\n */\n steps: PropTypes.number.isRequired,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['dots', 'progress', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiMobileStepper'\n})(MobileStepper);","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nvar useEnhancedEffect = typeof window !== 'undefined' && process.env.NODE_ENV !== 'test' ? React.useLayoutEffect : React.useEffect;\n/**\n * NoSsr purposely removes components from the subject of Server Side Rendering (SSR).\n *\n * This component can be useful in a variety of situations:\n * - Escape hatch for broken dependencies not supporting SSR.\n * - Improve the time-to-first paint on the client by only rendering above the fold.\n * - Reduce the rendering time on the server.\n * - Under too heavy server load, you can turn on service degradation.\n */\n\nfunction NoSsr(props) {\n var children = props.children,\n _props$defer = props.defer,\n defer = _props$defer === void 0 ? false : _props$defer,\n _props$fallback = props.fallback,\n fallback = _props$fallback === void 0 ? null : _props$fallback;\n\n var _React$useState = React.useState(false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n if (!defer) {\n setMountedState(true);\n }\n }, [defer]);\n React.useEffect(function () {\n if (defer) {\n setMountedState(true);\n }\n }, [defer]); // We need the Fragment here to force react-docgen to recognise NoSsr as a component.\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, mountedState ? children : fallback);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? NoSsr.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n\n /**\n * If `true`, the component will not only prevent server-side rendering.\n * It will also defer the rendering of the children into a different screen frame.\n */\n defer: PropTypes.bool,\n\n /**\n * The fallback content to display.\n */\n fallback: PropTypes.node\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n NoSsr['propTypes' + ''] = exactProp(NoSsr.propTypes);\n}\n\nexport default NoSsr;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'RadioButtonUnchecked');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z\"\n}), 'RadioButtonChecked');","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport RadioButtonUncheckedIcon from '../internal/svg-icons/RadioButtonUnchecked';\nimport RadioButtonCheckedIcon from '../internal/svg-icons/RadioButtonChecked';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'relative',\n display: 'flex',\n '&$checked $layer': {\n transform: 'scale(1)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.shortest\n })\n }\n },\n layer: {\n left: 0,\n position: 'absolute',\n transform: 'scale(0)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeIn,\n duration: theme.transitions.duration.shortest\n })\n },\n checked: {}\n };\n};\n/**\n * @ignore - internal component.\n */\n\nfunction RadioButtonIcon(props) {\n var checked = props.checked,\n classes = props.classes,\n fontSize = props.fontSize;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.root, checked && classes.checked)\n }, /*#__PURE__*/React.createElement(RadioButtonUncheckedIcon, {\n fontSize: fontSize\n }), /*#__PURE__*/React.createElement(RadioButtonCheckedIcon, {\n fontSize: fontSize,\n className: classes.layer\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? RadioButtonIcon.propTypes = {\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n fontSize: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateRadioButtonIcon'\n})(RadioButtonIcon);","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nvar RadioGroupContext = React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n RadioGroupContext.displayName = 'RadioGroupContext';\n}\n\nexport default RadioGroupContext;","import * as React from 'react';\nimport RadioGroupContext from './RadioGroupContext';\nexport default function useRadioGroup() {\n return React.useContext(RadioGroupContext);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport RadioButtonIcon from './RadioButtonIcon';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport withStyles from '../styles/withStyles';\nimport useRadioGroup from '../RadioGroup/useRadioGroup';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, {\n checked: true\n});\nvar defaultIcon = /*#__PURE__*/React.createElement(RadioButtonIcon, null);\nvar Radio = /*#__PURE__*/React.forwardRef(function Radio(props, ref) {\n var checkedProp = props.checked,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n nameProp = props.name,\n onChangeProp = props.onChange,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checked\", \"classes\", \"color\", \"name\", \"onChange\", \"size\"]);\n\n var radioGroup = useRadioGroup();\n var checked = checkedProp;\n var onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);\n var name = nameProp;\n\n if (radioGroup) {\n if (typeof checked === 'undefined') {\n checked = radioGroup.value === props.value;\n }\n\n if (typeof name === 'undefined') {\n name = radioGroup.name;\n }\n }\n\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n color: color,\n type: \"radio\",\n icon: /*#__PURE__*/React.cloneElement(defaultIcon, {\n fontSize: size === 'small' ? 'small' : 'medium'\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(defaultCheckedIcon, {\n fontSize: size === 'small' ? 'small' : 'medium'\n }),\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))]),\n checked: classes.checked,\n disabled: classes.disabled\n },\n name: name,\n checked: checked,\n onChange: onChange,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Radio.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the radio will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiRadio'\n})(Radio);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport FormGroup from '../FormGroup';\nimport useForkRef from '../utils/useForkRef';\nimport useControlled from '../utils/useControlled';\nimport RadioGroupContext from './RadioGroupContext';\nimport useId from '../utils/unstable_useId';\nvar RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {\n var actions = props.actions,\n children = props.children,\n nameProp = props.name,\n valueProp = props.value,\n onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"actions\", \"children\", \"name\", \"value\", \"onChange\"]);\n\n var rootRef = React.useRef(null);\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: props.defaultValue,\n name: 'RadioGroup'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n value = _useControlled2[0],\n setValue = _useControlled2[1];\n\n React.useImperativeHandle(actions, function () {\n return {\n focus: function focus() {\n var input = rootRef.current.querySelector('input:not(:disabled):checked');\n\n if (!input) {\n input = rootRef.current.querySelector('input:not(:disabled)');\n }\n\n if (input) {\n input.focus();\n }\n }\n };\n }, []);\n var handleRef = useForkRef(ref, rootRef);\n\n var handleChange = function handleChange(event) {\n setValue(event.target.value);\n\n if (onChange) {\n onChange(event, event.target.value);\n }\n };\n\n var name = useId(nameProp);\n return /*#__PURE__*/React.createElement(RadioGroupContext.Provider, {\n value: {\n name: name,\n onChange: handleChange,\n value: value\n }\n }, /*#__PURE__*/React.createElement(FormGroup, _extends({\n role: \"radiogroup\",\n ref: handleRef\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? RadioGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string]),\n\n /**\n * The name used to reference the value of the control.\n * If you don't provide this prop, it falls back to a randomly generated name.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when a radio button is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * Value of the selected radio button. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default RadioGroup;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/esm/getPrototypeOf\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, refType } from '@material-ui/utils';\nimport setRef from '../utils/setRef';\nvar warnedOnce = false;\n/**\n * ⚠️⚠️⚠️\n * If you want the DOM element of a Material-UI component check out\n * [FAQ: How can I access the DOM element?](/getting-started/faq/#how-can-i-access-the-dom-element)\n * first.\n *\n * This component uses `findDOMNode` which is deprecated in React.StrictMode.\n *\n * Helper component to allow attaching a ref to a\n * wrapped element to access the underlying DOM element.\n *\n * It's highly inspired by https://github.com/facebook/react/issues/11401#issuecomment-340543801.\n * For example:\n * ```jsx\n * import React from 'react';\n * import RootRef from '@material-ui/core/RootRef';\n *\n * function MyComponent() {\n * const domRef = React.useRef();\n *\n * React.useEffect(() => {\n * console.log(domRef.current); // DOM node\n * }, []);\n *\n * return (\n * \n * \n * \n * );\n * }\n * ```\n *\n * @deprecated\n */\n\nvar RootRef = /*#__PURE__*/function (_React$Component) {\n _inherits(RootRef, _React$Component);\n\n var _super = _createSuper(RootRef);\n\n function RootRef() {\n _classCallCheck(this, RootRef);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(RootRef, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ref = ReactDOM.findDOMNode(this);\n setRef(this.props.rootRef, this.ref);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var ref = ReactDOM.findDOMNode(this);\n\n if (prevProps.rootRef !== this.props.rootRef || this.ref !== ref) {\n if (prevProps.rootRef !== this.props.rootRef) {\n setRef(prevProps.rootRef, null);\n }\n\n this.ref = ref;\n setRef(this.props.rootRef, this.ref);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.ref = null;\n setRef(this.props.rootRef, null);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn(['Material-UI: The RootRef component is deprecated.', 'The component relies on the ReactDOM.findDOMNode API which is deprecated in React.StrictMode.', 'Instead, you can get a reference to the underlying DOM node of the components via the `ref` prop.'].join('/n'));\n }\n }\n\n return this.props.children;\n }\n }]);\n\n return RootRef;\n}(React.Component);\n\nprocess.env.NODE_ENV !== \"production\" ? RootRef.propTypes = {\n /**\n * The wrapped element.\n */\n children: PropTypes.element.isRequired,\n\n /**\n * A ref that points to the first DOM node of the wrapped element.\n */\n rootRef: refType.isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? RootRef.propTypes = exactProp(RootRef.propTypes) : void 0;\n}\n\nexport default RootRef;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\n\nvar styles = function styles(theme) {\n return {\n thumb: {\n '&$open': {\n '& $offset': {\n transform: 'scale(1) translateY(-10px)'\n }\n }\n },\n open: {},\n offset: _extends({\n zIndex: 1\n }, theme.typography.body2, {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1.2,\n transition: theme.transitions.create(['transform'], {\n duration: theme.transitions.duration.shortest\n }),\n top: -34,\n transformOrigin: 'bottom center',\n transform: 'scale(0)',\n position: 'absolute'\n }),\n circle: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 32,\n height: 32,\n borderRadius: '50% 50% 50% 0',\n backgroundColor: 'currentColor',\n transform: 'rotate(-45deg)'\n },\n label: {\n color: theme.palette.primary.contrastText,\n transform: 'rotate(45deg)'\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction ValueLabel(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n open = props.open,\n value = props.value,\n valueLabelDisplay = props.valueLabelDisplay;\n\n if (valueLabelDisplay === 'off') {\n return children;\n }\n\n return /*#__PURE__*/React.cloneElement(children, {\n className: clsx(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.offset, className)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.circle\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, value))));\n}\n\nexport default withStyles(styles, {\n name: 'PrivateValueLabel'\n})(ValueLabel);","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\nimport { alpha, lighten, darken } from '../styles/colorManipulator';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport capitalize from '../utils/capitalize';\nimport useControlled from '../utils/useControlled';\nimport ValueLabel from './ValueLabel';\n\nfunction asc(a, b) {\n return a - b;\n}\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(min, value), max);\n}\n\nfunction findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n\n return closestIndex;\n}\n\nfunction trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n\n return false;\n }\n\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\n\nfunction valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\n\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\n\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\nfunction roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\n\nfunction setValueIndex(_ref) {\n var values = _ref.values,\n source = _ref.source,\n newValue = _ref.newValue,\n index = _ref.index;\n\n // Performance shortcut\n if (values[index] === newValue) {\n return source;\n }\n\n var output = values.slice();\n output[index] = newValue;\n return output;\n}\n\nfunction focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n\n if (!sliderRef.current.contains(document.activeElement) || Number(document.activeElement.getAttribute('data-index')) !== activeIndex) {\n sliderRef.current.querySelector(\"[role=\\\"slider\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\")).focus();\n }\n\n if (setActive) {\n setActive(activeIndex);\n }\n}\n\nvar axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\n\nvar Identity = function Identity(x) {\n return x;\n};\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 2,\n width: '100%',\n boxSizing: 'content-box',\n padding: '13px 0',\n display: 'inline-block',\n position: 'relative',\n cursor: 'pointer',\n touchAction: 'none',\n color: theme.palette.primary.main,\n WebkitTapHighlightColor: 'transparent',\n '&$disabled': {\n pointerEvents: 'none',\n cursor: 'default',\n color: theme.palette.grey[400]\n },\n '&$vertical': {\n width: 2,\n height: '100%',\n padding: '0 13px'\n },\n // The primary input mechanism of the device includes a pointing device of limited accuracy.\n '@media (pointer: coarse)': {\n // Reach 42px touch target, about ~8mm on screen.\n padding: '20px 0',\n '&$vertical': {\n padding: '0 20px'\n }\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `marks` is provided with at least one label. */\n marked: {\n marginBottom: 20,\n '&$vertical': {\n marginBottom: 'auto',\n marginRight: 20\n }\n },\n\n /* Pseudo-class applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Pseudo-class applied to the root and thumb element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the rail element. */\n rail: {\n display: 'block',\n position: 'absolute',\n width: '100%',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n opacity: 0.38,\n '$vertical &': {\n height: '100%',\n width: 2\n }\n },\n\n /* Styles applied to the track element. */\n track: {\n display: 'block',\n position: 'absolute',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n '$vertical &': {\n width: 2\n }\n },\n\n /* Styles applied to the track element if `track={false}`. */\n trackFalse: {\n '& $track': {\n display: 'none'\n }\n },\n\n /* Styles applied to the track element if `track=\"inverted\"`. */\n trackInverted: {\n '& $track': {\n backgroundColor: // Same logic as the LinearProgress track color\n theme.palette.type === 'light' ? lighten(theme.palette.primary.main, 0.62) : darken(theme.palette.primary.main, 0.5)\n },\n '& $rail': {\n opacity: 1\n }\n },\n\n /* Styles applied to the thumb element. */\n thumb: {\n position: 'absolute',\n width: 12,\n height: 12,\n marginLeft: -6,\n marginTop: -5,\n boxSizing: 'border-box',\n borderRadius: '50%',\n outline: 0,\n backgroundColor: 'currentColor',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: theme.transitions.create(['box-shadow'], {\n duration: theme.transitions.duration.shortest\n }),\n '&::after': {\n position: 'absolute',\n content: '\"\"',\n borderRadius: '50%',\n // reach 42px hit target (2 * 15 + thumb diameter)\n left: -15,\n top: -15,\n right: -15,\n bottom: -15\n },\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.primary.main, 0.16)),\n '@media (hover: none)': {\n boxShadow: 'none'\n }\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.primary.main, 0.16))\n },\n '&$disabled': {\n width: 8,\n height: 8,\n marginLeft: -4,\n marginTop: -3,\n '&:hover': {\n boxShadow: 'none'\n }\n },\n '$vertical &': {\n marginLeft: -5,\n marginBottom: -6\n },\n '$vertical &$disabled': {\n marginLeft: -3,\n marginBottom: -4\n }\n },\n\n /* Styles applied to the thumb element if `color=\"primary\"`. */\n thumbColorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the thumb element if `color=\"secondary\"`. */\n thumbColorSecondary: {\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.secondary.main, 0.16))\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.secondary.main, 0.16))\n }\n },\n\n /* Pseudo-class applied to the thumb element if it's active. */\n active: {},\n\n /* Pseudo-class applied to the thumb element if keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the thumb label element. */\n valueLabel: {\n // IE 11 centering bug, to remove from the customization demos once no longer supported\n left: 'calc(-50% - 4px)'\n },\n\n /* Styles applied to the mark element. */\n mark: {\n position: 'absolute',\n width: 2,\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the mark element if active (depending on the value). */\n markActive: {\n backgroundColor: theme.palette.background.paper,\n opacity: 0.8\n },\n\n /* Styles applied to the mark label element. */\n markLabel: _extends({}, theme.typography.body2, {\n color: theme.palette.text.secondary,\n position: 'absolute',\n top: 26,\n transform: 'translateX(-50%)',\n whiteSpace: 'nowrap',\n '$vertical &': {\n top: 'auto',\n left: 26,\n transform: 'translateY(50%)'\n },\n '@media (pointer: coarse)': {\n top: 40,\n '$vertical &': {\n left: 31\n }\n }\n }),\n\n /* Styles applied to the mark label element if active (depending on the value). */\n markLabelActive: {\n color: theme.palette.text.primary\n }\n };\n};\nvar Slider = /*#__PURE__*/React.forwardRef(function Slider(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledby = props['aria-labelledby'],\n ariaValuetext = props['aria-valuetext'],\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n defaultValue = props.defaultValue,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n getAriaLabel = props.getAriaLabel,\n getAriaValueText = props.getAriaValueText,\n _props$marks = props.marks,\n marksProp = _props$marks === void 0 ? false : _props$marks,\n _props$max = props.max,\n max = _props$max === void 0 ? 100 : _props$max,\n _props$min = props.min,\n min = _props$min === void 0 ? 0 : _props$min,\n name = props.name,\n onChange = props.onChange,\n onChangeCommitted = props.onChangeCommitted,\n onMouseDown = props.onMouseDown,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$scale = props.scale,\n scale = _props$scale === void 0 ? Identity : _props$scale,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n _props$ThumbComponent = props.ThumbComponent,\n ThumbComponent = _props$ThumbComponent === void 0 ? 'span' : _props$ThumbComponent,\n _props$track = props.track,\n track = _props$track === void 0 ? 'normal' : _props$track,\n valueProp = props.value,\n _props$ValueLabelComp = props.ValueLabelComponent,\n ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel : _props$ValueLabelComp,\n _props$valueLabelDisp = props.valueLabelDisplay,\n valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp,\n _props$valueLabelForm = props.valueLabelFormat,\n valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"aria-valuetext\", \"classes\", \"className\", \"color\", \"component\", \"defaultValue\", \"disabled\", \"getAriaLabel\", \"getAriaValueText\", \"marks\", \"max\", \"min\", \"name\", \"onChange\", \"onChangeCommitted\", \"onMouseDown\", \"orientation\", \"scale\", \"step\", \"ThumbComponent\", \"track\", \"value\", \"ValueLabelComponent\", \"valueLabelDisplay\", \"valueLabelFormat\"]);\n\n var theme = useTheme();\n var touchId = React.useRef(); // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transfered when inversing a range slider.\n\n var _React$useState = React.useState(-1),\n active = _React$useState[0],\n setActive = _React$useState[1];\n\n var _React$useState2 = React.useState(-1),\n open = _React$useState2[0],\n setOpen = _React$useState2[1];\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Slider'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n valueDerived = _useControlled2[0],\n setValueState = _useControlled2[1];\n\n var range = Array.isArray(valueDerived);\n var values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(function (value) {\n return clamp(value, min, max);\n });\n var marks = marksProp === true && step !== null ? _toConsumableArray(Array(Math.floor((max - min) / step) + 1)).map(function (_, index) {\n return {\n value: min + step * index\n };\n }) : marksProp || [];\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(-1),\n focusVisible = _React$useState3[0],\n setFocusVisible = _React$useState3[1];\n\n var sliderRef = React.useRef();\n var handleFocusRef = useForkRef(focusVisibleRef, sliderRef);\n var handleRef = useForkRef(ref, handleFocusRef);\n var handleFocus = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n\n if (isFocusVisible(event)) {\n setFocusVisible(index);\n }\n\n setOpen(index);\n });\n var handleBlur = useEventCallback(function () {\n if (focusVisible !== -1) {\n setFocusVisible(-1);\n onBlurVisible();\n }\n\n setOpen(-1);\n });\n var handleMouseOver = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n });\n var handleMouseLeave = useEventCallback(function () {\n setOpen(-1);\n });\n var isRtl = theme.direction === 'rtl';\n var handleKeyDown = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n var value = values[index];\n var tenPercents = (max - min) / 10;\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var marksIndex = marksValues.indexOf(value);\n var newValue;\n var increaseKey = isRtl ? 'ArrowLeft' : 'ArrowRight';\n var decreaseKey = isRtl ? 'ArrowRight' : 'ArrowLeft';\n\n switch (event.key) {\n case 'Home':\n newValue = min;\n break;\n\n case 'End':\n newValue = max;\n break;\n\n case 'PageUp':\n if (step) {\n newValue = value + tenPercents;\n }\n\n break;\n\n case 'PageDown':\n if (step) {\n newValue = value - tenPercents;\n }\n\n break;\n\n case increaseKey:\n case 'ArrowUp':\n if (step) {\n newValue = value + step;\n } else {\n newValue = marksValues[marksIndex + 1] || marksValues[marksValues.length - 1];\n }\n\n break;\n\n case decreaseKey:\n case 'ArrowDown':\n if (step) {\n newValue = value - step;\n } else {\n newValue = marksValues[marksIndex - 1] || marksValues[0];\n }\n\n break;\n\n default:\n return;\n } // Prevent scroll of the page\n\n\n event.preventDefault();\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n }\n\n newValue = clamp(newValue, min, max);\n\n if (range) {\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values,\n source: valueDerived,\n newValue: newValue,\n index: index\n }).sort(asc);\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: newValue.indexOf(previousValue)\n });\n }\n\n setValueState(newValue);\n setFocusVisible(index);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n });\n var previousIndex = React.useRef();\n var axis = orientation;\n\n if (isRtl && orientation !== \"vertical\") {\n axis += '-reverse';\n }\n\n var getFingerNewValue = function getFingerNewValue(_ref3) {\n var finger = _ref3.finger,\n _ref3$move = _ref3.move,\n move = _ref3$move === void 0 ? false : _ref3$move,\n values2 = _ref3.values,\n source = _ref3.source;\n var slider = sliderRef.current;\n\n var _slider$getBoundingCl = slider.getBoundingClientRect(),\n width = _slider$getBoundingCl.width,\n height = _slider$getBoundingCl.height,\n bottom = _slider$getBoundingCl.bottom,\n left = _slider$getBoundingCl.left;\n\n var percent;\n\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n\n var newValue;\n newValue = percentToValue(percent, min, max);\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n\n newValue = clamp(newValue, min, max);\n var activeIndex = 0;\n\n if (range) {\n if (!move) {\n activeIndex = findClosest(values2, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values2,\n source: source,\n newValue: newValue,\n index: activeIndex\n }).sort(asc);\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n\n return {\n newValue: newValue,\n activeIndex: activeIndex\n };\n };\n\n var handleTouchMove = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue = getFingerNewValue({\n finger: finger,\n move: true,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue.newValue,\n activeIndex = _getFingerNewValue.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n });\n var handleTouchEnd = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue2 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue2.newValue;\n\n setActive(-1);\n\n if (event.type === 'touchend') {\n setOpen(-1);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n\n touchId.current = undefined;\n var doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n });\n var handleTouchStart = useEventCallback(function (event) {\n // Workaround as Safari has partial support for touchAction: 'none'.\n event.preventDefault();\n var touch = event.changedTouches[0];\n\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue3 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue3.newValue,\n activeIndex = _getFingerNewValue3.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n React.useEffect(function () {\n var slider = sliderRef.current;\n slider.addEventListener('touchstart', handleTouchStart);\n var doc = ownerDocument(slider);\n return function () {\n slider.removeEventListener('touchstart', handleTouchStart);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n };\n }, [handleTouchEnd, handleTouchMove, handleTouchStart]);\n var handleMouseDown = useEventCallback(function (event) {\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n event.preventDefault();\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue4 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue4.newValue,\n activeIndex = _getFingerNewValue4.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove);\n doc.addEventListener('mouseup', handleTouchEnd);\n });\n var trackOffset = valueToPercent(range ? values[0] : min, min, max);\n var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n\n var trackStyle = _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: handleRef,\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, disabled && classes.disabled, marks.length > 0 && marks.some(function (mark) {\n return mark.label;\n }) && classes.marked, track === false && classes.trackFalse, orientation === 'vertical' && classes.vertical, track === 'inverted' && classes.trackInverted),\n onMouseDown: handleMouseDown\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.rail\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track,\n style: trackStyle\n }), /*#__PURE__*/React.createElement(\"input\", {\n value: values.join(','),\n name: name,\n type: \"hidden\"\n }), marks.map(function (mark, index) {\n var percent = valueToPercent(mark.value, min, max);\n var style = axisProps[axis].offset(percent);\n var markActive;\n\n if (track === false) {\n markActive = values.indexOf(mark.value) !== -1;\n } else {\n markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: mark.value\n }, /*#__PURE__*/React.createElement(\"span\", {\n style: style,\n \"data-index\": index,\n className: clsx(classes.mark, markActive && classes.markActive)\n }), mark.label != null ? /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true,\n \"data-index\": index,\n style: style,\n className: clsx(classes.markLabel, markActive && classes.markLabelActive)\n }, mark.label) : null);\n }), values.map(function (value, index) {\n var percent = valueToPercent(value, min, max);\n var style = axisProps[axis].offset(percent);\n return /*#__PURE__*/React.createElement(ValueLabelComponent, {\n key: index,\n valueLabelFormat: valueLabelFormat,\n valueLabelDisplay: valueLabelDisplay,\n className: classes.valueLabel,\n value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,\n index: index,\n open: open === index || active === index || valueLabelDisplay === 'on',\n disabled: disabled\n }, /*#__PURE__*/React.createElement(ThumbComponent, {\n className: clsx(classes.thumb, classes[\"thumbColor\".concat(capitalize(color))], active === index && classes.active, disabled && classes.disabled, focusVisible === index && classes.focusVisible),\n tabIndex: disabled ? null : 0,\n role: \"slider\",\n style: style,\n \"data-index\": index,\n \"aria-label\": getAriaLabel ? getAriaLabel(index) : ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-orientation\": orientation,\n \"aria-valuemax\": scale(max),\n \"aria-valuemin\": scale(min),\n \"aria-valuenow\": scale(value),\n \"aria-valuetext\": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n }));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Slider.propTypes = {\n /**\n * The label of the slider.\n */\n 'aria-label': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-label'] != null) {\n return new Error('Material-UI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * The id of the element containing a label for the slider.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * A string value that provides a user-friendly name for the current value of the slider.\n */\n 'aria-valuetext': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-valuetext'] != null) {\n return new Error('Material-UI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * If `true`, the slider will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.\n *\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaLabel: PropTypes.func,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.\n *\n * @param {number} value The thumb label's value to format.\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaValueText: PropTypes.func,\n\n /**\n * Marks indicate predetermined values to which the user can move the slider.\n * If `true` the marks will be spaced according the value of the `step` prop.\n * If an array, it should contain objects with `value` and an optional `label` keys.\n */\n marks: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),\n\n /**\n * The maximum allowed value of the slider.\n * Should not be equal to min.\n */\n max: PropTypes.number,\n\n /**\n * The minimum allowed value of the slider.\n * Should not be equal to max.\n */\n min: PropTypes.number,\n\n /**\n * Name attribute of the hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChange: PropTypes.func,\n\n /**\n * Callback function that is fired when the `mouseup` is triggered.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChangeCommitted: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n\n /**\n * The slider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * A transformation function, to change the scale of the slider.\n */\n scale: PropTypes.func,\n\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.)\n * The `min` prop serves as the origin for the valid values.\n * We recommend (max - min) to be evenly divisible by the step.\n *\n * When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.\n */\n step: PropTypes.number,\n\n /**\n * The component used to display the value label.\n */\n ThumbComponent: PropTypes.elementType,\n\n /**\n * The track presentation:\n *\n * - `normal` the track will render a bar representing the slider value.\n * - `inverted` the track will render a bar representing the remaining slider value.\n * - `false` the track will render without a bar.\n */\n track: PropTypes.oneOf(['normal', false, 'inverted']),\n\n /**\n * The value of the slider.\n * For ranged sliders, provide an array with two values.\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * The value label component.\n */\n ValueLabelComponent: PropTypes.elementType,\n\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n */\n valueLabelDisplay: PropTypes.oneOf(['on', 'auto', 'off']),\n\n /**\n * The format function the value label's value.\n *\n * When a function is provided, it should have the following signature:\n *\n * - {number} value The value label's value to format\n * - {number} index The value label's index to format\n */\n valueLabelFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSlider'\n})(Slider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n flex: 1,\n position: 'relative'\n },\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {}\n};\nvar Step = /*#__PURE__*/React.forwardRef(function Step(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n connectorProp = props.connector,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$expanded = props.expanded,\n expanded = _props$expanded === void 0 ? false : _props$expanded,\n index = props.index,\n last = props.last,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"connector\", \"disabled\", \"expanded\", \"index\", \"last\", \"orientation\"]);\n\n var connector = connectorProp ? /*#__PURE__*/React.cloneElement(connectorProp, {\n orientation: orientation,\n alternativeLabel: alternativeLabel,\n index: index,\n active: active,\n completed: completed,\n disabled: disabled\n }) : null;\n var newChildren = /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, completed && classes.completed),\n ref: ref\n }, other), connector && alternativeLabel && index !== 0 ? connector : null, React.Children.map(children, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Step component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/React.cloneElement(child, _extends({\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n expanded: expanded,\n last: last,\n icon: index + 1,\n orientation: orientation\n }, child.props));\n }));\n\n if (connector && !alternativeLabel && index !== 0) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, connector, newChildren);\n }\n\n return newChildren;\n});\nprocess.env.NODE_ENV !== \"production\" ? Step.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Sets the step as active. Is passed to child components.\n */\n active: PropTypes.bool,\n\n /**\n * Should be `Step` sub-components such as `StepLabel`, `StepContent`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: PropTypes.bool,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepButton` is a child of `Step`. Is passed to child components.\n */\n disabled: PropTypes.bool,\n\n /**\n * Expand the step.\n */\n expanded: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStep'\n})(Step);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z\"\n}), 'CheckCircle');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"\n}), 'Warning');","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport CheckCircle from '../internal/svg-icons/CheckCircle';\nimport Warning from '../internal/svg-icons/Warning';\nimport withStyles from '../styles/withStyles';\nimport SvgIcon from '../SvgIcon';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n color: theme.palette.text.disabled,\n '&$completed': {\n color: theme.palette.primary.main\n },\n '&$active': {\n color: theme.palette.primary.main\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Styles applied to the SVG text element. */\n text: {\n fill: theme.palette.primary.contrastText,\n fontSize: theme.typography.caption.fontSize,\n fontFamily: theme.typography.fontFamily\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {}\n };\n};\n\nvar _ref = /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"12\"\n});\n\nvar StepIcon = /*#__PURE__*/React.forwardRef(function StepIcon(props, ref) {\n var _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n icon = props.icon,\n _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n classes = props.classes;\n\n if (typeof icon === 'number' || typeof icon === 'string') {\n var className = clsx(classes.root, active && classes.active, error && classes.error, completed && classes.completed);\n\n if (error) {\n return /*#__PURE__*/React.createElement(Warning, {\n className: className,\n ref: ref\n });\n }\n\n if (completed) {\n return /*#__PURE__*/React.createElement(CheckCircle, {\n className: className,\n ref: ref\n });\n }\n\n return /*#__PURE__*/React.createElement(SvgIcon, {\n className: className,\n ref: ref\n }, _ref, /*#__PURE__*/React.createElement(\"text\", {\n className: classes.text,\n x: \"12\",\n y: \"16\",\n textAnchor: \"middle\"\n }, icon));\n }\n\n return icon;\n});\nprocess.env.NODE_ENV !== \"production\" ? StepIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Whether this step is active.\n */\n active: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: PropTypes.bool,\n\n /**\n * Mark the step as failed.\n */\n error: PropTypes.bool,\n\n /**\n * The label displayed in the step icon.\n */\n icon: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepIcon'\n})(StepIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport StepIcon from '../StepIcon';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n '&$alternativeLabel': {\n flexDirection: 'column'\n },\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the `Typography` component which wraps `children`. */\n label: {\n color: theme.palette.text.secondary,\n '&$active': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$completed': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$alternativeLabel': {\n textAlign: 'center',\n marginTop: 16\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Pseudo-class applied to the `Typography` component if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the `Typography` component if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the `icon` container element. */\n iconContainer: {\n flexShrink: 0,\n // Fix IE 11 issue\n display: 'flex',\n paddingRight: 8,\n '&$alternativeLabel': {\n paddingRight: 0\n }\n },\n\n /* Pseudo-class applied to the root and icon container and `Typography` if `alternativeLabel={true}`. */\n alternativeLabel: {},\n\n /* Styles applied to the container element which wraps `Typography` and `optional`. */\n labelContainer: {\n width: '100%'\n }\n };\n};\nvar StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n StepIconComponentProp = props.StepIconComponent,\n StepIconProps = props.StepIconProps,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"error\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\", \"StepIconComponent\", \"StepIconProps\"]);\n\n var StepIconComponent = StepIconComponentProp;\n\n if (icon && !StepIconComponent) {\n StepIconComponent = StepIcon;\n }\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[orientation], className, disabled && classes.disabled, alternativeLabel && classes.alternativeLabel, error && classes.error),\n ref: ref\n }, other), icon || StepIconComponent ? /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.iconContainer, alternativeLabel && classes.alternativeLabel)\n }, /*#__PURE__*/React.createElement(StepIconComponent, _extends({\n completed: completed,\n active: active,\n error: error,\n icon: icon\n }, StepIconProps))) : null, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.labelContainer\n }, children ? /*#__PURE__*/React.createElement(Typography, {\n variant: \"body2\",\n component: \"span\",\n display: \"block\",\n className: clsx(classes.label, alternativeLabel && classes.alternativeLabel, completed && classes.completed, active && classes.active, error && classes.error)\n }, children) : null, optional));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * In most cases will simply be a string containing a title for the label.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepLabelButton` is a child of `StepLabel`. Is passed to child components.\n */\n disabled: PropTypes.bool,\n\n /**\n * Mark the step as failed.\n */\n error: PropTypes.bool,\n\n /**\n * Override the default label of the step icon.\n */\n icon: PropTypes.node,\n\n /**\n * The optional node to display.\n */\n optional: PropTypes.node,\n\n /**\n * The component to render in place of the [`StepIcon`](/api/step-icon/).\n */\n StepIconComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`StepIcon`](/api/step-icon/) element.\n */\n StepIconProps: PropTypes.object\n} : void 0;\nStepLabel.muiName = 'StepLabel';\nexport default withStyles(styles, {\n name: 'MuiStepLabel'\n})(StepLabel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport StepLabel from '../StepLabel';\nimport isMuiElement from '../utils/isMuiElement';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n padding: '24px 16px',\n margin: '-24px -16px',\n boxSizing: 'content-box'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n justifyContent: 'flex-start',\n padding: '8px',\n margin: '-8px'\n },\n\n /* Styles applied to the `ButtonBase` touch-ripple. */\n touchRipple: {\n color: 'rgba(0, 0, 0, 0.3)'\n }\n};\nvar StepButton = /*#__PURE__*/React.forwardRef(function StepButton(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\"]);\n\n var childProps = {\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n icon: icon,\n optional: optional,\n orientation: orientation\n };\n var child = isMuiElement(children, ['StepLabel']) ? /*#__PURE__*/React.cloneElement(children, childProps) : /*#__PURE__*/React.createElement(StepLabel, childProps, children);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: true,\n disabled: disabled,\n TouchRippleProps: {\n className: classes.touchRipple\n },\n className: clsx(classes.root, classes[orientation], className),\n ref: ref\n }, other), child);\n});\nprocess.env.NODE_ENV !== \"production\" ? StepButton.propTypes = {\n /**\n * @ignore\n * Passed in via `Step` - passed through to `StepLabel`.\n */\n active: PropTypes.bool,\n\n /**\n * @ignore\n * Set internally by Stepper when it's supplied with the alternativeLabel property.\n */\n alternativeLabel: PropTypes.bool,\n\n /**\n * Can be a `StepLabel` or a node to place inside `StepLabel` as children.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * Sets completed styling. Is passed to StepLabel.\n */\n completed: PropTypes.bool,\n\n /**\n * @ignore\n * Disables the button and sets disabled styling. Is passed to StepLabel.\n */\n disabled: PropTypes.bool,\n\n /**\n * @ignore\n * potentially passed from parent `Step`\n */\n expanded: PropTypes.bool,\n\n /**\n * The icon displayed by the step label.\n */\n icon: PropTypes.node,\n\n /**\n * @ignore\n */\n last: PropTypes.bool,\n\n /**\n * The optional node to display.\n */\n optional: PropTypes.node,\n\n /**\n * @ignore\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepButton'\n})(StepButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n marginLeft: 12,\n // half icon\n padding: '0 0 8px'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n position: 'absolute',\n top: 8 + 4,\n left: 'calc(-50% + 20px)',\n right: 'calc(50% + 20px)'\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the line element. */\n line: {\n display: 'block',\n borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n lineHorizontal: {\n borderTopStyle: 'solid',\n borderTopWidth: 1\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n lineVertical: {\n borderLeftStyle: 'solid',\n borderLeftWidth: 1,\n minHeight: 24\n }\n };\n};\nvar StepConnector = /*#__PURE__*/React.forwardRef(function StepConnector(props, ref) {\n var active = props.active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n index = props.index,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"classes\", \"className\", \"completed\", \"disabled\", \"index\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, active && classes.active, completed && classes.completed, disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.line, {\n 'horizontal': classes.lineHorizontal,\n 'vertical': classes.lineVertical\n }[orientation])\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepConnector.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepConnector'\n})(StepConnector);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Collapse from '../Collapse';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n marginTop: 8,\n marginLeft: 12,\n // half icon\n paddingLeft: 8 + 12,\n // margin + half icon\n paddingRight: 8,\n borderLeft: \"1px solid \".concat(theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])\n },\n\n /* Styles applied to the root element if `last={true}` (controlled by `Step`). */\n last: {\n borderLeft: 'none'\n },\n\n /* Styles applied to the Transition component. */\n transition: {}\n };\n};\nvar StepContent = /*#__PURE__*/React.forwardRef(function StepContent(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n expanded = props.expanded,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"expanded\", \"last\", \"optional\", \"orientation\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (orientation !== 'vertical') {\n console.error('Material-UI: is only designed for use with the vertical stepper.');\n }\n }\n\n var transitionDuration = transitionDurationProp;\n\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, last && classes.last),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: active || expanded,\n className: classes.transition,\n timeout: transitionDuration,\n unmountOnExit: true\n }, TransitionProps), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? StepContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Step content.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Adjust the duration of the content expand transition.\n * Passed as a prop to the transition component.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepContent'\n})(StepContent);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Paper from '../Paper';\nimport StepConnector from '../StepConnector';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: 24\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n alignItems: 'flex-start'\n }\n};\nvar defaultConnector = /*#__PURE__*/React.createElement(StepConnector, null);\nvar Stepper = /*#__PURE__*/React.forwardRef(function Stepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$connector = props.connector,\n connectorProp = _props$connector === void 0 ? defaultConnector : _props$connector,\n _props$nonLinear = props.nonLinear,\n nonLinear = _props$nonLinear === void 0 ? false : _props$nonLinear,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = _objectWithoutProperties(props, [\"activeStep\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"connector\", \"nonLinear\", \"orientation\"]);\n\n var connector = /*#__PURE__*/React.isValidElement(connectorProp) ? /*#__PURE__*/React.cloneElement(connectorProp, {\n orientation: orientation\n }) : null;\n var childrenArray = React.Children.toArray(children);\n var steps = childrenArray.map(function (step, index) {\n var state = {\n index: index,\n active: false,\n completed: false,\n disabled: false\n };\n\n if (activeStep === index) {\n state.active = true;\n } else if (!nonLinear && activeStep > index) {\n state.completed = true;\n } else if (!nonLinear && activeStep < index) {\n state.disabled = true;\n }\n\n return /*#__PURE__*/React.cloneElement(step, _extends({\n alternativeLabel: alternativeLabel,\n connector: connector,\n last: index + 1 === childrenArray.length,\n orientation: orientation\n }, state, step.props));\n });\n return /*#__PURE__*/React.createElement(Paper, _extends({\n square: true,\n elevation: 0,\n className: clsx(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel),\n ref: ref\n }, other), steps);\n});\nprocess.env.NODE_ENV !== \"production\" ? Stepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Set to -1 to disable all the steps.\n */\n activeStep: PropTypes.number,\n\n /**\n * If set to 'true' and orientation is horizontal,\n * then the step label will be positioned under the icon.\n */\n alternativeLabel: PropTypes.bool,\n\n /**\n * Two or more `` components.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * An element to be placed between each step.\n */\n connector: PropTypes.element,\n\n /**\n * If set the `Stepper` will not assist in controlling steps for linear flow.\n */\n nonLinear: PropTypes.bool,\n\n /**\n * The stepper orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiStepper'\n})(Stepper);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport { isHorizontal } from '../Drawer/Drawer';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'fixed',\n top: 0,\n left: 0,\n bottom: 0,\n zIndex: theme.zIndex.drawer - 1\n },\n anchorLeft: {\n right: 'auto'\n },\n anchorRight: {\n left: 'auto',\n right: 0\n },\n anchorTop: {\n bottom: 'auto',\n right: 0\n },\n anchorBottom: {\n top: 'auto',\n bottom: 0,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwipeArea = /*#__PURE__*/React.forwardRef(function SwipeArea(props, ref) {\n var anchor = props.anchor,\n classes = props.classes,\n className = props.className,\n width = props.width,\n other = _objectWithoutProperties(props, [\"anchor\", \"classes\", \"className\", \"width\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"anchor\".concat(capitalize(anchor))], className),\n ref: ref,\n style: _defineProperty({}, isHorizontal(anchor) ? 'width' : 'height', width)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeArea.propTypes = {\n /**\n * Side on which to attach the discovery area.\n */\n anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']).isRequired,\n\n /**\n * @ignore\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n width: PropTypes.number.isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwipeArea'\n})(SwipeArea);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport { getThemeProps } from '@material-ui/styles';\nimport Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps } from '../transitions/utils';\nimport NoSsr from '../NoSsr';\nimport SwipeArea from './SwipeArea'; // This value is closed to what browsers are using internally to\n// trigger a native scroll.\n\nvar UNCERTAINTY_THRESHOLD = 3; // px\n// We can only have one node at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\n\nvar nodeThatClaimedTheSwipe = null; // Exported for test purposes.\n\nexport function reset() {\n nodeThatClaimedTheSwipe = null;\n}\n\nfunction calculateCurrentX(anchor, touches) {\n return anchor === 'right' ? document.body.offsetWidth - touches[0].pageX : touches[0].pageX;\n}\n\nfunction calculateCurrentY(anchor, touches) {\n return anchor === 'bottom' ? window.innerHeight - touches[0].clientY : touches[0].clientY;\n}\n\nfunction getMaxTranslate(horizontalSwipe, paperInstance) {\n return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight;\n}\n\nfunction getTranslate(currentTranslate, startLocation, open, maxTranslate) {\n return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate);\n}\n\nfunction getDomTreeShapes(element, rootNode) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129\n var domTreeShapes = [];\n\n while (element && element !== rootNode) {\n var style = window.getComputedStyle(element);\n\n if ( // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n domTreeShapes = [];\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push(element);\n }\n\n element = element.parentElement;\n }\n\n return domTreeShapes;\n}\n\nfunction findNativeHandler(_ref) {\n var domTreeShapes = _ref.domTreeShapes,\n start = _ref.start,\n current = _ref.current,\n anchor = _ref.anchor;\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175\n var axisProperties = {\n scrollPosition: {\n x: 'scrollLeft',\n y: 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n y: 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n y: 'clientHeight'\n }\n };\n return domTreeShapes.some(function (shape) {\n // Determine if we are going backward or forward.\n var goingForward = current >= start;\n\n if (anchor === 'top' || anchor === 'left') {\n goingForward = !goingForward;\n }\n\n var axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y';\n var scrollPosition = shape[axisProperties.scrollPosition[axis]];\n var areNotAtStart = scrollPosition > 0;\n var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n return shape;\n }\n\n return null;\n });\n}\n\nvar iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);\nvar transitionDurationDefault = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {\n var theme = useTheme();\n var props = getThemeProps({\n name: 'MuiSwipeableDrawer',\n props: _extends({}, inProps),\n theme: theme\n });\n var _props$anchor = props.anchor,\n anchor = _props$anchor === void 0 ? 'left' : _props$anchor,\n _props$disableBackdro = props.disableBackdropTransition,\n disableBackdropTransition = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableDiscove = props.disableDiscovery,\n disableDiscovery = _props$disableDiscove === void 0 ? false : _props$disableDiscove,\n _props$disableSwipeTo = props.disableSwipeToOpen,\n disableSwipeToOpen = _props$disableSwipeTo === void 0 ? iOS : _props$disableSwipeTo,\n hideBackdrop = props.hideBackdrop,\n _props$hysteresis = props.hysteresis,\n hysteresis = _props$hysteresis === void 0 ? 0.52 : _props$hysteresis,\n _props$minFlingVeloci = props.minFlingVelocity,\n minFlingVelocity = _props$minFlingVeloci === void 0 ? 450 : _props$minFlingVeloci,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropProps = _props$ModalProps.BackdropProps,\n ModalPropsProp = _objectWithoutProperties(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n onOpen = props.onOpen,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SwipeAreaProps = props.SwipeAreaProps,\n _props$swipeAreaWidth = props.swipeAreaWidth,\n swipeAreaWidth = _props$swipeAreaWidth === void 0 ? 20 : _props$swipeAreaWidth,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? transitionDurationDefault : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = _objectWithoutProperties(props, [\"anchor\", \"disableBackdropTransition\", \"disableDiscovery\", \"disableSwipeToOpen\", \"hideBackdrop\", \"hysteresis\", \"minFlingVelocity\", \"ModalProps\", \"onClose\", \"onOpen\", \"open\", \"PaperProps\", \"SwipeAreaProps\", \"swipeAreaWidth\", \"transitionDuration\", \"variant\"]);\n\n var _React$useState = React.useState(false),\n maybeSwiping = _React$useState[0],\n setMaybeSwiping = _React$useState[1];\n\n var swipeInstance = React.useRef({\n isSwiping: null\n });\n var swipeAreaRef = React.useRef();\n var backdropRef = React.useRef();\n var paperRef = React.useRef();\n var touchDetected = React.useRef(false); // Ref for transition duration based on / to match swipe speed\n\n var calculatedDurationRef = React.useRef(); // Use a ref so the open value used is always up to date inside useCallback.\n\n useEnhancedEffect(function () {\n calculatedDurationRef.current = null;\n }, [open]);\n var setPosition = React.useCallback(function (translate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$mode = options.mode,\n mode = _options$mode === void 0 ? null : _options$mode,\n _options$changeTransi = options.changeTransition,\n changeTransition = _options$changeTransi === void 0 ? true : _options$changeTransi;\n var anchorRtl = getAnchor(theme, anchor);\n var rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1;\n var horizontalSwipe = isHorizontal(anchor);\n var transform = horizontalSwipe ? \"translate(\".concat(rtlTranslateMultiplier * translate, \"px, 0)\") : \"translate(0, \".concat(rtlTranslateMultiplier * translate, \"px)\");\n var drawerStyle = paperRef.current.style;\n drawerStyle.webkitTransform = transform;\n drawerStyle.transform = transform;\n var transition = '';\n\n if (mode) {\n transition = theme.transitions.create('all', getTransitionProps({\n timeout: transitionDuration\n }, {\n mode: mode\n }));\n }\n\n if (changeTransition) {\n drawerStyle.webkitTransition = transition;\n drawerStyle.transition = transition;\n }\n\n if (!disableBackdropTransition && !hideBackdrop) {\n var backdropStyle = backdropRef.current.style;\n backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current);\n\n if (changeTransition) {\n backdropStyle.webkitTransition = transition;\n backdropStyle.transition = transition;\n }\n }\n }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);\n var handleBodyTouchEnd = useEventCallback(function (event) {\n if (!touchDetected.current) {\n return;\n }\n\n nodeThatClaimedTheSwipe = null;\n touchDetected.current = false;\n setMaybeSwiping(false); // The swipe wasn't started.\n\n if (!swipeInstance.current.isSwiping) {\n swipeInstance.current.isSwiping = null;\n return;\n }\n\n swipeInstance.current.isSwiping = null;\n var anchorRtl = getAnchor(theme, anchor);\n var horizontal = isHorizontal(anchor);\n var current;\n\n if (horizontal) {\n current = calculateCurrentX(anchorRtl, event.changedTouches);\n } else {\n current = calculateCurrentY(anchorRtl, event.changedTouches);\n }\n\n var startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY;\n var maxTranslate = getMaxTranslate(horizontal, paperRef.current);\n var currentTranslate = getTranslate(current, startLocation, open, maxTranslate);\n var translateRatio = currentTranslate / maxTranslate;\n\n if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) {\n // Calculate transition duration to match swipe speed\n calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000;\n }\n\n if (open) {\n if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) {\n onClose();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(0, {\n mode: 'exit'\n });\n }\n\n return;\n }\n\n if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) {\n onOpen();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(getMaxTranslate(horizontal, paperRef.current), {\n mode: 'enter'\n });\n }\n });\n var handleBodyTouchMove = useEventCallback(function (event) {\n // the ref may be null when a parent component updates while swiping\n if (!paperRef.current || !touchDetected.current) {\n return;\n } // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer\n\n\n if (nodeThatClaimedTheSwipe != null && nodeThatClaimedTheSwipe !== swipeInstance.current) {\n return;\n }\n\n var anchorRtl = getAnchor(theme, anchor);\n var horizontalSwipe = isHorizontal(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (open && paperRef.current.contains(event.target) && nodeThatClaimedTheSwipe == null) {\n var domTreeShapes = getDomTreeShapes(event.target, paperRef.current);\n var nativeHandler = findNativeHandler({\n domTreeShapes: domTreeShapes,\n start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY,\n current: horizontalSwipe ? currentX : currentY,\n anchor: anchor\n });\n\n if (nativeHandler) {\n nodeThatClaimedTheSwipe = nativeHandler;\n return;\n }\n\n nodeThatClaimedTheSwipe = swipeInstance.current;\n } // We don't know yet.\n\n\n if (swipeInstance.current.isSwiping == null) {\n var dx = Math.abs(currentX - swipeInstance.current.startX);\n var dy = Math.abs(currentY - swipeInstance.current.startY); // We are likely to be swiping, let's prevent the scroll event on iOS.\n\n if (dx > dy) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n\n var definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD;\n\n if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) {\n swipeInstance.current.isSwiping = definitelySwiping;\n\n if (!definitelySwiping) {\n handleBodyTouchEnd(event);\n return;\n } // Shift the starting point.\n\n\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY; // Compensate for the part of the drawer displayed on touch start.\n\n if (!disableDiscovery && !open) {\n if (horizontalSwipe) {\n swipeInstance.current.startX -= swipeAreaWidth;\n } else {\n swipeInstance.current.startY -= swipeAreaWidth;\n }\n }\n }\n }\n\n if (!swipeInstance.current.isSwiping) {\n return;\n }\n\n var maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current);\n var startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY;\n\n if (open && !swipeInstance.current.paperHit) {\n startLocation = Math.min(startLocation, maxTranslate);\n }\n\n var translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate);\n\n if (open) {\n if (!swipeInstance.current.paperHit) {\n var paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate;\n\n if (paperHit) {\n swipeInstance.current.paperHit = true;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n } else {\n return;\n }\n } else if (translate === 0) {\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n }\n }\n\n if (swipeInstance.current.lastTranslate === null) {\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now() + 1;\n }\n\n var velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3; // Low Pass filter.\n\n swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6;\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now(); // We are swiping, let's prevent the scroll event on iOS.\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n setPosition(translate);\n });\n var handleBodyTouchStart = useEventCallback(function (event) {\n // We are not supposed to handle this touch move.\n // Example of use case: ignore the event if there is a Slider.\n if (event.defaultPrevented) {\n return;\n } // We can only have one node at the time claiming ownership for handling the swipe.\n\n\n if (event.muiHandled) {\n return;\n } // At least one element clogs the drawer interaction zone.\n\n\n if (open && !backdropRef.current.contains(event.target) && !paperRef.current.contains(event.target)) {\n return;\n }\n\n var anchorRtl = getAnchor(theme, anchor);\n var horizontalSwipe = isHorizontal(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (!open) {\n if (disableSwipeToOpen || event.target !== swipeAreaRef.current) {\n return;\n }\n\n if (horizontalSwipe) {\n if (currentX > swipeAreaWidth) {\n return;\n }\n } else if (currentY > swipeAreaWidth) {\n return;\n }\n }\n\n event.muiHandled = true;\n nodeThatClaimedTheSwipe = null;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n setMaybeSwiping(true);\n\n if (!open && paperRef.current) {\n // The ref may be null when a parent component updates while swiping.\n setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 20 : -swipeAreaWidth), {\n changeTransition: false\n });\n }\n\n swipeInstance.current.velocity = 0;\n swipeInstance.current.lastTime = null;\n swipeInstance.current.lastTranslate = null;\n swipeInstance.current.paperHit = false;\n touchDetected.current = true;\n });\n React.useEffect(function () {\n if (variant === 'temporary') {\n var doc = ownerDocument(paperRef.current);\n doc.addEventListener('touchstart', handleBodyTouchStart);\n doc.addEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.addEventListener('touchend', handleBodyTouchEnd);\n return function () {\n doc.removeEventListener('touchstart', handleBodyTouchStart);\n doc.removeEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.removeEventListener('touchend', handleBodyTouchEnd);\n };\n }\n\n return undefined;\n }, [variant, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]);\n React.useEffect(function () {\n return function () {\n // We need to release the lock.\n if (nodeThatClaimedTheSwipe === swipeInstance.current) {\n nodeThatClaimedTheSwipe = null;\n }\n };\n }, []);\n React.useEffect(function () {\n if (!open) {\n setMaybeSwiping(false);\n }\n }, [open]);\n var handleBackdropRef = React.useCallback(function (instance) {\n // #StrictMode ready\n backdropRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, _extends({\n open: variant === 'temporary' && maybeSwiping ? true : open,\n variant: variant,\n ModalProps: _extends({\n BackdropProps: _extends({}, BackdropProps, {\n ref: handleBackdropRef\n })\n }, ModalPropsProp),\n PaperProps: _extends({}, PaperProps, {\n style: _extends({\n pointerEvents: variant === 'temporary' && !open ? 'none' : ''\n }, PaperProps.style),\n ref: paperRef\n }),\n anchor: anchor,\n transitionDuration: calculatedDurationRef.current || transitionDuration,\n onClose: onClose,\n ref: ref\n }, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/React.createElement(NoSsr, null, /*#__PURE__*/React.createElement(SwipeArea, _extends({\n anchor: anchor,\n ref: swipeAreaRef,\n width: swipeAreaWidth\n }, SwipeAreaProps))));\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeableDrawer.propTypes = {\n /**\n * @ignore\n */\n anchor: PropTypes.oneOf(['left', 'top', 'right', 'bottom']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Disable the backdrop transition.\n * This can improve the FPS on low-end devices.\n */\n disableBackdropTransition: PropTypes.bool,\n\n /**\n * If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit\n * to promote accidental discovery of the swipe gesture.\n */\n disableDiscovery: PropTypes.bool,\n\n /**\n * If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers\n * navigation actions. Swipe to open is disabled on iOS browsers by default.\n */\n disableSwipeToOpen: PropTypes.bool,\n\n /**\n * @ignore\n */\n hideBackdrop: PropTypes.bool,\n\n /**\n * Affects how far the drawer must be opened/closed to change his state.\n * Specified as percent (0-1) of the width of the drawer\n */\n hysteresis: PropTypes.number,\n\n /**\n * Defines, from which (average) velocity on, the swipe is\n * defined as complete although hysteresis isn't reached.\n * Good threshold is between 250 - 1000 px/s\n */\n minFlingVelocity: PropTypes.number,\n\n /**\n * @ignore\n */\n ModalProps: PropTypes.shape({\n BackdropProps: PropTypes.shape({\n component: elementTypeAcceptingRef\n })\n }),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func.isRequired,\n\n /**\n * Callback fired when the component requests to be opened.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func.isRequired,\n\n /**\n * If `true`, the drawer is open.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: PropTypes.shape({\n component: elementTypeAcceptingRef,\n style: PropTypes.object\n }),\n\n /**\n * The element is used to intercept the touch events on the edge.\n */\n SwipeAreaProps: PropTypes.object,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n swipeAreaWidth: PropTypes.number,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * @ignore\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default SwipeableDrawer;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// @inheritedComponent IconButton\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport capitalize from '../utils/capitalize';\nimport SwitchBase from '../internal/SwitchBase';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -8\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -8\n },\n\n /* Styles applied to the internal `SwitchBase` component's `root` class. */\n switchBase: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400],\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n '&$checked': {\n transform: 'translateX(20px)'\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n opacity: 0.5\n },\n '&$disabled + $track': {\n opacity: theme.palette.type === 'light' ? 0.12 : 0.1\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.primary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.secondary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n width: 40,\n height: 24,\n padding: 7,\n '& $thumb': {\n width: 16,\n height: 16\n },\n '& $switchBase': {\n padding: 4,\n '&$checked': {\n transform: 'translateX(16px)'\n }\n }\n },\n\n /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */\n checked: {},\n\n /* Pseudo-class applied to the internal SwitchBase component's disabled class. */\n disabled: {},\n\n /* Styles applied to the internal SwitchBase component's input element. */\n input: {\n left: '-100%',\n width: '300%'\n },\n\n /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */\n thumb: {\n boxShadow: theme.shadows[1],\n backgroundColor: 'currentColor',\n width: 20,\n height: 20,\n borderRadius: '50%'\n },\n\n /* Styles applied to the track element. */\n track: {\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,\n opacity: theme.palette.type === 'light' ? 0.38 : 0.3\n }\n };\n};\nvar Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"edge\", \"size\"]);\n\n var icon = /*#__PURE__*/React.createElement(\"span\", {\n className: classes.thumb\n });\n return /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.root, className, {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge], size === \"small\" && classes[\"size\".concat(capitalize(size))])\n }, /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n classes: {\n root: clsx(classes.switchBase, classes[\"color\".concat(capitalize(color))]),\n input: classes.input,\n checked: classes.checked,\n disabled: classes.disabled\n },\n ref: ref\n }, other)), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the switch.\n * `small` is equivalent to the dense switch styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSwitch'\n})(Switch);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n overflowX: 'auto'\n }\n};\nvar TableContainer = /*#__PURE__*/React.forwardRef(function TableContainer(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableContainer.propTypes = {\n /**\n * The table itself, normally `
` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nvar TableCell = /*#__PURE__*/React.forwardRef(function TableCell(props, ref) {\n var _props$align = props.align,\n align = _props$align === void 0 ? 'inherit' : _props$align,\n classes = props.classes,\n className = props.className,\n component = props.component,\n paddingProp = props.padding,\n scopeProp = props.scope,\n sizeProp = props.size,\n sortDirection = props.sortDirection,\n variantProp = props.variant,\n other = _objectWithoutProperties(props, [\"align\", \"classes\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"]);\n\n var table = React.useContext(TableContext);\n var tablelvl2 = React.useContext(Tablelvl2Context);\n var isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n var role;\n var Component;\n\n if (component) {\n Component = component;\n role = isHeadCell ? 'columnheader' : 'cell';\n } else {\n Component = isHeadCell ? 'th' : 'td';\n }\n\n var scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n var padding = paddingProp || (table && table.padding ? table.padding : 'normal');\n var size = sizeProp || (table && table.size ? table.size : 'medium');\n var variant = variantProp || tablelvl2 && tablelvl2.variant;\n var ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, classes[variant], className, align !== 'inherit' && classes[\"align\".concat(capitalize(align))], padding !== 'normal' && classes[\"padding\".concat(capitalize(padding))], size !== 'medium' && classes[\"size\".concat(capitalize(size))], variant === 'head' && table && table.stickyHeader && classes.stickyHeader),\n \"aria-sort\": ariaSort,\n role: role,\n scope: scope\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableCell.propTypes = {\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n */\n align: PropTypes.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The table cell contents.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Sets the padding applied to the cell.\n * By default, the Table parent component set the value (`normal`).\n * `default` is deprecated, use `normal` instead.\n */\n padding: chainPropTypes(PropTypes.oneOf(['normal', 'checkbox', 'none', 'default']), function (props) {\n if (props.padding === 'default') {\n return new Error('Material-UI: padding=\"default\" was renamed to padding=\"normal\" for consistency.');\n }\n\n return null;\n }),\n\n /**\n * Set scope attribute.\n */\n scope: PropTypes.string,\n\n /**\n * Specify the size of the cell.\n * By default, the Table parent component set the value (`medium`).\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: PropTypes.oneOf(['asc', 'desc', false]),\n\n /**\n * Specify the cell type.\n * By default, the TableHead, TableBody or TableFooter parent component set the value.\n */\n variant: PropTypes.oneOf(['body', 'footer', 'head'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableCell'\n})(TableCell);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-header-group'\n }\n};\nvar tablelvl2 = {\n variant: 'head'\n};\nvar defaultComponent = 'thead';\nvar TableHead = /*#__PURE__*/React.forwardRef(function TableHead(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableHead.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableHead'\n})(TableHead);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n '&$hover:hover': {\n backgroundColor: theme.palette.action.hover\n },\n '&$selected, &$selected:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity)\n }\n },\n\n /* Pseudo-class applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `hover={true}`. */\n hover: {},\n\n /* Styles applied to the root element if table variant=\"head\". */\n head: {},\n\n /* Styles applied to the root element if table variant=\"footer\". */\n footer: {}\n };\n};\nvar defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nvar TableRow = /*#__PURE__*/React.forwardRef(function TableRow(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n _props$hover = props.hover,\n hover = _props$hover === void 0 ? false : _props$hover,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"hover\", \"selected\"]);\n\n var tablelvl2 = React.useContext(Tablelvl2Context);\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className, tablelvl2 && {\n 'head': classes.head,\n 'footer': classes.footer\n }[tablelvl2.variant], hover && classes.hover, selected && classes.selected),\n role: Component === defaultComponent ? null : 'row'\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableRow.propTypes = {\n /**\n * Should be valid
`\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableContainer'\n})(TableContainer);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-footer-group'\n }\n};\nvar tablelvl2 = {\n variant: 'footer'\n};\nvar defaultComponent = 'tfoot';\nvar TableFooter = /*#__PURE__*/React.forwardRef(function TableFooter(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableFooter.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableFooter'\n})(TableFooter);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport useTheme from '../styles/useTheme';\nimport IconButton from '../IconButton';\n/**\n * @ignore - internal component.\n */\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowRight, null);\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowLeft, null);\n\nvar _ref3 = /*#__PURE__*/React.createElement(KeyboardArrowLeft, null);\n\nvar _ref4 = /*#__PURE__*/React.createElement(KeyboardArrowRight, null);\n\nvar TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {\n var backIconButtonProps = props.backIconButtonProps,\n count = props.count,\n nextIconButtonProps = props.nextIconButtonProps,\n _props$onChangePage = props.onChangePage,\n onChangePage = _props$onChangePage === void 0 ? function () {} : _props$onChangePage,\n _props$onPageChange = props.onPageChange,\n onPageChange = _props$onPageChange === void 0 ? function () {} : _props$onPageChange,\n page = props.page,\n rowsPerPage = props.rowsPerPage,\n other = _objectWithoutProperties(props, [\"backIconButtonProps\", \"count\", \"nextIconButtonProps\", \"onChangePage\", \"onPageChange\", \"page\", \"rowsPerPage\"]);\n\n var theme = useTheme();\n\n var handleBackButtonClick = function handleBackButtonClick(event) {\n onChangePage(event, page - 1);\n onPageChange(event, page - 1);\n };\n\n var handleNextButtonClick = function handleNextButtonClick(event) {\n onChangePage(event, page + 1);\n onPageChange(event, page + 1);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref\n }, other), /*#__PURE__*/React.createElement(IconButton, _extends({\n onClick: handleBackButtonClick,\n disabled: page === 0,\n color: \"inherit\"\n }, backIconButtonProps), theme.direction === 'rtl' ? _ref : _ref2), /*#__PURE__*/React.createElement(IconButton, _extends({\n onClick: handleNextButtonClick,\n disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false,\n color: \"inherit\"\n }, nextIconButtonProps), theme.direction === 'rtl' ? _ref3 : _ref4));\n});\nprocess.env.NODE_ENV !== \"production\" ? TablePaginationActions.propTypes = {\n /**\n * Props applied to the back arrow [`IconButton`](/api/icon-button/) element.\n */\n backIconButtonProps: PropTypes.object,\n\n /**\n * The total number of rows.\n */\n count: PropTypes.number.isRequired,\n\n /**\n * Props applied to the next arrow [`IconButton`](/api/icon-button/) element.\n */\n nextIconButtonProps: PropTypes.object,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onChangePage: PropTypes.func,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onPageChange: PropTypes.func,\n\n /**\n * The zero-based index of the current page.\n */\n page: PropTypes.number.isRequired,\n\n /**\n * The number of rows per page.\n */\n rowsPerPage: PropTypes.number.isRequired\n} : void 0;\nexport default TablePaginationActions;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@material-ui/utils';\nimport clsx from 'clsx';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport InputBase from '../InputBase';\nimport MenuItem from '../MenuItem';\nimport Select from '../Select';\nimport TableCell from '../TableCell';\nimport Toolbar from '../Toolbar';\nimport Typography from '../Typography';\nimport TablePaginationActions from './TablePaginationActions';\nimport useId from '../utils/unstable_useId';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.primary,\n fontSize: theme.typography.pxToRem(14),\n overflow: 'auto',\n // Increase the specificity to override TableCell.\n '&:last-child': {\n padding: 0\n }\n },\n\n /* Styles applied to the Toolbar component. */\n toolbar: {\n minHeight: 52,\n paddingRight: 2\n },\n\n /* Styles applied to the spacer element. */\n spacer: {\n flex: '1 1 100%'\n },\n\n /* Styles applied to the caption Typography components if `variant=\"caption\"`. */\n caption: {\n flexShrink: 0\n },\n // TODO v5: `.selectRoot` should be merged with `.input`\n\n /* Styles applied to the Select component root element. */\n selectRoot: {\n marginRight: 32,\n marginLeft: 8\n },\n\n /* Styles applied to the Select component `select` class. */\n select: {\n paddingLeft: 8,\n paddingRight: 24,\n textAlign: 'right',\n textAlignLast: 'right' // Align children such as `TableCell`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n */\n hover: PropTypes.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n */\n selected: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableRow'\n})(TableRow);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: 40,\n flexShrink: 0,\n opacity: 0.8,\n '&$disabled': {\n opacity: 0\n }\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n width: '100%',\n height: 40,\n '& svg': {\n transform: 'rotate(90deg)'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {}\n};\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowLeft, {\n fontSize: \"small\"\n});\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowRight, {\n fontSize: \"small\"\n});\n\nvar TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(props, ref) {\n var classes = props.classes,\n classNameProp = props.className,\n direction = props.direction,\n orientation = props.orientation,\n disabled = props.disabled,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"direction\", \"orientation\", \"disabled\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"div\",\n className: clsx(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),\n ref: ref,\n role: null,\n tabIndex: null\n }, other), direction === 'left' ? _ref : _ref2);\n});\nprocess.env.NODE_ENV !== \"production\" ? TabScrollButton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Which direction should the button indicate?\n */\n direction: PropTypes.oneOf(['left', 'right']).isRequired,\n\n /**\n * If `true`, the element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabScrollButton'\n})(TabScrollButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { deepmerge, elementAcceptingRef } from '@material-ui/utils';\nimport { alpha } from '../styles/colorManipulator';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport Grow from '../Grow';\nimport Popper from '../Popper';\nimport useForkRef from '../utils/useForkRef';\nimport useId from '../utils/unstable_useId';\nimport setRef from '../utils/setRef';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useControlled from '../utils/useControlled';\nimport useTheme from '../styles/useTheme';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nfunction arrowGenerator() {\n return {\n '&[x-placement*=\"bottom\"] $arrow': {\n top: 0,\n left: 0,\n marginTop: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n '&[x-placement*=\"top\"] $arrow': {\n bottom: 0,\n left: 0,\n marginBottom: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n '&[x-placement*=\"right\"] $arrow': {\n left: 0,\n marginLeft: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n '&[x-placement*=\"left\"] $arrow': {\n right: 0,\n marginRight: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n };\n}\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the Popper component. */\n popper: {\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none' // disable jss-rtl plugin\n\n },\n\n /* Styles applied to the Popper component if `interactive={true}`. */\n popperInteractive: {\n pointerEvents: 'auto'\n },\n\n /* Styles applied to the Popper component if `arrow={true}`. */\n popperArrow: arrowGenerator(),\n\n /* Styles applied to the tooltip (label wrapper) element. */\n tooltip: {\n backgroundColor: alpha(theme.palette.grey[700], 0.9),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(10),\n lineHeight: \"\".concat(round(14 / 10), \"em\"),\n maxWidth: 300,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */\n tooltipArrow: {\n position: 'relative',\n margin: '0'\n },\n\n /* Styles applied to the arrow element. */\n arrow: {\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n },\n\n /* Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */\n touch: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: \"\".concat(round(16 / 14), \"em\"),\n fontWeight: theme.typography.fontWeightRegular\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"left\". */\n tooltipPlacementLeft: _defineProperty({\n transformOrigin: 'right center',\n margin: '0 24px '\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"right\". */\n tooltipPlacementRight: _defineProperty({\n transformOrigin: 'left center',\n margin: '0 24px'\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"top\". */\n tooltipPlacementTop: _defineProperty({\n transformOrigin: 'center bottom',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"bottom\". */\n tooltipPlacementBottom: _defineProperty({\n transformOrigin: 'center top',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n })\n };\n};\nvar hystersisOpen = false;\nvar hystersisTimer = null;\nexport function testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\nvar Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {\n var _props$arrow = props.arrow,\n arrow = _props$arrow === void 0 ? false : _props$arrow,\n children = props.children,\n classes = props.classes,\n _props$disableFocusLi = props.disableFocusListener,\n disableFocusListener = _props$disableFocusLi === void 0 ? false : _props$disableFocusLi,\n _props$disableHoverLi = props.disableHoverListener,\n disableHoverListener = _props$disableHoverLi === void 0 ? false : _props$disableHoverLi,\n _props$disableTouchLi = props.disableTouchListener,\n disableTouchListener = _props$disableTouchLi === void 0 ? false : _props$disableTouchLi,\n _props$enterDelay = props.enterDelay,\n enterDelay = _props$enterDelay === void 0 ? 100 : _props$enterDelay,\n _props$enterNextDelay = props.enterNextDelay,\n enterNextDelay = _props$enterNextDelay === void 0 ? 0 : _props$enterNextDelay,\n _props$enterTouchDela = props.enterTouchDelay,\n enterTouchDelay = _props$enterTouchDela === void 0 ? 700 : _props$enterTouchDela,\n idProp = props.id,\n _props$interactive = props.interactive,\n interactive = _props$interactive === void 0 ? false : _props$interactive,\n _props$leaveDelay = props.leaveDelay,\n leaveDelay = _props$leaveDelay === void 0 ? 0 : _props$leaveDelay,\n _props$leaveTouchDela = props.leaveTouchDelay,\n leaveTouchDelay = _props$leaveTouchDela === void 0 ? 1500 : _props$leaveTouchDela,\n onClose = props.onClose,\n onOpen = props.onOpen,\n openProp = props.open,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'bottom' : _props$placement,\n _props$PopperComponen = props.PopperComponent,\n PopperComponent = _props$PopperComponen === void 0 ? Popper : _props$PopperComponen,\n PopperProps = props.PopperProps,\n title = props.title,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"arrow\", \"children\", \"classes\", \"disableFocusListener\", \"disableHoverListener\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"id\", \"interactive\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var theme = useTheme();\n\n var _React$useState = React.useState(),\n childNode = _React$useState[0],\n setChildNode = _React$useState[1];\n\n var _React$useState2 = React.useState(null),\n arrowRef = _React$useState2[0],\n setArrowRef = _React$useState2[1];\n\n var ignoreNonTouchEvents = React.useRef(false);\n var closeTimer = React.useRef();\n var enterTimer = React.useRef();\n var leaveTimer = React.useRef();\n var touchTimer = React.useRef();\n\n var _useControlled = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n openState = _useControlled2[0],\n setOpenState = _useControlled2[1];\n\n var open = openState;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var _React$useRef = React.useRef(openProp !== undefined),\n isControlled = _React$useRef.current; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n\n React.useEffect(function () {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n var id = useId(idProp);\n React.useEffect(function () {\n return function () {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n clearTimeout(touchTimer.current);\n };\n }, []);\n\n var handleOpen = function handleOpen(event) {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen) {\n onOpen(event);\n }\n };\n\n var handleEnter = function handleEnter() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'mouseover' && childrenProps.onMouseOver && forward) {\n childrenProps.onMouseOver(event);\n }\n\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n event.persist();\n enterTimer.current = setTimeout(function () {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n };\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(false),\n childIsFocusVisible = _React$useState3[0],\n setChildIsFocusVisible = _React$useState3[1];\n\n var handleBlur = function handleBlur() {\n if (childIsFocusVisible) {\n setChildIsFocusVisible(false);\n onBlurVisible();\n }\n };\n\n var handleFocus = function handleFocus() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n if (isFocusVisible(event)) {\n setChildIsFocusVisible(true);\n handleEnter()(event);\n }\n\n var childrenProps = children.props;\n\n if (childrenProps.onFocus && forward) {\n childrenProps.onFocus(event);\n }\n };\n };\n\n var handleClose = function handleClose(event) {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(function () {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(function () {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n };\n\n var handleLeave = function handleLeave() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'blur') {\n if (childrenProps.onBlur && forward) {\n childrenProps.onBlur(event);\n }\n\n handleBlur();\n }\n\n if (event.type === 'mouseleave' && childrenProps.onMouseLeave && event.currentTarget === childNode) {\n childrenProps.onMouseLeave(event);\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveDelay);\n };\n };\n\n var detectTouchStart = function detectTouchStart(event) {\n ignoreNonTouchEvents.current = true;\n var childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n var handleTouchStart = function handleTouchStart(event) {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n clearTimeout(touchTimer.current);\n event.persist();\n touchTimer.current = setTimeout(function () {\n handleEnter()(event);\n }, enterTouchDelay);\n };\n\n var handleTouchEnd = function handleTouchEnd(event) {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n var handleUseRef = useForkRef(setChildNode, ref);\n var handleFocusRef = useForkRef(focusVisibleRef, handleUseRef); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n setRef(handleFocusRef, ReactDOM.findDOMNode(instance));\n }, [handleFocusRef]);\n var handleRef = useForkRef(children.ref, handleOwnRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n } // For accessibility and SEO concerns, we render the title to the DOM node when\n // the tooltip is hidden. However, we have made a tradeoff when\n // `disableHoverListener` is set. This title logic is disabled.\n // It's allowing us to keep the implementation size minimal.\n // We are open to change the tradeoff.\n\n\n var shouldShowNativeTitle = !open && !disableHoverListener;\n\n var childrenProps = _extends({\n 'aria-describedby': open ? id : null,\n title: shouldShowNativeTitle && typeof title === 'string' ? title : null\n }, other, children.props, {\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n });\n\n var interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = handleEnter();\n childrenProps.onMouseLeave = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onMouseOver = handleEnter(false);\n interactiveWrapperListeners.onMouseLeave = handleLeave(false);\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = handleFocus();\n childrenProps.onBlur = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onFocus = handleFocus(false);\n interactiveWrapperListeners.onBlur = handleLeave(false);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', \"Remove this title prop `\".concat(children.props.title, \"` or the Tooltip component.\")].join('\\n'));\n }\n }\n\n var mergedPopperProps = React.useMemo(function () {\n return deepmerge({\n popperOptions: {\n modifiers: {\n arrow: {\n enabled: Boolean(arrowRef),\n element: arrowRef\n }\n }\n }\n }, PopperProps);\n }, [arrowRef, PopperProps]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/React.createElement(PopperComponent, _extends({\n className: clsx(classes.popper, interactive && classes.popperInteractive, arrow && classes.popperArrow),\n placement: placement,\n anchorEl: childNode,\n open: childNode ? open : false,\n id: childrenProps['aria-describedby'],\n transition: true\n }, interactiveWrapperListeners, mergedPopperProps), function (_ref) {\n var placementInner = _ref.placement,\n TransitionPropsInner = _ref.TransitionProps;\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.tooltip, classes[\"tooltipPlacement\".concat(capitalize(placementInner.split('-')[0]))], ignoreNonTouchEvents.current && classes.touch, arrow && classes.tooltipArrow)\n }, title, arrow ? /*#__PURE__*/React.createElement(\"span\", {\n className: classes.arrow,\n ref: setArrowRef\n }) : null));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n */\n arrow: PropTypes.bool,\n\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Do not respond to focus events.\n */\n disableFocusListener: PropTypes.bool,\n\n /**\n * Do not respond to hover events.\n */\n disableHoverListener: PropTypes.bool,\n\n /**\n * Do not respond to long press touch events.\n */\n disableTouchListener: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n */\n enterDelay: PropTypes.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n */\n enterNextDelay: PropTypes.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n */\n enterTouchDelay: PropTypes.number,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n\n /**\n * Makes a tooltip interactive, i.e. will not close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n */\n interactive: PropTypes.bool,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n */\n leaveDelay: PropTypes.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n */\n leaveTouchDelay: PropTypes.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n\n /**\n * If `true`, the tooltip is shown.\n */\n open: PropTypes.bool,\n\n /**\n * Tooltip placement.\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n */\n PopperComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n */\n PopperProps: PropTypes.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: PropTypes\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTooltip',\n flip: false\n})(Tooltip);","// Source from https://github.com/alitaheri/normalize-scroll-left\nvar cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.\n *\n * Type | <- Most Left | Most Right -> | Initial\n * ---------------- | ------------ | ------------- | -------\n * default | 0 | 100 | 100\n * negative (spec*) | -100 | 0 | 0\n * reverse | 100 | 0 | 0\n *\n * Edge 85: default\n * Safari 14: negative\n * Chrome 85: negative\n * Firefox 81: negative\n * IE 11: reverse\n *\n * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll\n */\n\nexport function detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n\n var dummy = document.createElement('div');\n var container = document.createElement('div');\n container.style.width = '10px';\n container.style.height = '1px';\n dummy.appendChild(container);\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n\n document.body.removeChild(dummy);\n return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nexport function getNormalizedScrollLeft(element, direction) {\n var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior\n\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n var type = detectScrollType();\n\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n\n default:\n return scrollLeft;\n }\n}","function easeInOutSin(time) {\n return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};\n var _options$ease = options.ease,\n ease = _options$ease === void 0 ? easeInOutSin : _options$ease,\n _options$duration = options.duration,\n duration = _options$duration === void 0 ? 300 : _options$duration;\n var start = null;\n var from = element[property];\n var cancelled = false;\n\n var cancel = function cancel() {\n cancelled = true;\n };\n\n var step = function step(timestamp) {\n if (cancelled) {\n cb(new Error('Animation cancelled'));\n return;\n }\n\n if (start === null) {\n start = timestamp;\n }\n\n var time = Math.min(1, (timestamp - start) / duration);\n element[property] = ease(time) * (to - from) + from;\n\n if (time >= 1) {\n requestAnimationFrame(function () {\n cb(null);\n });\n return;\n }\n\n requestAnimationFrame(step);\n };\n\n if (from === to) {\n cb(new Error('Element already at target position'));\n return cancel;\n }\n\n requestAnimationFrame(step);\n return cancel;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nvar styles = {\n width: 99,\n height: 99,\n position: 'absolute',\n top: -9999,\n overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nexport default function ScrollbarSize(props) {\n var onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"onChange\"]);\n\n var scrollbarHeight = React.useRef();\n var nodeRef = React.useRef(null);\n\n var setMeasurements = function setMeasurements() {\n scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n };\n\n React.useEffect(function () {\n var handleResize = debounce(function () {\n var prevHeight = scrollbarHeight.current;\n setMeasurements();\n\n if (prevHeight !== scrollbarHeight.current) {\n onChange(scrollbarHeight.current);\n }\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [onChange]);\n React.useEffect(function () {\n setMeasurements();\n onChange(scrollbarHeight.current);\n }, [onChange]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n style: styles,\n ref: nodeRef\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? ScrollbarSize.propTypes = {\n onChange: PropTypes.func.isRequired\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'absolute',\n height: 2,\n bottom: 0,\n width: '100%',\n transition: theme.transitions.create()\n },\n colorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n vertical: {\n height: '100%',\n width: 2,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar TabIndicator = /*#__PURE__*/React.forwardRef(function TabIndicator(props, ref) {\n var classes = props.classes,\n className = props.className,\n color = props.color,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TabIndicator.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * The color of the tab indicator.\n */\n color: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateTabIndicator'\n})(TabIndicator);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport debounce from '../utils/debounce';\nimport ownerWindow from '../utils/ownerWindow';\nimport { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';\nimport animate from '../internal/animate';\nimport ScrollbarSize from './ScrollbarSize';\nimport withStyles from '../styles/withStyles';\nimport TabIndicator from './TabIndicator';\nimport TabScrollButton from '../TabScrollButton';\nimport useEventCallback from '../utils/useEventCallback';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n minHeight: 48,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n display: 'flex'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element. */\n flexContainer: {\n display: 'flex'\n },\n\n /* Styles applied to the flex container element if `orientation=\"vertical\"`. */\n flexContainerVertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element if `centered={true}` & `!variant=\"scrollable\"`. */\n centered: {\n justifyContent: 'center'\n },\n\n /* Styles applied to the tablist element. */\n scroller: {\n position: 'relative',\n display: 'inline-block',\n flex: '1 1 auto',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the tablist element if `!variant=\"scrollable\"`\b\b\b. */\n fixed: {\n overflowX: 'hidden',\n width: '100%'\n },\n\n /* Styles applied to the tablist element if `variant=\"scrollable\"`. */\n scrollable: {\n overflowX: 'scroll',\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n },\n\n /* Styles applied to the `ScrollButtonComponent` component. */\n scrollButtons: {},\n\n /* Styles applied to the `ScrollButtonComponent` component if `scrollButtons=\"auto\"` or scrollButtons=\"desktop\"`. */\n scrollButtonsDesktop: _defineProperty({}, theme.breakpoints.down('xs'), {\n display: 'none'\n }),\n\n /* Styles applied to the `TabIndicator` component. */\n indicator: {}\n };\n};\nvar Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledBy = props['aria-labelledby'],\n action = props.action,\n _props$centered = props.centered,\n centered = _props$centered === void 0 ? false : _props$centered,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$indicatorColor = props.indicatorColor,\n indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,\n onChange = props.onChange,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$ScrollButtonCo = props.ScrollButtonComponent,\n ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton : _props$ScrollButtonCo,\n _props$scrollButtons = props.scrollButtons,\n scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,\n selectionFollowsFocus = props.selectionFollowsFocus,\n _props$TabIndicatorPr = props.TabIndicatorProps,\n TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,\n TabScrollButtonProps = props.TabScrollButtonProps,\n _props$textColor = props.textColor,\n textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n value = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"classes\", \"className\", \"component\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\"]);\n\n var theme = useTheme();\n var scrollable = variant === 'scrollable';\n var isRtl = theme.direction === 'rtl';\n var vertical = orientation === 'vertical';\n var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n var start = vertical ? 'top' : 'left';\n var end = vertical ? 'bottom' : 'right';\n var clientSize = vertical ? 'clientHeight' : 'clientWidth';\n var size = vertical ? 'height' : 'width';\n\n if (process.env.NODE_ENV !== 'production') {\n if (centered && scrollable) {\n console.error('Material-UI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n }\n }\n\n var _React$useState = React.useState(false),\n mounted = _React$useState[0],\n setMounted = _React$useState[1];\n\n var _React$useState2 = React.useState({}),\n indicatorStyle = _React$useState2[0],\n setIndicatorStyle = _React$useState2[1];\n\n var _React$useState3 = React.useState({\n start: false,\n end: false\n }),\n displayScroll = _React$useState3[0],\n setDisplayScroll = _React$useState3[1];\n\n var _React$useState4 = React.useState({\n overflow: 'hidden',\n marginBottom: null\n }),\n scrollerStyle = _React$useState4[0],\n setScrollerStyle = _React$useState4[1];\n\n var valueToIndex = new Map();\n var tabsRef = React.useRef(null);\n var tabListRef = React.useRef(null);\n\n var getTabsMeta = function getTabsMeta() {\n var tabsNode = tabsRef.current;\n var tabsMeta;\n\n if (tabsNode) {\n var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n tabsMeta = {\n clientWidth: tabsNode.clientWidth,\n scrollLeft: tabsNode.scrollLeft,\n scrollTop: tabsNode.scrollTop,\n scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),\n scrollWidth: tabsNode.scrollWidth,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right\n };\n }\n\n var tabMeta;\n\n if (tabsNode && value !== false) {\n var _children = tabListRef.current.children;\n\n if (_children.length > 0) {\n var tab = _children[valueToIndex.get(value)];\n\n if (process.env.NODE_ENV !== 'production') {\n if (!tab) {\n console.error([\"Material-UI: The value provided to the Tabs component is invalid.\", \"None of the Tabs' children match with `\".concat(value, \"`.\"), valueToIndex.keys ? \"You can provide one of the following values: \".concat(Array.from(valueToIndex.keys()).join(', '), \".\") : null].join('\\n'));\n }\n }\n\n tabMeta = tab ? tab.getBoundingClientRect() : null;\n }\n }\n\n return {\n tabsMeta: tabsMeta,\n tabMeta: tabMeta\n };\n };\n\n var updateIndicatorState = useEventCallback(function () {\n var _newIndicatorStyle;\n\n var _getTabsMeta = getTabsMeta(),\n tabsMeta = _getTabsMeta.tabsMeta,\n tabMeta = _getTabsMeta.tabMeta;\n\n var startValue = 0;\n\n if (tabMeta && tabsMeta) {\n if (vertical) {\n startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n } else {\n var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n startValue = tabMeta.left - tabsMeta.left + correction;\n }\n }\n\n var newIndicatorStyle = (_newIndicatorStyle = {}, _defineProperty(_newIndicatorStyle, start, startValue), _defineProperty(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle);\n\n if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) {\n setIndicatorStyle(newIndicatorStyle);\n } else {\n var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);\n var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n if (dStart >= 1 || dSize >= 1) {\n setIndicatorStyle(newIndicatorStyle);\n }\n }\n });\n\n var scroll = function scroll(scrollValue) {\n animate(scrollStart, tabsRef.current, scrollValue);\n };\n\n var moveTabsScroll = function moveTabsScroll(delta) {\n var scrollValue = tabsRef.current[scrollStart];\n\n if (vertical) {\n scrollValue += delta;\n } else {\n scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;\n }\n\n scroll(scrollValue);\n };\n\n var handleStartScrollClick = function handleStartScrollClick() {\n moveTabsScroll(-tabsRef.current[clientSize]);\n };\n\n var handleEndScrollClick = function handleEndScrollClick() {\n moveTabsScroll(tabsRef.current[clientSize]);\n };\n\n var handleScrollbarSizeChange = React.useCallback(function (scrollbarHeight) {\n setScrollerStyle({\n overflow: null,\n marginBottom: -scrollbarHeight\n });\n }, []);\n\n var getConditionalElements = function getConditionalElements() {\n var conditionalElements = {};\n conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/React.createElement(ScrollbarSize, {\n className: classes.scrollable,\n onChange: handleScrollbarSizeChange\n }) : null;\n var scrollButtonsActive = displayScroll.start || displayScroll.end;\n var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');\n conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'right' : 'left',\n onClick: handleStartScrollClick,\n disabled: !displayScroll.start,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'left' : 'right',\n onClick: handleEndScrollClick,\n disabled: !displayScroll.end,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n return conditionalElements;\n };\n\n var scrollSelectedIntoView = useEventCallback(function () {\n var _getTabsMeta2 = getTabsMeta(),\n tabsMeta = _getTabsMeta2.tabsMeta,\n tabMeta = _getTabsMeta2.tabMeta;\n\n if (!tabMeta || !tabsMeta) {\n return;\n }\n\n if (tabMeta[start] < tabsMeta[start]) {\n // left side of button is out of view\n var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n scroll(nextScrollStart);\n } else if (tabMeta[end] > tabsMeta[end]) {\n // right side of button is out of view\n var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n\n scroll(_nextScrollStart);\n }\n });\n var updateScrollButtonState = useEventCallback(function () {\n if (scrollable && scrollButtons !== 'off') {\n var _tabsRef$current = tabsRef.current,\n scrollTop = _tabsRef$current.scrollTop,\n scrollHeight = _tabsRef$current.scrollHeight,\n clientHeight = _tabsRef$current.clientHeight,\n scrollWidth = _tabsRef$current.scrollWidth,\n clientWidth = _tabsRef$current.clientWidth;\n var showStartScroll;\n var showEndScroll;\n\n if (vertical) {\n showStartScroll = scrollTop > 1;\n showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n } else {\n var scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n }\n\n if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n setDisplayScroll({\n start: showStartScroll,\n end: showEndScroll\n });\n }\n }\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n var win = ownerWindow(tabsRef.current);\n win.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n win.removeEventListener('resize', handleResize);\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var handleTabsScroll = React.useCallback(debounce(function () {\n updateScrollButtonState();\n }));\n React.useEffect(function () {\n return function () {\n handleTabsScroll.clear();\n };\n }, [handleTabsScroll]);\n React.useEffect(function () {\n setMounted(true);\n }, []);\n React.useEffect(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n React.useEffect(function () {\n scrollSelectedIntoView();\n }, [scrollSelectedIntoView, indicatorStyle]);\n React.useImperativeHandle(action, function () {\n return {\n updateIndicator: updateIndicatorState,\n updateScrollButtons: updateScrollButtonState\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var indicator = /*#__PURE__*/React.createElement(TabIndicator, _extends({\n className: classes.indicator,\n orientation: orientation,\n color: indicatorColor\n }, TabIndicatorProps, {\n style: _extends({}, indicatorStyle, TabIndicatorProps.style)\n }));\n var childIndex = 0;\n var children = React.Children.map(childrenProp, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n valueToIndex.set(childValue, childIndex);\n var selected = childValue === value;\n childIndex += 1;\n return /*#__PURE__*/React.cloneElement(child, {\n fullWidth: variant === 'fullWidth',\n indicator: selected && !mounted && indicator,\n selected: selected,\n selectionFollowsFocus: selectionFollowsFocus,\n onChange: onChange,\n textColor: textColor,\n value: childValue\n });\n });\n\n var handleKeyDown = function handleKeyDown(event) {\n var target = event.target; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n // though we might warn in the future about nested, interactive elements\n // as a a11y violation\n\n var role = target.getAttribute('role');\n\n if (role !== 'tab') {\n return;\n }\n\n var newFocusTarget = null;\n var previousItemKey = orientation !== \"vertical\" ? 'ArrowLeft' : 'ArrowUp';\n var nextItemKey = orientation !== \"vertical\" ? 'ArrowRight' : 'ArrowDown';\n\n if (orientation !== \"vertical\" && theme.direction === 'rtl') {\n // swap previousItemKey with nextItemKey\n previousItemKey = 'ArrowRight';\n nextItemKey = 'ArrowLeft';\n }\n\n switch (event.key) {\n case previousItemKey:\n newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild;\n break;\n\n case nextItemKey:\n newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild;\n break;\n\n case 'Home':\n newFocusTarget = tabListRef.current.firstChild;\n break;\n\n case 'End':\n newFocusTarget = tabListRef.current.lastChild;\n break;\n\n default:\n break;\n }\n\n if (newFocusTarget !== null) {\n newFocusTarget.focus();\n event.preventDefault();\n }\n };\n\n var conditionalElements = getConditionalElements();\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, vertical && classes.vertical),\n ref: ref\n }, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.scroller, scrollable ? classes.scrollable : classes.fixed),\n style: scrollerStyle,\n ref: tabsRef,\n onScroll: handleTabsScroll\n }, /*#__PURE__*/React.createElement(\"div\", {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n className: clsx(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),\n onKeyDown: handleKeyDown,\n ref: tabListRef,\n role: \"tablist\"\n }, children), mounted && indicator), conditionalElements.scrollButtonEnd);\n});\nprocess.env.NODE_ENV !== \"production\" ? Tabs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Callback fired when the component mounts.\n * This is useful when you want to trigger an action programmatically.\n * It supports two actions: `updateIndicator()` and `updateScrollButtons()`\n *\n * @param {object} actions This object contains all possible actions\n * that can be triggered programmatically.\n */\n action: refType,\n\n /**\n * The label for the Tabs as a string.\n */\n 'aria-label': PropTypes.string,\n\n /**\n * An id or list of ids separated by a space that label the Tabs.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * If `true`, the tabs will be centered.\n * This property is intended for large views.\n */\n centered: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Determines the color of the indicator.\n */\n indicatorColor: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback\n * @param {any} value We default to the index of the child (number)\n */\n onChange: PropTypes.func,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The component used to render the scroll buttons.\n */\n ScrollButtonComponent: PropTypes.elementType,\n\n /**\n * Determine behavior of scroll buttons when tabs are set to scroll:\n *\n * - `auto` will only present them when not all the items are visible.\n * - `desktop` will only present them on medium and larger viewports.\n * - `on` will always present them.\n * - `off` will never present them.\n */\n scrollButtons: PropTypes.oneOf(['auto', 'desktop', 'off', 'on']),\n\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: PropTypes.bool,\n\n /**\n * Props applied to the tab indicator element.\n */\n TabIndicatorProps: PropTypes.object,\n\n /**\n * Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.\n */\n TabScrollButtonProps: PropTypes.object,\n\n /**\n * Determines the color of the `Tab`.\n */\n textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this property to `false`.\n */\n value: PropTypes.any,\n\n /**\n * Determines additional display behavior of the tabs:\n *\n * - `scrollable` will invoke scrolling properties and allow for horizontally\n * scrolling (or swiping) of the tab bar.\n * -`fullWidth` will make the tabs grow to use all the available space,\n * which should be used for small views, like on mobile.\n * - `standard` will render the default state.\n */\n variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabs'\n})(Tabs);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport CheckBoxOutlineBlankIcon from '../internal/svg-icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '../internal/svg-icons/CheckBox';\nimport { alpha } from '../styles/colorManipulator';\nimport IndeterminateCheckBoxIcon from '../internal/svg-icons/IndeterminateCheckBox';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `indeterminate={true}`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(CheckBoxIcon, null);\nvar defaultIcon = /*#__PURE__*/React.createElement(CheckBoxOutlineBlankIcon, null);\nvar defaultIndeterminateIcon = /*#__PURE__*/React.createElement(IndeterminateCheckBoxIcon, null);\nvar Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {\n var _props$checkedIcon = props.checkedIcon,\n checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$icon = props.icon,\n iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$indeterminateI = props.indeterminateIcon,\n indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI,\n inputProps = props.inputProps,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checkedIcon\", \"classes\", \"color\", \"icon\", \"indeterminate\", \"indeterminateIcon\", \"inputProps\", \"size\"]);\n\n var icon = indeterminate ? indeterminateIconProp : iconProp;\n var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))], indeterminate && classes.indeterminate),\n checked: classes.checked,\n disabled: classes.disabled\n },\n color: color,\n inputProps: _extends({\n 'data-indeterminate': indeterminate\n }, inputProps),\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize === undefined && size === \"small\" ? size : icon.props.fontSize\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize === undefined && size === \"small\" ? size : indeterminateIcon.props.fontSize\n }),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the checkbox will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the input.\n */\n indeterminate: PropTypes.bool,\n\n /**\n * The icon to display when the component is indeterminate.\n */\n indeterminateIcon: PropTypes.node,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the checkbox.\n * `small` is equivalent to the dense checkbox styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCheckbox'\n})(Checkbox);","export const SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'] as const;\nexport type SeverityLevel = typeof SeverityLevels[number];\n","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"\n}), 'ArrowDownward');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ArrowDownwardIcon from '../internal/svg-icons/ArrowDownward';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'flex-start',\n flexDirection: 'inherit',\n alignItems: 'center',\n '&:focus': {\n color: theme.palette.text.secondary\n },\n '&:hover': {\n color: theme.palette.text.secondary,\n '& $icon': {\n opacity: 0.5\n }\n },\n '&$active': {\n color: theme.palette.text.primary,\n // && instead of & is a workaround for https://github.com/cssinjs/jss/issues/1045\n '&& $icon': {\n opacity: 1,\n color: theme.palette.text.secondary\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Styles applied to the icon component. */\n icon: {\n fontSize: 18,\n marginRight: 4,\n marginLeft: 4,\n opacity: 0,\n transition: theme.transitions.create(['opacity', 'transform'], {\n duration: theme.transitions.duration.shorter\n }),\n userSelect: 'none'\n },\n\n /* Styles applied to the icon component if `direction=\"desc\"`. */\n iconDirectionDesc: {\n transform: 'rotate(0deg)'\n },\n\n /* Styles applied to the icon component if `direction=\"asc\"`. */\n iconDirectionAsc: {\n transform: 'rotate(180deg)'\n }\n };\n};\n/**\n * A button based label for placing inside `TableCell` for column sorting.\n */\n\nvar TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'asc' : _props$direction,\n _props$hideSortIcon = props.hideSortIcon,\n hideSortIcon = _props$hideSortIcon === void 0 ? false : _props$hideSortIcon,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? ArrowDownwardIcon : _props$IconComponent,\n other = _objectWithoutProperties(props, [\"active\", \"children\", \"classes\", \"className\", \"direction\", \"hideSortIcon\", \"IconComponent\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, active && classes.active),\n component: \"span\",\n disableRipple: true,\n ref: ref\n }, other), children, hideSortIcon && !active ? null : /*#__PURE__*/React.createElement(IconComponent, {\n className: clsx(classes.icon, classes[\"iconDirection\".concat(capitalize(direction))])\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableSortLabel.propTypes = {\n /**\n * If `true`, the label will have the active styling (should be true for the sorted column).\n */\n active: PropTypes.bool,\n\n /**\n * Label contents, the arrow will be appended automatically.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The current sort direction.\n */\n direction: PropTypes.oneOf(['asc', 'desc']),\n\n /**\n * Hide sort icon when active is false.\n */\n hideSortIcon: PropTypes.bool,\n\n /**\n * Sort icon to use.\n */\n IconComponent: PropTypes.elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableSortLabel'\n})(TableSortLabel);"],"sourceRoot":""} \ No newline at end of file diff --git a/src/build/static/js/main.255f9c57.chunk.js b/src/build/static/js/main.255f9c57.chunk.js deleted file mode 100644 index e76f3e3..0000000 --- a/src/build/static/js/main.255f9c57.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{319:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},320:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},323:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},324:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},335:function(e){e.exports=JSON.parse('{"a":"1.3.9"}')},350:function(e,t,a){},416:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},417:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},418:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},419:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},420:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},421:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},422:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},423:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},424:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},425:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},427:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(15),i=a.n(s),n=a(457),l=(a(350),a(68)),r=a(42),c=a(92),d=a(337),p=a(76),u=a(45),m=a(44),h=a(5),g=a(93),b=a(464),f=a(473),S=a(465),v=a(315),x=a.n(v),j=a(220),T=a.n(j),y=a(13),O=a.n(y),P=a(336),C=a(174),A=a(462),k=a(474),R=a(448),D=a(461),w=a(460),L=a(222),I=a(341),E=a(438),W=a(463),V=a(459),B=a(173),N=a(212),z=a(319),G=a(320),M=a(7),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],c=0;c10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;iparseInt(o[1],10))return 1;if(parseInt(a[1],10)parseInt(i[1],10)?1:parseInt(s[1],10)parseInt(i[2],10)?1:parseInt(s[2],10)>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(323),Z=a(324),H=a(58),K=a(466),_=a(469),Q=a(467),X=a(470),ee=a(468),te=a(218),ae=a(475),oe=a(472),se=a(81),ie=a.n(se),ne=a(333),le=a.n(ne),re=a(334),ce=a.n(re),de=a(61),pe=a.n(de),ue=a(325),me=a.n(ue),he=a(326),ge=a.n(he),be=a(328),fe=a.n(be),Se=a(225),ve=a(330),xe=a.n(ve),je=a(331),Te=a.n(je),ye=a(295),Oe=a(296),Pe=a(297),Ce=a(298),Ae=a(299),ke=a(294),Re=a(104),De=a.n(Re),we=a(221),Le=a.n(we),Ie=a(332),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(xe.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s.endsWith("\n")?s:s+"\n"),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var c=s.options.find((function(e){return e.value===r[s.name]}));t=c?c.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),c=r[0],d=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),x=Object(H.a)(v,2),j=x[0],T=x[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(ce.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:c===t.$index,rooms:e.rooms,setEditMode:function(){return d(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:j.open,action:j.action,onClose:function(){return T({open:!1,action:null,item:null})},item:j.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),c=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==c.db&&(l=c.db<<24),n|=r.byte<<8,l|=c.byte<<8,n|=r.bit||0,l|=c.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n ({\n optionsSelect: {\n width: 280\n },\n optionsTextField: {\n width: 280\n },\n optionContainer: {\n },\n optionsContainer: {\n width: `calc(100% - ${theme.spacing(4)}px)`,\n padding: theme.spacing(2),\n marginBottom: 20,\n display: 'inline-block',\n textAlign: 'left'\n },\n optionsGrid: {\n textAlign: 'center',\n padding: theme.spacing(2),\n },\n optionsLabel: {\n fontSize: 12,\n },\n header: {\n fontSize: 24,\n },\n fileInput: {\n textAlign: 'center',\n display: 'inline-block',\n height: 80,\n width: 200,\n border: '2px dashed #777',\n borderRadius: 10,\n marginTop: 12,\n padding: 4\n }\n});\n\nlet FileInput = function (props) {\n const { enqueueSnackbar } = useSnackbar();\n const onDrop = useCallback(acceptedFiles => {\n props.onChange(acceptedFiles);\n enqueueSnackbar(I18n.t('Data updated'));\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\n\n return \n { I18n.t(props.label)}\n
\n \n {\n isDragActive ?\n

{I18n.t('Drop the file here ...')}

:\n

{I18n.t(`Drag 'n' drop file here, or click to select file`)}

\n }\n
\n
;\n};\n\nclass Options extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n };\n }\n\n getValue(name) {\n if (name === 's7logo') {\n return this.props.native.params.slot === null;\n }\n return this.props.native.params[name];\n }\n\n inputDisabled = input => {\n return false;\n }\n\n inputDisplay = input => {\n if (this.props.native.params.slot === null) {\n if (['rack', 'slot'].includes(input.name)) {\n return false;\n }\n } else {\n if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\n return false;\n }\n }\n if (input.name === 'timeOffset') {\n return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\n }\n return true;\n }\n\n getInputsBlock(inputs, title) {\n return \n {I18n.t(title)}\n \n {inputs.map(input => {\n if (!this.inputDisplay(input)) {\n return null;\n }\n if (input.type === 'checkbox') {\n return \n this.changeParam(input.name, e.target.checked)}\n />}/> {input.dimension ? I18n.t(input.dimension) : null};\n } else if (input.type === 'select') {\n return \n \n {I18n.t(input.title)}\n this.changeParam(input.name, e.target.value)}\n >\n {input.options.map(option =>\n {option.title}\n )}\n \n {input.dimension ? I18n.t(input.dimension) : null}\n ;\n } else if (input.type === 'hex') {\n let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\n let top = (value >> 8) & 0xFF;\n let bottom = value & 0xFF;\n\n return \n {I18n.t(input.title)}\n {\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\n return;\n }\n this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\n }}\n />\n {\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\n return;\n }\n this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\n }}\n />\n ;\n } else {\n return {I18n.t(input.dimension)} : null\n }}\n onChange={e => this.changeParam(input.name, e.target.value)}\n />;\n }\n })}\n \n ;\n }\n\n getImportsBlock() {\n return <>\n {I18n.t('Import')}\n \n \n \n \n ;\n }\n\n render() {\n return
\n \n \n {this.getInputsBlock(connectionInputs, 'PLC Connection')}\n {this.getImportsBlock()}\n \n {this.getInputsBlock(generalInputs, 'General')}\n \n ;\n }\n\n changeParam = (name, value) => {\n let native = JSON.parse(JSON.stringify(this.props.native));\n if (name === 's7logo') {\n if (value) {\n native.params.localTSAP = '';\n native.params.remoteTSAP = '';\n native.params.rack = null;\n native.params.slot = null;\n } else {\n native.params.localTSAP = null;\n native.params.remoteTSAP = null;\n native.params.rack = '';\n native.params.slot = '';\n }\n } else {\n native.params[name] = value;\n }\n this.props.changeNative(native);\n }\n\n loadSymbols = e => {\n let native = JSON.parse(JSON.stringify(this.props.native));\n const reader = new FileReader();\n\n reader.onload = e => {\n const localData = {\n inputs: [],\n outputs: [],\n markers: []\n// counter: [],\n// timer: [],\n// dbs: []\n };\n let text = reader.result;\n\n text = text.split('126,');\n text.forEach(line => {\n const typ = line.slice(23, 29).replace(/( )/g, '');\n\n const d = {\n Name: line.slice(0, 23).replace(/( ){2,}/g, ''),\n Address: line.slice(29, 36).replace(/( )/g, ''),\n Type: line.slice(36, 41).replace(/( )/g, ''),\n Description: line.slice(46, 126).replace(/( ){2,}/, ''),\n Unit: '',\n// Role: '',\n// Room: '',\n poll: true,\n RW: false,\n WP: false\n };\n\n// if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\n// if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\n if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\n if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\n if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\n// if (typ == 'C')data.counter.push(d);\n// if (typ == 'T')data.timer.push(d);\n// if (typ == 'DB')data.dbs.push(d);\n });\n\n ['inputs', 'outputs', 'markers'].forEach(table => {\n native[table] = localData[table];\n });\n this.props.changeNative(native);\n };\n\n reader.readAsText(e[0], 'ISO-8859-1');\n }\n\n addDb = e => {\n let native = JSON.parse(JSON.stringify(this.props.native));\n const reader = new FileReader();\n\n reader.onload = e => {\n setTimeout(function () {\n const text = reader.result;\n const changes = {\n inputs: false,\n outputs: false,\n markers: false,\n dbs: false\n };\n const newParts = {\n inputs: native.inputs || [],\n outputs: native.outputs || [],\n markers: native.markers || [],\n dbs: native.dbs || []\n };\n\n if (text.indexOf('Leseanforderung') !== -1) {\n // Graphpic format\n const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\n const mapping = {\n 'Name': {attr: 'Name'},\n 'Typ': {attr: ''},\n 'Operand': {attr: 'Address', process: f => {\n // DB 504.DBW 1462 => DB504 1462\n f = f.trim();\n const db = f.match(/^DB (\\d+)/);\n if (!db) {\n // M\n // MB\n let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\n if (m) {\n return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\n } else {\n m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\n if (m) {\n return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\n } else {\n m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\n if (m) {\n return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\n } else {\n return f;\n }\n }\n }\n }\n\n const offset = f.match(/(\\d+).?(\\d+)?$/);\n if (db && offset) {\n return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\n } else {\n return f;\n }\n }},\n 'SPS-Format': {attr: 'Type', process: function (f) {return f;} },\n 'Byteanzahl': {attr: 'Length', process: function (f) {return parseInt(f, 10);} },\n 'Zugriff': {attr: 'RW', process: function (f) {return f !== 'read';} },\n 'Leseanforderung': {attr: 'poll', process: function (f) {return f === 'zyklisch';} },\n 'AktZeit (ms)': {attr: ''},\n 'Kommentar': {attr: 'Description'},\n 'Clients (Anzahl)': {attr: ''}\n };\n // First line\n // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\n let sFields = lines[0].split(',');\n // create mapping\n const fields = [];\n for (let m = 0; m < sFields.length; m++) {\n sFields[m] = sFields[m].replace(/\"/g, '');\n fields.push(mapping[sFields[m]]);\n }\n for (let l = 1; l < lines.length; l++) {\n lines[l] = lines[l].trim();\n if (!lines[l]) continue;\n sFields = lines[l].trim().split(',');\n let obj = {\n Type: 'ARRAY',\n Unit: '',\n Role: '',\n Room: '',\n poll: true,\n RW: false,\n WP: false\n };\n for (let f = 0; f < fields.length; f++) {\n if (!fields[f].attr) {\n continue;\n }\n if (!sFields[f]) {\n console.log('error');\n break;\n }\n sFields[f] = sFields[f].replace(/\"/g, '');\n obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\n\n if (obj.Name.match(/^@/)) {\n obj = null;\n break;\n }\n }\n if (obj) {\n if (obj.Type === 'BYTE' && obj.Length !== 1) {\n obj.Type = 'ARRAY';\n }\n if (obj.Type === 'CHAR') {\n obj.Type = 'STRING';\n }\n if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\n obj.Length = '';\n }\n let _attr;\n if (obj.Address.match(/^DB/)) {\n _attr = 'dbs';\n } else if (obj.Address.match(/^IN/)) {\n obj.Address = obj.Address.replace(/^IN\\s?/, '');\n _attr = 'inputs';\n } else if (obj.Address.match(/^OUT/)) {\n _attr = 'outputs';\n obj.Address = obj.Address.replace(/^OUT\\s?/, '');\n } else if (obj.Address.match(/^M/)) {\n _attr = 'markers';\n obj.Address = obj.Address.replace(/^M\\s?/, '');\n } else {\n console.error('Unknown TYPE: ' + obj.Address);\n continue;\n }\n // try to find same address\n for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\n if (newParts[_attr][aaa].Address === obj.Address) {\n newParts[_attr][aaa] = obj;\n changes[_attr] = true;\n obj = null;\n break;\n }\n }\n if (obj) {\n changes[_attr] = true;\n newParts[_attr].push(obj);\n }\n }\n }\n } else {\n const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\n const db = mm ? mm[0].replace(' - ', '') : '';\n const vv = text.split('STRUCT');\n\n const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\n\n struck.forEach((item) => {\n if (item.length > 10) {\n const x = item.split(/\\s+/g);\n x.shift();\n\n let obj = {\n Address: db + ' ' + x.shift(),\n Name: x.shift(),\n Type: x.shift(),\n dec: x.shift(),\n Description: x.join(' '),\n Unit: '',\n Role: '',\n Room: '',\n poll: true,\n RW: false,\n WP: false\n };\n\n // try to find same address\n for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\n if (newParts.dbs[aaa].Address === obj.Address) {\n newParts.dbs[aaa] = obj;\n changes.dbs = true;\n obj = null;\n break;\n }\n }\n if (obj) {\n changes.dbs = true;\n newParts.dbs.push(obj);\n }\n }\n });\n }\n for (const attr in newParts) {\n if (!newParts.hasOwnProperty(attr)) {\n continue;\n }\n newParts[attr].sort((a, b) => {\n const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\n const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\n if (!aDB) return -1;\n if (!bDB) return 1;\n if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\n if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\n const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\n const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\n if (!aOffset) return -1;\n if (!bOffset) return 1;\n if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\n if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\n if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\n if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\n if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\n if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\n if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\n return 0;\n });\n }\n if (changes.dbs) {\n native.dbs = newParts.dbs;\n }\n if (changes.inputs) {\n native.inputs = newParts.inputs;\n }\n if (changes.outputs) {\n native.outputs = newParts.outputs;\n }\n if (changes.markers) {\n native.markers = newParts.markers;\n }\n console.log(native);\n //this.props.changeNative(native);\n }, 200);\n };\n\n reader.readAsText(e[0], 'ISO-8859-1');\n }\n}\n\nOptions.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default withStyles(styles)(Options);\n","import { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport {withStyles} from '@material-ui/core/styles';\n\nimport { tsv2json, json2tsv } from 'tsv-json';\nimport { useSnackbar } from 'notistack';\nimport AceEditor from \"react-ace\";\nimport copy from 'copy-to-clipboard';\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Button from '@material-ui/core/Button';\n\nimport ClearIcon from '@material-ui/icons/Clear';\nimport SaveIcon from '@material-ui/icons/Save';\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\n\nconst styles = theme => ({\n tsvEditor: {\n width: '100%',\n height: 400\n },\n tsvEditorTextarea: {\n fontFamily: 'monospace'\n }\n});\n\nconst TsvDialog = props => {\n const [tsv, setTsv] = useState('');\n useEffect(() => {\n let tsvResult = [];\n tsvResult.push(props.fields.map(field => field.name));\n props.data.forEach(item =>\n tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\n );\n setTsv(json2tsv(tsvResult));\n }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\n const { enqueueSnackbar } = useSnackbar();\n\n if (!props.open) {\n return null;\n }\n\n const saveTsv = () => {\n let data = tsv2json(tsv.endsWith('\\n') ? tsv : tsv + '\\n');\n let fields = data.shift();\n let success = true;\n let errors = [];\n for (let index in props.fields) {\n if (props.fields[index].name !== fields[index]) {\n errors.push(<>No field {props.fields[index].name} in position {parseInt(index) + 1}!);\n success = false;\n }\n }\n\n data = data.map((itemValues, itemIndex) => {\n let item = {};\n for (let index in props.fields) {\n if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\n errors.push(<>Value {itemValues[index]} is wrong for field {props.fields[index].name} in position {parseInt(itemIndex) + 1}!);\n success = false;\n }\n if (props.fields[index].type === 'checkbox') {\n itemValues[index] = itemValues[index] === 'true';\n }\n item[props.fields[index].name] = itemValues[index];\n }\n return item;\n });\n\n if (!success) {\n enqueueSnackbar(
{errors.map((error, index) =>
{error}
)}
, { variant: 'error' });\n return;\n }\n props.save(data);\n props.onClose();\n };\n\n return \n {I18n.t('Edit data as TSV')}\n \n {I18n.t('You can copy, paste and edit data as TSV.')}\n
\n setTsv(e)}\n height=\"400px\"\n showPrintMargin={false}\n value={tsv}\n className={props.classes.tsvEditor}\n width=\"100%\"\n setOptions={{firstLineNumber: 0}}\n mode={null}\n />\n
\n
\n \n \n \n \n \n \n};\n\nTsvDialog.propTypes = {\n open: PropTypes.bool,\n onClose: PropTypes.func,\n classes: PropTypes.object,\n save: PropTypes.func,\n fields: PropTypes.array,\n data: PropTypes.array\n};\n\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\n\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Button from '@material-ui/core/Button';\n\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport ClearIcon from '@material-ui/icons/Clear';\n\nconst DeleteAllDialog = (props) => {\n return props.open ? \n {I18n.t('Delete all items')}\n \n {I18n.t('Are you sure to delete all items?')}\n \n \n \n \n \n : null;\n}\n\nDeleteAllDialog.propTypes = {\n open: PropTypes.bool,\n action: PropTypes.func,\n onClose: PropTypes.func,\n classes: PropTypes.object,\n}\n\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Button from '@material-ui/core/Button';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Checkbox from '@material-ui/core/Checkbox';\n\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport ClearIcon from '@material-ui/icons/Clear';\n\nconst DeleteDialog = (props) => {\n const [disableWarnings, setDisableWarnings] = useState(false);\n useEffect(() => {\n setDisableWarnings(false);\n }, [props.open]);\n\n return props.open ? \n {I18n.t('Delete item')}\n \n {I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}\n setDisableWarnings(e.target.checked)}\n />}/>\n \n \n \n \n \n : null;\n}\n\nDeleteDialog.propTypes = {\n open: PropTypes.bool,\n onClose: PropTypes.func,\n classes: PropTypes.object,\n action: PropTypes.func,\n item: PropTypes.object,\n}\n\nexport default DeleteDialog;","import { useState, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport {withStyles} from '@material-ui/core/styles';\n\nimport Table from '@material-ui/core/Table';\nimport TableHead from '@material-ui/core/TableHead';\nimport TableBody from '@material-ui/core/TableBody';\nimport TableRow from '@material-ui/core/TableRow';\nimport TableCell from '@material-ui/core/TableCell';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport TextField from '@material-ui/core/TextField';\nimport IconButton from '@material-ui/core/IconButton';\nimport Select from '@material-ui/core/Select';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\nimport Tooltip from '@material-ui/core/Tooltip';\n\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport AddIcon from '@material-ui/icons/Add';\nimport ImportExport from '@material-ui/icons/ImportExport';\n\nimport I18n from '@iobroker/adapter-react/i18n';\nimport Utils from '@iobroker/adapter-react/Components/Utils';\n\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\n\nimport TsvDialog from './TsvDialog';\nimport DeleteAllDialog from './DeleteAllDialog';\nimport DeleteDialog from './DeleteDialog';\n\nconst styles = theme => ({\n tableHeader: {\n whiteSpace: 'nowrap',\n fontWeight: 'bold',\n fontSize: '80%',\n padding: '0px 8px'\n },\n tableHeaderExtended: {\n color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\n },\n tableCell: {\n whiteSpace: 'nowrap',\n fontSize: '80%',\n padding: '0px 8px'\n },\n tableContainer: {\n overflow: 'auto',\n maxHeight: 'calc(100vh - 180px)'\n },\n tableTextField: {\n fontSize: '80%'\n },\n tableSelect: {\n fontSize: '80%'\n },\n tableTextFieldContainer: {\n width: '100%'\n },\n tableSelectContainer: {\n width: '100%'\n },\n nonEditMode: {\n cursor: 'pointer'\n }\n});\n\nconst DataCell = props => {\n const sortedItem = props.sortedItem;\n const field = props.field;\n const editMode = props.editMode;\n const setEditMode = props.setEditMode;\n\n const ref = useRef();\n /*useEffect(() => {\n if (props.editMode) {\n // ref.current && ref.current.focus()\n //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\n }\n }, [props.editMode])*/\n\n let item = sortedItem.item;\n let result;\n if (field.type === 'checkbox') {\n result = \n props.changeParam(sortedItem.$index, field.name, e.target.checked)}\n />\n ;\n } else if (field.type === 'rooms') {\n if (!editMode) {\n result = ;\n } else {\n result = props.changeParam(sortedItem.$index, field.name, value)}\n className={props.classes.tableSelectContainer}\n />;\n }\n } else if (field.type === 'select') {\n if (!editMode) {\n let option = field.options.find(option => option.value === item[field.name]);\n result = option ? option.title : '';\n } else {\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\n className={props.classes.tableSelectContainer}\n >\n {field.options.map(option =>\n {option.title ? option.title : {I18n.t('Nothing')}}\n )}\n ;\n }\n } else {\n if (!editMode) {\n result = item[field.name] ? item[field.name] : null;\n } else {\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\n disabled={props.getDisable(sortedItem.$index, field.name)}\n />;\n }\n }\n\n return {\n setEditMode(true);\n window.localStorage.setItem('Modbus.editMode', 'true');\n window.setTimeout(() => ref.current && ref.current.focus(), 100);\n }}\n >\n {result}\n ;\n}\n\nconst RegisterTable = props => {\n const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\n const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\n const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\n const [deleteAllDialog, setDeleteAllDialog] = useState({\n open: false,\n action: null,\n });\n const [deleteDialog, setDeleteDialog] = useState({\n open: false,\n item: null,\n action: null,\n });\n\n let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\n\n return
\n
\n \n props.addItem()}>\n \n \n \n \n setTsvDialogOpen(true)}>\n \n \n \n \n {\n window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\n setExtendedMode(!extendedMode);\n }}>\n \n \n \n
\n
\n
` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nvar TableCell = /*#__PURE__*/React.forwardRef(function TableCell(props, ref) {\n var _props$align = props.align,\n align = _props$align === void 0 ? 'inherit' : _props$align,\n classes = props.classes,\n className = props.className,\n component = props.component,\n paddingProp = props.padding,\n scopeProp = props.scope,\n sizeProp = props.size,\n sortDirection = props.sortDirection,\n variantProp = props.variant,\n other = _objectWithoutProperties(props, [\"align\", \"classes\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"]);\n\n var table = React.useContext(TableContext);\n var tablelvl2 = React.useContext(Tablelvl2Context);\n var isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n var role;\n var Component;\n\n if (component) {\n Component = component;\n role = isHeadCell ? 'columnheader' : 'cell';\n } else {\n Component = isHeadCell ? 'th' : 'td';\n }\n\n var scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n var padding = paddingProp || (table && table.padding ? table.padding : 'normal');\n var size = sizeProp || (table && table.size ? table.size : 'medium');\n var variant = variantProp || tablelvl2 && tablelvl2.variant;\n var ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, classes[variant], className, align !== 'inherit' && classes[\"align\".concat(capitalize(align))], padding !== 'normal' && classes[\"padding\".concat(capitalize(padding))], size !== 'medium' && classes[\"size\".concat(capitalize(size))], variant === 'head' && table && table.stickyHeader && classes.stickyHeader),\n \"aria-sort\": ariaSort,\n role: role,\n scope: scope\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableCell.propTypes = {\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n */\n align: PropTypes.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The table cell contents.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Sets the padding applied to the cell.\n * By default, the Table parent component set the value (`normal`).\n * `default` is deprecated, use `normal` instead.\n */\n padding: chainPropTypes(PropTypes.oneOf(['normal', 'checkbox', 'none', 'default']), function (props) {\n if (props.padding === 'default') {\n return new Error('Material-UI: padding=\"default\" was renamed to padding=\"normal\" for consistency.');\n }\n\n return null;\n }),\n\n /**\n * Set scope attribute.\n */\n scope: PropTypes.string,\n\n /**\n * Specify the size of the cell.\n * By default, the Table parent component set the value (`medium`).\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: PropTypes.oneOf(['asc', 'desc', false]),\n\n /**\n * Specify the cell type.\n * By default, the TableHead, TableBody or TableFooter parent component set the value.\n */\n variant: PropTypes.oneOf(['body', 'footer', 'head'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableCell'\n})(TableCell);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-header-group'\n }\n};\nvar tablelvl2 = {\n variant: 'head'\n};\nvar defaultComponent = 'thead';\nvar TableHead = /*#__PURE__*/React.forwardRef(function TableHead(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableHead.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableHead'\n})(TableHead);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n '&$hover:hover': {\n backgroundColor: theme.palette.action.hover\n },\n '&$selected, &$selected:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity)\n }\n },\n\n /* Pseudo-class applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `hover={true}`. */\n hover: {},\n\n /* Styles applied to the root element if table variant=\"head\". */\n head: {},\n\n /* Styles applied to the root element if table variant=\"footer\". */\n footer: {}\n };\n};\nvar defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nvar TableRow = /*#__PURE__*/React.forwardRef(function TableRow(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n _props$hover = props.hover,\n hover = _props$hover === void 0 ? false : _props$hover,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"hover\", \"selected\"]);\n\n var tablelvl2 = React.useContext(Tablelvl2Context);\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className, tablelvl2 && {\n 'head': classes.head,\n 'footer': classes.footer\n }[tablelvl2.variant], hover && classes.hover, selected && classes.selected),\n role: Component === defaultComponent ? null : 'row'\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableRow.propTypes = {\n /**\n * Should be valid
\n \n \n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\n let isChecked = false;\n let indeterminate = false;\n let trueFound = false;\n let falseFound = false;\n for (let k in props.data) {\n if (props.data[k][field.name]) {\n isChecked = true;\n trueFound = true;\n } else {\n isChecked = false;\n falseFound = true;\n }\n\n if (trueFound && falseFound) {\n indeterminate = true;\n isChecked = false;\n break;\n }\n }\n\n return \n {field.type === 'checkbox' ?\n \n {\n let newData = JSON.parse(JSON.stringify(props.data));\n newData.forEach(item =>\n item[field.name] = e.target.checked);\n props.changeData(newData);\n }}\n />\n \n : null}\n {field.sorted ? {\n const isAsc = props.orderBy === field.name && props.order === 'asc';\n props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\n }}\n >{I18n.t(field.title)} : I18n.t(field.title)}\n \n })}\n \n \n
\n setDeleteAllDialog({\n open: true,\n action: () => props.changeData([]),\n })}\n disabled={!props.data.length}\n >\n \n \n
\n
\n
\n
\n
\n \n {\n sortedData.map(sortedItem =>\n \n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\n setEditMode(sortedItem.$index)}\n {...props}\n />\n )}\n \n \n
\n {\n let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\n if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\n props.deleteItem(sortedItem.$index);\n return;\n }\n setDeleteDialog({\n open: true,\n action: disableDialogs => {\n if (disableDialogs) {\n window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\n }\n props.deleteItem(sortedItem.$index);\n },\n item: sortedItem.item\n })\n }}>\n \n \n
\n
\n
\n
\n )\n }\n
\n
\n
\n {tsvDialogOpen ?\n {\n if (props.prefix) {\n data.forEach(line => {\n line.Address = (line.Address || '').toUpperCase();\n if (line.Address && !line.Address.startsWith(props.prefix)) {\n line.Address = props.prefix + line.Address;\n }\n });\n }\n props.changeData(data);\n }}\n onClose={() => setTsvDialogOpen(false)}\n data={props.data}\n fields={props.fields}\n /> : null\n }\n setDeleteAllDialog({\n open: false,\n action: null,\n })}\n />\n setDeleteDialog({\n open: false,\n action: null,\n item: null\n })}\n item={deleteDialog.item}\n />\n
;\n}\n\nRegisterTable.propTypes = {\n data: PropTypes.array,\n fields: PropTypes.array,\n classes: PropTypes.object,\n addItem: PropTypes.func,\n changeData: PropTypes.func,\n deleteItem: PropTypes.func,\n rooms: PropTypes.object,\n formulaDisabled: PropTypes.bool,\n getSortedData: PropTypes.func,\n themeType: PropTypes.string,\n prefix: PropTypes.string,\n};\n\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\nimport PropTypes from 'prop-types';\n\nimport Paper from '@material-ui/core/Paper';\n\nimport roles from '../data/roles';\nimport types from '../data/types';\n\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport RegisterTable from '../Components/RegisterTable';\n\nclass BaseRegisters extends Component {\n constructor(props) {\n super(props);\n this.nativeField = '';\n this.state = {\n order: window.localStorage.getItem('Modbus.order') || 'asc',\n orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\n };\n }\n\n getRooms() {\n const lang = I18n.getLanguage();\n return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\n value: room._id,\n title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\n })) : [];\n }\n\n getFields() {\n let rooms = this.getRooms();\n rooms.unshift({value: '', title: ''});\n\n let result = [\n {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\n {name: 'Name', title: 'Name', type: 'text', sorted: true},\n {name: 'Description', title: 'Description', type: 'text', sorted: true},\n {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\n {name: 'Length', title: 'Length', type: 'text', width: 20},\n {name: 'Unit', title: 'Unit', type: 'text', width: 30},\n {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\n {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\n {name: 'poll', title: 'Poll', type: 'checkbox'},\n {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\n {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\n ]\n\n if (this.props.native.params.multiDeviceId) {\n result.splice(1, 0,\n {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\n );\n }\n\n return result;\n }\n\n address2struct(address) {\n if (this.nativeField === 'dbs') {\n const parts = address.split(' ');\n const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\n if (parts[1] && parts[1].includes('.')) {\n const a = parseFloat(parts[1]);\n return {db, byte: Math.floor(a), bit: (a * 10) % 10};\n } else {\n return {db, byte: parseInt(parts[1], 10)};\n }\n } else {\n if (address.includes('.')) {\n const a = parseFloat(address);\n return {byte: Math.floor(a), bit: (a * 10) % 10};\n } else {\n return {byte: parseInt(address, 10)};\n }\n }\n }\n\n struct2address(struct) {\n if (struct.db !== undefined) {\n if (struct.bit !== undefined) {\n return `DB${struct.db} ${struct.byte}.${struct.bit}`;\n } else {\n return `DB${struct.db} ${struct.byte}`;\n }\n } else if (struct.bit !== undefined) {\n return struct.byte + '.' + struct.bit;\n } else {\n return struct.byte;\n }\n }\n\n changeParam = (index, name, value) => {\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\n data[index][name] = value;\n if (name === 'Type') {\n if (['BOOL'].includes(value)) {\n data[index].Length = 0.1;\n } else\n if (['', 'BYTE'].includes(value)) {\n data[index].Length = 1;\n } else\n if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\n data[index].Length = 2;\n } else\n if (['DWORD', 'DINT', 'REAL'].includes(value)) {\n data[index].Length = 4;\n } else\n if (['S7TIME'].includes(value)) {\n data[index].Length = 8;\n } else\n if (['S7STRING', 'ARRAY'].includes(value)) {\n data[index].Length = 32;\n }\n\n if (value === 'BOOL') {\n const struct = this.address2struct(data[index].Address);\n if (struct.bit === undefined) {\n struct.bit = 0;\n data[index].Address = this.struct2address(struct);\n }\n } else {\n const struct = this.address2struct(data[index].Address);\n if (struct.bit !== undefined) {\n if (struct.bit > 0) {\n struct.byte++;\n }\n delete struct.bit;\n\n data[index].Address = this.struct2address(struct);\n }\n }\n }\n this.props.onChange(this.nativeField, data);\n }\n\n addItem = () => {\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\n let newItem = {}\n\n this.getFields().forEach(field => newItem[field.name] = '');\n\n if (data.length) {\n let sortedData = JSON.parse(JSON.stringify(data));\n sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\n let lastItem = sortedData[sortedData.length - 1];\n const struct = this.address2struct(lastItem.Address);\n if (lastItem.Type === 'BOOL') {\n struct.bit = struct.bit || 0;\n struct.bit++;\n if (struct.bit >= 8) {\n struct.bit = struct.bit % 8;\n struct.byte++;\n }\n } else {\n delete struct.bit;\n struct.byte += lastItem.Length;\n }\n\n if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\n struct.db++;\n struct.byte = 0;\n if (lastItem.Type === 'BOOL') {\n struct.bit = 0;\n }\n }\n\n newItem.Address = this.struct2address(struct);\n newItem.Type = lastItem.Type;\n newItem.Length = lastItem.Length;\n newItem.Unit = lastItem.Unit;\n newItem.Role = lastItem.Role;\n newItem.Room = lastItem.Room;\n newItem.poll = lastItem.poll;\n newItem.RW = lastItem.RW;\n newItem.WP = lastItem.WP;\n } else {\n newItem.role = 'level';\n newItem.Type = 'BOOL';\n newItem.Length = '0.1';\n newItem.poll = true;\n if (this.nativeField === 'dbs') {\n newItem.Address = 'DB1 0.0';\n } else {\n newItem.Address = '0.0';\n }\n }\n data.push(newItem);\n this.props.onChange(this.nativeField, data);\n }\n\n deleteItem = (index) => {\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\n data.splice(index, 1);\n this.props.onChange(this.nativeField, data);\n }\n\n changeData = (data) => {\n this.props.onChange(this.nativeField, data);\n }\n\n getDisable = (index, name) => {\n return name === 'Length' &&\n !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\n }\n\n getSortedData = (data, orderBy, order) => {\n this.fields = this.fields || this.getFields();\n\n data = data || this.props.native[this.nativeField];\n orderBy = orderBy || this.state.orderBy;\n order = order || this.state.order;\n let sortedData = [];\n data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\n const field = this.fields.find(item => item.name === orderBy);\n\n sortedData.sort((sortedItem1, sortedItem2) => {\n let sort1;\n let sort2;\n if (orderBy === 'Address') {\n const a1 = this.address2struct(sortedItem1.item.Address);\n const a2 = this.address2struct(sortedItem2.item.Address);\n\n sort1 = 0;\n if (a1.db !== undefined) {\n sort1 = a1.db << 24;\n }\n if (a2.db !== undefined) {\n sort2 = a2.db << 24;\n }\n sort1 |= a1.byte << 8;\n sort2 |= a2.byte << 8;\n sort1 |= a1.bit || 0;\n sort2 |= a2.bit || 0;\n } else if (orderBy === '$index') {\n sort1 = sortedItem1[orderBy];\n sort2 = sortedItem2[orderBy];\n } else if (field && field.type === 'number') {\n sort1 = parseInt(sortedItem1.item[orderBy], 10);\n sort2 = parseInt(sortedItem2.item[orderBy], 10);\n } else {\n sort1 = sortedItem1.item[orderBy];\n sort2 = sortedItem2.item[orderBy];\n }\n return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\n });\n\n return sortedData;\n }\n\n render() {\n this.fields = this.fields || this.getFields();\n\n return \n {\n this.setState({orderBy, order});\n window.localStorage.setItem('Modbus.orderBy', orderBy);\n window.localStorage.setItem('Modbus.order', order);\n }}\n />\n \n }\n}\n\nBaseRegisters.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n};\n\nexport default BaseRegisters;\n","import PropTypes from 'prop-types';\n\nimport BaseRegisters from './BaseRegisters';\n\nclass Inputs extends BaseRegisters {\n nativeField = 'inputs'\n}\n\nInputs.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default Inputs;\n","import PropTypes from 'prop-types';\n\nimport BaseRegisters from './BaseRegisters';\n\nclass Outputs extends BaseRegisters {\n nativeField = 'outputs'\n}\n\nOutputs.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default Outputs;\n","import PropTypes from 'prop-types';\n\nimport BaseRegisters from './BaseRegisters';\n\nclass Marker extends BaseRegisters {\n nativeField = 'markers'\n}\n\nMarker.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default Marker;\n","import PropTypes from 'prop-types';\n\nimport BaseRegisters from './BaseRegisters';\n\nclass Dbs extends BaseRegisters {\n nativeField = 'dbs';\n}\n\nDbs.propTypes = {\n common: PropTypes.object.isRequired,\n native: PropTypes.object.isRequired,\n instance: PropTypes.number.isRequired,\n adapterName: PropTypes.string.isRequired,\n onError: PropTypes.func,\n onLoad: PropTypes.func,\n onChange: PropTypes.func,\n changed: PropTypes.bool,\n socket: PropTypes.object.isRequired,\n};\n\nexport default Dbs;\n","import React from 'react';\nimport {withStyles} from '@material-ui/core/styles';\nimport { MuiThemeProvider } from '@material-ui/core/styles';\nimport { SnackbarProvider } from 'notistack';\n\nimport AppBar from '@material-ui/core/AppBar';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\n\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\nimport Loader from '@iobroker/adapter-react/Components/Loader'\nimport I18n from '@iobroker/adapter-react/i18n';\n\nimport TabOptions from './Tabs/Options';\nimport TabInputs from './Tabs/Inputs';\nimport TabOutputs from './Tabs/Outputs';\nimport TabMarker from './Tabs/Marker';\nimport TabDbs from './Tabs/DBs';\n\nconst styles = theme => ({\n root: {},\n tabContent: {\n padding: 10,\n height: 'calc(100% - 64px - 48px - 20px)',\n overflow: 'auto',\n },\n tabContentIFrame: {\n padding: 10,\n height: 'calc(100% - 64px - 48px - 20px - 38px)',\n overflow: 'auto'\n },\n tab: {\n width: '100%',\n minHeight: '100%'\n }\n});\n\nconst tabs = [\n {\n name: 'general',\n title: 'General',\n component: TabOptions,\n },\n {\n name: 'inputs',\n title: 'Inputs',\n component: TabInputs,\n },\n {\n name: 'outputs',\n title: 'Outputs',\n component: TabOutputs,\n },\n {\n name: 'marker',\n title: 'Marker',\n component: TabMarker,\n },\n {\n name: 'dbs',\n title: 'DBs',\n component: TabDbs,\n },\n]\n\nclass App extends GenericApp {\n constructor(props) {\n const extendedProps = {...props};\n extendedProps.encryptedFields = ['pass'];\n\n extendedProps.translations = {\n 'en': require('./i18n/en'),\n 'de': require('./i18n/de'),\n 'ru': require('./i18n/ru'),\n 'pt': require('./i18n/pt'),\n 'nl': require('./i18n/nl'),\n 'fr': require('./i18n/fr'),\n 'it': require('./i18n/it'),\n 'es': require('./i18n/es'),\n 'pl': require('./i18n/pl'),\n 'zh-cn': require('./i18n/zh-cn'),\n };\n\n super(props, extendedProps);\n this.state.moreLoaded = false;\n this.state.rooms = null;\n }\n\n onConnectionReady() {\n super.onConnectionReady()\n this.socket.getForeignObjects('enum.rooms.*', 'enum')\n .then(rooms =>\n this.setState({moreLoaded: true, rooms}));\n }\n\n getSelectedTab() {\n const selectedTab = this.state.selectedTab;\n if (!selectedTab) {\n return 0;\n } else {\n return tabs.findIndex(tab => tab.name === selectedTab);\n }\n }\n\n render() {\n if (!this.state.loaded || !this.state.moreLoaded) {\n return \n \n ;\n }\n\n return \n \n
\n \n this.selectTab(tabs[index].name, index)}\n variant=\"scrollable\" scrollButtons=\"auto\">\n {tabs.map(tab => {tab.icon}{I18n.t(tab.title)} : I18n.t(tab.title)}\n data-name={tab.name}\n key={tab.name}\n title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\n />)}\n \n \n
\n {tabs.map((tab, index) => {\n const TabComponent = tab.component;\n if (this.state.selectedTab) {\n if (this.state.selectedTab !== tab.name) {\n return null;\n }\n } else {\n if (index !== 0) {\n return null;\n }\n }\n return this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\n onLoad={native => this.onLoadConfig(native)}\n instance={this.instance}\n adapterName={this.adapterName}\n changed={this.state.changed}\n onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\n changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\n rooms={this.state.rooms}\n />\n })}\n {/*
{JSON.stringify(this.state.native, null, 2)}
*/}\n
\n {this.renderError()}\n {this.renderSaveCloseButtons()}\n
\n
\n
;\n }\n}\n\nexport default withStyles(styles)(App);\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read http://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport * as Sentry from '@sentry/browser';\nimport * as SentryIntegrations from '@sentry/integrations';\nimport { MuiThemeProvider} from '@material-ui/core/styles';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\nimport {version} from '../package.json';\nimport theme from '@iobroker/adapter-react/Theme';\nimport Utils from '@iobroker/adapter-react/Components/Utils';\n\nwindow.adapterName = 's7';\nlet themeName = Utils.getThemeName();\n\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\n\nfunction build() {\n return ReactDOM.render(\n \n {\n themeName = _theme;\n build();\n }}\n />\n ,\n document.getElementById('root')\n );\n}\n\nif (false && window.location.host !== 'localhost:3000') {\n Sentry.init({\n dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\n release: `iobroker.${window.adapterName}@${version}`,\n integrations: [\n new SentryIntegrations.Dedupe()\n ]\n });\n}\n\nbuild();\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/build/static/js/main.ef8e32e0.chunk.js b/src/build/static/js/main.ef8e32e0.chunk.js new file mode 100644 index 0000000..1544722 --- /dev/null +++ b/src/build/static/js/main.ef8e32e0.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpmodebus-admin"]=this["webpackJsonpmodebus-admin"]||[]).push([[0],{316:function(e){e.exports=JSON.parse('[{"name":"ip","type":"text","title":"PLC IP Address"},{"name":"s7logo","type":"checkbox","title":"S7 LOGO!"},{"name":"rack","type":"text","title":"PLC Rack"},{"name":"slot","type":"text","title":"PLC Slot"},{"name":"localTSAP","type":"hex","title":"Local TSAP"},{"name":"remoteTSAP","type":"hex","title":"Remote TSAP"}]')},317:function(e){e.exports=JSON.parse('[{"name":"round","type":"number","title":"Round Real to"},{"name":"poll","type":"number","title":"Poll delay","dimension":"ms"},{"name":"recon","type":"number","title":"Reconnect time","dimension":"ms"},{"name":"pulsetime","type":"number","title":"Pulse time","dimension":"ms"},{"name":"timeFormat","type":"select","title":"S7 Time mode","options":[{"value":"","title":"Local time"},{"value":"utc","title":"UTC"},{"value":"summer","title":"Time offset (with day saving time)"},{"value":"offset","title":"Time offset (no day saving time)"}]},{"name":"timeOffset","type":"number","title":"Time offset","dimension":"minutes"}]')},321:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"value","title":"value"},{"value":"level","title":"level"},{"value":"state","title":"state"},{"value":"switch","title":"switch"},{"value":"value.temperature","title":"value.temperature"},{"value":"value.humidity","title":"value.humidity"},{"value":"value.brightness","title":"value.brightness"},{"value":"value.uv","title":"value.uv"},{"value":"value.pressure","title":"value.pressure"},{"value":"value.battery","title":"value.battery"},{"value":"value.valve","title":"value.valve"},{"value":"value.time","title":"value.time"},{"value":"value.interval","title":"value.interval"},{"value":"value.window","title":"value.window"},{"value":"button","title":"button"},{"value":"indicator","title":"indicator"},{"value":"level.dimmer","title":"level.dimmer"},{"value":"level.valve","title":"level.valve"},{"value":"level.blind","title":"level.blind"},{"value":"level.temperature","title":"level.temperature"},{"value":"level.interval","title":"level.interval"}]')},322:function(e){e.exports=JSON.parse('[{"value":"","title":""},{"value":"BOOL","title":"BOOL"},{"value":"BYTE","title":"BYTE"},{"value":"WORD","title":"WORD"},{"value":"DWORD","title":"DWORD"},{"value":"INT","title":"INT"},{"value":"DINT","title":"DINT"},{"value":"REAL","title":"REAL"},{"value":"S7STRING","title":"S7STRING"},{"value":"STRING","title":"STRING"},{"value":"ARRAY","title":"ARRAY"},{"value":"S5TIME","title":"S5TIME"},{"value":"S7TIME","title":"S7TIME"}]')},333:function(e){e.exports=JSON.parse('{"a":"1.3.10"}')},348:function(e,t,a){},415:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Local time","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Time offset (no day saving time)","Offset (with day saving time)":"Time offset (with day saving time)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Polling","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 Time mode","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Time offset","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Write access","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutes","poll":"poll","sec":"sec.","write as Pulse":"write as Pulse","Drag \'n\' drop file here, or click to select file":"Drag \'n\' drop file here, or click to select file","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Change all","Delete all":"Delete all","Edit as TSV (Tab separated values)":"Edit as TSV (Tab separated values)","Add line":"Add line","Delete":"Delete","Are you sure to delete item with address \\"%s\\"?":"Are you sure to delete item with address \\"%s\\"?","Don\'t show this message in 5 minutes":"Don\'t show this message in 5 minutes","Cancel":"Cancel","Delete all items":"Delete all items","Are you sure to delete all items?":"Are you sure to delete all items?","Edit mode":"Edit mode","Toggle extended mode":"Toggle extended mode","Edit data as TSV":"Edit data as TSV","You can copy, paste and edit data as TSV.":"You can copy, paste and edit data as TSV.","Copy to clipboard":"Copy to clipboard","Nothing":"Nothing","Delete item":"Delete item","Load symbols":"Load symbols","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack and slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV was copied to clipboard"}')},416:function(e){e.exports=JSON.parse('{"Add DB":"DB hinzuf\xfcgen","Address":"Adresse","All entries will be deleted. Are you sure?":"Alle Eintr\xe4ge werden gel\xf6scht. Sind sie sicher?","Close":"Zumachen","Delete all entries":"Alle Eintr\xe4ge l\xf6schen","Description":"Beschreibung","Enable polling of data point":"Zyklische Abfrage vom Datenpunkt","Export":"Export","Export to CSV":"Export in CSV","General":"Allgemein","Import":"Import","Import DB file":"DB-Datei importieren","Import from CSV":"Import aus CSV","Import symbols file":"Symboldatei Importieren","Inputs":"Eing\xe4nge","Length":"L\xe4nge","Load Symbols":"Lade Symbole","Local TSAP":"Local TSAP","Local time":"Ortszeit","Marker":"Merker","Name":"Name","Offset (no day saving time)":"Zeit-Offset (ohne Sommerzeit)","Offset (with day saving time)":"Zeit-Offset (mit Sommerzeit)","Outputs":"Ausg\xe4nge","PLC Connection":"SPS Verbindung","PLC IP Address":"SPS IP Adresse","PLC Rack":"SPS Rack","PLC Slot":"SPS Slot","Poll delay":"Poll delay","Polling":"Abfrage","Pulse time":"Pulsetime","RW":"RW","Reconnect time":"Reconnectzeit","Remote TSAP":"Remote TSAP","Role":"Rolle","Room":"Raum","Round Real to":"Aufrunden Real auf","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7-Zeitmodus","Text copied to clipboard. Click to close the window":"Text wurde in der Zwischenablage kopiert. Klick um Fenster zu zumachen.","Time offset":"Zeitverschiebung","Toggle RW":"RW umschalten","Toggle WP":"WP umschalten","Toggle poll":"Poll umschalten","Type":"Typ","UTC":"UTC","Unit":"Einheit","WP":"WP","Write access":"Schreibzugriff","Write access allowed":"Schreiben erlaubt","Write pulses (true=>false edge)":"Schreibe Pulse (Ja=>Nein Kante)","minutes":"Minuten","poll":"poll","sec":"Sek.","write as Pulse":"schreibe als Impuls","Drag \'n\' drop file here, or click to select file":"Die Datei hierher ziehen , oder klicken, um die Datei auszuw\xe4hlen","DBs":"DBs","ms":"ms","Poll":"Abfrage","Change all":"\xc4ndere Alles","Delete all":"Alles l\xf6schen","Edit as TSV (Tab separated values)":"Als TSV bearbeiten (Tabulatorgetrennte Werte)","Add line":"Zeile hinzuf\xfcgen","Delete":"L\xf6schen","Are you sure to delete item with address \\"%s\\"?":"M\xf6chten Sie den Artikel mit der Adresse \\"%s\\" wirklich l\xf6schen?","Don\'t show this message in 5 minutes":"Diese Nachricht nicht in 5\xa0Minuten anzeigen","Cancel":"Abbrechen","Delete all items":"Alle Elemente l\xf6schen","Are you sure to delete all items?":"M\xf6chten Sie wirklich alle Elemente l\xf6schen?","Edit mode":"Bearbeitungsmodus","Toggle extended mode":"Erweiterten Modus umschalten","Edit data as TSV":"Daten als TSV bearbeiten","You can copy, paste and edit data as TSV.":"Sie k\xf6nnen Daten als TSV kopieren, einf\xfcgen und bearbeiten.","Copy to clipboard":"In die Zwischenablage kopieren","Nothing":"Keins","Delete item":"Item l\xf6schen","Load symbols":"Symbole laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Verbindungstyp: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack und Steckplatz: [Rack * 0x20 + Steckplatz]","TSV was copied to clipboard":"TSV wurde in die Zwischenablage kopiert"}')},417:function(e){e.exports=JSON.parse('{"Add DB":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c DB","Address":"\u0410\u0434\u0440\u0435\u0441","All entries will be deleted. Are you sure?":"\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b?","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Delete all entries":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Enable polling of data point":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0435","Export":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442","Export to CSV":"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 CSV","General":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435","Import":"\u0418\u043f\u043c\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c","Import DB file":"\u0418\u043f\u043c\u043e\u0440\u0442 DB \u0444\u0430\u0439\u043b\u043e\u0432","Import from CSV":"\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 CSV","Import symbols file":"\u0418\u043f\u043c\u043e\u0440\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432","Inputs":"\u0412\u0445\u043e\u0434\u044b","Length":"Length","Load Symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Local TSAP":"Local TSAP","Local time":"\u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f","Marker":"\u041c\u0430\u0440\u043a\u0435\u0440\u044b","Name":"\u0418\u043c\u044f","Offset (no day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0431\u0435\u0437 \u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)","Offset (with day saving time)":"\u0421\u0434\u0432\u0438\u0433 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0441 \u043b\u0435\u0442\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c)","Outputs":"\u0412\u044b\u0445\u043e\u0434\u044b","PLC Connection":"PLC \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","PLC IP Address":"PLC IP \u0430\u0434\u0440\u0435\u0441","PLC Rack":"PLC Rack","PLC Slot":"PLC \u0441\u043b\u043e\u0442","Poll delay":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u043f\u0440\u043e\u0441\u0430","Polling":"\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"\u0420\u043e\u043b\u044c","Room":"\u041a\u043e\u043c\u043d\u0430\u0442\u0430","Round Real to":"\u041e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c real \u0434\u043e","S7 LOGO!":"S7 LOGO!","S7 Time mode":"S7 \u0420\u0435\u0436\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Text copied to clipboard. Click to close the window":"\u0422\u0435\u043a\u0441\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043c\u044b\u0448\u043a\u043e\u0439 \u0437\u0434\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e","Time offset":"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438","Toggle RW":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c RW","Toggle WP":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c WP","Toggle poll":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c poll","Type":"\u0422\u0438\u043f","UTC":"UTC","Unit":"\u0415\u0434\u0438\u043d\u0438\u0446\u044b","WP":"WP","Write access":"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u0438","Write access allowed":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e","Write pulses (true=>false edge)":"\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b (1 => 0)","minutes":"\u043c\u0438\u043d\u0443\u0442\u044b","poll":"poll","sec":"\u0441\u0435\u043a.","write as Pulse":"\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0430\u043a Pulse","Drag \'n\' drop file here, or click to select file":"\u041f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0441\u044e\u0434\u0430 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b","DBs":"DBs","ms":"ms","Poll":"\u041e\u043f\u0440\u043e\u0441","Change all":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435","Delete all":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435","Edit as TSV (Tab separated values)":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a TSV (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0435\u0439)","Add line":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","Delete":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","Are you sure to delete item with address \\"%s\\"?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \\"%s\\"?","Don\'t show this message in 5 minutes":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 5 \u043c\u0438\u043d\u0443\u0442","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","Delete all items":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b","Are you sure to delete all items?":"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b?","Edit mode":"\u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Toggle extended mode":"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c","Edit data as TSV":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV","You can copy, paste and edit data as TSV.":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a TSV.","Copy to clipboard":"\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430","Nothing":"\u041d\u0438\u0447\u0435\u0433\u043e","Delete item":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442","Load symbols":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u0422\u0438\u043f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u0421\u0442\u043e\u0439\u043a\u0430 \u0438 \u0441\u043b\u043e\u0442: [\u0421\u0442\u043e\u0439\u043a\u0430 * 0x20 + \u0441\u043b\u043e\u0442]","TSV was copied to clipboard":"TSV \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430"}')},418:function(e){e.exports=JSON.parse('{"Add DB":"Adicionar DB","Address":"Endere\xe7o","All entries will be deleted. Are you sure?":"Todas as entradas ser\xe3o exclu\xeddas. Voc\xea tem certeza?","Close":"Fechar","Delete all entries":"Eliminar todas as entradas","Description":"Descri\xe7\xe3o","Enable polling of data point":"Habilitar a vota\xe7\xe3o do ponto de dados","Export":"Exportar","Export to CSV":"Exportar para CSV","General":"Geral","Import":"Importar","Import DB file":"Importar arquivo DB","Import from CSV":"Importa\xe7\xe3o de CSV","Import symbols file":"Arquivo de s\xedmbolos de importa\xe7\xe3o","Inputs":"Entradas","Length":"comprimento","Load Symbols":"Carregar s\xedmbolos","Local TSAP":"TSAP local","Local time":"Hor\xe1rio local","Marker":"Marcador","Name":"Nome","Offset (no day saving time)":"Deslocamento (sem hor\xe1rio)","Offset (with day saving time)":"Offset (com tempo de economia de hora)","Outputs":"Sa\xeddas","PLC Connection":"Conex\xe3o do PLC","PLC IP Address":"Endere\xe7o IP do PLC","PLC Rack":"PLC Rack","PLC Slot":"Slot PLC","Poll delay":"Retardo de enquete","Polling":"Polling","Pulse time":"Tempo de pulso","RW":"RW","Reconnect time":"Reconectar o tempo","Remote TSAP":"TSAP remoto","Role":"Fun\xe7\xe3o","Room":"Quarto","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO !","S7 Time mode":"Modo de tempo S7","Text copied to clipboard. Click to close the window":"Texto copiado para a \xe1rea de transfer\xeancia. Clique para fechar a janela","Time offset":"Deslocamento de tempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Alternar pesquisa","Type":"Tipo","UTC":"UTC","Unit":"Unidade","WP":"WP","Write access":"Acesso de grava\xe7\xe3o","Write access allowed":"Acesso de acesso permitido","Write pulses (true=>false edge)":"Escrever pulsos (true => false edge)","minutes":"minutos","poll":"vota\xe7\xe3o","sec":"seg.","write as Pulse":"escreva como pulso","Drag \'n\' drop file here, or click to select file":"Arraste e solte o arquivo aqui ou clique para selecionar o arquivo","DBs":"DBs","ms":"ms","Poll":"Enquete","Change all":"Mude tudo","Delete all":"Apagar tudo","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabula\xe7\xe3o)","Add line":"Adicionar linha","Delete":"Excluir","Are you sure to delete item with address \\"%s\\"?":"Tem certeza de que deseja excluir o item com o endere\xe7o \\"%s\\"?","Don\'t show this message in 5 minutes":"N\xe3o mostre esta mensagem em 5 minutos","Cancel":"Cancelar","Delete all items":"Apagar todos os itens","Are you sure to delete all items?":"Tem certeza de que deseja excluir todos os itens?","Edit mode":"Modo de edi\xe7\xe3o","Toggle extended mode":"Alternar modo estendido","Edit data as TSV":"Editar dados como TSV","You can copy, paste and edit data as TSV.":"Voc\xea pode copiar, colar e editar dados como TSV.","Copy to clipboard":"Copiar para \xe1rea de transfer\xeancia","Nothing":"Nada","Delete item":"Apagar item","Load symbols":"S\xedmbolos de carga","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conex\xe3o: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 B\xe1sico","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV foi copiado para a \xe1rea de transfer\xeancia"}')},419:function(e){e.exports=JSON.parse('{"Add DB":"Voeg DB toe","Address":"Adres","All entries will be deleted. Are you sure?":"Alle inzendingen worden verwijderd. Weet je het zeker?","Close":"Dichtbij","Delete all entries":"Verwijder alle vermeldingen","Description":"Beschrijving","Enable polling of data point":"Polling van gegevenspunt inschakelen","Export":"Exporteren","Export to CSV":"Exporteren naar CSV","General":"Algemeen","Import":"Importeren","Import DB file":"DB-bestand importeren","Import from CSV":"Importeren vanuit CSV","Import symbols file":"Symboolbestand importeren","Inputs":"ingangen","Length":"Lengte","Load Symbols":"Laad symbolen","Local TSAP":"Lokale TSAP","Local time":"Lokale tijd","Marker":"Markeerstift","Name":"Naam","Offset (no day saving time)":"Offset (geen dagbesparende tijd)","Offset (with day saving time)":"Offset (met dagbesparende tijd)","Outputs":"uitgangen","PLC Connection":"PLC-verbinding","PLC IP Address":"PLC IP-adres","PLC Rack":"PLC Rack","PLC Slot":"PLC-slot","Poll delay":"Poll vertraging","Polling":"stemming","Pulse time":"Pulstijd","RW":"RW","Reconnect time":"Reconnect tijd","Remote TSAP":"TSAP op afstand","Role":"Rol","Room":"Kamer","Round Real to":"Rond echt naar","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tijdmodus","Text copied to clipboard. Click to close the window":"Tekst gekopieerd naar klembord. Klik om het venster te sluiten","Time offset":"Tijd offset","Toggle RW":"RW omschakelen","Toggle WP":"Wissel WP","Toggle poll":"Poll wisselen","Type":"Type","UTC":"UTC","Unit":"Eenheid","WP":"WP","Write access":"Schrijf toegang","Write access allowed":"Schrijftoegang toegestaan","Write pulses (true=>false edge)":"Schrijf pulsen (true => false edge)","minutes":"minuut","poll":"poll","sec":"seconde","write as Pulse":"schrijf als Pulse","Drag \'n\' drop file here, or click to select file":"Sleep het bestand hierheen, of klik om het bestand te selecteren","DBs":"DBs","ms":"ms","Poll":"Opiniepeiling","Change all":"Verander alles","Delete all":"Verwijder alles","Edit as TSV (Tab separated values)":"Bewerken als TSV (door tabs gescheiden waarden)","Add line":"Lijn toevoegen","Delete":"Verwijderen","Are you sure to delete item with address \\"%s\\"?":"Weet u zeker dat u het item met adres \\"%s\\" wilt verwijderen?","Don\'t show this message in 5 minutes":"Dit bericht niet binnen 5 minuten weergeven","Cancel":"annuleren","Delete all items":"Alle items verwijderen","Are you sure to delete all items?":"Weet je zeker dat je alle items wilt verwijderen?","Edit mode":"Bewerkingsmodus","Toggle extended mode":"Schakel uitgebreide modus in","Edit data as TSV":"Gegevens bewerken als TSV","You can copy, paste and edit data as TSV.":"U kunt gegevens kopi\xebren, plakken en bewerken als TSV.","Copy to clipboard":"Kopieer naar klembord","Nothing":"Niets","Delete item":"Verwijder item","Load symbols":"Symbolen laden","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Aansluittype: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rek en sleuf: [Rack * 0x20 + sleuf]","TSV was copied to clipboard":"TSV is gekopieerd naar het klembord"}')},420:function(e){e.exports=JSON.parse('{"Add DB":"Ajouter une DB","Address":"Adresse","All entries will be deleted. Are you sure?":"Toutes les entr\xe9es seront supprim\xe9es. \xcates-vous s\xfbr?","Close":"Fermer","Delete all entries":"Supprimer toutes les entr\xe9es","Description":"La description","Enable polling of data point":"Activer l\'interrogation du point de donn\xe9es","Export":"Exportation","Export to CSV":"Exporter au format CSV","General":"G\xe9n\xe9ral","Import":"Importer","Import DB file":"Importer un fichier DB","Import from CSV":"Importer \xe0 partir du fichier CSV","Import symbols file":"Importer un fichier de symboles","Inputs":"Contributions","Length":"Longueur","Load Symbols":"Charger des symboles","Local TSAP":"TSAP local","Local time":"Heure locale","Marker":"Marqueur","Name":"pr\xe9nom","Offset (no day saving time)":"D\xe9calage (pas de temps pour gagner du temps)","Offset (with day saving time)":"D\xe9calage (avec un gain de temps de jour)","Outputs":"Les sorties","PLC Connection":"Connexion PLC","PLC IP Address":"Adresse IP de l\'API","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"D\xe9lai d\'interrogation","Polling":"Vote","Pulse time":"Temps d\'impulsion","RW":"RW","Reconnect time":"Reconnectez le temps","Remote TSAP":"TSAP distant","Role":"R\xf4le","Room":"Chambre","Round Real to":"Rond r\xe9el \xe0","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Mode heure","Text copied to clipboard. Click to close the window":"Texte copi\xe9 dans le presse-papier Cliquez pour fermer la fen\xeatre","Time offset":"D\xe9calage temporel","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Basculer le sondage","Type":"Type","UTC":"UTC","Unit":"Unit\xe9","WP":"WP","Write access":"Acc\xe8s en \xe9criture","Write access allowed":"Acc\xe8s en \xe9criture autoris\xe9","Write pulses (true=>false edge)":"\xc9crire des impulsions (true => false edge)","minutes":"minutes","poll":"sondage","sec":"seconde.","write as Pulse":"\xe9crire comme Pulse","Drag \'n\' drop file here, or click to select file":"Glissez-d\xe9posez le fichier ici, ou cliquez pour s\xe9lectionner le fichier","DBs":"DBs","ms":"ms","Poll":"Sondage","Change all":"Change tout","Delete all":"Tout supprimer","Edit as TSV (Tab separated values)":"Modifier en tant que TSV (valeurs s\xe9par\xe9es par des tabulations)","Add line":"Ajouter une ligne","Delete":"Effacer","Are you sure to delete item with address \\"%s\\"?":"\xcates-vous s\xfbr de supprimer l\'\xe9l\xe9ment avec l\'adresse \xab\xa0%s\xa0\xbb\xa0?","Don\'t show this message in 5 minutes":"Ne pas afficher ce message dans 5 minutes","Cancel":"Annuler","Delete all items":"Supprimer tous les \xe9l\xe9ments","Are you sure to delete all items?":"\xcates-vous s\xfbr de supprimer tous les \xe9l\xe9ments\xa0?","Edit mode":"Mode \xe9dition","Toggle extended mode":"Basculer en mode \xe9tendu","Edit data as TSV":"Modifier les donn\xe9es en tant que TSV","You can copy, paste and edit data as TSV.":"Vous pouvez copier, coller et modifier des donn\xe9es au format TSV.","Copy to clipboard":"Copier dans le presse-papier","Nothing":"Rien","Delete item":"Effacer l\'article","Load symbols":"Charger des symboles","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Type de connexion : 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack et slot : [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV a \xe9t\xe9 copi\xe9 dans le presse-papiers"}')},421:function(e){e.exports=JSON.parse('{"Add DB":"Aggiungi DB","Address":"Indirizzo","All entries will be deleted. Are you sure?":"Tutte le voci saranno cancellate. Sei sicuro?","Close":"Vicino","Delete all entries":"Elimina tutte le voci","Description":"Descrizione","Enable polling of data point":"Abilita il polling del punto dati","Export":"Esportare","Export to CSV":"Esporta in CSV","General":"Generale","Import":"Importare","Import DB file":"Importa file DB","Import from CSV":"Importa da CSV","Import symbols file":"Importa file simboli","Inputs":"ingressi","Length":"Lunghezza","Load Symbols":"Carica simboli","Local TSAP":"TSAP locale","Local time":"Ora locale","Marker":"marcatore","Name":"Nome","Offset (no day saving time)":"Offset (nessun giorno risparmiando tempo)","Offset (with day saving time)":"Offset (con ora del giorno)","Outputs":"Uscite","PLC Connection":"Connessione PLC","PLC IP Address":"Indirizzo IP del PLC","PLC Rack":"Rack PLC","PLC Slot":"Slot PLC","Poll delay":"Ritardo del sondaggio","Polling":"votazione","Pulse time":"Tempo di impulso","RW":"RW","Reconnect time":"Tempo di riconnessione","Remote TSAP":"TSAP remoto","Role":"Ruolo","Room":"Camera","Round Real to":"Round reale a","S7 LOGO!":"LOGO S7 !","S7 Time mode":"Modalit\xe0 ora S7","Text copied to clipboard. Click to close the window":"Testo copiato negli appunti. Clicca per chiudere la finestra","Time offset":"Differenza di fuso orario","Toggle RW":"Attiva / disattiva RW","Toggle WP":"Attiva / disattiva WP","Toggle poll":"Attiva / disattiva sondaggio","Type":"genere","UTC":"UTC","Unit":"Unit\xe0","WP":"WP","Write access":"Accesso in scrittura","Write access allowed":"Accesso in scrittura consentito","Write pulses (true=>false edge)":"Scrivi impulsi (true => falso bordo)","minutes":"minuti","poll":"sondaggio","sec":"sec.","write as Pulse":"scrivi come Pulse","Drag \'n\' drop file here, or click to select file":"Trascina e rilascia il file qui o fai clic per selezionare il file","DBs":"DBs","ms":"ms","Poll":"Sondaggio","Change all":"Cambia tutto","Delete all":"Cancella tutto","Edit as TSV (Tab separated values)":"Modifica come TSV (valori separati da tabulazioni)","Add line":"Aggiungi riga","Delete":"Elimina","Are you sure to delete item with address \\"%s\\"?":"Sei sicuro di eliminare l\'elemento con l\'indirizzo \\"%s\\"?","Don\'t show this message in 5 minutes":"Non mostrare questo messaggio in 5 minuti","Cancel":"Annulla","Delete all items":"Elimina tutti gli elementi","Are you sure to delete all items?":"Sei sicuro di eliminare tutti gli elementi?","Edit mode":"Modalit\xe0 Modifica","Toggle extended mode":"Attiva/disattiva modalit\xe0 estesa","Edit data as TSV":"Modifica dati come TSV","You can copy, paste and edit data as TSV.":"Puoi copiare, incollare e modificare i dati come TSV.","Copy to clipboard":"Copia negli appunti","Nothing":"Niente","Delete item":"Cancellare l\'oggetto","Load symbols":"Simboli di carico","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo di collegamento: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack e slot: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV \xe8 stato copiato negli appunti"}')},422:function(e){e.exports=JSON.parse('{"Add DB":"Add DB","Address":"Address","All entries will be deleted. Are you sure?":"All entries will be deleted. Are you sure?","Close":"Close","Delete all entries":"Delete all entries","Description":"Description","Enable polling of data point":"Enable polling of data point","Export":"Export","Export to CSV":"Export to CSV","General":"General","Import":"Import","Import DB file":"Import DB file","Import from CSV":"Import from CSV","Import symbols file":"Import symbols file","Inputs":"Inputs","Length":"Length","Load Symbols":"Load symbols","Local TSAP":"Local TSAP","Local time":"Hora local","Marker":"Marker","Name":"Name","Offset (no day saving time)":"Desplazamiento (sin horario de guardado)","Offset (with day saving time)":"Desplazamiento (con horario de ahorro de d\xeda)","Outputs":"Outputs","PLC Connection":"PLC Connection","PLC IP Address":"PLC IP Address","PLC Rack":"PLC Rack","PLC Slot":"PLC Slot","Poll delay":"Poll delay","Polling":"Votaci\xf3n","Pulse time":"Pulse time","RW":"RW","Reconnect time":"Reconnect time","Remote TSAP":"Remote TSAP","Role":"Role","Room":"Room","Round Real to":"Round real to","S7 LOGO!":"S7 LOGO!","S7 Time mode":"Modo de tiempo S7","Text copied to clipboard. Click to close the window":"Text copied to clipboard. Click to close the window","Time offset":"Desplazamiento de tiempo","Toggle RW":"Toggle RW","Toggle WP":"Toggle WP","Toggle poll":"Toggle poll","Type":"Type","UTC":"UTC","Unit":"Unit","WP":"WP","Write access":"Acceso de escritura","Write access allowed":"Write access allowed","Write pulses (true=>false edge)":"Write pulses (true=>false edge)","minutes":"minutos","poll":"poll","sec":"sec.","write as Pulse":"escribe como Pulso","Drag \'n\' drop file here, or click to select file":"Arrastre y suelte el archivo aqu\xed o haga clic para seleccionar el archivo","DBs":"DBs","ms":"ms","Poll":"Encuesta","Change all":"Cambia todo","Delete all":"Eliminar todos","Edit as TSV (Tab separated values)":"Editar como TSV (valores separados por tabulaciones)","Add line":"A\xf1adir l\xednea","Delete":"Borrar","Are you sure to delete item with address \\"%s\\"?":"\xbfEst\xe1 seguro de eliminar el elemento con la direcci\xf3n \\"%s\\"?","Don\'t show this message in 5 minutes":"No muestre este mensaje en 5 minutos","Cancel":"Cancelar","Delete all items":"Eliminar todos los elementos","Are you sure to delete all items?":"\xbfEst\xe1 seguro de eliminar todos los elementos?","Edit mode":"Modo de edici\xf3n","Toggle extended mode":"Alternar modo extendido","Edit data as TSV":"Editar datos como TSV","You can copy, paste and edit data as TSV.":"Puede copiar, pegar y editar datos como TSV.","Copy to clipboard":"Copiar al portapapeles","Nothing":"Nada","Delete item":"Eliminar elemento","Load symbols":"Cargar s\xedmbolos","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Tipo de conexi\xf3n: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Rack y ranura: [Rack * 0x20 + Slot]","TSV was copied to clipboard":"TSV se copi\xf3 al portapapeles"}')},423:function(e){e.exports=JSON.parse('{"Add DB":"Dodaj DB","Address":"Adres","All entries will be deleted. Are you sure?":"Wszystkie wpisy zostan\u0105 usuni\u0119te. Jeste\u015b pewny?","Close":"Blisko","Delete all entries":"Usu\u0144 wszystkie wpisy","Description":"Opis","Enable polling of data point":"W\u0142\u0105cz odpytywanie punktu danych","Export":"Eksport","Export to CSV":"Eksportuj do pliku CSV","General":"Genera\u0142","Import":"Import","Import DB file":"Importuj plik DB","Import from CSV":"Importuj z CSV","Import symbols file":"Importuj plik symboli","Inputs":"Wej\u015bcia","Length":"D\u0142ugo\u015b\u0107","Load Symbols":"Za\u0142aduj symbole","Local TSAP":"Lokalny TSAP","Local time":"Czas lokalny","Marker":"Znacznik","Name":"Nazwa","Offset (no day saving time)":"Przesuni\u0119cie (brak czasu na dzie\u0144)","Offset (with day saving time)":"Przesuni\u0119cie (z czasem oszcz\u0119dzania dziennego)","Outputs":"Wyj\u015bcia","PLC Connection":"Po\u0142\u0105czenie PLC","PLC IP Address":"Adres IP sterownika PLC","PLC Rack":"Rack PLC","PLC Slot":"Gniazdo PLC","Poll delay":"Op\xf3\u017anienie ankiety","Polling":"Ankieta","Pulse time":"Czas impulsu","RW":"RW","Reconnect time":"Czas ponownego po\u0142\u0105czenia","Remote TSAP":"Zdalny TSAP","Role":"Rola","Room":"Pok\xf3j","Round Real to":"Runda prawdziwa do","S7 LOGO!":"S7 LOGO !","S7 Time mode":"S7 Tryb czasu","Text copied to clipboard. Click to close the window":"Tekst skopiowany do schowka. Kliknij, aby zamkn\u0105\u0107 okno","Time offset":"Przesuni\u0119cie czasu","Toggle RW":"Prze\u0142\u0105cz RW","Toggle WP":"Prze\u0142\u0105cz WP","Toggle poll":"Prze\u0142\u0105cz ankiet\u0119","Type":"Rodzaj","UTC":"UTC","Unit":"Jednostka","WP":"WP","Write access":"Dost\u0119p do zapisu","Write access allowed":"Dost\u0119p do zapisu dozwolony","Write pulses (true=>false edge)":"Pisz impulsy (true => false edge)","minutes":"minuty","poll":"g\u0142osowanie","sec":"sec.","write as Pulse":"napisz jako Pulse","Drag \'n\' drop file here, or click to select file":"Przeci\u0105gnij i upu\u015b\u0107 plik tutaj lub kliknij, aby wybra\u0107 plik","DBs":"DBs","ms":"ms","Poll":"Poll","Change all":"Zmieni\u0107 wszystko","Delete all":"Usu\u0144 wszystko","Edit as TSV (Tab separated values)":"Edytuj jako TSV (warto\u015bci rozdzielone tabulatorami)","Add line":"Dodaj lini\u0119","Delete":"Kasowa\u0107","Are you sure to delete item with address \\"%s\\"?":"Czy na pewno chcesz usun\u0105\u0107 element o adresie \u201e%s\u201d?","Don\'t show this message in 5 minutes":"Nie pokazuj tej wiadomo\u015bci za 5 minut","Cancel":"Anuluj","Delete all items":"Usu\u0144 wszystkie elementy","Are you sure to delete all items?":"Czy na pewno chcesz usun\u0105\u0107 wszystkie elementy?","Edit mode":"Tryb edycji","Toggle extended mode":"Prze\u0142\u0105cz tryb rozszerzony","Edit data as TSV":"Edytuj dane jako TSV","You can copy, paste and edit data as TSV.":"Mo\u017cesz kopiowa\u0107, wkleja\u0107 i edytowa\u0107 dane jako TSV.","Copy to clipboard":"Skopiuj do schowka","Nothing":"Nic","Delete item":"Usu\u0144 przedmiot","Load symbols":"Za\u0142aduj symbole","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"Typ po\u0142\u0105czenia: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"Szafa i gniazdo: [Stela\u017c * 0x20 + Slot]","TSV was copied to clipboard":"TSV zosta\u0142 skopiowany do schowka"}')},424:function(e){e.exports=JSON.parse('{"Add DB":"\u6dfb\u52a0\u6570\u636e\u5e93","Address":"\u5730\u5740","All entries will be deleted. Are you sure?":"\u6240\u6709\u6761\u76ee\u5c06\u88ab\u5220\u9664\u3002","Close":"\u5173\u95ed","Delete all entries":"\u5220\u9664\u6240\u6709\u6761\u76ee","Description":"\u63cf\u8ff0","Enable polling of data point":"\u542f\u7528\u6570\u636e\u70b9\u8f6e\u8be2","Export":"\u51fa\u53e3","Export to CSV":"\u5bfc\u51fa\u4e3aCSV","General":"\u4e00\u822c\u7684","Import":"\u8fdb\u53e3","Import DB file":"\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6\uff1a","Import from CSV":"\u4eceCSV\u5bfc\u5165","Import symbols file":"\u5bfc\u5165\u7b26\u53f7\u6587\u4ef6\uff1a","Inputs":"\u8f93\u5165\u9879","Length":"\u957f\u5ea6","Load Symbols":"\u52a0\u8f7d\u7b26\u53f7","Local TSAP":"\u672c\u5730TSAP\uff1a","Local time":"\u5f53\u5730\u65f6\u95f4","Marker":"\u8bb0\u53f7\u7b14","Name":"\u540d\u79f0","Offset (no day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u65e0\u590f\u4ee4\u65f6\uff09","Offset (with day saving time)":"\u65f6\u95f4\u504f\u79fb\uff08\u5e26\u590f\u65f6\u5236\uff09","Outputs":"\u4ea7\u51fa","PLC Connection":"PLC\u8fde\u63a5\uff1a","PLC IP Address":"PLC IP\u5730\u5740\uff1a","PLC Rack":"PLC\u673a\u67b6\uff1a","PLC Slot":"PLC\u63d2\u69fd\uff1a","Poll delay":"\u8f6e\u8be2\u5ef6\u8fdf\uff1a","Polling":"\u8f6e\u8be2","Pulse time":"\u8109\u51b2\u65f6\u95f4\uff1a","RW":"\u8bfb\u5199\u5668","Reconnect time":"\u91cd\u65b0\u8fde\u63a5\u65f6\u95f4\uff1a","Remote TSAP":"\u8fdc\u7a0bTSAP\uff1a","Role":"\u89d2\u8272","Room":"\u623f\u95f4","Round Real to":"\u820d\u5165\u4e3a\uff1a","S7 LOGO!":"S7 LOGO !\uff1a","S7 Time mode":"S7\u65f6\u95f4\u6a21\u5f0f","Text copied to clipboard. Click to close the window":"\u6587\u672c\u5df2\u590d\u5236\u5230\u526a\u8d34\u677f\u3002","Time offset":"\u65f6\u95f4\u504f\u79fb\uff1a","Toggle RW":"\u5207\u6362RW","Toggle WP":"\u5207\u6362WP","Toggle poll":"\u5207\u6362\u6c11\u610f\u8c03\u67e5","Type":"\u7c7b\u578b","UTC":"\u4e16\u754c\u6807\u51c6\u65f6\u95f4","Unit":"\u5355\u5143","WP":"\u53ef\u6e7f\u6027\u7c89\u5242","Write access":"\u5199\u8bbf\u95ee","Write access allowed":"\u5141\u8bb8\u5199\u8bbf\u95ee","Write pulses (true=>false edge)":"\u5199\u8109\u51b2\uff08\u771f=>\u5047\u8fb9\uff09","minutes":"\u5206\u949f","poll":"\u8f6e\u8be2","sec":"\u79d2","write as Pulse":"\u5199\u4e3a\u8109\u51b2","Drag \'n\' drop file here, or click to select file":"\u5c06\u201cn\u201d\u6587\u4ef6\u62d6\u5230\u6b64\u5904\uff0c\u6216\u5355\u51fb\u4ee5\u9009\u62e9\u6587\u4ef6","DBs":"DBs","ms":"ms","Poll":"\u8f6e\u8be2","Change all":"\u5168\u90e8\u66f4\u6539","Delete all":"\u5220\u9664\u6240\u6709","Edit as TSV (Tab separated values)":"\u7f16\u8f91\u4e3a TSV\uff08\u5236\u8868\u7b26\u5206\u9694\u503c\uff09","Add line":"\u6dfb\u52a0\u884c","Delete":"\u5220\u9664","Are you sure to delete item with address \\"%s\\"?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u5730\u5740\u4e3a\u201c%s\u201d\u7684\u9879\u76ee\u5417\uff1f","Don\'t show this message in 5 minutes":"5 \u5206\u949f\u5185\u4e0d\u8981\u663e\u793a\u6b64\u6d88\u606f","Cancel":"\u53d6\u6d88","Delete all items":"\u5220\u9664\u6240\u6709\u9879\u76ee","Are you sure to delete all items?":"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u6240\u6709\u9879\u76ee\u5417\uff1f","Edit mode":"\u7f16\u8f91\u6a21\u5f0f","Toggle extended mode":"\u5207\u6362\u6269\u5c55\u6a21\u5f0f","Edit data as TSV":"\u5c06\u6570\u636e\u7f16\u8f91\u4e3a TSV","You can copy, paste and edit data as TSV.":"\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u590d\u5236\u3001\u7c98\u8d34\u548c\u7f16\u8f91\u4e3a TSV\u3002","Copy to clipboard":"\u590d\u5236\u5230\u526a\u8d34\u677f","Nothing":"\u6ca1\u6709\u4ec0\u4e48","Delete item":"\u5220\u9664\u9879\u76ee","Load symbols":"\u52a0\u8f7d\u7b26\u53f7","Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic":"\u8fde\u63a5\u7c7b\u578b\uff1a0x1 - PG\u30010x2 - OP\u30010x3-0x10 - S7 Basic","Rack and slot: [Rack * 0x20 + Slot]":"\u673a\u67b6\u548c\u63d2\u69fd\uff1a[\u673a\u67b6 * 0x20 + \u63d2\u69fd]","TSV was copied to clipboard":"TSV \u88ab\u590d\u5236\u5230\u526a\u8d34\u677f"}')},426:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a(16),i=a.n(s),n=a(456),l=(a(348),a(68)),r=a(28),c=a(25),d=a(335),p=a(58),u=a(38),m=a(46),h=a(5),g=a(91),b=a(463),f=a(472),S=a(464),v=a(313),j=a.n(v),x=a(218),T=a.n(x),y=a(13),O=a.n(y),P=a(334),C=a(173),A=a(461),k=a(473),R=a(447),D=a(460),w=a(459),L=a(220),I=a(339),E=a(437),W=a(462),V=a(458),B=a(172),N=a(211),z=a(316),G=a(317),M=a(7),U=function(e){var t=Object(g.b)().enqueueSnackbar,a=Object(o.useCallback)((function(a){e.onChange(a),t(O.a.t("Data updated"))}),[]),s=Object(P.a)({onDrop:a,accept:e.accept}),i=s.getRootProps,n=s.getInputProps,r=s.isDragActive;return Object(M.jsxs)(L.a,{style:{padding:3,paddingRight:40},children:[Object(M.jsx)(C.a,{variant:"h6",gutterBottom:!0,children:O.a.t(e.label)}),Object(M.jsxs)("div",Object(l.a)(Object(l.a)({},i()),{},{className:e.classes.fileInput,style:r?{backgroundColor:"rgba(0, 255, 0, 0.1)"}:{cursor:"pointer"},children:[Object(M.jsx)("input",Object(l.a)({},n())),r?Object(M.jsx)("p",{children:O.a.t("Drop the file here ...")}):Object(M.jsx)("p",{children:O.a.t("Drag 'n' drop file here, or click to select file")})]}))]})},F=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).inputDisabled=function(e){return!1},o.inputDisplay=function(e){if(null===o.props.native.params.slot){if(["rack","slot"].includes(e.name))return!1}else if(["localTSAP","remoteTSAP"].includes(e.name))return!1;return"timeOffset"!==e.name||["summer","offset"].includes(o.props.native.params.timeFormat)},o.changeParam=function(e,t){var a=JSON.parse(JSON.stringify(o.props.native));"s7logo"===e?t?(a.params.localTSAP="",a.params.remoteTSAP="",a.params.rack=null,a.params.slot=null):(a.params.localTSAP=null,a.params.remoteTSAP=null,a.params.rack="",a.params.slot=""):a.params[e]=t,o.props.changeNative(a)},o.loadSymbols=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){var s={inputs:[],outputs:[],markers:[]},i=a.result;(i=i.split("126,")).forEach((function(e){var t=e.slice(23,29).replace(/( )/g,""),a={Name:e.slice(0,23).replace(/( ){2,}/g,""),Address:e.slice(29,36).replace(/( )/g,""),Type:e.slice(36,41).replace(/( )/g,""),Description:e.slice(46,126).replace(/( ){2,}/,""),Unit:"",poll:!0,RW:!1,WP:!1};"E"!==t&&"EB"!==t&&"EW"!==t&&"ED"!==t||s.inputs.push(a),"A"!==t&&"AB"!==t&&"AW"!==t&&"AD"!==t||s.outputs.push(a),"M"!==t&&"MB"!==t&&"MW"!==t&&"MD"!==t||s.markers.push(a)})),["inputs","outputs","markers"].forEach((function(e){t[e]=s[e]})),o.props.changeNative(t)},a.readAsText(e[0],"ISO-8859-1")},o.addDb=function(e){var t=JSON.parse(JSON.stringify(o.props.native)),a=new FileReader;a.onload=function(e){setTimeout((function(){var e=a.result,o={inputs:!1,outputs:!1,markers:!1,dbs:!1},s={inputs:t.inputs||[],outputs:t.outputs||[],markers:t.markers||[],dbs:t.dbs||[]};if(-1!==e.indexOf("Leseanforderung")){for(var i=e.replace(/\r\n/g,"\n").split("\n"),n={Name:{attr:"Name"},Typ:{attr:""},Operand:{attr:"Address",process:function(e){var t=(e=e.trim()).match(/^DB (\d+)/);if(!t){var a=e.match(/^MB? (\d+)\.?(\d+)?$/);return a?"M "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^AB? (\d+)\.?(\d+)?$/))?"OUT "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):(a=e.match(/^EB? (\d+)\.?(\d+)?$/))?"IN "+parseInt(a[1],10)+(void 0!==a[2]?"."+a[2]:""):e}var o=e.match(/(\d+).?(\d+)?$/);return t&&o?"DB".concat(t[1]," ").concat(o[1]).concat(void 0!==o[2]?"."+o[2]:""):e}},"SPS-Format":{attr:"Type",process:function(e){return e}},Byteanzahl:{attr:"Length",process:function(e){return parseInt(e,10)}},Zugriff:{attr:"RW",process:function(e){return"read"!==e}},Leseanforderung:{attr:"poll",process:function(e){return"zyklisch"===e}},"AktZeit (ms)":{attr:""},Kommentar:{attr:"Description"},"Clients (Anzahl)":{attr:""}},l=i[0].split(","),r=[],c=0;c10){var t=e.split(/\s+/g);t.shift();for(var a={Address:b+" "+t.shift(),Name:t.shift(),Type:t.shift(),dec:t.shift(),Description:t.join(" "),Unit:"",Role:"",Room:"",poll:!0,RW:!1,WP:!1},i=0;iparseInt(o[1],10))return 1;if(parseInt(a[1],10)parseInt(i[1],10)?1:parseInt(s[1],10)parseInt(i[2],10)?1:parseInt(s[2],10)>8&255,s=255&t;return Object(M.jsxs)(V.a,{item:!0,className:a.props.classes.optionContainer,children:[Object(M.jsx)(E.a,{className:a.props.classes.optionsLabel,children:O.a.t(e.title)}),Object(M.jsx)(I.a,{title:O.a.t("Connection type: 0x1 - PG, 0x2 - OP, 0x3-0x10 - S7 Basic"),style:{width:"6ch"},value:o.toString(16)?o.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,parseInt(t.target.value,16)<<8|s)}}),Object(M.jsx)(I.a,{title:O.a.t("Rack and slot: [Rack * 0x20 + Slot]"),style:{marginLeft:5,width:"6ch"},value:s.toString(16)?s.toString(16).toUpperCase():0,onChange:function(t){parseInt(t.target.value,16)>255||parseInt(t.target.value,16)<0||a.changeParam(e.name,o<<8|parseInt(t.target.value,16))}})]},e.name)}return Object(M.jsx)(V.a,{item:!0,className:a.props.classes.optionContainer,children:Object(M.jsx)(A.a,{type:e.type,label:O.a.t(e.title),className:a.props.classes.optionsTextField,disabled:a.inputDisabled(e),value:a.getValue(e.name),InputProps:{endAdornment:e.dimension?Object(M.jsx)(W.a,{position:"end",children:O.a.t(e.dimension)}):null},onChange:function(t){return a.changeParam(e.name,t.target.value)}})},e.name)}))})]})}},{key:"getImportsBlock",value:function(){return Object(M.jsx)(M.Fragment,{children:Object(M.jsxs)(B.a,{className:this.props.classes.optionsContainer,children:[Object(M.jsx)(C.a,{variant:"h4",gutterBottom:!0,className:this.props.classes.header,children:O.a.t("Import")}),Object(M.jsxs)(N.a,{className:this.props.classes.optionContainer,children:[Object(M.jsx)(U,{classes:this.props.classes,onChange:this.loadSymbols,label:"Load symbols",accept:".asc"}),Object(M.jsx)(U,{classes:this.props.classes,onChange:this.addDb,label:"Add DB",accept:".csv,.prn"})]})]})})}},{key:"render",value:function(){return Object(M.jsx)("form",{className:this.props.classes.tab,children:Object(M.jsxs)(V.a,{container:!0,spacing:2,children:[Object(M.jsxs)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:[this.getInputsBlock(z,"PLC Connection"),this.getImportsBlock()]}),Object(M.jsx)(V.a,{item:!0,xs:12,md:6,className:this.props.classes.optionsGrid,children:this.getInputsBlock(G,"General")})]})})}}]),a}(o.Component),q=Object(h.a)((function(e){return{optionsSelect:{width:280},optionsTextField:{width:280},optionContainer:{},optionsContainer:{width:"calc(100% - ".concat(e.spacing(4),"px)"),padding:e.spacing(2),marginBottom:20,display:"inline-block",textAlign:"left"},optionsGrid:{textAlign:"center",padding:e.spacing(2)},optionsLabel:{fontSize:12},header:{fontSize:24},fileInput:{textAlign:"center",display:"inline-block",height:80,width:200,border:"2px dashed #777",borderRadius:10,marginTop:12,padding:4}}}))(F),J=a(4),Y=a.n(J),$=a(321),Z=a(322),H=a(18),K=a(465),_=a(468),Q=a(466),X=a(469),ee=a(467),te=a(216),ae=a(475),oe=a(471),se=a(80),ie=a.n(se),ne=a(331),le=a.n(ne),re=a(332),ce=a.n(re),de=a(61),pe=a.n(de),ue=a(323),me=a.n(ue),he=a(324),ge=a.n(he),be=a(326),fe=a.n(be),Se=a(223),ve=a(328),je=a.n(ve),xe=a(329),Te=a.n(xe),ye=a(293),Oe=a(294),Pe=a(295),Ce=a(296),Ae=a(297),ke=a(292),Re=a(101),De=a.n(Re),we=a(219),Le=a.n(we),Ie=a(330),Ee=a.n(Ie),We=Object(h.a)((function(e){return{tsvEditor:{width:"100%",height:400},tsvEditorTextarea:{fontFamily:"monospace"}}}))((function(e){var t=Object(o.useState)(""),a=Object(H.a)(t,2),s=a[0],i=a[1];Object(o.useEffect)((function(){var t=[];t.push(e.fields.map((function(e){return e.name}))),e.data.forEach((function(a){return t.push(e.fields.map((function(e){return void 0!==a[e.name]&&null!==a[e.name]?a[e.name].toString():""})))})),i(Object(Se.json2tsv)(t))}),[e.open]);var n=Object(g.b)().enqueueSnackbar;if(!e.open)return null;return Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,maxWidth:"lg",fullWidth:!0,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Edit data as TSV")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("You can copy, paste and edit data as TSV.")}),Object(M.jsx)("div",{children:Object(M.jsx)(je.a,{onChange:function(e){return i(e)},height:"400px",showPrintMargin:!1,value:s,className:e.classes.tsvEditor,width:"100%",setOptions:{firstLineNumber:0},mode:null})})]}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"outlined",color:"primary",onClick:function(){Te()(s),n(O.a.t("TSV was copied to clipboard"))},startIcon:Object(M.jsx)(Ee.a,{}),children:O.a.t("Copy to clipboard")}),Object(M.jsx)(ke.a,{variant:"contained",color:"primary",onClick:function(){var t=Object(Se.tsv2json)(s.endsWith("\n")?s:s+"\n"),a=t.shift(),o=!0,i=[];for(var l in e.fields)e.fields[l].name!==a[l]&&(i.push(Object(M.jsxs)(M.Fragment,{children:["No field ",Object(M.jsx)("i",{children:e.fields[l].name})," in position ",Object(M.jsx)("i",{children:parseInt(l)+1}),"!"]})),o=!1);t=t.map((function(t,a){var s={};for(var n in e.fields)"select"!==e.fields[n].type||e.fields[n].options.map((function(e){return e.value})).includes(t[n])||(i.push(Object(M.jsxs)(M.Fragment,{children:["Value ",Object(M.jsx)("i",{children:t[n]})," is wrong for field ",Object(M.jsx)("i",{children:e.fields[n].name})," in position ",Object(M.jsx)("i",{children:parseInt(a)+1}),"!"]})),o=!1),"checkbox"===e.fields[n].type&&(t[n]="true"===t[n]),s[e.fields[n].name]=t[n];return s})),o?(e.save(t),e.onClose()):n(Object(M.jsx)("div",{children:i.map((function(e,t){return Object(M.jsx)("div",{children:e},t)}))}),{variant:"error"})},startIcon:Object(M.jsx)(Le.a,{}),children:O.a.t("Import")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Close")})]})]})})),Ve=function(e){return e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete all items")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t("Are you sure to delete all items?")}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(),e.onClose()},children:O.a.t("Delete all items")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Be=function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1];return Object(o.useEffect)((function(){i(!1)}),[e.open]),e.open?Object(M.jsxs)(ye.a,{open:e.open,onClose:e.onClose,children:[Object(M.jsx)(Ae.a,{children:O.a.t("Delete item")}),Object(M.jsxs)(Pe.a,{children:[Object(M.jsx)(Ce.a,{children:O.a.t('Are you sure to delete item with address "%s"?',e.item._address)}),Object(M.jsx)(Ce.a,{children:Object(M.jsx)(w.a,{label:O.a.t("Don't show this message in 5 minutes"),control:Object(M.jsx)(k.a,{checked:s,onChange:function(e){return i(e.target.checked)}})})}),Object(M.jsxs)(Oe.a,{children:[Object(M.jsx)(ke.a,{variant:"contained",color:"secondary",startIcon:Object(M.jsx)(ie.a,{}),onClick:function(){e.action(s),e.onClose()},children:O.a.t("Delete")}),Object(M.jsx)(ke.a,{variant:"contained",onClick:e.onClose,startIcon:Object(M.jsx)(De.a,{}),children:O.a.t("Cancel")})]})]})]}):null},Ne=function(e){var t,a=e.sortedItem,s=e.field,i=e.editMode,n=e.setEditMode,l=Object(o.useRef)(),r=a.item;if("checkbox"===s.type)t=Object(M.jsx)(oe.a,{title:O.a.t(s.title),children:Object(M.jsx)(k.a,{inputRef:l,className:e.classes.tableCheckbox,checked:!!r[s.name],disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.checked)}})});else if("rooms"===s.type)t=i?Object(M.jsx)(fe.a,{list:e.rooms,allowNone:!0,value:r[s.name],dense:!0,themeType:e.themeType,inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t)},className:e.classes.tableSelectContainer}):Object(M.jsx)(ge.a,{list:e.rooms,value:r[s.name],themeType:e.themeType});else if("select"===s.type)if(i)t=Object(M.jsx)(R.a,{value:r[s.name],inputProps:{ref:l,className:e.classes.tableSelect},disabled:e.getDisable(a.$index,s.name),onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},className:e.classes.tableSelectContainer,children:s.options.map((function(e){return Object(M.jsx)(D.a,{value:e.value,children:e.title?e.title:Object(M.jsx)("i",{children:O.a.t("Nothing")})},e.value)}))});else{var c=s.options.find((function(e){return e.value===r[s.name]}));t=c?c.title:""}else t=i?Object(M.jsx)(A.a,{value:r[s.name],className:e.classes.tableTextFieldContainer,inputProps:{ref:l,className:e.classes.tableTextField},type:s.type,onChange:function(t){return e.changeParam(a.$index,s.name,t.target.value)},disabled:e.getDisable(a.$index,s.name)}):r[s.name]?r[s.name]:null;return Object(M.jsx)(ee.a,{className:pe.a.clsx(e.classes.tableCell,!i&&e.classes.nonEditMode),onClick:function(e){n(!0),window.localStorage.setItem("Modbus.editMode","true"),window.setTimeout((function(){return l.current&&l.current.focus()}),100)},children:t})},ze=Object(h.a)((function(e){return{tableHeader:{whiteSpace:"nowrap",fontWeight:"bold",fontSize:"80%",padding:"0px 8px"},tableHeaderExtended:{color:"dark"===e.palette.type?e.palette.primary.light:e.palette.primary.dark},tableCell:{whiteSpace:"nowrap",fontSize:"80%",padding:"0px 8px"},tableContainer:{overflow:"auto",maxHeight:"calc(100vh - 180px)"},tableTextField:{fontSize:"80%"},tableSelect:{fontSize:"80%"},tableTextFieldContainer:{width:"100%"},tableSelectContainer:{width:"100%"},nonEditMode:{cursor:"pointer"}}}))((function(e){var t=Object(o.useState)(!1),a=Object(H.a)(t,2),s=a[0],i=a[1],n=Object(o.useState)(parseInt(window.localStorage.getItem("Modbus.editMode"),10)||0),r=Object(H.a)(n,2),c=r[0],d=r[1],p=Object(o.useState)("true"===window.localStorage.getItem("Modbus.extendedMode")),u=Object(H.a)(p,2),m=u[0],h=u[1],g=Object(o.useState)({open:!1,action:null}),b=Object(H.a)(g,2),f=b[0],S=b[1],v=Object(o.useState)({open:!1,item:null,action:null}),j=Object(H.a)(v,2),x=j[0],T=j[1],y=e.getSortedData(e.data,e.orderBy,e.order);return Object(M.jsxs)("div",{children:[Object(M.jsxs)("div",{children:[Object(M.jsx)(oe.a,{title:O.a.t("Add line"),children:Object(M.jsx)(te.a,{onClick:function(t){return e.addItem()},children:Object(M.jsx)(le.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Edit as TSV (Tab separated values)"),children:Object(M.jsx)(te.a,{onClick:function(){return i(!0)},children:Object(M.jsx)(ce.a,{})})}),Object(M.jsx)(oe.a,{title:O.a.t("Toggle extended mode"),children:Object(M.jsx)(te.a,{color:m?"primary":"inherit",onClick:function(){window.localStorage.setItem("Modbus.extendedMode",m?"false":"true"),h(!m)},children:Object(M.jsx)(me.a,{})})})]}),Object(M.jsx)("div",{className:e.classes.tableContainer,children:Object(M.jsxs)(K.a,{size:"small",stickyHeader:!0,padding:"none",children:[Object(M.jsx)(_.a,{children:Object(M.jsxs)(X.a,{children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(t){var a=!1,o=!1,s=!1,i=!1;for(var n in e.data)if(e.data[n][t.name]?(a=!0,s=!0):(a=!1,i=!0),s&&i){o=!0,a=!1;break}return Object(M.jsxs)(ee.a,{style:{width:"checkbox"===t.type?20:t.width},className:pe.a.clsx(e.classes.tableHeader,t.expert&&e.classes.tableHeaderExtended),title:t.tooltip?O.a.t(t.tooltip):null,children:["checkbox"===t.type?Object(M.jsx)(oe.a,{title:O.a.t("Change all"),children:Object(M.jsx)(k.a,{indeterminate:o,checked:a,onChange:function(a){var o=JSON.parse(JSON.stringify(e.data));o.forEach((function(e){return e[t.name]=a.target.checked})),e.changeData(o)}})}):null,t.sorted?Object(M.jsx)(ae.a,{active:t.name===e.orderBy,direction:e.order,onClick:function(a){var o=e.orderBy===t.name&&"asc"===e.order;e.onChangeOrder(t.name,o?"desc":"asc")},children:O.a.t(t.title)}):O.a.t(t.title)]},t.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete all"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(t){return S({open:!0,action:function(){return e.changeData([])}})},disabled:!e.data.length,children:Object(M.jsx)(ie.a,{})})})})})]})}),Object(M.jsx)(Q.a,{children:y.map((function(t){return Object(M.jsxs)(X.a,{hover:!0,children:[e.fields.filter((function(t){return(m||!t.expert)&&(!e.formulaDisabled||!t.formulaDisabled)})).map((function(a){return Object(M.jsx)(Ne,Object(l.a)({themeType:e.themeType,sortedItem:t,field:a,editMode:c===t.$index,rooms:e.rooms,setEditMode:function(){return d(t.$index)}},e),a.name)})),Object(M.jsx)(ee.a,{children:Object(M.jsx)(oe.a,{title:O.a.t("Delete"),children:Object(M.jsx)("div",{children:Object(M.jsx)(te.a,{size:"small",onClick:function(a){var o=window.sessionStorage.getItem("disableDeleteDialogs");o&&new Date-new Date(o)<3e5?e.deleteItem(t.$index):T({open:!0,action:function(a){a&&window.sessionStorage.setItem("disableDeleteDialogs",(new Date).toISOString()),e.deleteItem(t.$index)},item:t.item})},children:Object(M.jsx)(ie.a,{})})})})})]},t.$index)}))})]})}),s?Object(M.jsx)(We,{open:!0,save:function(t){e.prefix&&t.forEach((function(t){t.Address=(t.Address||"").toUpperCase(),t.Address&&!t.Address.startsWith(e.prefix)&&(t.Address=e.prefix+t.Address)})),e.changeData(t)},onClose:function(){return i(!1)},data:e.data,fields:e.fields}):null,Object(M.jsx)(Ve,{open:f.open,action:f.action,onClose:function(){return S({open:!1,action:null})}}),Object(M.jsx)(Be,{open:x.open,action:x.action,onClose:function(){return T({open:!1,action:null,item:null})},item:x.item})]})})),Ge=function(e){Object(u.a)(a,e);var t=Object(m.a)(a);function a(e){var o;return Object(r.a)(this,a),(o=t.call(this,e)).changeParam=function(e,t,a){var s=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));if(s[e][t]=a,"Type"===t)if(["BOOL"].includes(a)?s[e].Length=.1:["","BYTE"].includes(a)?s[e].Length=1:["WORD","INT","STRING","S5TIME"].includes(a)?s[e].Length=2:["DWORD","DINT","REAL"].includes(a)?s[e].Length=4:["S7TIME"].includes(a)?s[e].Length=8:["S7STRING","ARRAY"].includes(a)&&(s[e].Length=32),"BOOL"===a){var i=o.address2struct(s[e].Address);void 0===i.bit&&(i.bit=0,s[e].Address=o.struct2address(i))}else{var n=o.address2struct(s[e].Address);void 0!==n.bit&&(n.bit>0&&n.byte++,delete n.bit,s[e].Address=o.struct2address(n))}o.props.onChange(o.nativeField,s)},o.addItem=function(){var e=JSON.parse(JSON.stringify(o.props.native[o.nativeField])),t={};if(o.getFields().forEach((function(e){return t[e.name]=""})),e.length){var a=JSON.parse(JSON.stringify(e));a.sort((function(e,t){return e.Address>t.Address?1:-1}));var s=a[a.length-1],i=o.address2struct(s.Address);"BOOL"===s.Type?(i.bit=i.bit||0,i.bit++,i.bit>=8&&(i.bit=i.bit%8,i.byte++)):(delete i.bit,i.byte+=s.Length),void 0!==i.db&&i.byte+s.Length>65535&&(i.db++,i.byte=0,"BOOL"===s.Type&&(i.bit=0)),t.Address=o.struct2address(i),t.Type=s.Type,t.Length=s.Length,t.Unit=s.Unit,t.Role=s.Role,t.Room=s.Room,t.poll=s.poll,t.RW=s.RW,t.WP=s.WP}else t.role="level",t.Type="BOOL",t.Length="0.1",t.poll=!0,"dbs"===o.nativeField?t.Address="DB1 0.0":t.Address="0.0";e.push(t),o.props.onChange(o.nativeField,e)},o.deleteItem=function(e){var t=JSON.parse(JSON.stringify(o.props.native[o.nativeField]));t.splice(e,1),o.props.onChange(o.nativeField,t)},o.changeData=function(e){o.props.onChange(o.nativeField,e)},o.getDisable=function(e,t){return"Length"===t&&!["STRING","S7STRING","ARRAY"].includes(o.props.native[o.nativeField][e].type)},o.getSortedData=function(e,t,a){o.fields=o.fields||o.getFields(),e=e||o.props.native[o.nativeField],t=t||o.state.orderBy,a=a||o.state.order;var s=[];e.forEach((function(e,t){s[t]={item:e,$index:t}}));var i=o.fields.find((function(e){return e.name===t}));return s.sort((function(e,s){var n,l;if("Address"===t){var r=o.address2struct(e.item.Address),c=o.address2struct(s.item.Address);n=0,void 0!==r.db&&(n=r.db<<24),void 0!==c.db&&(l=c.db<<24),n|=r.byte<<8,l|=c.byte<<8,n|=r.bit||0,l|=c.bit||0}else"$index"===t?(n=e[t],l=s[t]):i&&"number"===i.type?(n=parseInt(e.item[t],10),l=parseInt(s.item[t],10)):(n=e.item[t],l=s.item[t]);return("asc"===a?n>l:n ({\r\n optionsSelect: {\r\n width: 280\r\n },\r\n optionsTextField: {\r\n width: 280\r\n },\r\n optionContainer: {\r\n },\r\n optionsContainer: {\r\n width: `calc(100% - ${theme.spacing(4)}px)`,\r\n padding: theme.spacing(2),\r\n marginBottom: 20,\r\n display: 'inline-block',\r\n textAlign: 'left'\r\n },\r\n optionsGrid: {\r\n textAlign: 'center',\r\n padding: theme.spacing(2),\r\n },\r\n optionsLabel: {\r\n fontSize: 12,\r\n },\r\n header: {\r\n fontSize: 24,\r\n },\r\n fileInput: {\r\n textAlign: 'center',\r\n display: 'inline-block',\r\n height: 80,\r\n width: 200,\r\n border: '2px dashed #777',\r\n borderRadius: 10,\r\n marginTop: 12,\r\n padding: 4\r\n }\r\n});\r\n\r\nlet FileInput = function (props) {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const onDrop = useCallback(acceptedFiles => {\r\n props.onChange(acceptedFiles);\r\n enqueueSnackbar(I18n.t('Data updated'));\r\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\r\n\r\n const {getRootProps, getInputProps, isDragActive} = useDropzone({onDrop, accept: props.accept});\r\n\r\n return \r\n { I18n.t(props.label)}\r\n
\r\n \r\n {\r\n isDragActive ?\r\n

{I18n.t('Drop the file here ...')}

:\r\n

{I18n.t(`Drag 'n' drop file here, or click to select file`)}

\r\n }\r\n
\r\n
;\r\n};\r\n\r\nclass Options extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n };\r\n }\r\n\r\n getValue(name) {\r\n if (name === 's7logo') {\r\n return this.props.native.params.slot === null;\r\n }\r\n return this.props.native.params[name];\r\n }\r\n\r\n inputDisabled = input => {\r\n return false;\r\n }\r\n\r\n inputDisplay = input => {\r\n if (this.props.native.params.slot === null) {\r\n if (['rack', 'slot'].includes(input.name)) {\r\n return false;\r\n }\r\n } else {\r\n if (['localTSAP', 'remoteTSAP'].includes(input.name)) {\r\n return false;\r\n }\r\n }\r\n if (input.name === 'timeOffset') {\r\n return ['summer', 'offset'].includes(this.props.native.params.timeFormat);\r\n }\r\n return true;\r\n }\r\n\r\n getInputsBlock(inputs, title) {\r\n return \r\n {I18n.t(title)}\r\n \r\n {inputs.map(input => {\r\n if (!this.inputDisplay(input)) {\r\n return null;\r\n }\r\n if (input.type === 'checkbox') {\r\n return \r\n this.changeParam(input.name, e.target.checked)}\r\n />}/> {input.dimension ? I18n.t(input.dimension) : null};\r\n } else if (input.type === 'select') {\r\n return \r\n \r\n {I18n.t(input.title)}\r\n this.changeParam(input.name, e.target.value)}\r\n >\r\n {input.options.map(option =>\r\n {option.title}\r\n )}\r\n \r\n {input.dimension ? I18n.t(input.dimension) : null}\r\n ;\r\n } else if (input.type === 'hex') {\r\n let value = parseInt(this.getValue(input.name)) ? parseInt(this.getValue(input.name)) : 0;\r\n let top = (value >> 8) & 0xFF;\r\n let bottom = value & 0xFF;\r\n\r\n return \r\n {I18n.t(input.title)}\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (parseInt(e.target.value, 16) << 8) | bottom);\r\n }}\r\n />\r\n {\r\n if (parseInt(e.target.value, 16) > 0xFF || parseInt(e.target.value, 16) < 0) {\r\n return;\r\n }\r\n this.changeParam(input.name, (top << 8) | parseInt(e.target.value, 16));\r\n }}\r\n />\r\n ;\r\n } else {\r\n return {I18n.t(input.dimension)} : null\r\n }}\r\n onChange={e => this.changeParam(input.name, e.target.value)}\r\n />;\r\n }\r\n })}\r\n \r\n ;\r\n }\r\n\r\n getImportsBlock() {\r\n return <>\r\n {I18n.t('Import')}\r\n \r\n \r\n \r\n \r\n ;\r\n }\r\n\r\n render() {\r\n return
\r\n \r\n \r\n {this.getInputsBlock(connectionInputs, 'PLC Connection')}\r\n {this.getImportsBlock()}\r\n \r\n {this.getInputsBlock(generalInputs, 'General')}\r\n \r\n
;\r\n }\r\n\r\n changeParam = (name, value) => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n if (name === 's7logo') {\r\n if (value) {\r\n native.params.localTSAP = '';\r\n native.params.remoteTSAP = '';\r\n native.params.rack = null;\r\n native.params.slot = null;\r\n } else {\r\n native.params.localTSAP = null;\r\n native.params.remoteTSAP = null;\r\n native.params.rack = '';\r\n native.params.slot = '';\r\n }\r\n } else {\r\n native.params[name] = value;\r\n }\r\n this.props.changeNative(native);\r\n }\r\n\r\n loadSymbols = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n const localData = {\r\n inputs: [],\r\n outputs: [],\r\n markers: []\r\n// counter: [],\r\n// timer: [],\r\n// dbs: []\r\n };\r\n let text = reader.result;\r\n\r\n text = text.split('126,');\r\n text.forEach(line => {\r\n const typ = line.slice(23, 29).replace(/( )/g, '');\r\n\r\n const d = {\r\n Name: line.slice(0, 23).replace(/( ){2,}/g, ''),\r\n Address: line.slice(29, 36).replace(/( )/g, ''),\r\n Type: line.slice(36, 41).replace(/( )/g, ''),\r\n Description: line.slice(46, 126).replace(/( ){2,}/, ''),\r\n Unit: '',\r\n// Role: '',\r\n// Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n// if (typ == 'E' || typ == 'EB' ||typ == 'EW' ||typ == 'ED'||typ == 'PEB'||typ == 'PEW'||typ == 'PED')data.inputs.push(d);\r\n// if (typ == 'A' || typ == 'AB' ||typ == 'AW' ||typ == 'AD'||typ == 'PAB'||typ == 'PAW'||typ == 'PAD')data.outputs.push(d);\r\n if (typ === 'E' || typ === 'EB' || typ === 'EW' || typ === 'ED') localData.inputs.push(d);\r\n if (typ === 'A' || typ === 'AB' || typ === 'AW' || typ === 'AD') localData.outputs.push(d);\r\n if (typ === 'M' || typ === 'MB' || typ === 'MW' || typ === 'MD') localData.markers.push(d);\r\n// if (typ == 'C')data.counter.push(d);\r\n// if (typ == 'T')data.timer.push(d);\r\n// if (typ == 'DB')data.dbs.push(d);\r\n });\r\n\r\n ['inputs', 'outputs', 'markers'].forEach(table => {\r\n native[table] = localData[table];\r\n });\r\n this.props.changeNative(native);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n\r\n addDb = e => {\r\n let native = JSON.parse(JSON.stringify(this.props.native));\r\n const reader = new FileReader();\r\n\r\n reader.onload = e => {\r\n setTimeout(function () {\r\n const text = reader.result;\r\n const changes = {\r\n inputs: false,\r\n outputs: false,\r\n markers: false,\r\n dbs: false\r\n };\r\n const newParts = {\r\n inputs: native.inputs || [],\r\n outputs: native.outputs || [],\r\n markers: native.markers || [],\r\n dbs: native.dbs || []\r\n };\r\n\r\n if (text.indexOf('Leseanforderung') !== -1) {\r\n // Graphpic format\r\n const lines = text.replace(/\\r\\n/g, '\\n').split('\\n');\r\n const mapping = {\r\n 'Name': {attr: 'Name'},\r\n 'Typ': {attr: ''},\r\n 'Operand': {attr: 'Address', process: f => {\r\n // DB 504.DBW 1462 => DB504 1462\r\n f = f.trim();\r\n const db = f.match(/^DB (\\d+)/);\r\n if (!db) {\r\n // M\r\n // MB\r\n let m = f.match(/^MB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'M ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^AB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'OUT ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n m = f.match(/^EB? (\\d+)\\.?(\\d+)?$/);\r\n if (m) {\r\n return 'IN ' + parseInt(m[1], 10) + (m[2] !== undefined ? '.' + m[2] : '');\r\n } else {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n\r\n const offset = f.match(/(\\d+).?(\\d+)?$/);\r\n if (db && offset) {\r\n return `DB${db[1]} ${offset[1]}${offset[2] !== undefined ? '.' + offset[2] : ''}`;\r\n } else {\r\n return f;\r\n }\r\n }},\r\n 'SPS-Format': {attr: 'Type', process: function (f) {return f;} },\r\n 'Byteanzahl': {attr: 'Length', process: function (f) {return parseInt(f, 10);} },\r\n 'Zugriff': {attr: 'RW', process: function (f) {return f !== 'read';} },\r\n 'Leseanforderung': {attr: 'poll', process: function (f) {return f === 'zyklisch';} },\r\n 'AktZeit (ms)': {attr: ''},\r\n 'Kommentar': {attr: 'Description'},\r\n 'Clients (Anzahl)': {attr: ''}\r\n };\r\n // First line\r\n // \"Name\",\"Typ\",\"Operand\",\"SPS-Format\",\"Byteanzahl\",\"Zugriff\",\"Leseanforderung\",\"AktZeit (ms)\",\"Kommentar\",\"Clients (Anzahl)\"\r\n let sFields = lines[0].split(',');\r\n // create mapping\r\n const fields = [];\r\n for (let m = 0; m < sFields.length; m++) {\r\n sFields[m] = sFields[m].replace(/\"/g, '');\r\n fields.push(mapping[sFields[m]]);\r\n }\r\n for (let l = 1; l < lines.length; l++) {\r\n lines[l] = lines[l].trim();\r\n if (!lines[l]) continue;\r\n sFields = lines[l].trim().split(',');\r\n let obj = {\r\n Type: 'ARRAY',\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n for (let f = 0; f < fields.length; f++) {\r\n if (!fields[f].attr) {\r\n continue;\r\n }\r\n if (!sFields[f]) {\r\n console.log('error');\r\n break;\r\n }\r\n sFields[f] = sFields[f].replace(/\"/g, '');\r\n obj[fields[f].attr] = fields[f].process ? fields[f].process(sFields[f]) : sFields[f];\r\n\r\n if (obj.Name.match(/^@/)) {\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n if (obj.Type === 'BYTE' && obj.Length !== 1) {\r\n obj.Type = 'ARRAY';\r\n }\r\n if (obj.Type === 'CHAR') {\r\n obj.Type = 'STRING';\r\n }\r\n if (obj.Type === 'BYTE' || obj.Type === 'BOOL' || obj.Type === 'INT') {\r\n obj.Length = '';\r\n }\r\n let _attr;\r\n if (obj.Address.match(/^DB/)) {\r\n _attr = 'dbs';\r\n } else if (obj.Address.match(/^IN/)) {\r\n obj.Address = obj.Address.replace(/^IN\\s?/, '');\r\n _attr = 'inputs';\r\n } else if (obj.Address.match(/^OUT/)) {\r\n _attr = 'outputs';\r\n obj.Address = obj.Address.replace(/^OUT\\s?/, '');\r\n } else if (obj.Address.match(/^M/)) {\r\n _attr = 'markers';\r\n obj.Address = obj.Address.replace(/^M\\s?/, '');\r\n } else {\r\n console.error('Unknown TYPE: ' + obj.Address);\r\n continue;\r\n }\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts[_attr].length; aaa++) {\r\n if (newParts[_attr][aaa].Address === obj.Address) {\r\n newParts[_attr][aaa] = obj;\r\n changes[_attr] = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes[_attr] = true;\r\n newParts[_attr].push(obj);\r\n }\r\n }\r\n }\r\n } else {\r\n const mm = text.match(/(DB)[0-9]+\\s-\\s/g);\r\n const db = mm ? mm[0].replace(' - ', '') : '';\r\n const vv = text.split('STRUCT');\r\n\r\n const struck = vv[1] ? vv[1].split('=')[0].split('\\n') : [];\r\n\r\n struck.forEach((item) => {\r\n if (item.length > 10) {\r\n const x = item.split(/\\s+/g);\r\n x.shift();\r\n\r\n let obj = {\r\n Address: db + ' ' + x.shift(),\r\n Name: x.shift(),\r\n Type: x.shift(),\r\n dec: x.shift(),\r\n Description: x.join(' '),\r\n Unit: '',\r\n Role: '',\r\n Room: '',\r\n poll: true,\r\n RW: false,\r\n WP: false\r\n };\r\n\r\n // try to find same address\r\n for (let aaa = 0; aaa < newParts.dbs.length; aaa++) {\r\n if (newParts.dbs[aaa].Address === obj.Address) {\r\n newParts.dbs[aaa] = obj;\r\n changes.dbs = true;\r\n obj = null;\r\n break;\r\n }\r\n }\r\n if (obj) {\r\n changes.dbs = true;\r\n newParts.dbs.push(obj);\r\n }\r\n }\r\n });\r\n }\r\n for (const attr in newParts) {\r\n if (!newParts.hasOwnProperty(attr)) {\r\n continue;\r\n }\r\n newParts[attr].sort((a, b) => {\r\n const aDB = a.Address.match(/^D?B?\\s?(\\d+)/);\r\n const bDB = b.Address.match(/^D?B?\\s?(\\d+)/);\r\n if (!aDB) return -1;\r\n if (!bDB) return 1;\r\n if (parseInt(aDB[1], 10) > parseInt(bDB[1], 10)) return 1;\r\n if (parseInt(aDB[1], 10) < parseInt(bDB[1], 10)) return -1;\r\n const aOffset = a.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n const bOffset = b.Address.match(/\\s(\\d+).?(\\d+)?$/);\r\n if (!aOffset) return -1;\r\n if (!bOffset) return 1;\r\n if (parseInt(aOffset[1], 10) > parseInt(bOffset[1], 10)) return 1;\r\n if (parseInt(aOffset[1], 10) < parseInt(bOffset[1], 10)) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] !== undefined) return 1;\r\n if (bOffset[2] === undefined && aOffset[2] !== undefined) return -1;\r\n if (aOffset[2] === undefined && bOffset[2] === undefined) return 0;\r\n if (parseInt(aOffset[2], 10) > parseInt(bOffset[2], 10)) return 1;\r\n if (parseInt(aOffset[2], 10) < parseInt(bOffset[1], 10)) return -1;\r\n return 0;\r\n });\r\n }\r\n if (changes.dbs) {\r\n native.dbs = newParts.dbs;\r\n }\r\n if (changes.inputs) {\r\n native.inputs = newParts.inputs;\r\n }\r\n if (changes.outputs) {\r\n native.outputs = newParts.outputs;\r\n }\r\n if (changes.markers) {\r\n native.markers = newParts.markers;\r\n }\r\n console.log(native);\r\n //this.props.changeNative(native);\r\n }, 200);\r\n };\r\n\r\n reader.readAsText(e[0], 'ISO-8859-1');\r\n }\r\n}\r\n\r\nOptions.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(Options);\r\n","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport { tsv2json, json2tsv } from 'tsv-json';\r\nimport { useSnackbar } from 'notistack';\r\nimport AceEditor from \"react-ace\";\r\nimport copy from 'copy-to-clipboard';\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport SaveIcon from '@material-ui/icons/Save';\r\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\r\n\r\nconst styles = theme => ({\r\n tsvEditor: {\r\n width: '100%',\r\n height: 400\r\n },\r\n tsvEditorTextarea: {\r\n fontFamily: 'monospace'\r\n }\r\n});\r\n\r\nconst TsvDialog = props => {\r\n const [tsv, setTsv] = useState('');\r\n useEffect(() => {\r\n let tsvResult = [];\r\n tsvResult.push(props.fields.map(field => field.name));\r\n props.data.forEach(item =>\r\n tsvResult.push(props.fields.map(field => item[field.name] !== undefined && item[field.name] !== null ? item[field.name].toString() : ''))\r\n );\r\n setTsv(json2tsv(tsvResult));\r\n }, [props.open]); // eslint-disable-line react-hooks/exhaustive-deps\r\n const { enqueueSnackbar } = useSnackbar();\r\n\r\n if (!props.open) {\r\n return null;\r\n }\r\n\r\n const saveTsv = () => {\r\n let data = tsv2json(tsv.endsWith('\\n') ? tsv : tsv + '\\n');\r\n let fields = data.shift();\r\n let success = true;\r\n let errors = [];\r\n for (let index in props.fields) {\r\n if (props.fields[index].name !== fields[index]) {\r\n errors.push(<>No field {props.fields[index].name} in position {parseInt(index) + 1}!);\r\n success = false;\r\n }\r\n }\r\n\r\n data = data.map((itemValues, itemIndex) => {\r\n let item = {};\r\n for (let index in props.fields) {\r\n if (props.fields[index].type === 'select' && !props.fields[index].options.map(option => option.value).includes(itemValues[index])) {\r\n errors.push(<>Value {itemValues[index]} is wrong for field {props.fields[index].name} in position {parseInt(itemIndex) + 1}!);\r\n success = false;\r\n }\r\n if (props.fields[index].type === 'checkbox') {\r\n itemValues[index] = itemValues[index] === 'true';\r\n }\r\n item[props.fields[index].name] = itemValues[index];\r\n }\r\n return item;\r\n });\r\n\r\n if (!success) {\r\n enqueueSnackbar(
{errors.map((error, index) =>
{error}
)}
, { variant: 'error' });\r\n return;\r\n }\r\n props.save(data);\r\n props.onClose();\r\n };\r\n\r\n return \r\n {I18n.t('Edit data as TSV')}\r\n \r\n {I18n.t('You can copy, paste and edit data as TSV.')}\r\n
\r\n setTsv(e)}\r\n height=\"400px\"\r\n showPrintMargin={false}\r\n value={tsv}\r\n className={props.classes.tsvEditor}\r\n width=\"100%\"\r\n setOptions={{firstLineNumber: 0}}\r\n mode={null}\r\n />\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n};\r\n\r\nTsvDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n save: PropTypes.func,\r\n fields: PropTypes.array,\r\n data: PropTypes.array\r\n};\r\n\r\nexport default withStyles(styles)(TsvDialog);","import PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteAllDialog = (props) => {\r\n return props.open ? \r\n {I18n.t('Delete all items')}\r\n \r\n {I18n.t('Are you sure to delete all items?')}\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteAllDialog.propTypes = {\r\n open: PropTypes.bool,\r\n action: PropTypes.func,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n}\r\n\r\nexport default DeleteAllDialog;","import { useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Button from '@material-ui/core/Button';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\n\r\nconst DeleteDialog = (props) => {\r\n const [disableWarnings, setDisableWarnings] = useState(false);\r\n useEffect(() => {\r\n setDisableWarnings(false);\r\n }, [props.open]);\r\n\r\n return props.open ? \r\n {I18n.t('Delete item')}\r\n \r\n {I18n.t('Are you sure to delete item with address \"%s\"?', props.item._address)}\r\n setDisableWarnings(e.target.checked)}\r\n />}/>\r\n \r\n \r\n \r\n \r\n \r\n : null;\r\n}\r\n\r\nDeleteDialog.propTypes = {\r\n open: PropTypes.bool,\r\n onClose: PropTypes.func,\r\n classes: PropTypes.object,\r\n action: PropTypes.func,\r\n item: PropTypes.object,\r\n}\r\n\r\nexport default DeleteDialog;","import { useState, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {withStyles} from '@material-ui/core/styles';\r\n\r\nimport Table from '@material-ui/core/Table';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport TableSortLabel from '@material-ui/core/TableSortLabel';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport AddIcon from '@material-ui/icons/Add';\r\nimport ImportExport from '@material-ui/icons/ImportExport';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nimport ExpertIcon from '@iobroker/adapter-react/icons/IconExpert';\r\nimport TextWithIcon from '@iobroker/adapter-react/Components/TextWithIcon';\r\nimport SelectWithIcon from '@iobroker/adapter-react/Components/SelectWithIcon';\r\n\r\nimport TsvDialog from './TsvDialog';\r\nimport DeleteAllDialog from './DeleteAllDialog';\r\nimport DeleteDialog from './DeleteDialog';\r\n\r\nconst styles = theme => ({\r\n tableHeader: {\r\n whiteSpace: 'nowrap',\r\n fontWeight: 'bold',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableHeaderExtended: {\r\n color: theme.palette.type === 'dark' ? theme.palette.primary.light : theme.palette.primary.dark\r\n },\r\n tableCell: {\r\n whiteSpace: 'nowrap',\r\n fontSize: '80%',\r\n padding: '0px 8px'\r\n },\r\n tableContainer: {\r\n overflow: 'auto',\r\n maxHeight: 'calc(100vh - 180px)'\r\n },\r\n tableTextField: {\r\n fontSize: '80%'\r\n },\r\n tableSelect: {\r\n fontSize: '80%'\r\n },\r\n tableTextFieldContainer: {\r\n width: '100%'\r\n },\r\n tableSelectContainer: {\r\n width: '100%'\r\n },\r\n nonEditMode: {\r\n cursor: 'pointer'\r\n }\r\n});\r\n\r\nconst DataCell = props => {\r\n const sortedItem = props.sortedItem;\r\n const field = props.field;\r\n const editMode = props.editMode;\r\n const setEditMode = props.setEditMode;\r\n\r\n const ref = useRef();\r\n /*useEffect(() => {\r\n if (props.editMode) {\r\n // ref.current && ref.current.focus()\r\n //window.setTimeout(() => ref.current && ref.current.focus(), 1000);\r\n }\r\n }, [props.editMode])*/\r\n\r\n let item = sortedItem.item;\r\n let result;\r\n if (field.type === 'checkbox') {\r\n result = \r\n props.changeParam(sortedItem.$index, field.name, e.target.checked)}\r\n />\r\n ;\r\n } else if (field.type === 'rooms') {\r\n if (!editMode) {\r\n result = ;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, value)}\r\n className={props.classes.tableSelectContainer}\r\n />;\r\n }\r\n } else if (field.type === 'select') {\r\n if (!editMode) {\r\n let option = field.options.find(option => option.value === item[field.name]);\r\n result = option ? option.title : '';\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n className={props.classes.tableSelectContainer}\r\n >\r\n {field.options.map(option =>\r\n {option.title ? option.title : {I18n.t('Nothing')}}\r\n )}\r\n ;\r\n }\r\n } else {\r\n if (!editMode) {\r\n result = item[field.name] ? item[field.name] : null;\r\n } else {\r\n result = props.changeParam(sortedItem.$index, field.name, e.target.value)}\r\n disabled={props.getDisable(sortedItem.$index, field.name)}\r\n />;\r\n }\r\n }\r\n\r\n return {\r\n setEditMode(true);\r\n window.localStorage.setItem('Modbus.editMode', 'true');\r\n window.setTimeout(() => ref.current && ref.current.focus(), 100);\r\n }}\r\n >\r\n {result}\r\n ;\r\n}\r\n\r\nconst RegisterTable = props => {\r\n const [tsvDialogOpen, setTsvDialogOpen] = useState(false);\r\n const [editMode, setEditMode] = useState(parseInt(window.localStorage.getItem('Modbus.editMode'), 10) || 0);\r\n const [extendedMode, setExtendedMode] = useState(window.localStorage.getItem('Modbus.extendedMode') === 'true');\r\n const [deleteAllDialog, setDeleteAllDialog] = useState({\r\n open: false,\r\n action: null,\r\n });\r\n const [deleteDialog, setDeleteDialog] = useState({\r\n open: false,\r\n item: null,\r\n action: null,\r\n });\r\n\r\n let sortedData = props.getSortedData(props.data, props.orderBy, props.order);\r\n\r\n return
\r\n
\r\n \r\n props.addItem()}>\r\n \r\n \r\n \r\n \r\n setTsvDialogOpen(true)}>\r\n \r\n \r\n \r\n \r\n {\r\n window.localStorage.setItem('Modbus.extendedMode', extendedMode ? 'false' : 'true');\r\n setExtendedMode(!extendedMode);\r\n }}>\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field => {\r\n let isChecked = false;\r\n let indeterminate = false;\r\n let trueFound = false;\r\n let falseFound = false;\r\n for (let k in props.data) {\r\n if (props.data[k][field.name]) {\r\n isChecked = true;\r\n trueFound = true;\r\n } else {\r\n isChecked = false;\r\n falseFound = true;\r\n }\r\n\r\n if (trueFound && falseFound) {\r\n indeterminate = true;\r\n isChecked = false;\r\n break;\r\n }\r\n }\r\n\r\n return \r\n {field.type === 'checkbox' ?\r\n \r\n {\r\n let newData = JSON.parse(JSON.stringify(props.data));\r\n newData.forEach(item =>\r\n item[field.name] = e.target.checked);\r\n props.changeData(newData);\r\n }}\r\n />\r\n \r\n : null}\r\n {field.sorted ? {\r\n const isAsc = props.orderBy === field.name && props.order === 'asc';\r\n props.onChangeOrder(field.name, isAsc ? 'desc' : 'asc');\r\n }}\r\n >{I18n.t(field.title)} : I18n.t(field.title)}\r\n \r\n })}\r\n \r\n \r\n
\r\n setDeleteAllDialog({\r\n open: true,\r\n action: () => props.changeData([]),\r\n })}\r\n disabled={!props.data.length}\r\n >\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {\r\n sortedData.map(sortedItem =>\r\n \r\n {props.fields.filter(item => (extendedMode || !item.expert) && (!props.formulaDisabled || !item.formulaDisabled)).map(field =>\r\n setEditMode(sortedItem.$index)}\r\n {...props}\r\n />\r\n )}\r\n \r\n \r\n
\r\n {\r\n let lastTime = window.sessionStorage.getItem('disableDeleteDialogs');\r\n if (lastTime && (new Date() - new Date(lastTime)) < 1000 * 60 * 5) {\r\n props.deleteItem(sortedItem.$index);\r\n return;\r\n }\r\n setDeleteDialog({\r\n open: true,\r\n action: disableDialogs => {\r\n if (disableDialogs) {\r\n window.sessionStorage.setItem('disableDeleteDialogs', (new Date()).toISOString());\r\n }\r\n props.deleteItem(sortedItem.$index);\r\n },\r\n item: sortedItem.item\r\n })\r\n }}>\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n {tsvDialogOpen ?\r\n {\r\n if (props.prefix) {\r\n data.forEach(line => {\r\n line.Address = (line.Address || '').toUpperCase();\r\n if (line.Address && !line.Address.startsWith(props.prefix)) {\r\n line.Address = props.prefix + line.Address;\r\n }\r\n });\r\n }\r\n props.changeData(data);\r\n }}\r\n onClose={() => setTsvDialogOpen(false)}\r\n data={props.data}\r\n fields={props.fields}\r\n /> : null\r\n }\r\n setDeleteAllDialog({\r\n open: false,\r\n action: null,\r\n })}\r\n />\r\n setDeleteDialog({\r\n open: false,\r\n action: null,\r\n item: null\r\n })}\r\n item={deleteDialog.item}\r\n />\r\n
;\r\n}\r\n\r\nRegisterTable.propTypes = {\r\n data: PropTypes.array,\r\n fields: PropTypes.array,\r\n classes: PropTypes.object,\r\n addItem: PropTypes.func,\r\n changeData: PropTypes.func,\r\n deleteItem: PropTypes.func,\r\n rooms: PropTypes.object,\r\n formulaDisabled: PropTypes.bool,\r\n getSortedData: PropTypes.func,\r\n themeType: PropTypes.string,\r\n prefix: PropTypes.string,\r\n};\r\n\r\nexport default withStyles(styles)(RegisterTable);","import {Component} from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport roles from '../data/roles';\r\nimport types from '../data/types';\r\n\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport RegisterTable from '../Components/RegisterTable';\r\n\r\nclass BaseRegisters extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.nativeField = '';\r\n this.state = {\r\n order: window.localStorage.getItem('Modbus.order') || 'asc',\r\n orderBy: window.localStorage.getItem('Modbus.orderBy') || 'Address',\r\n };\r\n }\r\n\r\n getRooms() {\r\n const lang = I18n.getLanguage();\r\n return this.props.rooms ? Object.values(this.props.rooms).map(room => ({\r\n value: room._id,\r\n title: typeof room.common.name === 'object' ? room.common.name[lang] : room.common.name\r\n })) : [];\r\n }\r\n\r\n getFields() {\r\n let rooms = this.getRooms();\r\n rooms.unshift({value: '', title: ''});\r\n\r\n let result = [\r\n {name: 'Address', title: 'Address', type: 'text', sorted: true, width: 20},\r\n {name: 'Name', title: 'Name', type: 'text', sorted: true},\r\n {name: 'Description', title: 'Description', type: 'text', sorted: true},\r\n {name: 'Type', title: 'Type', type: 'select', options: types, sorted: true},\r\n {name: 'Length', title: 'Length', type: 'text', width: 20},\r\n {name: 'Unit', title: 'Unit', type: 'text', width: 30},\r\n {name: 'Role', title: 'Role', type: 'select', options: roles, sorted: true},\r\n {name: 'Room', title: 'Room', type: 'rooms', options: rooms, sorted: true},\r\n {name: 'poll', title: 'Poll', type: 'checkbox'},\r\n {name: 'RW', title: 'RW', type: 'checkbox', expert: true},\r\n {name: 'WP', title: 'WP', type: 'checkbox', expert: true},\r\n ]\r\n\r\n if (this.props.native.params.multiDeviceId) {\r\n result.splice(1, 0,\r\n {name: 'deviceId', title: 'Slave ID', type: 'number', sorted: true, width: 20},\r\n );\r\n }\r\n\r\n return result;\r\n }\r\n\r\n address2struct(address) {\r\n if (this.nativeField === 'dbs') {\r\n const parts = address.split(' ');\r\n const db = parseInt(parts[0].replace('DB', '').replace('db', '').trim(), 10);\r\n if (parts[1] && parts[1].includes('.')) {\r\n const a = parseFloat(parts[1]);\r\n return {db, byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {db, byte: parseInt(parts[1], 10)};\r\n }\r\n } else {\r\n if (address.includes('.')) {\r\n const a = parseFloat(address);\r\n return {byte: Math.floor(a), bit: (a * 10) % 10};\r\n } else {\r\n return {byte: parseInt(address, 10)};\r\n }\r\n }\r\n }\r\n\r\n struct2address(struct) {\r\n if (struct.db !== undefined) {\r\n if (struct.bit !== undefined) {\r\n return `DB${struct.db} ${struct.byte}.${struct.bit}`;\r\n } else {\r\n return `DB${struct.db} ${struct.byte}`;\r\n }\r\n } else if (struct.bit !== undefined) {\r\n return struct.byte + '.' + struct.bit;\r\n } else {\r\n return struct.byte;\r\n }\r\n }\r\n\r\n changeParam = (index, name, value) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data[index][name] = value;\r\n if (name === 'Type') {\r\n if (['BOOL'].includes(value)) {\r\n data[index].Length = 0.1;\r\n } else\r\n if (['', 'BYTE'].includes(value)) {\r\n data[index].Length = 1;\r\n } else\r\n if (['WORD', 'INT', 'STRING', 'S5TIME'].includes(value)) {\r\n data[index].Length = 2;\r\n } else\r\n if (['DWORD', 'DINT', 'REAL'].includes(value)) {\r\n data[index].Length = 4;\r\n } else\r\n if (['S7TIME'].includes(value)) {\r\n data[index].Length = 8;\r\n } else\r\n if (['S7STRING', 'ARRAY'].includes(value)) {\r\n data[index].Length = 32;\r\n }\r\n\r\n if (value === 'BOOL') {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit === undefined) {\r\n struct.bit = 0;\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n } else {\r\n const struct = this.address2struct(data[index].Address);\r\n if (struct.bit !== undefined) {\r\n if (struct.bit > 0) {\r\n struct.byte++;\r\n }\r\n delete struct.bit;\r\n\r\n data[index].Address = this.struct2address(struct);\r\n }\r\n }\r\n }\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n addItem = () => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n let newItem = {}\r\n\r\n this.getFields().forEach(field => newItem[field.name] = '');\r\n\r\n if (data.length) {\r\n let sortedData = JSON.parse(JSON.stringify(data));\r\n sortedData.sort((item1, item2) => item1.Address > item2.Address ? 1 : -1);\r\n let lastItem = sortedData[sortedData.length - 1];\r\n const struct = this.address2struct(lastItem.Address);\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = struct.bit || 0;\r\n struct.bit++;\r\n if (struct.bit >= 8) {\r\n struct.bit = struct.bit % 8;\r\n struct.byte++;\r\n }\r\n } else {\r\n delete struct.bit;\r\n struct.byte += lastItem.Length;\r\n }\r\n\r\n if (struct.db !== undefined && struct.byte + lastItem.Length > 0xFFFF) {\r\n struct.db++;\r\n struct.byte = 0;\r\n if (lastItem.Type === 'BOOL') {\r\n struct.bit = 0;\r\n }\r\n }\r\n\r\n newItem.Address = this.struct2address(struct);\r\n newItem.Type = lastItem.Type;\r\n newItem.Length = lastItem.Length;\r\n newItem.Unit = lastItem.Unit;\r\n newItem.Role = lastItem.Role;\r\n newItem.Room = lastItem.Room;\r\n newItem.poll = lastItem.poll;\r\n newItem.RW = lastItem.RW;\r\n newItem.WP = lastItem.WP;\r\n } else {\r\n newItem.role = 'level';\r\n newItem.Type = 'BOOL';\r\n newItem.Length = '0.1';\r\n newItem.poll = true;\r\n if (this.nativeField === 'dbs') {\r\n newItem.Address = 'DB1 0.0';\r\n } else {\r\n newItem.Address = '0.0';\r\n }\r\n }\r\n data.push(newItem);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n deleteItem = (index) => {\r\n let data = JSON.parse(JSON.stringify(this.props.native[this.nativeField]));\r\n data.splice(index, 1);\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n changeData = (data) => {\r\n this.props.onChange(this.nativeField, data);\r\n }\r\n\r\n getDisable = (index, name) => {\r\n return name === 'Length' &&\r\n !['STRING', 'S7STRING', 'ARRAY'].includes(this.props.native[this.nativeField][index].type);\r\n }\r\n\r\n getSortedData = (data, orderBy, order) => {\r\n this.fields = this.fields || this.getFields();\r\n\r\n data = data || this.props.native[this.nativeField];\r\n orderBy = orderBy || this.state.orderBy;\r\n order = order || this.state.order;\r\n let sortedData = [];\r\n data.forEach((item, index) => {sortedData[index] = {item, $index: index}});\r\n const field = this.fields.find(item => item.name === orderBy);\r\n\r\n sortedData.sort((sortedItem1, sortedItem2) => {\r\n let sort1;\r\n let sort2;\r\n if (orderBy === 'Address') {\r\n const a1 = this.address2struct(sortedItem1.item.Address);\r\n const a2 = this.address2struct(sortedItem2.item.Address);\r\n\r\n sort1 = 0;\r\n if (a1.db !== undefined) {\r\n sort1 = a1.db << 24;\r\n }\r\n if (a2.db !== undefined) {\r\n sort2 = a2.db << 24;\r\n }\r\n sort1 |= a1.byte << 8;\r\n sort2 |= a2.byte << 8;\r\n sort1 |= a1.bit || 0;\r\n sort2 |= a2.bit || 0;\r\n } else if (orderBy === '$index') {\r\n sort1 = sortedItem1[orderBy];\r\n sort2 = sortedItem2[orderBy];\r\n } else if (field && field.type === 'number') {\r\n sort1 = parseInt(sortedItem1.item[orderBy], 10);\r\n sort2 = parseInt(sortedItem2.item[orderBy], 10);\r\n } else {\r\n sort1 = sortedItem1.item[orderBy];\r\n sort2 = sortedItem2.item[orderBy];\r\n }\r\n return (order === 'asc' ? sort1 > sort2 : sort1 < sort2) ? 1 : -1;\r\n });\r\n\r\n return sortedData;\r\n }\r\n\r\n render() {\r\n this.fields = this.fields || this.getFields();\r\n\r\n return \r\n {\r\n this.setState({orderBy, order});\r\n window.localStorage.setItem('Modbus.orderBy', orderBy);\r\n window.localStorage.setItem('Modbus.order', order);\r\n }}\r\n />\r\n \r\n }\r\n}\r\n\r\nBaseRegisters.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n themeType: PropTypes.string,\r\n};\r\n\r\nexport default BaseRegisters;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Inputs extends BaseRegisters {\r\n nativeField = 'inputs'\r\n}\r\n\r\nInputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Inputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Outputs extends BaseRegisters {\r\n nativeField = 'outputs'\r\n}\r\n\r\nOutputs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Outputs;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Marker extends BaseRegisters {\r\n nativeField = 'markers'\r\n}\r\n\r\nMarker.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Marker;\r\n","import PropTypes from 'prop-types';\r\n\r\nimport BaseRegisters from './BaseRegisters';\r\n\r\nclass Dbs extends BaseRegisters {\r\n nativeField = 'dbs';\r\n}\r\n\r\nDbs.propTypes = {\r\n common: PropTypes.object.isRequired,\r\n native: PropTypes.object.isRequired,\r\n instance: PropTypes.number.isRequired,\r\n adapterName: PropTypes.string.isRequired,\r\n onError: PropTypes.func,\r\n onLoad: PropTypes.func,\r\n onChange: PropTypes.func,\r\n changed: PropTypes.bool,\r\n socket: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default Dbs;\r\n","import React from 'react';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport { MuiThemeProvider } from '@material-ui/core/styles';\r\nimport { SnackbarProvider } from 'notistack';\r\n\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Tabs from '@material-ui/core/Tabs';\r\nimport Tab from '@material-ui/core/Tab';\r\n\r\nimport GenericApp from '@iobroker/adapter-react/GenericApp';\r\nimport Loader from '@iobroker/adapter-react/Components/Loader'\r\nimport I18n from '@iobroker/adapter-react/i18n';\r\n\r\nimport TabOptions from './Tabs/Options';\r\nimport TabInputs from './Tabs/Inputs';\r\nimport TabOutputs from './Tabs/Outputs';\r\nimport TabMarker from './Tabs/Marker';\r\nimport TabDbs from './Tabs/DBs';\r\n\r\nconst styles = theme => ({\r\n root: {},\r\n tabContent: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px)',\r\n overflow: 'auto',\r\n },\r\n tabContentIFrame: {\r\n padding: 10,\r\n height: 'calc(100% - 64px - 48px - 20px - 38px)',\r\n overflow: 'auto'\r\n },\r\n tab: {\r\n width: '100%',\r\n minHeight: '100%'\r\n }\r\n});\r\n\r\nconst tabs = [\r\n {\r\n name: 'general',\r\n title: 'General',\r\n component: TabOptions,\r\n },\r\n {\r\n name: 'inputs',\r\n title: 'Inputs',\r\n component: TabInputs,\r\n },\r\n {\r\n name: 'outputs',\r\n title: 'Outputs',\r\n component: TabOutputs,\r\n },\r\n {\r\n name: 'marker',\r\n title: 'Marker',\r\n component: TabMarker,\r\n },\r\n {\r\n name: 'dbs',\r\n title: 'DBs',\r\n component: TabDbs,\r\n },\r\n]\r\n\r\nclass App extends GenericApp {\r\n constructor(props) {\r\n const extendedProps = {...props};\r\n extendedProps.encryptedFields = ['pass'];\r\n\r\n extendedProps.translations = {\r\n 'en': require('./i18n/en'),\r\n 'de': require('./i18n/de'),\r\n 'ru': require('./i18n/ru'),\r\n 'pt': require('./i18n/pt'),\r\n 'nl': require('./i18n/nl'),\r\n 'fr': require('./i18n/fr'),\r\n 'it': require('./i18n/it'),\r\n 'es': require('./i18n/es'),\r\n 'pl': require('./i18n/pl'),\r\n 'zh-cn': require('./i18n/zh-cn'),\r\n };\r\n\r\n super(props, extendedProps);\r\n this.state.moreLoaded = false;\r\n this.state.rooms = null;\r\n }\r\n\r\n onConnectionReady() {\r\n super.onConnectionReady()\r\n this.socket.getForeignObjects('enum.rooms.*', 'enum')\r\n .then(rooms =>\r\n this.setState({moreLoaded: true, rooms}));\r\n }\r\n\r\n getSelectedTab() {\r\n const selectedTab = this.state.selectedTab;\r\n if (!selectedTab) {\r\n return 0;\r\n } else {\r\n return tabs.findIndex(tab => tab.name === selectedTab);\r\n }\r\n }\r\n\r\n render() {\r\n if (!this.state.loaded || !this.state.moreLoaded) {\r\n return \r\n \r\n ;\r\n }\r\n\r\n return \r\n \r\n
\r\n \r\n this.selectTab(tabs[index].name, index)}\r\n variant=\"scrollable\" scrollButtons=\"auto\">\r\n {tabs.map(tab => {tab.icon}{I18n.t(tab.title)} : I18n.t(tab.title)}\r\n data-name={tab.name}\r\n key={tab.name}\r\n title={tab.tooltip ? I18n.t(tab.tooltip) : undefined}\r\n />)}\r\n \r\n \r\n
\r\n {tabs.map((tab, index) => {\r\n const TabComponent = tab.component;\r\n if (this.state.selectedTab) {\r\n if (this.state.selectedTab !== tab.name) {\r\n return null;\r\n }\r\n } else {\r\n if (index !== 0) {\r\n return null;\r\n }\r\n }\r\n return this.setState({errorText: (text || text === 0) && typeof text !== 'string' ? text.toString() : text})}\r\n onLoad={native => this.onLoadConfig(native)}\r\n instance={this.instance}\r\n adapterName={this.adapterName}\r\n changed={this.state.changed}\r\n onChange={(attr, value, cb) => this.updateNativeValue(attr, value, cb)}\r\n changeNative={value => this.setState({native: value, changed: this.getIsChanged(value)})}\r\n rooms={this.state.rooms}\r\n />\r\n })}\r\n {/*
{JSON.stringify(this.state.native, null, 2)}
*/}\r\n
\r\n {this.renderError()}\r\n {this.renderSaveCloseButtons()}\r\n
\r\n
\r\n
;\r\n }\r\n}\r\n\r\nexport default withStyles(styles)(App);\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport * as Sentry from '@sentry/browser';\r\nimport * as SentryIntegrations from '@sentry/integrations';\r\nimport { MuiThemeProvider} from '@material-ui/core/styles';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport {version} from '../package.json';\r\nimport theme from '@iobroker/adapter-react/Theme';\r\nimport Utils from '@iobroker/adapter-react/Components/Utils';\r\n\r\nwindow.adapterName = 's7';\r\nlet themeName = Utils.getThemeName();\r\n\r\nconsole.log(`iobroker.${window.adapterName}@${version} using theme \"${themeName}\"`);\r\n\r\nfunction build() {\r\n return ReactDOM.render(\r\n \r\n {\r\n themeName = _theme;\r\n build();\r\n }}\r\n />\r\n ,\r\n document.getElementById('root')\r\n );\r\n}\r\n\r\nif (false && window.location.host !== 'localhost:3000') {\r\n Sentry.init({\r\n dsn: 'https://5ad729dbed504d15aa8bde423cae9a8e@sentry.iobroker.net/57',\r\n release: `iobroker.${window.adapterName}@${version}`,\r\n integrations: [\r\n new SentryIntegrations.Dedupe()\r\n ]\r\n });\r\n}\r\n\r\nbuild();\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/build/static/js/runtime-main.0b37ba43.js.map b/src/build/static/js/runtime-main.0b37ba43.js.map deleted file mode 100644 index af680ff..0000000 --- a/src/build/static/js/runtime-main.0b37ba43.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU8B,QAGnC,IAAIC,EAASH,EAAiB5B,GAAY,CACzCK,EAAGL,EACHgC,GAAG,EACHF,QAAS,IAUV,OANAhB,EAAQd,GAAUW,KAAKoB,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAG/DK,EAAOC,GAAI,EAGJD,EAAOD,QAKfJ,EAAoBO,EAAInB,EAGxBY,EAAoBQ,EAAIN,EAGxBF,EAAoBS,EAAI,SAASL,EAASM,EAAMC,GAC3CX,EAAoBY,EAAER,EAASM,IAClC5B,OAAO+B,eAAeT,EAASM,EAAM,CAAEI,YAAY,EAAMC,IAAKJ,KAKhEX,EAAoBgB,EAAI,SAASZ,GACX,qBAAXa,QAA0BA,OAAOC,aAC1CpC,OAAO+B,eAAeT,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DrC,OAAO+B,eAAeT,EAAS,aAAc,CAAEe,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKzC,OAAO0C,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBzC,OAAO+B,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBS,EAAEc,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAAStB,GAChC,IAAIM,EAASN,GAAUA,EAAOiB,WAC7B,WAAwB,OAAOjB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,EAAoBY,EAAI,SAASgB,EAAQC,GAAY,OAAO/C,OAAOC,UAAUC,eAAeC,KAAK2C,EAAQC,IAGzG7B,EAAoB8B,EAAI,KAExB,IAAIC,EAAaC,KAAK,6BAA+BA,KAAK,8BAAgC,GACtFC,EAAmBF,EAAW5C,KAAKuC,KAAKK,GAC5CA,EAAW5C,KAAOf,EAClB2D,EAAaA,EAAWG,QACxB,IAAI,IAAIvD,EAAI,EAAGA,EAAIoD,EAAWlD,OAAQF,IAAKP,EAAqB2D,EAAWpD,IAC3E,IAAIU,EAAsB4C,EAI1BxC,I","file":"static/js/runtime-main.0b37ba43.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \tvar jsonpArray = this[\"webpackJsonpmodebus-admin\"] = this[\"webpackJsonpmodebus-admin\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/build/static/js/runtime-main.0b37ba43.js b/src/build/static/js/runtime-main.1532eaf1.js similarity index 96% rename from src/build/static/js/runtime-main.0b37ba43.js rename to src/build/static/js/runtime-main.1532eaf1.js index b3bf229..6afc011 100644 --- a/src/build/static/js/runtime-main.0b37ba43.js +++ b/src/build/static/js/runtime-main.1532eaf1.js @@ -1,2 +1,2 @@ !function(e){function r(r){for(var n,i,l=r[0],a=r[1],f=r[2],c=0,s=[];c