From 6338093c7dfba139a92ddaa3ebf2ee30db570e52 Mon Sep 17 00:00:00 2001 From: Felix Zumstein Date: Sun, 19 May 2024 09:04:34 +0200 Subject: [PATCH] wip --- app/static/mypyscript.py | 4 ++-- app/static/pyscript.json | 2 +- app/static/vendor/xlwings/xlwings.min.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/static/mypyscript.py b/app/static/mypyscript.py index 487e4d7..de7f04c 100644 --- a/app/static/mypyscript.py +++ b/app/static/mypyscript.py @@ -1,9 +1,9 @@ """ * You can use pyscript.fetch, but often, you'll run into CORS issues (GitHub is fine though) * No support for TCP/IP, i.e., no connections with external databases like Postgres -* No access to local file system, but there's a virtual file system where files can be created via URLs -* xlwings (Python) is currently old as the current version doesn't have a wasm build yet +* No access to local file system, but there's a virtual file system where files can be created via URLs or via upload * Pictures/Matplotlib should be possible to pass to JS via file system or if not via base64 encoding +* TODO: test out custom functions """ import json diff --git a/app/static/pyscript.json b/app/static/pyscript.json index 8b47cb9..6863205 100644 --- a/app/static/pyscript.json +++ b/app/static/pyscript.json @@ -1,3 +1,3 @@ { - "packages": ["https://xlwings.s3.amazonaws.com/xlwings-0.0.0-py3-none-any.whl"] + "packages": ["xlwings==0.31.2"] } diff --git a/app/static/vendor/xlwings/xlwings.min.js b/app/static/vendor/xlwings/xlwings.min.js index 38ba727..68c6bc5 100644 --- a/app/static/vendor/xlwings/xlwings.min.js +++ b/app/static/vendor/xlwings/xlwings.min.js @@ -7,5 +7,5 @@ * This file also contains code from Webpack * Copyright (C) JS Foundation and other contributors, Licensed under MIT license, see https://raw.githubusercontent.com/webpack/webpack/main/LICENSE */ -var xlwings;!function(){var t={909:function(t,e,n){var r=n(6575);t.exports=r},6533:function(t,e,n){var r=n(8018);t.exports=r},9869:function(t,e,n){var r=n(8825);t.exports=r},6907:function(t,e,n){var r=n(4977);t.exports=r},3462:function(t,e,n){n(6699);var r=n(2649);t.exports=r("Array","includes")},6715:function(t,e,n){n(8309)},6410:function(t,e,n){n(5837),t.exports=n(7854)},9116:function(t,e,n){n(9601);var r=n(857);t.exports=r.Object.assign},9662:function(t,e,n){var r=n(614),o=n(6330),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},1223:function(t,e,n){var r=n(5112),o=n(30),i=n(3070).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},9670:function(t,e,n){var r=n(111),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},1318:function(t,e,n){var r=n(5656),o=n(1400),i=n(6244),s=function(t){return function(e,n,s){var a,c=r(e),u=i(c),l=o(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},4326:function(t,e,n){var r=n(1702),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},9920:function(t,e,n){var r=n(2597),o=n(3887),i=n(1236),s=n(3070);t.exports=function(t,e,n){for(var a=o(e),c=s.f,u=i.f,l=0;l0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},2649:function(t,e,n){var r=n(7854),o=n(1702);t.exports=function(t,e){return o(r[t].prototype[e])}},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var r=n(7854),o=n(1236).f,i=n(8880),s=n(8052),a=n(3072),c=n(9920),u=n(4705);t.exports=function(t,e){var n,l,f,h,p,d=t.target,g=t.global,v=t.stat;if(n=g?r:v?r[d]||a(d,{}):(r[d]||{}).prototype)for(l in e){if(h=e[l],f=t.dontCallGetSet?(p=o(n,l))&&p.value:n[l],!u(g?l:d+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;c(h,f)}(t.sham||f&&f.sham)&&i(h,"sham",!0),s(n,l,h,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},4374:function(t,e,n){var r=n(7293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:function(t,e,n){var r=n(4374),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6530:function(t,e,n){var r=n(9781),o=n(2597),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},1702:function(t,e,n){var r=n(4374),o=Function.prototype,i=o.call,s=r&&o.bind.bind(i,i);t.exports=r?s:function(t){return function(){return i.apply(t,arguments)}}},5005:function(t,e,n){var r=n(7854),o=n(614);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},8173:function(t,e,n){var r=n(9662),o=n(8554);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},7854:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:function(t,e,n){var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:function(t){t.exports={}},490:function(t,e,n){var r=n(5005);t.exports=r("document","documentElement")},4664:function(t,e,n){var r=n(9781),o=n(7293),i=n(317);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,n){var r=n(1702),o=n(7293),i=n(4326),s=Object,a=r("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):s(t)}:s},2788:function(t,e,n){var r=n(1702),o=n(614),i=n(5465),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},9909:function(t,e,n){var r,o,i,s=n(4811),a=n(7854),c=n(111),u=n(8880),l=n(2597),f=n(5465),h=n(6200),p=n(3501),d="Object already initialized",g=a.TypeError,v=a.WeakMap;if(s||f.state){var b=f.state||(f.state=new v);b.get=b.get,b.has=b.has,b.set=b.set,r=function(t,e){if(b.has(t))throw g(d);return e.facade=t,b.set(t,e),e},o=function(t){return b.get(t)||{}},i=function(t){return b.has(t)}}else{var y=h("state");p[y]=!0,r=function(t,e){if(l(t,y))throw g(d);return e.facade=t,u(t,y,e),e},o=function(t){return l(t,y)?t[y]:{}},i=function(t){return l(t,y)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},614:function(t,e,n){var r=n(4154),o=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},4705:function(t,e,n){var r=n(7293),o=n(614),i=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==l||n!=u&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},8554:function(t){t.exports=function(t){return null==t}},111:function(t,e,n){var r=n(614),o=n(4154),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},1913:function(t){t.exports=!1},2190:function(t,e,n){var r=n(5005),o=n(614),i=n(7976),s=n(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},6244:function(t,e,n){var r=n(7466);t.exports=function(t){return r(t.length)}},6339:function(t,e,n){var r=n(1702),o=n(7293),i=n(614),s=n(2597),a=n(9781),c=n(6530).CONFIGURABLE,u=n(2788),l=n(9909),f=l.enforce,h=l.get,p=String,d=Object.defineProperty,g=r("".slice),v=r("".replace),b=r([].join),y=a&&!o((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),w=t.exports=function(t,e,n){"Symbol("===g(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||c&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&s(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=f(t);return s(r,"source")||(r.source=b(m,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return i(this)&&h(this).source||u(this)}),"toString")},4758:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},1574:function(t,e,n){"use strict";var r=n(9781),o=n(1702),i=n(6916),s=n(7293),a=n(1956),c=n(5181),u=n(5296),l=n(7908),f=n(8361),h=Object.assign,p=Object.defineProperty,d=o([].concat);t.exports=!h||s((function(){if(r&&1!==h({b:1},h(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=h({},t)[n]||a(h({},e)).join("")!=o}))?function(t,e){for(var n=l(t),o=arguments.length,s=1,h=c.f,p=u.f;o>s;)for(var g,v=f(arguments[s++]),b=h?d(a(v),h(v)):a(v),y=b.length,m=0;y>m;)g=b[m++],r&&!i(p,v,g)||(n[g]=v[g]);return n}:h},30:function(t,e,n){var r,o=n(9670),i=n(6048),s=n(748),a=n(3501),c=n(490),u=n(317),l=n(6200),f="prototype",h="script",p=l("IE_PROTO"),d=function(){},g=function(t){return"<"+h+">"+t+""},v=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;b="undefined"!=typeof document?document.domain&&r?v(r):(e=u("iframe"),n="java"+h+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):v(r);for(var o=s.length;o--;)delete b[f][s[o]];return b()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d[f]=o(t),n=new d,d[f]=null,n[p]=t):n=b(),void 0===e?n:i.f(n,e)}},6048:function(t,e,n){var r=n(9781),o=n(3353),i=n(3070),s=n(9670),a=n(5656),c=n(1956);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=c(e),u=o.length,l=0;u>l;)i.f(t,n=o[l++],r[n]);return t}},3070:function(t,e,n){var r=n(9781),o=n(4664),i=n(3353),s=n(9670),a=n(4948),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",p="writable";e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var r=l(t,e);r&&r[p]&&(t[e]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:f in n?n[f]:r[f],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var r=n(9781),o=n(6916),i=n(5296),s=n(9114),a=n(5656),c=n(4948),u=n(2597),l=n(4664),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},8006:function(t,e,n){var r=n(6324),o=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},7976:function(t,e,n){var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:function(t,e,n){var r=n(1702),o=n(2597),i=n(5656),s=n(1318).indexOf,a=n(3501),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&c(l,n);for(;e.length>u;)o(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},1956:function(t,e,n){var r=n(6324),o=n(748);t.exports=Object.keys||function(t){return r(t,o)}},5296:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2140:function(t,e,n){var r=n(6916),o=n(614),i=n(111),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},3887:function(t,e,n){var r=n(5005),o=n(1702),i=n(8006),s=n(5181),a=n(9670),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?c(e,n(t)):e}},857:function(t,e,n){var r=n(7854);t.exports=r},4488:function(t,e,n){var r=n(8554),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},6200:function(t,e,n){var r=n(2309),o=n(9711),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:function(t,e,n){var r=n(7854),o=n(3072),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},2309:function(t,e,n){var r=n(1913),o=n(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6293:function(t,e,n){var r=n(7392),o=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},1400:function(t,e,n){var r=n(9303),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5656:function(t,e,n){var r=n(8361),o=n(4488);t.exports=function(t){return r(o(t))}},9303:function(t,e,n){var r=n(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7466:function(t,e,n){var r=n(9303),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7908:function(t,e,n){var r=n(4488),o=Object;t.exports=function(t){return o(r(t))}},7593:function(t,e,n){var r=n(6916),o=n(111),i=n(2190),s=n(8173),a=n(2140),c=n(5112),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:function(t,e,n){var r=n(7593),o=n(2190);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},6330:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:function(t,e,n){var r=n(1702),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},3307:function(t,e,n){var r=n(6293);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,n){var r=n(9781),o=n(7293);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:function(t,e,n){var r=n(7854),o=n(614),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},5112:function(t,e,n){var r=n(7854),o=n(2309),i=n(2597),s=n(9711),a=n(6293),c=n(3307),u=r.Symbol,l=o("wks"),f=c?u.for||u:u&&u.withoutSetter||s;t.exports=function(t){return i(l,t)||(l[t]=a&&i(u,t)?u[t]:f("Symbol."+t)),l[t]}},6699:function(t,e,n){"use strict";var r=n(2109),o=n(1318).includes,i=n(7293),s=n(1223);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},8309:function(t,e,n){var r=n(9781),o=n(6530).EXISTS,i=n(1702),s=n(7045),a=Function.prototype,c=i(a.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(u.exec);r&&!o&&s(a,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(t){return""}}})},5837:function(t,e,n){var r=n(2109),o=n(7854);r({global:!0,forced:o.globalThis!==o},{globalThis:o})},9601:function(t,e,n){var r=n(2109),o=n(1574);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},6575:function(t,e,n){var r=n(3462);t.exports=r},8018:function(t,e,n){var r=n(6715);t.exports=r},8825:function(t,e,n){var r=n(6410);t.exports=r},4977:function(t,e,n){var r=n(9116);t.exports=r}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{getAccessToken:function(){return p},getActiveBookName:function(){return v},registerCallback:function(){return _},runPython:function(){return x}}),n(6907),n(909),n(9869),n(6533);var t;function e(e){e.status===Office.AsyncResultStatus.Failed?console.log("".concat(e.error.message," [").concat(e.error.code,"]")):((t=e.value).addEventHandler(Office.EventType.DialogMessageReceived,o),t.addEventHandler(Office.EventType.DialogEventReceived,i))}function o(e){t.close();var n=e.message.split("|"),r=n[0],o=n[1];if(""!==o&&o in globalThis.callbacks)globalThis.callbacks[o](r);else if(""!==o&&!(o in globalThis.callbacks))throw new Error("Didn't find callback '".concat(o,"'! Make sure to run xlwings.registerCallback(").concat(o,") before calling runPython."))}function i(t){switch(t.error){case 12002:console.log("The dialog box has been directed to a page that it cannot find or load, or the URL syntax is invalid.");break;case 12003:console.log("HTTPS is required.");break;case 12006:console.log("Dialog closed by user");break;default:console.log("Unknown error in dialog box")}}var s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},a=function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=f-900?l?[3,3]:(l=!0,u=!0,[4,h()]):[3,5];case 2:return t.sent(),u=!1,[3,5];case 3:return u?[4,new Promise((function(t){return setTimeout(t,100)}))]:[3,5];case 4:return t.sent(),[3,3];case 5:return[2,c]}}))}))}var d=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},g=function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&h.length>0)throw"Either use 'include' or 'exclude', but not both!";if(f.length>0&&r.forEach((function(t){f.includes(t.name)||h.push(t.name)})),0===Object.keys(l).length)for(p in a)p.toLowerCase().startsWith("header_")&&(l[p.substring(7)]=a[p]);return!("Authorization"in l)&&o.length>0&&(l.Authorization=o),l["Content-Type"]="application/json",(d={}).client="Office.js",d.version=w,g=n.getActiveWorksheet().load("position"),v=e.getSelectedRange().load("address"),[4,t.sync()];case 5:return R.sent(),d.book={name:e.name,active_sheet_index:g.position,selection:v.address.split("!").pop()},b=[],m=t.workbook.names.load("name, type"),[4,t.sync()];case 6:return R.sent(),m.items.forEach((function(t,e){"Range"===t.type&&b.push({name:t.name,sheet:t.getRange().worksheet.load("position"),range:t.getRange().load("address"),scope_sheet_name:null,scope_sheet_index:null,book_scope:!0})})),[4,t.sync()];case 7:return R.sent(),x=[],b.forEach((function(t,e){x.push({name:t.name,sheet_index:t.sheet.position,address:t.range.address.split("!").pop(),scope_sheet_name:null,scope_sheet_index:null,book_scope:t.book_scope})})),d.names=x,d.sheets=[],S=[],r.forEach((function(t){var e;t.load("name names"),e=h.includes(t.name)?null:void 0!==t.getUsedRange()?t.getUsedRange().getLastCell().load("address"):t.getRange("A1").load("address"),S.push({sheet:t,lastCell:e})})),[4,t.sync()];case 8:return R.sent(),S.forEach((function(t,e){var n;h.includes(t.sheet.name)||(n=t.sheet.getRange("A1:".concat(t.lastCell.address)).load("values, numberFormatCategories"),S[e].range=n,S[e].names=t.sheet.names.load("name, type"))})),[4,t.sync()];case 9:return R.sent(),k=[],S.forEach((function(t){h.includes(t.sheet.name)||t.names.items.forEach((function(t){k.push({name:t.name,sheet:t.getRange().worksheet.load("position"),range:t.getRange().load("address"),scope_sheet:t.worksheet.load("name, position"),book_scope:!1})}))})),[4,t.sync()];case 10:R.sent(),O=[],k.forEach((function(t){O.push({name:t.name,sheet_index:t.sheet.position,address:t.range.address.split("!").pop(),scope_sheet_name:t.scope_sheet.name,scope_sheet_index:t.scope_sheet.position,book_scope:t.book_scope})})),d.names=d.names.concat(O),T=function(e){var n,r,o,i,s,a,c,u,l,f,p,g,v,b;return y(this,(function(y){switch(y.label){case 0:return n=e.sheet,h.includes(e.sheet.name)?r=[[]]:(r=e.range.values,Office.context.requirements.isSetSupported("ExcelApi","1.12")&&(o=e.range.numberFormatCategories,r.forEach((function(t,e){var n=o[e];t.forEach((function(t,o){var i=n[o];"Date"!==i.toString()&&"Time"!==i.toString()||"number"!=typeof t||(r[e][o]=new Date(Math.round(86400*(t-25569)*1e3)).toISOString())}))})))),i=[],h.includes(e.sheet.name)?[3,3]:(n.tables.load(["name","showHeaders","dataBodyRange","showTotals","style","showFilterButton"]),[4,t.sync()]);case 1:for(y.sent(),s=[],a=0,c=n.tables.items;a18&&t.includes("T")&&(n=new Date(Date.parse(t)),"Invalid Date"!==(r=n.toLocaleDateString(Office.context.contentLanguage))&&(n.getHours()+n.getMinutes()+n.getSeconds()+n.getMilliseconds()!==0&&(r+=" "+n.toLocaleTimeString()),e.values[o][i]=r))}))})),[4,S(t,e)];case 1:return o.sent().values=e.values,[4,t.sync()];case 2:return o.sent(),[2]}}))}))},addSheet:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){return(null!==e.args[1]?t.workbook.worksheets.add(e.args[1].toString()):t.workbook.worksheets.add()).position=parseInt(e.args[0].toString()),[2]}))}))},setSheetName:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){return t.workbook.worksheets.load("items").items[e.sheet_position].name=e.args[0].toString(),[2]}))}))},setAutofit:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return"columns"!==e.args[0]?[3,2]:[4,S(t,e)];case 1:return n.sent().format.autofitColumns(),[3,4];case 2:return[4,S(t,e)];case 3:n.sent().format.autofitRows(),n.label=4;case 4:return[2]}}))}))},setRangeColor:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,S(t,e)];case 1:return n.sent().format.fill.color=e.args[0].toString(),[4,t.sync()];case 2:return n.sent(),[2]}}))}))},activateSheet:function(t,e){return b(this,void 0,void 0,(function(){var n;return y(this,(function(r){switch(r.label){case 0:return(n=t.workbook.worksheets).load("items"),[4,t.sync()];case 1:return r.sent(),n.items[parseInt(e.args[0].toString())].activate(),[2]}}))}))},addHyperlink:function(t,e){return b(this,void 0,void 0,(function(){var n,r;return y(this,(function(o){switch(o.label){case 0:return[4,S(t,e)];case 1:return n=o.sent(),r={textToDisplay:e.args[1].toString(),screenTip:e.args[2].toString(),address:e.args[0].toString()},n.hyperlink=r,[4,t.sync()];case 2:return o.sent(),[2]}}))}))},setNumberFormat:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,S(t,e)];case 1:return n.sent().numberFormat=[[e.args[0].toString()]],[2]}}))}))},setPictureName:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,T(t,e.sheet_position,Number(e.args[0]),Excel.ShapeType.image)];case 1:return n.sent().name=e.args[1].toString(),[2]}}))}))},setPictureWidth:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,T(t,e.sheet_position,Number(e.args[0]),Excel.ShapeType.image)];case 1:return n.sent().width=Number(e.args[1]),[2]}}))}))},setPictureHeight:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,T(t,e.sheet_position,Number(e.args[0]),Excel.ShapeType.image)];case 1:return n.sent().height=Number(e.args[1]),[2]}}))}))},deletePicture:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,T(t,e.sheet_position,Number(e.args[0]),Excel.ShapeType.image)];case 1:return n.sent().delete(),[2]}}))}))},addPicture:function(t,e){return b(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u;return y(this,(function(l){switch(l.label){case 0:return n=e.args[0].toString(),r=Number(e.args[1]),o=Number(e.args[2]),i=Number(e.args[3]),s=Number(e.args[4]),[4,k(t,e)];case 1:return a=l.sent(),c=a.getRangeByIndexes(o,r,1,1).load("left, top"),[4,t.sync()];case 2:return l.sent(),i=Math.max(i,c.left),s=Math.max(s,c.top),(u=a.shapes.addImage(n)).left=i,u.top=s,[2]}}))}))},updatePicture:function(t,e){return b(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u,l;return y(this,(function(f){switch(f.label){case 0:return n=e.args[0].toString(),[4,k(t,e)];case 1:return r=f.sent(),[4,T(t,e.sheet_position,Number(e.args[1]),Excel.ShapeType.image)];case 2:return o=(o=f.sent()).load("name, left, top, height, width"),[4,t.sync()];case 3:return f.sent(),i=o.name,s=o.left,a=o.top,c=o.height,u=o.width,o.delete(),(l=r.shapes.addImage(n)).name=i,l.left=s,l.top=a,l.height=c,l.width=u,[2]}}))}))},alert:function(t,n){return b(this,void 0,void 0,(function(){var t,r,o,i,s;return y(this,(function(a){return t=n.args[0].toString(),r=n.args[1].toString(),o=n.args[2].toString(),i=n.args[3].toString(),s=n.args[4].toString(),function(t,n,r,o,i){var s,a,c,u;s=this,a=void 0,u=function(){var s,a;return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},4326:function(t,e,n){var r=n(1702),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},9920:function(t,e,n){var r=n(2597),o=n(3887),i=n(1236),s=n(3070);t.exports=function(t,e,n){for(var a=o(e),c=s.f,u=i.f,l=0;l0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},2649:function(t,e,n){var r=n(7854),o=n(1702);t.exports=function(t,e){return o(r[t].prototype[e])}},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var r=n(7854),o=n(1236).f,i=n(8880),s=n(8052),a=n(3072),c=n(9920),u=n(4705);t.exports=function(t,e){var n,l,f,h,p,d=t.target,g=t.global,v=t.stat;if(n=g?r:v?r[d]||a(d,{}):(r[d]||{}).prototype)for(l in e){if(h=e[l],f=t.dontCallGetSet?(p=o(n,l))&&p.value:n[l],!u(g?l:d+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;c(h,f)}(t.sham||f&&f.sham)&&i(h,"sham",!0),s(n,l,h,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},4374:function(t,e,n){var r=n(7293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:function(t,e,n){var r=n(4374),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},6530:function(t,e,n){var r=n(9781),o=n(2597),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},1702:function(t,e,n){var r=n(4374),o=Function.prototype,i=o.call,s=r&&o.bind.bind(i,i);t.exports=r?s:function(t){return function(){return i.apply(t,arguments)}}},5005:function(t,e,n){var r=n(7854),o=n(614);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},8173:function(t,e,n){var r=n(9662),o=n(8554);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},7854:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:function(t,e,n){var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:function(t){t.exports={}},490:function(t,e,n){var r=n(5005);t.exports=r("document","documentElement")},4664:function(t,e,n){var r=n(9781),o=n(7293),i=n(317);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,n){var r=n(1702),o=n(7293),i=n(4326),s=Object,a=r("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):s(t)}:s},2788:function(t,e,n){var r=n(1702),o=n(614),i=n(5465),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},9909:function(t,e,n){var r,o,i,s=n(4811),a=n(7854),c=n(111),u=n(8880),l=n(2597),f=n(5465),h=n(6200),p=n(3501),d="Object already initialized",g=a.TypeError,v=a.WeakMap;if(s||f.state){var b=f.state||(f.state=new v);b.get=b.get,b.has=b.has,b.set=b.set,r=function(t,e){if(b.has(t))throw g(d);return e.facade=t,b.set(t,e),e},o=function(t){return b.get(t)||{}},i=function(t){return b.has(t)}}else{var y=h("state");p[y]=!0,r=function(t,e){if(l(t,y))throw g(d);return e.facade=t,u(t,y,e),e},o=function(t){return l(t,y)?t[y]:{}},i=function(t){return l(t,y)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},614:function(t,e,n){var r=n(4154),o=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},4705:function(t,e,n){var r=n(7293),o=n(614),i=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==l||n!=u&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},8554:function(t){t.exports=function(t){return null==t}},111:function(t,e,n){var r=n(614),o=n(4154),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},1913:function(t){t.exports=!1},2190:function(t,e,n){var r=n(5005),o=n(614),i=n(7976),s=n(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},6244:function(t,e,n){var r=n(7466);t.exports=function(t){return r(t.length)}},6339:function(t,e,n){var r=n(1702),o=n(7293),i=n(614),s=n(2597),a=n(9781),c=n(6530).CONFIGURABLE,u=n(2788),l=n(9909),f=l.enforce,h=l.get,p=String,d=Object.defineProperty,g=r("".slice),v=r("".replace),b=r([].join),y=a&&!o((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),w=t.exports=function(t,e,n){"Symbol("===g(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||c&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&s(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=f(t);return s(r,"source")||(r.source=b(m,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return i(this)&&h(this).source||u(this)}),"toString")},4758:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},1574:function(t,e,n){"use strict";var r=n(9781),o=n(1702),i=n(6916),s=n(7293),a=n(1956),c=n(5181),u=n(5296),l=n(7908),f=n(8361),h=Object.assign,p=Object.defineProperty,d=o([].concat);t.exports=!h||s((function(){if(r&&1!==h({b:1},h(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=h({},t)[n]||a(h({},e)).join("")!=o}))?function(t,e){for(var n=l(t),o=arguments.length,s=1,h=c.f,p=u.f;o>s;)for(var g,v=f(arguments[s++]),b=h?d(a(v),h(v)):a(v),y=b.length,m=0;y>m;)g=b[m++],r&&!i(p,v,g)||(n[g]=v[g]);return n}:h},30:function(t,e,n){var r,o=n(9670),i=n(6048),s=n(748),a=n(3501),c=n(490),u=n(317),l=n(6200),f="prototype",h="script",p=l("IE_PROTO"),d=function(){},g=function(t){return"<"+h+">"+t+""},v=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;b="undefined"!=typeof document?document.domain&&r?v(r):(e=u("iframe"),n="java"+h+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):v(r);for(var o=s.length;o--;)delete b[f][s[o]];return b()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d[f]=o(t),n=new d,d[f]=null,n[p]=t):n=b(),void 0===e?n:i.f(n,e)}},6048:function(t,e,n){var r=n(9781),o=n(3353),i=n(3070),s=n(9670),a=n(5656),c=n(1956);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=c(e),u=o.length,l=0;u>l;)i.f(t,n=o[l++],r[n]);return t}},3070:function(t,e,n){var r=n(9781),o=n(4664),i=n(3353),s=n(9670),a=n(4948),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",p="writable";e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var r=l(t,e);r&&r[p]&&(t[e]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:f in n?n[f]:r[f],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var r=n(9781),o=n(6916),i=n(5296),s=n(9114),a=n(5656),c=n(4948),u=n(2597),l=n(4664),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},8006:function(t,e,n){var r=n(6324),o=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},7976:function(t,e,n){var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:function(t,e,n){var r=n(1702),o=n(2597),i=n(5656),s=n(1318).indexOf,a=n(3501),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&c(l,n);for(;e.length>u;)o(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},1956:function(t,e,n){var r=n(6324),o=n(748);t.exports=Object.keys||function(t){return r(t,o)}},5296:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2140:function(t,e,n){var r=n(6916),o=n(614),i=n(111),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},3887:function(t,e,n){var r=n(5005),o=n(1702),i=n(8006),s=n(5181),a=n(9670),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?c(e,n(t)):e}},857:function(t,e,n){var r=n(7854);t.exports=r},4488:function(t,e,n){var r=n(8554),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},6200:function(t,e,n){var r=n(2309),o=n(9711),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:function(t,e,n){var r=n(7854),o=n(3072),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},2309:function(t,e,n){var r=n(1913),o=n(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6293:function(t,e,n){var r=n(7392),o=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},1400:function(t,e,n){var r=n(9303),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},5656:function(t,e,n){var r=n(8361),o=n(4488);t.exports=function(t){return r(o(t))}},9303:function(t,e,n){var r=n(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7466:function(t,e,n){var r=n(9303),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},7908:function(t,e,n){var r=n(4488),o=Object;t.exports=function(t){return o(r(t))}},7593:function(t,e,n){var r=n(6916),o=n(111),i=n(2190),s=n(8173),a=n(2140),c=n(5112),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:function(t,e,n){var r=n(7593),o=n(2190);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},6330:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:function(t,e,n){var r=n(1702),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},3307:function(t,e,n){var r=n(6293);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,n){var r=n(9781),o=n(7293);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:function(t,e,n){var r=n(7854),o=n(614),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},5112:function(t,e,n){var r=n(7854),o=n(2309),i=n(2597),s=n(9711),a=n(6293),c=n(3307),u=r.Symbol,l=o("wks"),f=c?u.for||u:u&&u.withoutSetter||s;t.exports=function(t){return i(l,t)||(l[t]=a&&i(u,t)?u[t]:f("Symbol."+t)),l[t]}},6699:function(t,e,n){"use strict";var r=n(2109),o=n(1318).includes,i=n(7293),s=n(1223);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},8309:function(t,e,n){var r=n(9781),o=n(6530).EXISTS,i=n(1702),s=n(7045),a=Function.prototype,c=i(a.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(u.exec);r&&!o&&s(a,"name",{configurable:!0,get:function(){try{return l(u,c(this))[1]}catch(t){return""}}})},5837:function(t,e,n){var r=n(2109),o=n(7854);r({global:!0,forced:o.globalThis!==o},{globalThis:o})},9601:function(t,e,n){var r=n(2109),o=n(1574);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},6575:function(t,e,n){var r=n(3462);t.exports=r},8018:function(t,e,n){var r=n(6715);t.exports=r},8825:function(t,e,n){var r=n(6410);t.exports=r},4977:function(t,e,n){var r=n(9116);t.exports=r}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{getAccessToken:function(){return p},getActiveBookName:function(){return v},registerCallback:function(){return _},runPython:function(){return x}}),n(6907),n(909),n(9869),n(6533);var t;function e(e){e.status===Office.AsyncResultStatus.Failed?console.log("".concat(e.error.message," [").concat(e.error.code,"]")):((t=e.value).addEventHandler(Office.EventType.DialogMessageReceived,o),t.addEventHandler(Office.EventType.DialogEventReceived,i))}function o(e){t.close();var n=e.message.split("|"),r=n[0],o=n[1];if(""!==o&&o in globalThis.callbacks)globalThis.callbacks[o](r);else if(""!==o&&!(o in globalThis.callbacks))throw new Error("Didn't find callback '".concat(o,"'! Make sure to run xlwings.registerCallback(").concat(o,") before calling runPython."))}function i(t){switch(t.error){case 12002:console.log("The dialog box has been directed to a page that it cannot find or load, or the URL syntax is invalid.");break;case 12003:console.log("HTTPS is required.");break;case 12006:console.log("Dialog closed by user");break;default:console.log("Unknown error in dialog box")}}var s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},a=function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=f-900?l?[3,3]:(l=!0,u=!0,[4,h()]):[3,5];case 2:return t.sent(),u=!1,[3,5];case 3:return u?[4,new Promise((function(t){return setTimeout(t,100)}))]:[3,5];case 4:return t.sent(),[3,3];case 5:return[2,c]}}))}))}var d=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},g=function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&h.length>0)throw"Either use 'include' or 'exclude', but not both!";if(f.length>0&&r.forEach((function(t){f.includes(t.name)||h.push(t.name)})),0===Object.keys(l).length)for(p in a)p.toLowerCase().startsWith("header_")&&(l[p.substring(7)]=a[p]);return!("Authorization"in l)&&o.length>0&&(l.Authorization=o),l["Content-Type"]="application/json",(d={}).client="Office.js",d.version=w,g=n.getActiveWorksheet().load("position"),v=e.getSelectedRange().load("address"),[4,t.sync()];case 5:return R.sent(),d.book={name:e.name,active_sheet_index:g.position,selection:v.address.split("!").pop()},b=[],m=t.workbook.names.load("name, type"),[4,t.sync()];case 6:return R.sent(),m.items.forEach((function(t,e){"Range"===t.type&&b.push({name:t.name,sheet:t.getRange().worksheet.load("position"),range:t.getRange().load("address"),scope_sheet_name:null,scope_sheet_index:null,book_scope:!0})})),[4,t.sync()];case 7:return R.sent(),x=[],b.forEach((function(t,e){x.push({name:t.name,sheet_index:t.sheet.position,address:t.range.address.split("!").pop(),scope_sheet_name:null,scope_sheet_index:null,book_scope:t.book_scope})})),d.names=x,d.sheets=[],S=[],r.forEach((function(t){var e;t.load("name names"),e=h.includes(t.name)?null:void 0!==t.getUsedRange()?t.getUsedRange().getLastCell().load("address"):t.getRange("A1").load("address"),S.push({sheet:t,lastCell:e})})),[4,t.sync()];case 8:return R.sent(),S.forEach((function(t,e){var n;h.includes(t.sheet.name)||(n=t.sheet.getRange("A1:".concat(t.lastCell.address)).load("values, numberFormatCategories"),S[e].range=n,S[e].names=t.sheet.names.load("name, type"))})),[4,t.sync()];case 9:return R.sent(),k=[],S.forEach((function(t){h.includes(t.sheet.name)||t.names.items.forEach((function(t){k.push({name:t.name,sheet:t.getRange().worksheet.load("position"),range:t.getRange().load("address"),scope_sheet:t.worksheet.load("name, position"),book_scope:!1})}))})),[4,t.sync()];case 10:R.sent(),O=[],k.forEach((function(t){O.push({name:t.name,sheet_index:t.sheet.position,address:t.range.address.split("!").pop(),scope_sheet_name:t.scope_sheet.name,scope_sheet_index:t.scope_sheet.position,book_scope:t.book_scope})})),d.names=d.names.concat(O),T=function(e){var n,r,o,i,s,a,c,u,l,f,p,g,v,b;return y(this,(function(y){switch(y.label){case 0:return n=e.sheet,h.includes(e.sheet.name)?r=[[]]:(r=e.range.values,Office.context.requirements.isSetSupported("ExcelApi","1.12")&&(o=e.range.numberFormatCategories,r.forEach((function(t,e){var n=o[e];t.forEach((function(t,o){var i=n[o];"Date"!==i.toString()&&"Time"!==i.toString()||"number"!=typeof t||(r[e][o]=new Date(Math.round(86400*(t-25569)*1e3)).toISOString())}))})))),i=[],h.includes(e.sheet.name)?[3,3]:(n.tables.load(["name","showHeaders","dataBodyRange","showTotals","style","showFilterButton"]),[4,t.sync()]);case 1:for(y.sent(),s=[],a=0,c=n.tables.items;a18&&t.includes("T")&&(n=new Date(Date.parse(t)),"Invalid Date"!==(r=n.toLocaleDateString(Office.context.contentLanguage))&&(n.getHours()+n.getMinutes()+n.getSeconds()+n.getMilliseconds()!==0&&(r+=" "+n.toLocaleTimeString()),e.values[o][i]=r))}))})),[4,S(t,e)];case 1:return o.sent().values=e.values,[4,t.sync()];case 2:return o.sent(),[2]}}))}))},addSheet:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){return(null!==e.args[1]?t.workbook.worksheets.add(e.args[1].toString()):t.workbook.worksheets.add()).position=parseInt(e.args[0].toString()),[2]}))}))},setSheetName:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){return t.workbook.worksheets.load("items").items[e.sheet_position].name=e.args[0].toString(),[2]}))}))},setAutofit:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return"columns"!==e.args[0]?[3,2]:[4,S(t,e)];case 1:return n.sent().format.autofitColumns(),[3,4];case 2:return[4,S(t,e)];case 3:n.sent().format.autofitRows(),n.label=4;case 4:return[2]}}))}))},setRangeColor:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,S(t,e)];case 1:return n.sent().format.fill.color=e.args[0].toString(),[4,t.sync()];case 2:return n.sent(),[2]}}))}))},activateSheet:function(t,e){return b(this,void 0,void 0,(function(){var n;return y(this,(function(r){switch(r.label){case 0:return(n=t.workbook.worksheets).load("items"),[4,t.sync()];case 1:return r.sent(),n.items[parseInt(e.args[0].toString())].activate(),[2]}}))}))},addHyperlink:function(t,e){return b(this,void 0,void 0,(function(){var n,r;return y(this,(function(o){switch(o.label){case 0:return[4,S(t,e)];case 1:return n=o.sent(),r={textToDisplay:e.args[1].toString(),screenTip:e.args[2].toString(),address:e.args[0].toString()},n.hyperlink=r,[4,t.sync()];case 2:return o.sent(),[2]}}))}))},setNumberFormat:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,S(t,e)];case 1:return n.sent().numberFormat=[[e.args[0].toString()]],[2]}}))}))},setPictureName:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,T(t,e.sheet_position,Number(e.args[0]),Excel.ShapeType.image)];case 1:return n.sent().name=e.args[1].toString(),[2]}}))}))},setPictureWidth:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,T(t,e.sheet_position,Number(e.args[0]),Excel.ShapeType.image)];case 1:return n.sent().width=Number(e.args[1]),[2]}}))}))},setPictureHeight:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,T(t,e.sheet_position,Number(e.args[0]),Excel.ShapeType.image)];case 1:return n.sent().height=Number(e.args[1]),[2]}}))}))},deletePicture:function(t,e){return b(this,void 0,void 0,(function(){return y(this,(function(n){switch(n.label){case 0:return[4,T(t,e.sheet_position,Number(e.args[0]),Excel.ShapeType.image)];case 1:return n.sent().delete(),[2]}}))}))},addPicture:function(t,e){return b(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u;return y(this,(function(l){switch(l.label){case 0:return n=e.args[0].toString(),r=Number(e.args[1]),o=Number(e.args[2]),i=Number(e.args[3]),s=Number(e.args[4]),[4,k(t,e)];case 1:return a=l.sent(),c=a.getRangeByIndexes(o,r,1,1).load("left, top"),[4,t.sync()];case 2:return l.sent(),i=Math.max(i,c.left),s=Math.max(s,c.top),(u=a.shapes.addImage(n)).left=i,u.top=s,[2]}}))}))},updatePicture:function(t,e){return b(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u,l;return y(this,(function(f){switch(f.label){case 0:return n=e.args[0].toString(),[4,k(t,e)];case 1:return r=f.sent(),[4,T(t,e.sheet_position,Number(e.args[1]),Excel.ShapeType.image)];case 2:return o=(o=f.sent()).load("name, left, top, height, width"),[4,t.sync()];case 3:return f.sent(),i=o.name,s=o.left,a=o.top,c=o.height,u=o.width,o.delete(),(l=r.shapes.addImage(n)).name=i,l.left=s,l.top=a,l.height=c,l.width=u,[2]}}))}))},alert:function(t,n){return b(this,void 0,void 0,(function(){var t,r,o,i,s;return y(this,(function(a){return t=n.args[0].toString(),r=n.args[1].toString(),o=n.args[2].toString(),i=n.args[3].toString(),s=n.args[4].toString(),function(t,n,r,o,i){var s,a,c,u;s=this,a=void 0,u=function(){var s,a;return function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]