Mini Kabibi Habibi

Current Path : C:/Program Files/Microsoft Office/root/Office16/sdxs/FA000000049/
Upload File :
Current File : C:/Program Files/Microsoft Office/root/Office16/sdxs/FA000000049/index.win32.bundle

/*! For license information please see index.win32.bundle.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="http://localhost:8081/",n(n.s=7)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.register=function(e){this.modelID=e.modelId},e.prototype.getModelID=function(){return this.modelID},e}();t.getDefaultModelOutput=function(){return{output:!1,isModelFlightable:!0,calcDurationSec:0}},t.MLConfiguration=new r,function(e){e.RowCount="rowCount",e.TileUpdateCount="tileUpdateCount",e.DwellTimeSec="dwellTimeSecs",e.RelevantTcidsExists="relevantTcidsExists"}(t.ModelParameter||(t.ModelParameter={})),function(e){e[e.Heuristic=1e3]="Heuristic",e[e.LR=1001]="LR",e[e.ClickStream=1002]="ClickStream",e[e.Onyx=1003]="Onyx"}(t.SavePromptModel||(t.SavePromptModel={}))},function(e,t,n){"use strict";(function(e,n){var r,o=this&&this.__extends||(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])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this.m_actionInfo=e,this.m_operationType=t,this.m_flags=n}return Object.defineProperty(e.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"operationType",{get:function(){return this.m_operationType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this.m_flags},enumerable:!0,configurable:!0}),e}();t.Action=i;var a=function(){function e(e){this.m_callback=e}return e.prototype._handleResult=function(e){this.m_callback&&this.m_callback()},e}(),s=function(){function e(){}return e.createSetPropertyAction=function(e,t,n,r,o){G.validateObjectPath(t);var a={Id:e._nextId(),ActionType:4,Name:n,ObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[r],c=G.setMethodArguments(e,a.ArgumentInfo,s);G.validateReferencedObjectPaths(c),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath),e._pendingRequest.ensureInstantiateObjectPaths(c);var u=new i(a,0,o);return e._pendingRequest.addAction(u),e._pendingRequest.addReferencedObjectPath(t._objectPath),e._pendingRequest.addReferencedObjectPaths(c),u.referencedObjectPath=t._objectPath,u.referencedArgumentObjectPaths=c,u},e.createMethodAction=function(e,t,n,r,o,a){G.validateObjectPath(t);var s={Id:e._nextId(),ActionType:3,Name:n,ObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},c=G.setMethodArguments(e,s.ArgumentInfo,o);G.validateReferencedObjectPaths(c),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath),e._pendingRequest.ensureInstantiateObjectPaths(c);var u=new i(s,r,G._fixupApiFlags(a));return e._pendingRequest.addAction(u),e._pendingRequest.addReferencedObjectPath(t._objectPath),e._pendingRequest.addReferencedObjectPaths(c),u.referencedObjectPath=t._objectPath,u.referencedArgumentObjectPaths=c,u},e.createQueryAction=function(e,t,n){G.validateObjectPath(t),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath);var r={Id:e._nextId(),ActionType:2,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id};r.QueryInfo=n;var o=new i(r,1,4);return e._pendingRequest.addAction(o),e._pendingRequest.addReferencedObjectPath(t._objectPath),o.referencedObjectPath=t._objectPath,o},e.createRecursiveQueryAction=function(e,t,n){G.validateObjectPath(t),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath);var r={Id:e._nextId(),ActionType:6,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,RecursiveQueryInfo:n},o=new i(r,1,4);return e._pendingRequest.addAction(o),e._pendingRequest.addReferencedObjectPath(t._objectPath),o.referencedObjectPath=t._objectPath,o},e.createQueryAsJsonAction=function(e,t,n){G.validateObjectPath(t),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath);var r={Id:e._nextId(),ActionType:7,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id};r.QueryInfo=n;var o=new i(r,1,4);return e._pendingRequest.addAction(o),e._pendingRequest.addReferencedObjectPath(t._objectPath),o.referencedObjectPath=t._objectPath,o},e.createEnsureUnchangedAction=function(e,t,n){G.validateObjectPath(t),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath);var r={Id:e._nextId(),ActionType:8,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},o=new i(r,1,4);return e._pendingRequest.addAction(o),e._pendingRequest.addReferencedObjectPath(t._objectPath),o.referencedObjectPath=t._objectPath,o},e.createUpdateAction=function(e,t,n){G.validateObjectPath(t),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath);var r={Id:e._nextId(),ActionType:9,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id,ObjectState:n},o=new i(r,0,0);return e._pendingRequest.addAction(o),e._pendingRequest.addReferencedObjectPath(t._objectPath),o.referencedObjectPath=t._objectPath,o},e.createInstantiateAction=function(e,t){G.validateObjectPath(t),e._pendingRequest.ensureInstantiateObjectPath(t._objectPath.parentObjectPath),e._pendingRequest.ensureInstantiateObjectPaths(t._objectPath.argumentObjectPaths);var n={Id:e._nextId(),ActionType:1,Name:"",ObjectPathId:t._objectPath.objectPathInfo.Id},r=new i(n,1,4);return r.referencedObjectPath=t._objectPath,e._pendingRequest.addAction(r),e._pendingRequest.addReferencedObjectPath(t._objectPath),e._pendingRequest.addActionResultHandler(r,new x(t)),r},e.createTraceAction=function(e,t,n){var r={Id:e._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},o=new i(r,1,4);return e._pendingRequest.addAction(o),n&&e._pendingRequest.addTrace(r.Id,t),o},e.createTraceMarkerForCallback=function(t,n){var r=e.createTraceAction(t,null,!1);t._pendingRequest.addActionResultHandler(r,new a(n))},e}();t.ActionFactory=s;var c=function(){function e(e,t){G.checkArgumentNull(e,"context"),this.m_context=e,this.m_objectPath=t,this.m_objectPath&&(e._processingResult||(s.createInstantiateAction(e,this),e._autoCleanup&&this._KeepReference&&e.trackedObjects._autoAdd(this)))}return Object.defineProperty(e.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(e){this.m_objectPath=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isNull",{get:function(){return G.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isNullObject",{get:function(){return G.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(e){this.m_isNull=e,e&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this._isNull=G.isNullOrUndefined(e),this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,e)},e.prototype._handleIdResult=function(e){this._isNull=G.isNullOrUndefined(e),G.fixObjectPathIfNecessary(this,e),this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,e)},e.prototype._handleRetrieveResult=function(e,t){this._handleIdResult(e)},e.prototype._recursivelySet=function(t,n,r,o,i){var a=t instanceof e,s=t;if(a){if(Object.getPrototypeOf(this)!==Object.getPrototypeOf(t))throw O.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});t=JSON.parse(JSON.stringify(t))}try{for(var c,u=0;u<r.length;u++)c=r[u],t.hasOwnProperty(c)&&void 0!==t[c]&&(this[c]=t[c]);for(u=0;u<o.length;u++)if(c=o[u],t.hasOwnProperty(c)&&void 0!==t[c]){var l=a?s[c]:t[c];this[c].set(l,n)}var d=!a;n&&!G.isNullOrUndefined(d)&&(d=n.throwOnReadOnly);for(u=0;u<i.length;u++)if(c=i[u],t.hasOwnProperty(c)&&void 0!==t[c]&&d)throw new O.RuntimeError({code:j.invalidArgument,message:G._getResourceString(J.cannotApplyPropertyThroughSetMethod,c),debugInfo:{errorLocation:c}});for(c in t)if(r.indexOf(c)<0&&o.indexOf(c)<0){var f=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),c);if(!f)throw new O.RuntimeError({code:j.invalidArgument,message:G._getResourceString(J.propertyDoesNotExist,c),debugInfo:{errorLocation:c}});if(d&&!f.set)throw new O.RuntimeError({code:j.invalidArgument,message:G._getResourceString(J.attemptingToSetReadOnlyProperty,c),debugInfo:{errorLocation:c}})}}catch(e){throw new O.RuntimeError({code:j.invalidArgument,message:G._getResourceString(J.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".set"},innerError:e})}},e.prototype._recursivelyUpdate=function(e){var n=t._internalConfig.alwaysPolyfillClientObjectUpdateMethod;n||(n=!G.isSetSupported("RichApiRuntime","1.2"));try{var r=this[p.scalarPropertyNames];r||(r=[]);var o=this[p.scalarPropertyUpdateable];if(!o){o=[];for(var i=0;i<r.length;i++)o.push(!1)}var a=this[p.navigationPropertyNames];a||(a=[]);var c={},u={},l=0;for(var d in e){var f=r.indexOf(d);if(f>=0){if(!o[f])throw new O.RuntimeError({code:j.invalidArgument,message:G._getResourceString(J.attemptingToSetReadOnlyProperty,d),debugInfo:{errorLocation:d}});c[d]=e[d],++l}else{if(!(a.indexOf(d)>=0))throw new O.RuntimeError({code:j.invalidArgument,message:G._getResourceString(J.propertyDoesNotExist,d),debugInfo:{errorLocation:d}});u[d]=e[d]}}if(l>0)if(n)for(i=0;i<r.length;i++){var h=c[d=r[i]];G.isUndefined(h)||s.createSetPropertyAction(this.context,this,d,h)}else s.createUpdateAction(this.context,this,c);for(var d in u){var m=this[d],g=u[d];m._recursivelyUpdate(g)}}catch(e){throw new O.RuntimeError({code:j.invalidArgument,message:G._getResourceString(J.invalidArgument,"properties"),debugInfo:{errorLocation:this._className+".update"},innerError:e})}},e}();t.ClientObject=c;var u=function(){function e(e){this.m_context=e,this.m_actions=[],this.m_actionResultHandler={},this.m_referencedObjectPaths={},this.m_instantiatedObjectPaths={},this.m_traceInfos={},this.m_pendingProcessEventHandlers=[],this.m_pendingEventHandlerActions={},this.m_responseTraceIds={},this.m_responseTraceMessages=[],this.m_preSyncPromises=[]}return Object.defineProperty(e.prototype,"traceInfos",{get:function(){return this.m_traceInfos},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_responseTraceMessages",{get:function(){return this.m_responseTraceMessages},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_responseTraceIds",{get:function(){return this.m_responseTraceIds},enumerable:!0,configurable:!0}),e.prototype._setResponseTraceIds=function(e){if(e)for(var t=0;t<e.length;t++){var n=e[t];this.m_responseTraceIds[n]=n;var r=this.m_traceInfos[n];G.isNullOrUndefined(r)||this.m_responseTraceMessages.push(r)}},e.prototype.addAction=function(e){if(1===this.m_context.batchMode){var t=!1;1===e.actionInfo.ActionType&&4===e.referencedObjectPath.objectPathInfo.ObjectPathType&&(t=!0),t||this.m_context.ensureInProgressBatchIfBatchMode()}this.m_actions.push(e),1==e.actionInfo.ActionType&&(this.m_instantiatedObjectPaths[e.actionInfo.ObjectPathId]=e)},Object.defineProperty(e.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),e.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},e.prototype.addTrace=function(e,t){this.m_traceInfos[e]=t},e.prototype.ensureInstantiateObjectPath=function(e){if(e){if(this.m_instantiatedObjectPaths[e.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(e.parentObjectPath),this.ensureInstantiateObjectPaths(e.argumentObjectPaths),!this.m_instantiatedObjectPaths[e.objectPathInfo.Id]){var t={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:e.objectPathInfo.Id},n=new i(t,1,4);n.referencedObjectPath=e,this.addReferencedObjectPath(e),this.addAction(n)}}},e.prototype.ensureInstantiateObjectPaths=function(e){if(e)for(var t=0;t<e.length;t++)this.ensureInstantiateObjectPath(e[t])},e.prototype.addReferencedObjectPath=function(e){if(!this.m_referencedObjectPaths[e.objectPathInfo.Id]){if(!e.isValid)throw new O.RuntimeError({code:j.invalidObjectPath,message:G._getResourceString(J.invalidObjectPath,G.getObjectPathExpression(e)),debugInfo:{errorLocation:G.getObjectPathExpression(e)}});for(;e;)this.m_referencedObjectPaths[e.objectPathInfo.Id]=e,3==e.objectPathInfo.ObjectPathType&&this.addReferencedObjectPaths(e.argumentObjectPaths),e=e.parentObjectPath}},e.prototype.addReferencedObjectPaths=function(e){if(e)for(var t=0;t<e.length;t++)this.addReferencedObjectPath(e[t])},e.prototype.addActionResultHandler=function(e,t){this.m_actionResultHandler[e.actionInfo.Id]=t},e.prototype.aggregrateRequestFlags=function(e,t,n){return 0===t&&(e|=1,0==(2&n)&&(e&=-17),e&=-5),1&n&&(e|=2),0==(4&n)&&(e&=-5),e},e.prototype.finallyNormalizeFlags=function(e){return 0==(1&e)&&(e&=-17),t._internalConfig.enableConcurrentFlag||(e&=-5),t._internalConfig.enableUndoableFlag||(e&=-17),G.isSetSupported("RichApiRuntimeFlag","1.1")||(e&=-5,e&=-17),"number"==typeof this.m_flagsForTesting&&(e=this.m_flagsForTesting),e},e.prototype.buildRequestMessageBodyAndRequestFlags=function(){t._internalConfig.enableEarlyDispose&&e._calculateLastUsedObjectPathIds(this.m_actions);var n=20,r={};for(var o in this.m_referencedObjectPaths)n=this.aggregrateRequestFlags(n,this.m_referencedObjectPaths[o].operationType,this.m_referencedObjectPaths[o].flags),r[o]=this.m_referencedObjectPaths[o].objectPathInfo;for(var i=[],a=!1,s=0;s<this.m_actions.length;s++){var c=this.m_actions[s];3===c.actionInfo.ActionType&&c.actionInfo.Name===p.keepReference&&(a=!0),n=this.aggregrateRequestFlags(n,c.operationType,c.flags),i.push(c.actionInfo)}return n=this.finallyNormalizeFlags(n),{body:{AutoKeepReference:this.m_context._autoCleanup&&a,Actions:i,ObjectPaths:r},flags:n}},e.prototype.processResponse=function(e){if(e)for(var t=0;t<e.length;t++){var n=e[t],r=this.m_actionResultHandler[n.ActionId];r&&r._handleResult(n.Value)}},e.prototype.invalidatePendingInvalidObjectPaths=function(){for(var e in this.m_referencedObjectPaths)this.m_referencedObjectPaths[e].isInvalidAfterRequest&&(this.m_referencedObjectPaths[e].isValid=!1)},e.prototype._addPendingEventHandlerAction=function(e,t){this.m_pendingEventHandlerActions[e._id]||(this.m_pendingEventHandlerActions[e._id]=[],this.m_pendingProcessEventHandlers.push(e)),this.m_pendingEventHandlerActions[e._id].push(t)},Object.defineProperty(e.prototype,"_pendingProcessEventHandlers",{get:function(){return this.m_pendingProcessEventHandlers},enumerable:!0,configurable:!0}),e.prototype._getPendingEventHandlerActions=function(e){return this.m_pendingEventHandlerActions[e._id]},e.prototype._addPreSyncPromise=function(e){this.m_preSyncPromises.push(e)},Object.defineProperty(e.prototype,"_preSyncPromises",{get:function(){return this.m_preSyncPromises},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_actions",{get:function(){return this.m_actions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_objectPaths",{get:function(){return this.m_referencedObjectPaths},enumerable:!0,configurable:!0}),e.prototype._removeKeepReferenceAction=function(e){for(var t=this.m_actions.length-1;t>=0;t--){var n=this.m_actions[t].actionInfo;if(n.ObjectPathId===e&&3===n.ActionType&&n.Name===p.keepReference){this.m_actions.splice(t);break}}},e._updateLastUsedActionIdOfObjectPathId=function(t,n,r){for(;n;){if(t[n.objectPathInfo.Id])return;t[n.objectPathInfo.Id]=r;var o=n.argumentObjectPaths;if(o)for(var i=o.length,a=0;a<i;a++)e._updateLastUsedActionIdOfObjectPathId(t,o[a],r);n=n.parentObjectPath}},e._calculateLastUsedObjectPathIds=function(t){for(var n={},r=t.length,o=r-1;o>=0;--o){var i=(f=t[o]).actionInfo.Id;f.referencedObjectPath&&e._updateLastUsedActionIdOfObjectPathId(n,f.referencedObjectPath,i);var a=f.referencedArgumentObjectPaths;if(a)for(var s=a.length,c=0;c<s;c++)e._updateLastUsedActionIdOfObjectPathId(n,a[c],i)}var u={};for(var l in n){var d=u[i=n[l]];d||(d=[],u[i]=d),d.push(parseInt(l))}for(o=0;o<r;o++){var f,h=u[(f=t[o]).actionInfo.Id];h&&h.length>0?f.actionInfo.L=h:f.actionInfo.L&&delete f.actionInfo.L}},e}();t.ClientRequest=u,t._internalConfig={showDisposeInfoInDebugInfo:!1,showInternalApiInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectUpdateMethod:!1,alwaysPolyfillClientObjectRetrieveMethod:!1,enableConcurrentFlag:!0,enableUndoableFlag:!0},t.config={extendedErrorLogging:!1};var l=function(){function e(){}return e.prototype._resolveRequestUrlAndHeaderInfo=function(){return G._createPromiseFromResult(null)},e.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(e.prototype,"eventRegistration",{get:function(){return O.officeJsEventRegistration},enumerable:!0,configurable:!0}),e}();t.SessionBase=l;var d=function(){function e(t){if(this.m_customRequestHeaders={},this.m_batchMode=0,this._onRunFinishedNotifiers=[],this.m_nextId=0,e._overrideSession)this.m_requestUrlAndHeaderInfoResolver=e._overrideSession;else if((G.isNullOrUndefined(t)||"string"==typeof t&&0===t.length)&&((t=e.defaultRequestUrlAndHeaders)||(t={url:p.localDocument,headers:{}})),"string"==typeof t)this.m_requestUrlAndHeaderInfo={url:t,headers:{}};else if(e.isRequestUrlAndHeaderInfoResolver(t))this.m_requestUrlAndHeaderInfoResolver=t;else{if(!e.isRequestUrlAndHeaderInfo(t))throw O.RuntimeError._createInvalidArgError({argumentName:"url"});var n=t;this.m_requestUrlAndHeaderInfo={url:n.url,headers:{}},G._copyHeaders(n.headers,this.m_requestUrlAndHeaderInfo.headers)}this.m_requestUrlAndHeaderInfoResolver instanceof l&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver),this._processingResult=!1,this._customData=p.iterativeExecutor,this.sync=this.sync.bind(this)}return Object.defineProperty(e.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:O.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_pendingRequest",{get:function(){return null==this.m_pendingRequest&&(this.m_pendingRequest=new u(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"debugInfo",{get:function(){return{pendingStatements:new B(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,t._internalConfig.showDisposeInfoInDebugInfo).process()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new D(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batchMode",{get:function(){return this.m_batchMode},enumerable:!0,configurable:!0}),e.prototype.ensureInProgressBatchIfBatchMode=function(){if(1===this.m_batchMode&&!this.m_explicitBatchInProgress)throw G.createRuntimeError(j.generalException,G._getResourceString(J.notInsideBatch),null)},e.prototype.load=function(t,n){G.validateContext(this,t);var r=e._parseQueryOption(n),o=s.createQueryAction(this,t,r);this._pendingRequest.addActionResultHandler(o,t)},e.isLoadOption=function(e){if(!G.isUndefined(e.select)&&("string"==typeof e.select||Array.isArray(e.select)))return!0;if(!G.isUndefined(e.expand)&&("string"==typeof e.expand||Array.isArray(e.expand)))return!0;if(!G.isUndefined(e.top)&&"number"==typeof e.top)return!0;if(!G.isUndefined(e.skip)&&"number"==typeof e.skip)return!0;for(var t in e)return!1;return!0},e.parseStrictLoadOption=function(t){var n={Select:[]};return e.parseStrictLoadOptionHelper(n,"","option",t),n},e.combineQueryPath=function(e,t,n){return 0===e.length?t:e+n+t},e.parseStrictLoadOptionHelper=function(t,n,r,o){for(var i in o){var a=o[i];if("$all"===i){if("boolean"!=typeof a)throw O.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,i,".")});a&&t.Select.push(e.combineQueryPath(n,"*","/"))}else if("$top"===i){if("number"!=typeof a||n.length>0)throw O.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,i,".")});t.Top=a}else if("$skip"===i){if("number"!=typeof a||n.length>0)throw O.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,i,".")});t.Skip=a}else if("boolean"==typeof a)a&&t.Select.push(e.combineQueryPath(n,i,"/"));else{if("object"!=typeof a)throw O.RuntimeError._createInvalidArgError({argumentName:e.combineQueryPath(r,i,".")});e.parseStrictLoadOptionHelper(t,e.combineQueryPath(n,i,"/"),e.combineQueryPath(r,i,"."),a)}}},e._parseQueryOption=function(t){var n={};if("string"==typeof t){var r=t;n.Select=G._parseSelectExpand(r)}else if(Array.isArray(t))n.Select=t;else if("object"==typeof t){var o=t;if(e.isLoadOption(o)){if("string"==typeof o.select)n.Select=G._parseSelectExpand(o.select);else if(Array.isArray(o.select))n.Select=o.select;else if(!G.isNullOrUndefined(o.select))throw O.RuntimeError._createInvalidArgError({argumentName:"option.select"});if("string"==typeof o.expand)n.Expand=G._parseSelectExpand(o.expand);else if(Array.isArray(o.expand))n.Expand=o.expand;else if(!G.isNullOrUndefined(o.expand))throw O.RuntimeError._createInvalidArgError({argumentName:"option.expand"});if("number"==typeof o.top)n.Top=o.top;else if(!G.isNullOrUndefined(o.top))throw O.RuntimeError._createInvalidArgError({argumentName:"option.top"});if("number"==typeof o.skip)n.Skip=o.skip;else if(!G.isNullOrUndefined(o.skip))throw O.RuntimeError._createInvalidArgError({argumentName:"option.skip"})}else n=e.parseStrictLoadOption(t)}else if(!G.isNullOrUndefined(t))throw O.RuntimeError._createInvalidArgError({argumentName:"option"});return n},e.prototype.loadRecursive=function(t,n,r){if(!G.isPlainJsonObject(n))throw O.RuntimeError._createInvalidArgError({argumentName:"options"});var o={};for(var i in n)o[i]=e._parseQueryOption(n[i]);var a=s.createRecursiveQueryAction(this,t,{Queries:o,MaxDepth:r});this._pendingRequest.addActionResultHandler(a,t)},e.prototype.trace=function(e){s.createTraceAction(this,e,!0)},e.prototype._processOfficeJsErrorResponse=function(e,t){},e.prototype.ensureRequestUrlAndHeaderInfo=function(){var e=this;return G._createPromiseFromResult(null).then((function(){if(!e.m_requestUrlAndHeaderInfo)return e.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then((function(t){if(e.m_requestUrlAndHeaderInfo=t,e.m_requestUrlAndHeaderInfo||(e.m_requestUrlAndHeaderInfo={url:p.localDocument,headers:{}}),G.isNullOrEmptyString(e.m_requestUrlAndHeaderInfo.url)&&(e.m_requestUrlAndHeaderInfo.url=p.localDocument),e.m_requestUrlAndHeaderInfo.headers||(e.m_requestUrlAndHeaderInfo.headers={}),"function"==typeof e.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull){var n=e.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();n&&(e._requestExecutor=n)}}))}))},e.prototype.syncPrivateMain=function(){var e=this;return this.ensureRequestUrlAndHeaderInfo().then((function(){var t=e._pendingRequest;return e.m_pendingRequest=null,e.processPreSyncPromises(t).then((function(){return e.syncPrivate(t)}))}))},e.prototype.syncPrivate=function(e){var t=this;if(!e.hasActions)return this.processPendingEventHandlers(e);var n=e.buildRequestMessageBodyAndRequestFlags(),r=n.body,o=n.flags;this._requestExecutor||(G._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?this._requestExecutor=new U(this):this._requestExecutor=new N);var i=this._requestExecutor,a={};G._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,a),G._copyHeaders(this.m_customRequestHeaders,a);var s={Url:this.m_requestUrlAndHeaderInfo.url,Headers:a,Body:r};e.invalidatePendingInvalidObjectPaths();var c=null,u=null;return this._lastSyncStart="undefined"==typeof performance?0:performance.now(),this._lastRequestFlags=o,i.executeAsync(this._customData,o,s).then((function(n){return t._lastSyncEnd="undefined"==typeof performance?0:performance.now(),c=t.processRequestExecutorResponseMessage(e,n),t.processPendingEventHandlers(e).catch((function(e){G.log("Error in processPendingEventHandlers"),G.log(JSON.stringify(e)),u=e}))})).then((function(){if(c)throw G.log("Throw error from response: "+JSON.stringify(c)),c;if(u){G.log("Throw error from ProcessEventHandler: "+JSON.stringify(u));var t=null;if(u instanceof O.RuntimeError)(t=u).traceMessages=e._responseTraceMessages;else{var n=null;n="string"==typeof u?u:u.message,G.isNullOrEmptyString(n)&&(n=G._getResourceString(J.cannotRegisterEvent)),t=new O.RuntimeError({code:j.cannotRegisterEvent,message:n,traceMessages:e._responseTraceMessages})}throw t}}))},e.prototype.processRequestExecutorResponseMessage=function(e,n){n.Body&&n.Body.TraceIds&&e._setResponseTraceIds(n.Body.TraceIds);var r=e._responseTraceMessages,o=null;if(n.Body){if(n.Body.Error&&n.Body.Error.ActionIndex>=0){var i=new B(this._rootObjectPropertyName,e._objectPaths,e._actions,!1,!0),a=i.processForDebugStatementInfo(n.Body.Error.ActionIndex);o={statement:a.statement,surroundingStatements:a.surroundingStatements,fullStatements:["Please enable config.extendedErrorLogging to see full statements."]},t.config.extendedErrorLogging&&(i=new B(this._rootObjectPropertyName,e._objectPaths,e._actions,!1,!1),o.fullStatements=i.process())}var s=null;if(n.Body.Results?s=n.Body.Results:n.Body.ProcessedResults&&n.Body.ProcessedResults.Results&&(s=n.Body.ProcessedResults.Results),s){this._processingResult=!0;try{e.processResponse(s)}finally{this._processingResult=!1}}}if(!G.isNullOrEmptyString(n.ErrorCode))return new O.RuntimeError({code:n.ErrorCode,message:n.ErrorMessage,traceMessages:r});if(n.Body&&n.Body.Error){var c={errorLocation:n.Body.Error.Location};return o&&(c.statement=o.statement,c.surroundingStatements=o.surroundingStatements,c.fullStatements=o.fullStatements),new O.RuntimeError({code:n.Body.Error.Code,message:n.Body.Error.Message,traceMessages:r,debugInfo:c})}return null},e.prototype.processPendingEventHandlers=function(e){for(var t=G._createPromiseFromResult(null),n=0;n<e._pendingProcessEventHandlers.length;n++){var r=e._pendingProcessEventHandlers[n];t=t.then(this.createProcessOneEventHandlersFunc(r,e))}return t},e.prototype.createProcessOneEventHandlersFunc=function(e,t){return function(){return e._processRegistration(t)}},e.prototype.processPreSyncPromises=function(e){for(var t=G._createPromiseFromResult(null),n=0;n<e._preSyncPromises.length;n++){var r=e._preSyncPromises[n];t=t.then(this.createProcessOneProSyncFunc(r))}return t},e.prototype.createProcessOneProSyncFunc=function(e){return function(){return e}},e.prototype.sync=function(e){return this.syncPrivateMain().then((function(){return e}))},e.prototype.batch=function(e){var t=this;if(1!==this.m_batchMode)return m.Promise.reject(G.createRuntimeError(j.generalException,null,null));if(this.m_explicitBatchInProgress)return m.Promise.reject(G.createRuntimeError(j.generalException,G._getResourceString(J.pendingBatchInProgress),null));if(G.isNullOrUndefined(e))return G._createPromiseFromResult(null);this.m_explicitBatchInProgress=!0;var n,r,o,i=this.m_pendingRequest;this.m_pendingRequest=new u(this);try{n=e(this._rootObject,this)}catch(e){return this.m_explicitBatchInProgress=!1,this.m_pendingRequest=i,m.Promise.reject(e)}return"object"==typeof n&&n&&"function"==typeof n.then?o=G._createPromiseFromResult(null).then((function(){return n})).then((function(e){return t.m_explicitBatchInProgress=!1,r=t.m_pendingRequest,t.m_pendingRequest=i,e})).catch((function(e){return t.m_explicitBatchInProgress=!1,r=t.m_pendingRequest,t.m_pendingRequest=i,m.Promise.reject(e)})):(this.m_explicitBatchInProgress=!1,r=this.m_pendingRequest,this.m_pendingRequest=i,o=G._createPromiseFromResult(n)),o.then((function(e){return t.ensureRequestUrlAndHeaderInfo().then((function(){return t.syncPrivate(r)})).then((function(){return e}))}))},e._run=function(t,n,r,o,i,a){return void 0===r&&(r=3),void 0===o&&(o=5e3),e._runCommon("run",null,t,0,n,r,o,i,a)},e.isRequestUrlAndHeaderInfo=function(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})&&!G.isNullOrUndefined(e.url)},e.isRequestUrlAndHeaderInfoResolver=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e._resolveRequestUrlAndHeaderInfo},e._runBatch=function(t,n,r,o,i,a,s){return void 0===o&&(o=3),void 0===i&&(i=5e3),e._runBatchCommon(0,t,n,r,o,i,a,s)},e._runExplicitBatch=function(t,n,r,o,i,a,s){return void 0===o&&(o=3),void 0===i&&(i=5e3),e._runBatchCommon(1,t,n,r,o,i,a,s)},e._runBatchCommon=function(t,n,r,o,i,a,s,u){var l,d;void 0===i&&(i=3),void 0===a&&(a=5e3);var f=null,h=0;if(r.length>0&&("string"==typeof r[0]||e.isRequestUrlAndHeaderInfo(r[0])||e.isRequestUrlAndHeaderInfoResolver(r[0]))&&(f=r[0],h=1),r.length==h+1)l=o,d=r[h+0];else{if(r.length!=h+2)return e.createErrorPromise(n);if(G.isNullOrUndefined(r[h+0]))l=o;else if(r[h+0]instanceof c)l=function(){return r[h+0].context};else if(r[h+0]instanceof e)l=function(){return r[h+0]};else{if(!Array.isArray(r[h+0]))return e.createErrorPromise(n);var p=r[h+0];if(0==p.length)return e.createErrorPromise(n);for(var m=0;m<p.length;m++){if(!(p[m]instanceof c))return e.createErrorPromise(n);if(p[m].context!=p[0].context)return e.createErrorPromise(n,J.invalidRequestContext)}l=function(){return p[0].context}}d=r[h+1]}return e._runCommon(n,f,l,t,d,i,a,s,u)},e.createErrorPromise=function(e,t){return void 0===t&&(t=J.invalidArgument),m.Promise.reject(G.createRuntimeError(t,G._getResourceString(t),e))},e._runCommon=function(t,n,r,o,i,a,s,c,l){e._overrideSession&&(n=e._overrideSession);var d,f,h,p=new m.Promise((function(e,t){e()})),g=!1;return p.then((function(){if((d=r(n))._autoCleanup)return new m.Promise((function(e,t){d._onRunFinishedNotifiers.push((function(){d._autoCleanup=!0,e()}))}));d._autoCleanup=!0})).then((function(){return"function"!=typeof i?e.createErrorPromise(t):(h=d.m_batchMode,d.m_batchMode=o,n=i(1==o?d.batch.bind(d):d),(G.isNullOrUndefined(n)||"function"!=typeof n.then)&&G.throwError(J.runMustReturnPromise),n);var n})).then((function(e){return 1===o?e:d.sync(e)})).then((function(e){g=!0,f=e})).catch((function(e){f=e})).then((function(){var t=d.trackedObjects._retrieveAndClearAutoCleanupList();for(var r in d._autoCleanup=!1,d.m_batchMode=h,t)t[r]._objectPath.isValid=!1;var o=0;if(G._synchronousCleanup||e.isRequestUrlAndHeaderInfoResolver(n))return i();function i(){o++;var e=d.m_pendingRequest,n=d.m_batchMode,r=new u(d);d.m_pendingRequest=r,d.m_batchMode=0;try{for(var f in t)d.trackedObjects.remove(t[f])}finally{d.m_batchMode=n,d.m_pendingRequest=e}return d.syncPrivate(r).then((function(){c&&c(o)})).catch((function(){l&&l(o),o<a&&setTimeout((function(){i()}),s)}))}i()})).then((function(){d._onRunFinishedNotifiers&&d._onRunFinishedNotifiers.length>0&&d._onRunFinishedNotifiers.shift()();if(g)return f;throw f}))},e.prototype._nextId=function(){return++this.m_nextId},e}();t.ClientRequestContext=d;var f=function(){function e(e){this.m_type=e}return Object.defineProperty(e.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new O.RuntimeError({code:j.valueNotLoaded,message:G._getResourceString(J.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),e.prototype._handleResult=function(e){this.m_isLoaded=!0,"object"==typeof e&&e&&e._IsNull||(1===this.m_type?this.m_value=G.adjustToDateTime(e):this.m_value=e)},e}();t.ClientResult=f;var h=function(){function e(e,t){this.m_proxy=e,this.m_shouldPolyfill=t;var n=e[p.scalarPropertyNames],r=e[p.navigationPropertyNames],o=e[p.className],i=e[p.isCollection];if(n)for(var a=0;a<n.length;a++)G.definePropertyThrowUnloadedException(this,o,n[a]);if(r)for(a=0;a<r.length;a++)G.definePropertyThrowUnloadedException(this,o,r[a]);i&&G.definePropertyThrowUnloadedException(this,o,p.itemsLowerCase)}return Object.defineProperty(e.prototype,"$proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$isNullObject",{get:function(){if(!this.m_isLoaded)throw new O.RuntimeError({code:j.valueNotLoaded,message:G._getResourceString(J.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.$isNullObject"}});return this.m_isNullObject},enumerable:!0,configurable:!0}),e.prototype.toJSON=function(){if(this.m_isLoaded)return this.m_isNullObject?null:(G.isUndefined(this.m_json)&&(this.m_json=this.purifyJson(this.m_value)),this.m_json)},e.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.prototype._handleResult=function(e){this.m_isLoaded=!0,null===e||"object"==typeof e&&e&&e._IsNull?(this.m_isNullObject=!0,e=null):this.m_isNullObject=!1,this.m_shouldPolyfill&&(e=this.changePropertyNameToCamelLowerCase(e)),this.m_value=e,this.m_proxy._handleRetrieveResult(e,this)},e.prototype.changePropertyNameToCamelLowerCase=function(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(this.changePropertyNameToCamelLowerCase(e[n]));return t}if("object"==typeof e&&null!==e){t={};for(var r in e){var o=e[r];if(r===p.items){(t={})[p.itemsLowerCase]=this.changePropertyNameToCamelLowerCase(o);break}t[G._toCamelLowerCase(r)]=this.changePropertyNameToCamelLowerCase(o)}return t}return e},e.prototype.purifyJson=function(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(this.purifyJson(e[n]));return t}if("object"==typeof e&&null!==e){t={};for(var r in e)if(95!==r.charCodeAt(0)){var o=e[r];"object"==typeof o&&null!==o&&Array.isArray(o.items)&&(o=o.items),t[r]=this.purifyJson(o)}return t}return e},e}();t.RetrieveResultImpl=h;var p=function(){function e(){}return e.flags="flags",e.getItemAt="GetItemAt",e.id="Id",e.idLowerCase="id",e.idPrivate="_Id",e.index="_Index",e.items="_Items",e.iterativeExecutor="IterativeExecutor",e.localDocument="http://document.localhost/",e.localDocumentApiPrefix="http://document.localhost/_api/",e.keepReference="_KeepReference",e.objectPathIdPrivate="_ObjectPathId",e.processQuery="ProcessQuery",e.referenceId="_ReferenceId",e.isTracked="_IsTracked",e.sourceLibHeader="SdkVersion",e.sessionContext="sc",e.embeddingPageOrigin="EmbeddingPageOrigin",e.embeddingPageSessionInfo="EmbeddingPageSessionInfo",e.eventMessageCategory=65536,e.eventWorkbookId="Workbook",e.eventSourceRemote="Remote",e.itemsLowerCase="items",e.proxy="$proxy",e.scalarPropertyNames="_scalarPropertyNames",e.navigationPropertyNames="_navigationPropertyNames",e.className="_className",e.isCollection="_isCollection",e.scalarPropertyUpdateable="_scalarPropertyUpdateable",e.collectionPropertyPath="_collectionPropertyPath",e.objectPathInfoDoNotKeepReferenceFieldName="D",e}();t.Constants=p;var m=function(){function e(){}return Object.defineProperty(e,"Promise",{get:function(){if(void 0!==t.Promise)return t.Promise;if("undefined"!=typeof Office&&Office.Promise)return Office.Promise;if("undefined"!=typeof OfficeExtension&&OfficeExtension.Promise)return OfficeExtension.Promise;throw new t.Error("No Promise implementation found")},enumerable:!0,configurable:!0}),e}();t.CoreUtility=m;var g,y,b=1,_=function(e){return e.DdaMethod.Version=b,e},v=function(e){return b=e.Version,e.Error&&(e.error={},e.error.Code=e.Error),e};!function(e){e[e.Success=0]="Success",e[e.Timeout=1]="Timeout",e[e.InternalError=5001]="InternalError"}(g||(g={})),function(e){e.SendingId="sId",e.RespondingId="rId",e.CommandKey="command",e.SessionInfoKey="sessionInfo",e.ParamsKey="params",e.ApiReadyCommand="apiready",e.ExecuteMethodCommand="executeMethod",e.GetAppContextCommand="getAppContext",e.RegisterEventCommand="registerEvent",e.UnregisterEventCommand="unregisterEvent",e.FireEventCommand="fireEvent"}(y||(y={}));var P=function(e){function t(t,n){var r=e.call(this)||this;return r.m_chosenWindow=null,r.m_chosenOrigin=null,r.m_enabled=!0,r.m_onMessageHandler=r._onMessage.bind(r),r.m_callbackList={},r.m_id=0,r.m_timeoutId=-1,r.m_appContext=null,r.m_url=t,r.m_options=n,r.m_options||(r.m_options={sessionKey:Math.random().toString()}),r.m_options.sessionKey||(r.m_options.sessionKey=Math.random().toString()),r.m_options.container||(r.m_options.container=document.body),r.m_options.timeoutInMilliseconds||(r.m_options.timeoutInMilliseconds=6e4),r.m_options.height||(r.m_options.height="400px"),r.m_options.width||(r.m_options.width="100%"),r.m_options.webApplication&&r.m_options.webApplication.accessToken&&r.m_options.webApplication.accessTokenTtl||(r.m_options.webApplication=null),r}return o(t,e),t.prototype._getIFrameSrc=function(){var e=window.location.protocol+"//"+window.location.host,t=p.embeddingPageOrigin+"="+encodeURIComponent(e)+"&"+p.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),n=!1;(this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0||this.m_url.toLowerCase().indexOf("/_layouts/15/preauth.aspx")>0)&&(n=!0);var r=document.createElement("a");if(r.href=this.m_url,this.m_options.webApplication){var o=p.embeddingPageOrigin+"="+e+"&"+p.embeddingPageSessionInfo+"="+this.m_options.sessionKey;0===r.search.length||"?"===r.search?r.search="?"+p.sessionContext+"="+encodeURIComponent(o):r.search=r.search+"&"+p.sessionContext+"="+encodeURIComponent(o)}else n?0===r.hash.length||"#"===r.hash?r.hash="#"+t:r.hash=r.hash+"&"+t:0===r.search.length||"?"===r.search?r.search="?"+t:r.search=r.search+"&"+t;return r.href},t.prototype.init=function(){var e=this;window.addEventListener("message",this.m_onMessageHandler);var t=this._getIFrameSrc();return new m.Promise((function(n,r){var o=document.createElement("iframe");if(e.m_options.id&&(o.id=e.m_options.id,o.name=e.m_options.id),o.style.height=e.m_options.height,o.style.width=e.m_options.width,e.m_options.webApplication){var i=document.createElement("form");i.setAttribute("action",t),i.setAttribute("method","post"),i.setAttribute("target",o.name),e.m_options.container.appendChild(i);var a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name","access_token"),a.setAttribute("value",e.m_options.webApplication.accessToken),i.appendChild(a);var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name","access_token_ttl"),s.setAttribute("value",e.m_options.webApplication.accessTokenTtl),i.appendChild(s),e.m_options.container.appendChild(o),i.submit()}else o.src=t,e.m_options.container.appendChild(o);e.m_timeoutId=setTimeout((function(){e.close();var t=G.createRuntimeError(j.timeout,G._getResourceString(J.timeout),"EmbeddedSession.init");r(t)}),e.m_options.timeoutInMilliseconds),e.m_promiseResolver=n}))},t.prototype._invoke=function(e,t,n){this.m_enabled?(_&&(n=_(n)),this._sendMessageWithCallback(this.m_id++,e,n,(function(e){v&&(e=v(e));var n=e.Error;delete e.Error,t(n||g.Success,e)}))):t(g.InternalError,null)},t.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler),window.clearTimeout(this.m_timeoutId),this.m_enabled=!1},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new E(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),t.prototype._createRequestExecutorOrNull=function(){return new I(this)},t.prototype._resolveRequestUrlAndHeaderInfo=function(){return G._createPromiseFromResult(null)},t.prototype._registerEventImpl=function(e,t){var n=this;return new m.Promise((function(r,o){n._sendMessageWithCallback(n.m_id++,y.RegisterEventCommand,{EventId:e,TargetId:t},(function(){r(null)}))}))},t.prototype._unregisterEventImpl=function(e,t){var n=this;return new m.Promise((function(r,o){n._sendMessageWithCallback(n.m_id++,y.UnregisterEventCommand,{EventId:e,TargetId:t},(function(){r()}))}))},t.prototype._onMessage=function(e){var t=this;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===e.source&&this.m_chosenOrigin===e.origin)){var n=e.data;if(n&&n[y.CommandKey]===y.ApiReadyCommand)!this.m_chosenWindow&&this._isValidDescendant(e.source)&&n[y.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=e.source,this.m_chosenOrigin=e.origin,this._sendMessageWithCallback(this.m_id++,y.GetAppContextCommand,null,(function(e){t._setupContext(e),window.clearTimeout(t.m_timeoutId),t.m_promiseResolver()})));else if(n&&n[y.CommandKey]===y.FireEventCommand){var r=n[y.ParamsKey],o=r.EventId,i=r.TargetId,a=r.Data;if(this.m_sessionEventManager)for(var s=this.m_sessionEventManager.getHandlers(o,i),c=0;c<s.length;c++)s[c](a)}else if(n&&n.hasOwnProperty(y.RespondingId)){var u=n[y.RespondingId],l=this.m_callbackList[u];"function"==typeof l&&l(n[y.ParamsKey]),delete this.m_callbackList[u]}}},t.prototype._sendMessageWithCallback=function(e,t,n,r){this.m_callbackList[e]=r;var o={};o[y.SendingId]=e,o[y.CommandKey]=t,o[y.ParamsKey]=n,this.m_chosenWindow.postMessage(JSON.stringify(o),this.m_chosenOrigin)},t.prototype._isValidDescendant=function(e){function t(n){if(n===e)return!0;for(var r=0,o=n.frames.length;r<o;r++)if(t(n.frames[r]))return!0;return!1}for(var n=(this.m_options.container||document.body).getElementsByTagName("iframe"),r=0,o=n.length;r<o;r++)if(t(n[r].contentWindow))return!0;return!1},t.prototype._setupContext=function(e){this.m_appContext=e},t}(l);t.EmbeddedSession=P;var O,I=function(){function e(e){this.m_session=e}return e.prototype.executeAsync=function(t,n,r){var o=this,i=W.buildMessageArrayForIRequestExecutor(t,n,r,e.SourceLibHeaderValue);return new m.Promise((function(t,n){o.m_session._invoke(y.ExecuteMethodCommand,(function(e,n){var r;G.log("Response:"),G.log(JSON.stringify(n)),r=e==g.Success?W.buildResponseOnSuccess(W.getResponseBodyFromSafeArray(n.Data),W.getResponseHeadersFromSafeArray(n.Data)):W.buildResponseOnError(n.error.Code,n.error.Message),t(r)}),e._transformMessageArrayIntoParams(i))}))},e._transformMessageArrayIntoParams=function(t){return{ArrayData:t,DdaMethod:{DispatchId:e.DispidExecuteRichApiRequestMethod}}},e.DispidExecuteRichApiRequestMethod=93,e.SourceLibHeaderValue="Embedded",e}();!function(e){var t=function(t){function n(e){var r=t.call(this,"string"==typeof e?e:e.message)||this;return Object.setPrototypeOf(r,n.prototype),r.name="Error","string"==typeof e?r.message=e:(r.code=e.code,r.message=e.message,r.traceMessages=e.traceMessages||[],r.innerError=e.innerError||null,r.debugInfo=r._createDebugInfo(e.debugInfo||{})),r}return o(n,t),n.prototype.toString=function(){return this.code+": "+this.message},n.prototype._createDebugInfo=function(t){var n={code:this.code,message:this.message,toString:function(){return JSON.stringify(this)}};for(var r in t)n[r]=t[r];return this.innerError&&(this.innerError instanceof e.RuntimeError?n.innerError=this.innerError.debugInfo:n.innerError=this.innerError),n},n._createInvalidArgError=function(t){return new e.RuntimeError({code:j.invalidArgument,message:G.isNullOrEmptyString(t.argumentName)?G._getResourceString(J.invalidArgumentGeneric):G._getResourceString(J.invalidArgument,t.argumentName),debugInfo:t.errorLocation?{errorLocation:t.errorLocation}:{},innerError:t.innerError})},n}(Error);e.RuntimeError=t}(O=t._Internal||(t._Internal={})),t.Error=O.RuntimeError;var j=function(){function e(){}return e.accessDenied="AccessDenied",e.generalException="GeneralException",e.activityLimitReached="ActivityLimitReached",e.invalidObjectPath="InvalidObjectPath",e.propertyNotLoaded="PropertyNotLoaded",e.valueNotLoaded="ValueNotLoaded",e.invalidRequestContext="InvalidRequestContext",e.invalidArgument="InvalidArgument",e.runMustReturnPromise="RunMustReturnPromise",e.cannotRegisterEvent="CannotRegisterEvent",e.apiNotFound="ApiNotFound",e.connectionFailure="ConnectionFailure",e.timeout="Timeout",e.invalidOrTimedOutSession="InvalidOrTimedOutSession",e.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",e}();t.ErrorCodes=j;var R=function(){function e(e,t,n,r){var o=this;this.m_id=e._nextId(),this.m_context=e,this.m_name=n,this.m_handlers=[],this.m_registered=!1,this.m_eventInfo=r,this.m_callback=function(e){o.m_eventInfo.eventArgsTransformFunc(e).then((function(e){return o.fireEvent(e)}))}}return Object.defineProperty(e.prototype,"_registered",{get:function(){return this.m_registered},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_id",{get:function(){return this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_handlers",{get:function(){return this.m_handlers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_callback",{get:function(){return this.m_callback},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=s.createTraceAction(this.m_context,null,!1);return this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:t.actionInfo.Id,handler:e,operation:0}),new A(this.m_context,this,e)},e.prototype.remove=function(e){var t=s.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:t.actionInfo.Id,handler:e,operation:1})},e.prototype.removeAll=function(){var e=s.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:e.actionInfo.Id,handler:null,operation:2})},e.prototype._processRegistration=function(e){var t=this,n=G._createPromiseFromResult(null),r=e._getPendingEventHandlerActions(this);if(!r)return n;for(var o=[],i=0;i<this.m_handlers.length;i++)o.push(this.m_handlers[i]);var a=!1;for(i=0;i<r.length;i++)if(e._responseTraceIds[r[i].id])switch(a=!0,r[i].operation){case 0:o.push(r[i].handler);break;case 1:for(var s=o.length-1;s>=0;s--)if(o[s]===r[i].handler){o.splice(s,1);break}break;case 2:o=[]}return a&&(!this.m_registered&&o.length>0?n=n.then((function(){return t.m_eventInfo.registerFunc(t.m_callback)})).then((function(){return t.m_registered=!0})):this.m_registered&&0==o.length&&(n=n.then((function(){return t.m_eventInfo.unregisterFunc(t.m_callback)})).catch((function(e){G.log("Error when unregister event: "+JSON.stringify(e))})).then((function(){return t.m_registered=!1}))),n=n.then((function(){return t.m_handlers=o}))),n},e.prototype.fireEvent=function(e){for(var t=[],n=0;n<this.m_handlers.length;n++){var r=this.m_handlers[n],o=G._createPromiseFromResult(null).then(this.createFireOneEventHandlerFunc(r,e)).catch((function(e){G.log("Error when invoke handler: "+JSON.stringify(e))}));t.push(o)}m.Promise.all(t)},e.prototype.createFireOneEventHandlerFunc=function(e,t){return function(){return e(t)}},e}();t.EventHandlers=R;var A=function(){function e(e,t,n){this.m_context=e,this.m_allHandlers=t,this.m_handler=n}return Object.defineProperty(e.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this.m_allHandlers&&this.m_handler&&(this.m_allHandlers.remove(this.m_handler),this.m_allHandlers=null,this.m_handler=null)},e}();t.EventHandlerResult=A,function(e){var t=function(){function t(){}return t.prototype.register=function(t,n,r){switch(t){case 4:return G.promisify((function(e){return Office.context.document.bindings.getByIdAsync(n,e)})).then((function(e){return G.promisify((function(t){return e.addHandlerAsync(Office.EventType.BindingDataChanged,r,t)}))}));case 3:return G.promisify((function(e){return Office.context.document.bindings.getByIdAsync(n,e)})).then((function(e){return G.promisify((function(t){return e.addHandlerAsync(Office.EventType.BindingSelectionChanged,r,t)}))}));case 2:return G.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged,r,e)}));case 1:return G.promisify((function(e){return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged,r,e)}));case 5:return G.promisify((function(e){return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage",r,e)}));case 13:return G.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted,r,{id:n},e)}));case 14:return G.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged,r,{id:n},e)}));case 15:return G.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged,r,{id:n},e)}));case 16:return G.promisify((function(e){return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded,r,{id:n},e)}));default:throw e.RuntimeError._createInvalidArgError({argumentName:"eventId"})}},t.prototype.unregister=function(t,n,r){switch(t){case 4:return G.promisify((function(e){return Office.context.document.bindings.getByIdAsync(n,e)})).then((function(e){return G.promisify((function(t){return e.removeHandlerAsync(Office.EventType.BindingDataChanged,{handler:r},t)}))}));case 3:return G.promisify((function(e){return Office.context.document.bindings.getByIdAsync(n,e)})).then((function(e){return G.promisify((function(t){return e.removeHandlerAsync(Office.EventType.BindingSelectionChanged,{handler:r},t)}))}));case 2:return G.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged,{handler:r},e)}));case 1:return G.promisify((function(e){return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged,{handler:r},e)}));case 5:return G.promisify((function(e){return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage",{handler:r},e)}));case 13:return G.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted,{id:n,handler:r},e)}));case 14:return G.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged,{id:n,handler:r},e)}));case 15:return G.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged,{id:n,handler:r},e)}));case 16:return G.promisify((function(e){return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded,{id:n,handler:r},e)}));default:throw e.RuntimeError._createInvalidArgError({argumentName:"eventId"})}},t}();e.officeJsEventRegistration=new t}(O=t._Internal||(t._Internal={}));var E=function(){function e(e,t){this.m_handlersByEventByTarget={},this.m_registerEventImpl=e,this.m_unregisterEventImpl=t}return e.prototype.getHandlers=function(e,t){G.isNullOrUndefined(t)&&(t="");var n=this.m_handlersByEventByTarget[e];n||(n={},this.m_handlersByEventByTarget[e]=n);var r=n[t];return r||(r=[],n[t]=r),r},e.prototype.register=function(e,t,n){if(!n)throw O.RuntimeError._createInvalidArgError({argumentName:"handler"});var r=this.getHandlers(e,t);return r.push(n),1===r.length?this.m_registerEventImpl(e,t):G._createPromiseFromResult(null)},e.prototype.unregister=function(e,t,n){if(!n)throw O.RuntimeError._createInvalidArgError({argumentName:"handler"});for(var r=this.getHandlers(e,t),o=r.length-1;o>=0;o--)if(r[o]===n){r.splice(o,1);break}return 0===r.length?this.m_unregisterEventImpl(e,t):G._createPromiseFromResult(null)},e}();t.EventRegistration=E;var S=function(){function e(){this.m_eventRegistration=new E(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this)),this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return e.prototype.ready=function(){var t=this;return this.m_ready||(e._testReadyImpl?this.m_ready=e._testReadyImpl().then((function(){t.m_isReady=!0})):this.m_ready=O.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then((function(){t.m_isReady=!0}))),this.m_ready},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.register(e,t,n)}))},e.prototype.unregister=function(e,t,n){var r=this;return this.ready().then((function(){return r.m_eventRegistration.unregister(e,t,n)}))},e.prototype._registerEventImpl=function(e,t){return G._createPromiseFromResult(null)},e.prototype._unregisterEventImpl=function(e,t){return G._createPromiseFromResult(null)},e.prototype._handleRichApiMessage=function(e){if(e&&e.entries)for(var t=0;t<e.entries.length;t++){var n=e.entries[t];if(n.messageCategory==p.eventMessageCategory){G._logEnabled&&G.log(JSON.stringify(n));var r=this.m_eventRegistration.getHandlers(n.messageType,n.targetId);if(r.length>0){var o=JSON.parse(n.message);n.isRemoteOverride&&(o.source=p.eventSourceRemote);for(var i=0;i<r.length;i++)r[i](o)}}}},e.getGenericEventRegistration=function(){return e.s_genericEventRegistration||(e.s_genericEventRegistration=new e),e.s_genericEventRegistration},e.richApiMessageEventCategory=65536,e}();t._testSetRichApiMessageReadyImpl=function(e){S._testReadyImpl=e},t._testTriggerRichApiMessageEvent=function(e){S.getGenericEventRegistration()._handleRichApiMessage(e)};var w=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.m_genericEventInfo=o,i}return o(t,e),t.prototype.add=function(e){var t=this;return 0==this._handlers.length&&this.m_genericEventInfo.registerFunc&&this.m_genericEventInfo.registerFunc(),S.getGenericEventRegistration().isReady||this._context._pendingRequest._addPreSyncPromise(S.getGenericEventRegistration().ready()),s.createTraceMarkerForCallback(this._context,(function(){t._handlers.push(e),1==t._handlers.length&&S.getGenericEventRegistration().register(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)})),new A(this._context,this,e)},t.prototype.remove=function(e){var t=this;1==this._handlers.length&&this.m_genericEventInfo.unregisterFunc&&this.m_genericEventInfo.unregisterFunc(),s.createTraceMarkerForCallback(this._context,(function(){for(var n=t._handlers,r=n.length-1;r>=0;r--)if(n[r]===e){n.splice(r,1);break}0==n.length&&S.getGenericEventRegistration().unregister(t.m_genericEventInfo.eventType,t.m_genericEventInfo.getTargetIdFunc(),t._callback)}))},t.prototype.removeAll=function(){},t}(R);t.GenericEventHandlers=w;var N=function(){function e(){}return e.prototype.executeAsync=function(t,n,r){var o=JSON.stringify(r.Body),i=r.Url;"/"!=i.charAt(i.length-1)&&(i+="/");var a={method:"POST",url:i=(i+=p.processQuery)+"?"+p.flags+"="+n.toString(),headers:{},body:o};if(a.headers[p.sourceLibHeader]=e.SourceLibHeaderValue,a.headers["CONTENT-TYPE"]="application/json",r.Headers)for(var s in r.Headers)a.headers[s]=r.Headers[s];return C.sendRequest(a).then((function(e){var t;if(200===e.statusCode)t={ErrorCode:null,ErrorMessage:null,Headers:e.headers,Body:JSON.parse(e.body)};else{G.log("Error Response:"+e.body);var n=G._parseErrorResponse(e);t={ErrorCode:n.errorCode,ErrorMessage:n.errorMessage,Headers:e.headers,Body:null}}return t}))},e.SourceLibHeaderValue="officejs-rest",e}();t.HttpRequestExecutor=N;var C=function(){function e(){}return e.setCustomSendRequestFunc=function(t){e.s_customSendRequestFunc=t},e.xhrSendRequestFunc=function(e){return new m.Promise((function(t,n){var r=new XMLHttpRequest;if(r.open(e.method,e.url),r.onload=function(){var e={statusCode:r.status,headers:G._parseHttpResponseHeaders(r.getAllResponseHeaders()),body:r.responseText};t(e)},r.onerror=function(){n(new O.RuntimeError({code:j.connectionFailure,message:G._getResourceString(J.connectionFailureWithStatus,r.statusText)}))},e.headers)for(var o in e.headers)r.setRequestHeader(o,e.headers[o]);r.send(e.body)}))},e.sendRequest=function(t){e.validateAndNormalizeRequest(t);var n=e.s_customSendRequestFunc;return n||(n=e.xhrSendRequestFunc),n(t)},e.setCustomSendLocalDocumentRequestFunc=function(t){e.s_customSendLocalDocumentRequestFunc=t},e.sendLocalDocumentRequest=function(t){return e.validateAndNormalizeRequest(t),(e.s_customSendLocalDocumentRequestFunc||e.officeJsSendLocalDocumentRequestFunc)(t)},e.officeJsSendLocalDocumentRequestFunc=function(e){e=G._validateLocalDocumentRequest(e);var t=G._buildRequestMessageSafeArray(e);return new m.Promise((function(e,n){OSF.DDA.RichApi.executeRichApiRequestAsync(t,(function(t){var n;n="succeeded"==t.status?{statusCode:W.getResponseStatusCode(t),headers:W.getResponseHeaders(t),body:W.getResponseBody(t)}:W.buildHttpResponseFromOfficeJsError(t.error.code,t.error.message),G.log(JSON.stringify(n)),e(n)}))}))},e.validateAndNormalizeRequest=function(e){if(G.isNullOrUndefined(e))throw O.RuntimeError._createInvalidArgError({argumentName:"request"});G.isNullOrEmptyString(e.method)&&(e.method="GET"),e.method=e.method.toUpperCase()},e.logRequest=function(t){if(G._logEnabled){if(G.log("---HTTP Request---"),G.log(t.method+" "+t.url),t.headers)for(var n in t.headers)G.log(n+": "+t.headers[n]);e._logBody&&G.log(t.body)}},e.logResponse=function(t){if(G._logEnabled){if(G.log("---HTTP Response---"),G.log(""+t.statusCode),t.headers)for(var n in t.headers)G.log(n+": "+t.headers[n]);e._logBody&&G.log(t.body)}},e._logBody=!1,e}();t.HttpUtility=C;var x=function(){function e(e){this.m_clientObject=e}return e.prototype._handleResult=function(e){this.m_clientObject._handleIdResult(e)},e}();t.InstantiateActionResultHandler=x;var T=function(){function e(e){this.m_session=e}return e.prototype.executeAsync=function(e,t,n){var r={url:p.processQuery,method:"POST",headers:n.Headers,body:n.Body},o={id:M.nextId(),type:1,flags:t,message:r};return G.log(JSON.stringify(o)),this.m_session.sendMessageToHost(o).then((function(e){G.log("Received response: "+JSON.stringify(e));var t,n=e.message;if(200===n.statusCode)t={ErrorCode:null,ErrorMessage:null,Headers:n.headers,Body:n.body};else{G.log("Error Response:"+n.body);var r=G._parseErrorResponse(n);t={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:n.headers,Body:null}}return t}))},e}(),M=function(e){function t(t){var n=e.call(this)||this;return n.m_promiseResolver={},n.m_bridge=t,n.m_bridge.onMessageFromHost=function(e){n.onMessageFromHost(e)},n}return o(t,e),t.prototype._resolveRequestUrlAndHeaderInfo=function(){return G._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return G.log("NativeBridgeSession::CreateRequestExecutor"),new T(this)},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return O.officeJsEventRegistration},enumerable:!0,configurable:!0}),t.init=function(e){if(e&&"object"==typeof e){var n=new t(e);d._overrideSession=n,C.setCustomSendLocalDocumentRequestFunc((function(e){var r={id:t.nextId(),type:1,flags:0,message:e};return n.sendMessageToHost(r).then((function(e){return e.message}))}))}},t.prototype.sendMessageToHost=function(e){var t=this;return this.m_bridge.sendMessageToHost(JSON.stringify(e)),new m.Promise((function(n,r){t.m_promiseResolver[e.id]=n}))},t.prototype.onMessageFromHost=function(e){if("test"===e)q._testFunc&&q._testFunc();else{var t=JSON.parse(e);if("number"==typeof t.id){var n=this.m_promiseResolver[t.id];n&&n(t),delete this.m_promiseResolver[t.id]}}},t.nextId=function(){return t.s_nextId++},t.s_nextId=1,t}(l),F=function(){function e(){}return e.init=function(e){M.init(e)},e}();t.HostBridge=F,"object"==typeof _richApiNativeBridge&&_richApiNativeBridge&&F.init(_richApiNativeBridge);var q=function(){function e(){}return e.setTestFunc=function(t){e._testFunc=t},e}();t.HostBridgeTest=q;var L=function(){function e(e,t,n,r,o,i){this.m_objectPathInfo=e,this.m_parentObjectPath=t,this.m_isCollection=n,this.m_isInvalidAfterRequest=r,this.m_isValid=!0,this.m_operationType=o,this.m_flags=i}return Object.defineProperty(e.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"operationType",{get:function(){return this.m_operationType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this.m_flags},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(e){this.m_argumentObjectPaths=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isValid",{get:function(){return this.m_isValid},set:function(t){this.m_isValid=t,!t&&6===this.m_objectPathInfo.ObjectPathType&&this.m_savedObjectPathInfo&&(e.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalObjectPathInfo",{get:function(){return this.m_originalObjectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(e){this.m_getByIdMethodName=e},enumerable:!0,configurable:!0}),e.prototype._updateAsNullObject=function(){this.resetForUpdateUsingObjectData(),this.m_objectPathInfo.ObjectPathType=7,this.m_objectPathInfo.Name="",this.m_parentObjectPath=null},e.prototype.saveOriginalObjectPathInfo=function(){t.config.extendedErrorLogging&&!this.m_originalObjectPathInfo&&(this.m_originalObjectPathInfo={},e.copyObjectPathInfo(this.m_objectPathInfo,this.m_originalObjectPathInfo))},e.prototype.updateUsingObjectData=function(t,n){var r=t[p.referenceId];if(!G.isNullOrEmptyString(r)){if(!this.m_savedObjectPathInfo&&!this.isInvalidAfterRequest&&e.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)){var o={};e.copyObjectPathInfo(this.m_objectPathInfo,o),this.m_savedObjectPathInfo={pathInfo:o,parent:this.m_parentObjectPath}}return this.saveOriginalObjectPathInfo(),this.resetForUpdateUsingObjectData(),this.m_objectPathInfo.ObjectPathType=6,this.m_objectPathInfo.Name=r,delete this.m_objectPathInfo.ParentObjectPathId,void(this.m_parentObjectPath=null)}var i=n[p.collectionPropertyPath];if(!G.isNullOrEmptyString(i)){var a=G.tryGetObjectIdFromLoadOrRetrieveResult(t);if(!G.isNullOrUndefined(a)){for(var s=i.split("."),c=n.context[s[0]],u=1;u<s.length;u++)c=c[s[u]];return this.saveOriginalObjectPathInfo(),this.resetForUpdateUsingObjectData(),this.m_parentObjectPath=c._objectPath,this.m_objectPathInfo.ParentObjectPathId=this.m_parentObjectPath.objectPathInfo.Id,this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name="",void(this.m_objectPathInfo.ArgumentInfo.Arguments=[a])}}var l=this.parentObjectPath&&this.parentObjectPath.isCollection,d=this.getByIdMethodName;if(l||!G.isNullOrEmptyString(d)){a=G.tryGetObjectIdFromLoadOrRetrieveResult(t);if(!G.isNullOrUndefined(a))return this.saveOriginalObjectPathInfo(),this.resetForUpdateUsingObjectData(),G.isNullOrEmptyString(d)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=d,this.m_getByIdMethodName=null),void(this.m_objectPathInfo.ArgumentInfo.Arguments=[a])}},e.prototype.resetForUpdateUsingObjectData=function(){this.m_isInvalidAfterRequest=!1,this.m_isValid=!0,this.m_operationType=1,this.m_flags=4,this.m_objectPathInfo.ArgumentInfo={},this.m_argumentObjectPaths=null},e.isRestorableObjectPath=function(e){return 1===e||5===e||3===e||4===e},e.copyObjectPathInfo=function(e,t){t.Id=e.Id,t.ArgumentInfo=e.ArgumentInfo,t.Name=e.Name,t.ObjectPathType=e.ObjectPathType,t.ParentObjectPathId=e.ParentObjectPathId},e}();t.ObjectPath=L;var H=function(){function e(){}return e.createGlobalObjectObjectPath=function(e){var t={Id:e._nextId(),ObjectPathType:1,Name:""};return new L(t,null,!1,!1,1,4)},e.createNewObjectObjectPath=function(e,t,n,r){var o={Id:e._nextId(),ObjectPathType:2,Name:t};return new L(o,null,n,!1,1,G._fixupApiFlags(r))},e.createPropertyObjectPath=function(e,t,n,r,o,i){var a={Id:e._nextId(),ObjectPathType:4,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id};return new L(a,t._objectPath,r,o,1,G._fixupApiFlags(i))},e.createIndexerObjectPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new L(r,t._objectPath,!1,!1,1,4)},e.createIndexerObjectPathUsingParentPath=function(e,t,n){var r={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t.objectPathInfo.Id,ArgumentInfo:{}};return r.ArgumentInfo.Arguments=n,new L(r,t,!1,!1,1,4)},e.createMethodObjectPath=function(e,t,n,r,o,i,a,s,c){var u={Id:e._nextId(),ObjectPathType:3,Name:n,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=G.setMethodArguments(e,u.ArgumentInfo,o),d=new L(u,t._objectPath,i,a,r,G._fixupApiFlags(c));return d.argumentObjectPaths=l,d.getByIdMethodName=s,d},e.createReferenceIdObjectPath=function(e,t){var n={Id:e._nextId(),ObjectPathType:6,Name:t,ArgumentInfo:{}};return new L(n,null,!1,!1,1,4)},e.createChildItemObjectPathUsingIndexerOrGetItemAt=function(t,n,r,o,i){var a=G.tryGetObjectIdFromLoadOrRetrieveResult(o);return t&&!G.isNullOrUndefined(a)?e.createChildItemObjectPathUsingIndexer(n,r,o):e.createChildItemObjectPathUsingGetItemAt(n,r,o,i)},e.createChildItemObjectPathUsingIndexer=function(e,t,n){var r=G.tryGetObjectIdFromLoadOrRetrieveResult(n),o=o={Id:e._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return o.ArgumentInfo.Arguments=[r],new L(o,t._objectPath,!1,!1,1,4)},e.createChildItemObjectPathUsingGetItemAt=function(e,t,n,r){var o=n[p.index];o&&(r=o);var i={Id:e._nextId(),ObjectPathType:3,Name:p.getItemAt,ParentObjectPathId:t._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return i.ArgumentInfo.Arguments=[r],new L(i,t._objectPath,!1,!1,1,4)},e}();t.ObjectPathFactory=H;var U=function(){function e(e){this.m_context=e}return e.prototype.executeAsync=function(t,n,r){var o=this,i=W.buildMessageArrayForIRequestExecutor(t,n,r,e.SourceLibHeaderValue);return new m.Promise((function(e,t){OSF.DDA.RichApi.executeRichApiRequestAsync(i,(function(t){var n;G.log("Response:"),G.log(JSON.stringify(t)),"succeeded"==t.status?n=W.buildResponseOnSuccess(W.getResponseBody(t),W.getResponseHeaders(t)):(n=W.buildResponseOnError(t.error.code,t.error.message),o.m_context._processOfficeJsErrorResponse(t.error.code,n)),e(n)}))}))},e.SourceLibHeaderValue="officejs",e}();t.OfficeJsRequestExecutor=U,function(e){e.OfficeRequire=null}(O=t._Internal||(t._Internal={})),function(t){!function(r){r.Init=function(){return function(){function r(e){return"function"==typeof e}var o,i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=0,s=function(e,t){_[a]=e,_[a+1]=t,2===(a+=2)&&(o?o(v):f())};var c=("undefined"!=typeof window?window:void 0)||{},u=c.MutationObserver||c.WebKitMutationObserver,l=void 0!==e&&"[object process]"==={}.toString.call(e),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;var f,h,p,m,g,y,b,_=new Array(1e3);function v(){for(var e=0;e<a;e+=2){(0,_[e])(_[e+1]),_[e]=void 0,_[e+1]=void 0}a=0}function P(){}l?(y=e.nextTick,b=e.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/),Array.isArray(b)&&"0"===b[1]&&"10"===b[2]&&(y=n),f=function(){y(v)}):u?(p=0,m=new u(v),g=document.createTextNode(""),m.observe(g,{characterData:!0}),f=function(){g.data=p=++p%2}):d?((h=new MessageChannel).port1.onmessage=v,f=function(){h.port2.postMessage(0)}):f=function(){setTimeout(v,1)};var O=new N;function I(e,t){if(t.constructor===e.constructor)!function(e,t){1===t._state?A(e,t._result):2===t._state?E(e,t._result):S(t,void 0,(function(t){j(e,t)}),(function(t){E(e,t)}))}(e,t);else{var n=function(e){try{return e.then}catch(e){return O.error=e,O}}(t);n===O?E(e,O.error):void 0===n?A(e,t):r(n)?function(e,t,n){s((function(e){var r=!1,o=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?j(e,n):A(e,n))}),(function(t){r||(r=!0,E(e,t))}),e._label);!r&&o&&(r=!0,E(e,o))}),e)}(e,t,n):A(e,t)}}function j(e,t){var n;e===t?E(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?I(e,t):A(e,t)}function R(e){e._onerror&&e._onerror(e._result),w(e)}function A(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&s(w,e))}function E(e,t){void 0===e._state&&(e._state=2,e._result=t,s(R,e))}function S(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&s(w,e)}function w(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,a=0;a<t.length;a+=3)r=t[a],o=t[a+n],r?x(n,r,o,i):o(i);e._subscribers.length=0}}function N(){this.error=null}var C=new N;function x(e,t,n,o){var i,a,s,c,u=r(n);if(u){if((i=function(e,t){try{return e(t)}catch(e){return C.error=e,C}}(n,o))===C?(c=!0,a=i.error,i=null):s=!0,t===i)return void E(t,new TypeError("A promises callback cannot return that same promise."))}else i=o,s=!0;void 0!==t._state||(u&&s?j(t,i):c?E(t,a):1===e?A(t,i):2===e&&E(t,i))}function T(e,t){this._instanceConstructor=e,this.promise=new e(P),this._validateInput(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._init(),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&A(this.promise,this._result))):E(this.promise,this._validationError())}T.prototype._validateInput=function(e){return i(e)},T.prototype._validationError=function(){return new t.Error("Array Methods must be provided an Array")},T.prototype._init=function(){this._result=new Array(this.length)};var M=T;T.prototype._enumerate=function(){for(var e=this.length,t=this.promise,n=this._input,r=0;void 0===t._state&&r<e;r++)this._eachEntry(n[r],r)},T.prototype._eachEntry=function(e,t){var n,r=this._instanceConstructor;"object"==typeof(n=e)&&null!==n?e.constructor===r&&void 0!==e._state?(e._onerror=null,this._settledAt(e._state,t,e._result)):this._willSettleAt(r.resolve(e),t):(this._remaining--,this._result[t]=e)},T.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?E(r,n):this._result[t]=n),0===this._remaining&&A(r,this._result)},T.prototype._willSettleAt=function(e,t){var n=this;S(e,void 0,(function(e){n._settledAt(1,t,e)}),(function(e){n._settledAt(2,t,e)}))};var F=function(e){return new M(this,e).promise};var q=function(e){var t=new this(P);if(!i(e))return E(t,new TypeError("You must pass an array to race.")),t;var n=e.length;function r(e){j(t,e)}function o(e){E(t,e)}for(var a=0;void 0===t._state&&a<n;a++)S(this.resolve(e[a]),void 0,r,o);return t};var L=function(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(P);return j(t,e),t};var H=function(e){var t=new this(P);return E(t,e),t},U=0;var k=D;function D(e){this._id=U++,this._state=void 0,this._result=void 0,this._subscribers=[],P!==e&&(r(e)||function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof D||function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}(),function(e,t){try{t((function(t){j(e,t)}),(function(t){E(e,t)}))}catch(t){E(e,t)}}(this,e))}return D.all=F,D.race=q,D.resolve=L,D.reject=H,D._setScheduler=function(e){o=e},D._setAsap=function(e){s=e},D._asap=s,D.prototype={constructor:D,then:function(e,t){var n=this,r=n._state;if(1===r&&!e||2===r&&!t)return this;var o=new this.constructor(P),i=n._result;if(r){var a=arguments[r-1];s((function(){x(r,o,a,i)}))}else S(n,o,e,t);return o},catch:function(e){return this.then(null,e)}},k}.call(this)}}(t.PromiseImpl||(t.PromiseImpl={}))}(O=t._Internal||(t._Internal={})),function(e){e.OfficePromise="undefined"==typeof window&&"function"==typeof Promise?Promise:"undefined"!=typeof window&&window.Promise?window.Promise:e.PromiseImpl.Init()}(O=t._Internal||(t._Internal={}));var k=O.OfficePromise;t.Promise=k;var D=function(){function e(e){this._autoCleanupList={},this.m_context=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._addCommon(e,!0)})):this._addCommon(e,!0)},e.prototype._autoAdd=function(e){this._addCommon(e,!1),this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e},e.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(e,t){this.m_context._autoCleanup&&!e[p.isTracked]&&e!==this.m_context._rootObject&&t&&!G.isNullOrEmptyString(t[p.referenceId])&&(this._autoCleanupList[e._objectPath.objectPathInfo.Id]=e,e[p.isTracked]=!0)},e.prototype._addCommon=function(e,t){if(e[p.isTracked])t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id];else{var n=e[p.referenceId];if(e._objectPath.objectPathInfo[p.objectPathInfoDoNotKeepReferenceFieldName])throw G.createRuntimeError(j.generalException,G._getResourceString(J.objectIsUntracked),null);G.isNullOrEmptyString(n)&&e._KeepReference&&(e._KeepReference(),s.createInstantiateAction(this.m_context,e),t&&this.m_context._autoCleanup&&delete this._autoCleanupList[e._objectPath.objectPathInfo.Id],e[p.isTracked]=!0)}},e.prototype.remove=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t._removeCommon(e)})):this._removeCommon(e)},e.prototype._removeCommon=function(e){e._objectPath.objectPathInfo[p.objectPathInfoDoNotKeepReferenceFieldName]=!0,e.context._pendingRequest._removeKeepReferenceAction(e._objectPath.objectPathInfo.Id);var t=e[p.referenceId];if(!G.isNullOrEmptyString(t)){var n=this.m_context._rootObject;n._RemoveReference&&n._RemoveReference(t)}delete e[p.isTracked]},e.prototype._retrieveAndClearAutoCleanupList=function(){var e=this._autoCleanupList;return this._autoCleanupList={},e},e}();t.TrackedObjects=D;var B=function(){function e(e,t,n,r,o){e||(e="root"),this.m_globalObjName=e,this.m_referencedObjectPaths=t,this.m_actions=n,this.m_statements=[],this.m_variableNameForObjectPathMap={},this.m_variableNameToObjectPathMap={},this.m_declaredObjectPathMap={},this.m_showDispose=r,this.m_removePII=o}return e.prototype.process=function(){this.m_showDispose&&u._calculateLastUsedObjectPathIds(this.m_actions);for(var e=0;e<this.m_actions.length;e++)this.processOneAction(this.m_actions[e]);return this.m_statements},e.prototype.processForDebugStatementInfo=function(e){this.m_showDispose&&u._calculateLastUsedObjectPathIds(this.m_actions);this.m_statements=[];for(var t=-1,n=0;n<this.m_actions.length&&(this.processOneAction(this.m_actions[n]),e==n&&(t=this.m_statements.length-1),!(t>=0&&this.m_statements.length>t+5+1));n++);if(t<0)return null;var r=t-5;r<0&&(r=0);var o=t+1+5;o>this.m_statements.length&&(o=this.m_statements.length);var i=[];0!=r&&i.push("...");for(var a=r;a<t;a++)i.push(this.m_statements[a]);i.push("// >>>>>"),i.push(this.m_statements[t]),i.push("// <<<<<");for(var s=t+1;s<o;s++)i.push(this.m_statements[s]);return o<this.m_statements.length&&i.push("..."),{statement:this.m_statements[t],surroundingStatements:i}},e.prototype.processOneAction=function(e){switch(e.actionInfo.ActionType){case 1:this.processInstantiateAction(e);break;case 3:this.processMethodAction(e);break;case 2:this.processQueryAction(e);break;case 7:this.processQueryAsJsonAction(e);break;case 6:this.processRecursiveQueryAction(e);break;case 4:this.processSetPropertyAction(e);break;case 5:this.processTraceAction(e);break;case 8:this.processEnsureUnchangedAction(e);break;case 9:this.processUpdateAction(e)}},e.prototype.processInstantiateAction=function(e){var t=e.actionInfo.ObjectPathId,n=this.m_referencedObjectPaths[t],r=this.getObjVarName(t);if(this.m_declaredObjectPathMap[t]){o="// Instantiate {"+r+"}";o=this.appendDisposeCommentIfRelevant(o,e),this.m_statements.push(o)}else{var o="var "+r+" = "+this.buildObjectPathExpressionWithParent(n)+";";o=this.appendDisposeCommentIfRelevant(o,e),this.m_statements.push(o),this.m_declaredObjectPathMap[t]=r}},e.prototype.processMethodAction=function(e){var n=e.actionInfo.Name;if("_KeepReference"===n){if(!t._internalConfig.showInternalApiInDebugInfo)return;n="track"}var r=this.getObjVarName(e.actionInfo.ObjectPathId)+"."+G._toCamelLowerCase(n)+"("+this.buildArgumentsExpression(e.actionInfo.ArgumentInfo)+");";r=this.appendDisposeCommentIfRelevant(r,e),this.m_statements.push(r)},e.prototype.processQueryAction=function(e){var t=this.buildQueryExpression(e),n=this.getObjVarName(e.actionInfo.ObjectPathId)+".load("+t+");";n=this.appendDisposeCommentIfRelevant(n,e),this.m_statements.push(n)},e.prototype.processQueryAsJsonAction=function(e){var t=this.buildQueryExpression(e),n=this.getObjVarName(e.actionInfo.ObjectPathId)+".retrieve("+t+");";n=this.appendDisposeCommentIfRelevant(n,e),this.m_statements.push(n)},e.prototype.processRecursiveQueryAction=function(e){var t="";e.actionInfo.RecursiveQueryInfo&&(t=JSON.stringify(e.actionInfo.RecursiveQueryInfo));var n=this.getObjVarName(e.actionInfo.ObjectPathId)+".loadRecursive("+t+");";n=this.appendDisposeCommentIfRelevant(n,e),this.m_statements.push(n)},e.prototype.processSetPropertyAction=function(e){var t=this.getObjVarName(e.actionInfo.ObjectPathId)+"."+G._toCamelLowerCase(e.actionInfo.Name)+" = "+this.buildArgumentsExpression(e.actionInfo.ArgumentInfo)+";";t=this.appendDisposeCommentIfRelevant(t,e),this.m_statements.push(t)},e.prototype.processTraceAction=function(e){var t="context.trace();";t=this.appendDisposeCommentIfRelevant(t,e),this.m_statements.push(t)},e.prototype.processEnsureUnchangedAction=function(e){var t=this.getObjVarName(e.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(e.actionInfo.ObjectState)+");";t=this.appendDisposeCommentIfRelevant(t,e),this.m_statements.push(t)},e.prototype.processUpdateAction=function(e){var t=this.getObjVarName(e.actionInfo.ObjectPathId)+".update("+JSON.stringify(e.actionInfo.ObjectState)+");";t=this.appendDisposeCommentIfRelevant(t,e),this.m_statements.push(t)},e.prototype.appendDisposeCommentIfRelevant=function(e,t){var n=this;if(this.m_showDispose){var r=t.actionInfo.L;if(r&&r.length>0)return e+" // And then dispose {"+r.map((function(e){return n.getObjVarName(e)})).join(", ")+"}"}return e},e.prototype.buildQueryExpression=function(e){if(e.actionInfo.QueryInfo){var t={};return t.select=e.actionInfo.QueryInfo.Select,t.expand=e.actionInfo.QueryInfo.Expand,t.skip=e.actionInfo.QueryInfo.Skip,t.top=e.actionInfo.QueryInfo.Top,void 0===t.top&&void 0===t.skip&&void 0===t.expand?void 0===t.select?"":JSON.stringify(t.select):JSON.stringify(t)}return""},e.prototype.buildObjectPathExpressionWithParent=function(e){return(5==e.objectPathInfo.ObjectPathType||3==e.objectPathInfo.ObjectPathType||4==e.objectPathInfo.ObjectPathType)&&e.objectPathInfo.ParentObjectPathId?this.getObjVarName(e.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(e):this.buildObjectPathExpression(e)},e.prototype.buildObjectPathExpression=function(e){var t=this.buildObjectPathInfoExpression(e.objectPathInfo),n=e.originalObjectPathInfo;return n&&(t=t+" /* originally "+this.buildObjectPathInfoExpression(n)+" */"),t},e.prototype.buildObjectPathInfoExpression=function(e){switch(e.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 3:return G._toCamelLowerCase(e.Name)+"("+this.buildArgumentsExpression(e.ArgumentInfo)+")";case 2:return e.Name+".newObject()";case 7:return"null";case 4:return G._toCamelLowerCase(e.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(e.Name)+")"}},e.prototype.buildArgumentsExpression=function(e){var t="";if(!e.Arguments||0===e.Arguments.length)return t;if(this.m_removePII)return void 0===e.Arguments[0]?t:"...";for(var n=0;n<e.Arguments.length;n++)n>0&&(t+=", "),t+=this.buildArgumentLiteral(e.Arguments[n],e.ReferencedObjectPathIds?e.ReferencedObjectPathIds[n]:null);return"undefined"===t&&(t=""),t},e.prototype.buildArgumentLiteral=function(e,t){return"number"==typeof e&&e===t?this.getObjVarName(t):JSON.stringify(e)},e.prototype.getObjVarNameBase=function(e){var t="v",n=this.m_referencedObjectPaths[e];if(n)switch(n.objectPathInfo.ObjectPathType){case 1:t=this.m_globalObjName;break;case 4:t=G._toCamelLowerCase(n.objectPathInfo.Name);break;case 3:var r=n.objectPathInfo.Name;r.length>3&&"Get"===r.substr(0,3)&&(r=r.substr(3)),t=G._toCamelLowerCase(r);break;case 5:var o=this.getObjVarNameBase(n.objectPathInfo.ParentObjectPathId);t="s"===o.charAt(o.length-1)?o.substr(0,o.length-1):o+"Item"}return t},e.prototype.getObjVarName=function(e){if(this.m_variableNameForObjectPathMap[e])return this.m_variableNameForObjectPathMap[e];var t=this.getObjVarNameBase(e);if(!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t;for(var n=1;this.m_variableNameToObjectPathMap[t+n.toString()];)n++;return t+=n.toString(),this.m_variableNameForObjectPathMap[e]=t,this.m_variableNameToObjectPathMap[t]=e,t},e}();t.RequestPrettyPrinter=B;var J=function(){function e(){}return e.cannotRegisterEvent="CannotRegisterEvent",e.connectionFailureWithStatus="ConnectionFailureWithStatus",e.connectionFailureWithDetails="ConnectionFailureWithDetails",e.invalidObjectPath="InvalidObjectPath",e.invalidRequestContext="InvalidRequestContext",e.invalidArgument="InvalidArgument",e.invalidArgumentGeneric="InvalidArgumentGeneric",e.propertyNotLoaded="PropertyNotLoaded",e.runMustReturnPromise="RunMustReturnPromise",e.timeout="Timeout",e.propertyDoesNotExist="PropertyDoesNotExist",e.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",e.moreInfoInnerError="MoreInfoInnerError",e.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",e.valueNotLoaded="ValueNotLoaded",e.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",e.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",e.objectIsUntracked="ObjectIsUntracked",e.customFunctionDefintionMissing="CustomFunctionDefintionMissing",e.customFunctionImplementationMissing="CustomFunctionImplementationMissing",e.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",e.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",e.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",e.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",e.apiNotFoundDetails="ApiNotFoundDetails",e.pendingBatchInProgress="PendingBatchInProgress",e.notInsideBatch="NotInsideBatch",e.cannotUpdateReadOnlyProperty="CannotUpdateReadOnlyProperty",e}();t.ResourceStrings=J;var V=function(){function e(){}return e.CannotRegisterEvent="The event handler cannot be registered.",e.ConnectionFailureWithStatus="The request failed with status code of {0}.",e.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",e.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",e.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',e.InvalidRequestContext="Cannot use the object across different request contexts.",e.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",e.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',e.Timeout="The operation has timed out.",e.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',e.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",e.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",e.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.Script.CustomFunctions.",e.CustomFunctionImplementationMissing="The property with this name on Excel.Script.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",e.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",e.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",e.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",e.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",e.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",e.PendingBatchInProgress="There is a pending batch in progress. The batch method may not be called inside another batch, or simultaneously with another batch.",e.NotInsideBatch="Operations may not be invoked outside of a batch method.",e.CannotUpdateReadOnlyProperty="The property '{0}' is read-only and it cannot be updated.",e.ObjectIsUntracked="The object is untracked.",e}();t.ResourceStringValues=V;var W=function(){function e(){}return e.buildMessageArrayForIRequestExecutor=function(t,n,r,o){var i=JSON.stringify(r.Body);G.log("Request:"),G.log(i);var a={};return a[p.sourceLibHeader]=o,e.buildRequestMessageSafeArray(t,n,"POST","ProcessQuery",a,i)},e.buildResponseOnSuccess=function(e,t){var n={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return n.Body=JSON.parse(e),n.Headers=t,n},e.buildResponseOnError=function(t,n){var r={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return r.ErrorCode=j.generalException,r.ErrorMessage=n,t==e.OfficeJsErrorCode_ooeNoCapability?r.ErrorCode=j.accessDenied:t==e.OfficeJsErrorCode_ooeActivityLimitReached?r.ErrorCode=j.activityLimitReached:t==e.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(r.ErrorCode=j.invalidOrTimedOutSession,r.ErrorMessage=G._getResourceString(J.invalidOrTimedOutSessionMessage)),r},e.buildHttpResponseFromOfficeJsError=function(t,n){var r=500,o={error:{}};return o.error.code=j.generalException,o.error.message=n,t===e.OfficeJsErrorCode_ooeNoCapability?(r=403,o.error.code=j.accessDenied):t===e.OfficeJsErrorCode_ooeActivityLimitReached&&(r=429,o.error.code=j.activityLimitReached),{statusCode:r,headers:{},body:JSON.stringify(o)}},e.buildRequestMessageSafeArray=function(e,t,n,r,o,i){var a=[];if(o)for(var s in o)a.push(s),a.push(o[s]);return[e,n,r,a,i,0,t,"","",""]},e.getResponseBody=function(t){return e.getResponseBodyFromSafeArray(t.value.data)},e.getResponseHeaders=function(t){return e.getResponseHeadersFromSafeArray(t.value.data)},e.getResponseBodyFromSafeArray=function(e){var t=e[2];return"string"==typeof t?t:t.join("")},e.getResponseHeadersFromSafeArray=function(e){var t=e[1];if(!t)return null;for(var n={},r=0;r<t.length-1;r+=2)n[t[r]]=t[r+1];return n},e.getResponseStatusCode=function(t){return e.getResponseStatusCodeFromSafeArray(t.value.data)},e.getResponseStatusCodeFromSafeArray=function(e){return e[0]},e.OfficeJsErrorCode_ooeInvalidOrTimedOutSession=5012,e.OfficeJsErrorCode_ooeActivityLimitReached=5102,e.OfficeJsErrorCode_ooeNoCapability=7e3,e}();t.RichApiMessageUtility=W;var G=function(){function e(){}return e.checkArgumentNull=function(t,n){if(e.isNullOrUndefined(t))throw O.RuntimeError._createInvalidArgError({argumentName:n})},e.isNullOrUndefined=function(e){return null===e||void 0===e},e.isUndefined=function(e){return void 0===e},e.isNullOrEmptyString=function(e){return null===e||(void 0===e||0==e.length)},e.isPlainJsonObject=function(t){return!e.isNullOrUndefined(t)&&("object"==typeof t&&Object.getPrototypeOf(t)===Object.getPrototypeOf({}))},e.trim=function(e){return e.replace(new RegExp("^\\s+|\\s+$","g"),"")},e.caseInsensitiveCompareString=function(t,n){return e.isNullOrUndefined(t)?e.isNullOrUndefined(n):!e.isNullOrUndefined(n)&&t.toUpperCase()==n.toUpperCase()},e.adjustToDateTime=function(t){if(e.isNullOrUndefined(t))return null;if("string"==typeof t)return new Date(t);if(Array.isArray(t)){for(var n=t,r=0;r<n.length;r++)n[r]=e.adjustToDateTime(n[r]);return n}throw O.RuntimeError._createInvalidArgError({argumentName:"date"})},e.isReadonlyRestRequest=function(t){return e.caseInsensitiveCompareString(t,"GET")},e.setMethodArguments=function(t,n,r){if(e.isNullOrUndefined(r))return null;var o=new Array,i=new Array,a=e.collectObjectPathInfos(t,r,o,i);return n.Arguments=r,a&&(n.ReferencedObjectPathIds=i),o},e.collectObjectPathInfos=function(t,n,r,o){for(var i=!1,a=0;a<n.length;a++)if(n[a]instanceof c){var s=n[a];e.validateContext(t,s),n[a]=s._objectPath.objectPathInfo.Id,o.push(s._objectPath.objectPathInfo.Id),r.push(s._objectPath),i=!0}else if(Array.isArray(n[a])){var u=new Array;e.collectObjectPathInfos(t,n[a],r,u)?(o.push(u),i=!0):o.push(0)}else e.isPlainJsonObject(n[a])?(o.push(0),e.replaceClientObjectPropertiesWithObjectPathIds(n[a],r)):o.push(0);return i},e.replaceClientObjectPropertiesWithObjectPathIds=function(t,n){for(var r in t){var o=t[r];if(o instanceof c)n.push(o._objectPath),t[r]=((s={})[p.objectPathIdPrivate]=o._objectPath.objectPathInfo.Id,s);else if(Array.isArray(o))for(var i=0;i<o.length;i++)if(o[i]instanceof c){var a=o[i];n.push(a._objectPath),o[i]=((u={})[p.objectPathIdPrivate]=a._objectPath.objectPathInfo.Id,u)}else e.isPlainJsonObject(o[i])&&e.replaceClientObjectPropertiesWithObjectPathIds(o[i],n);else e.isPlainJsonObject(o)&&e.replaceClientObjectPropertiesWithObjectPathIds(o,n)}var s,u},e.fixObjectPathIfNecessary=function(e,t){e&&e._objectPath&&t&&e._objectPath.updateUsingObjectData(t,e)},e.tryGetObjectIdFromLoadOrRetrieveResult=function(t){var n=t[p.id];return e.isNullOrUndefined(n)&&(n=t[p.idLowerCase]),e.isNullOrUndefined(n)&&(n=t[p.idPrivate]),n},e.validateObjectPath=function(t){for(var n=t._objectPath;n;){if(!n.isValid)throw new O.RuntimeError({code:j.invalidObjectPath,message:e._getResourceString(J.invalidObjectPath,e.getObjectPathExpression(n)),debugInfo:{errorLocation:e.getObjectPathExpression(n)}});n=n.parentObjectPath}},e.validateReferencedObjectPaths=function(t){if(t)for(var n=0;n<t.length;n++)for(var r=t[n];r;){if(!r.isValid)throw new O.RuntimeError({code:j.invalidObjectPath,message:e._getResourceString(J.invalidObjectPath,e.getObjectPathExpression(r))});r=r.parentObjectPath}},e.validateContext=function(t,n){if(n&&n.context!==t)throw new O.RuntimeError({code:j.invalidRequestContext,message:e._getResourceString(J.invalidRequestContext)})},e.log=function(t){e._logEnabled&&"undefined"!=typeof console&&console.log&&console.log(t)},e.load=function(e,t){return e.context.load(e,t),e},e.loadAndSync=function(e,t){return e.context.load(e,t),e.context.sync().then((function(){return e}))},e.retrieve=function(n,r){var o=t._internalConfig.alwaysPolyfillClientObjectRetrieveMethod;o||(o=!e.isSetSupported("RichApiRuntime","1.1"));var i,a=new h(n,o),c=d._parseQueryOption(r);return i=o?s.createQueryAction(n.context,n,c):s.createQueryAsJsonAction(n.context,n,c),n.context._pendingRequest.addActionResultHandler(i,a),a},e.retrieveAndSync=function(t,n){var r=e.retrieve(t,n);return t.context.sync().then((function(){return r}))},e.isSetSupported=function(e,t){return!("undefined"!=typeof window&&window.Office&&window.Office.context&&window.Office.context.requirements)||window.Office.context.requirements.isSetSupported(e,t)},e._parseSelectExpand=function(t){var n=[];if(!e.isNullOrEmptyString(t))for(var r=t.split(","),o=0;o<r.length;o++){var i=r[o];(i=a(i.trim())).length>0&&n.push(i)}return n;function a(e){var t=e.toLowerCase();if("items"===t||"items/"===t)return"*";return("items/"===t.substr(0,6)||"items."===t.substr(0,6))&&(e=e.substr(6)),e.replace(new RegExp("[/.]items[/.]","gi"),"/")}},e.toJson=function(t,n,r,o){var i={};for(var a in n){void 0!==(s=n[a])&&(i[a]=s)}for(var a in r){var s;void 0!==(s=r[a])&&(s[e.fieldName_isCollection]&&void 0!==s[e.fieldName_m__items]?i[a]=s.toJSON().items:i[a]=s.toJSON())}return o&&(i.items=o.map((function(e){return e.toJSON()}))),i},e.throwError=function(t,n,r){throw new O.RuntimeError({code:t,message:e._getResourceString(t,n),debugInfo:r?{errorLocation:r}:void 0})},e.createRuntimeError=function(e,t,n){return new O.RuntimeError({code:e,message:t,debugInfo:{errorLocation:n}})},e._getResourceString=function(t,n){var r;if("undefined"!=typeof window&&window.Strings&&window.Strings.OfficeOM){var o="L_"+t,i=window.Strings.OfficeOM[o];i&&(r=i)}if(r||(r=V[t]),r||(r=t),!e.isNullOrUndefined(n))if(Array.isArray(n)){var a=n;r=e._formatString(r,a)}else r=r.replace("{0}",n);return r},e._formatString=function(e,t){return e.replace(/\{\d\}/g,(function(e){var n=parseInt(e.substr(1,e.length-2));if(n<t.length)return t[n];throw O.RuntimeError._createInvalidArgError({argumentName:"format"})}))},e.throwIfNotLoaded=function(t,n,r,o){if(!o&&e.isUndefined(n)&&t.charCodeAt(0)!=e.s_underscoreCharCode)throw e.createPropertyNotLoadedException(r,t)},e.createPropertyNotLoadedException=function(t,n){return new O.RuntimeError({code:j.propertyNotLoaded,message:e._getResourceString(J.propertyNotLoaded,n),debugInfo:t?{errorLocation:t+"."+n}:void 0})},e.createCannotUpdateReadOnlyPropertyException=function(t,n){return new O.RuntimeError({code:j.cannotUpdateReadOnlyProperty,message:e._getResourceString(J.cannotUpdateReadOnlyProperty,n),debugInfo:t?{errorLocation:t+"."+n}:void 0})},e.throwIfApiNotSupported=function(t,n,r,o){if(e._doApiNotSupportedCheck&&!e.isSetSupported(n,r)){var i=e._getResourceString(J.apiNotFoundDetails,[t,n+" "+r,o]);throw new O.RuntimeError({code:j.apiNotFound,message:i,debugInfo:{errorLocation:t}})}},e.getObjectPathExpression=function(t){for(var n="";t;){switch(t.objectPathInfo.ObjectPathType){case 1:n=n;break;case 2:n="new()"+(n.length>0?".":"")+n;break;case 3:n=e.normalizeName(t.objectPathInfo.Name)+"()"+(n.length>0?".":"")+n;break;case 4:n=e.normalizeName(t.objectPathInfo.Name)+(n.length>0?".":"")+n;break;case 5:n="getItem()"+(n.length>0?".":"")+n;break;case 6:n="_reference()"+(n.length>0?".":"")+n}t=t.parentObjectPath}return n},e._createPromiseFromResult=function(e){return new m.Promise((function(t,n){t(e)}))},e._createTimeoutPromise=function(e){return new m.Promise((function(t,n){setTimeout((function(){t(null)}),e)}))},e.promisify=function(e){return new m.Promise((function(t,n){e((function(e){"failed"==e.status?n(e.error):t(e.value)}))}))},e._addActionResultHandler=function(e,t,n){e.context._pendingRequest.addActionResultHandler(t,n)},e._handleNavigationPropertyResults=function(t,n,r){for(var o=0;o<r.length-1;o+=2)e.isUndefined(n[r[o+1]])||t[r[o]]._handleResult(n[r[o+1]])},e.normalizeName=function(e){return e.substr(0,1).toLowerCase()+e.substr(1)},e._isLocalDocumentUrl=function(t){return e._getLocalDocumentUrlPrefixLength(t)>0},e._getLocalDocumentUrlPrefixLength=function(e){for(var t=["http://document.localhost","https://document.localhost","//document.localhost"],n=e.toLowerCase().trim(),r=0;r<t.length;r++){if(n===t[r])return t[r].length;if(n.substr(0,t[r].length+1)===t[r]+"/")return t[r].length+1}return 0},e._validateLocalDocumentRequest=function(t){var n=e._getLocalDocumentUrlPrefixLength(t.url);if(n<=0)throw O.RuntimeError._createInvalidArgError({argumentName:"request"});var r=t.url.substr(n),o=r.toLowerCase();return"_api"===o?r="":"_api/"===o.substr(0,"_api/".length)&&(r=r.substr("_api/".length)),{method:t.method,url:r,headers:t.headers,body:t.body}},e._buildRequestMessageSafeArray=function(t){var n=0;if(e.isReadonlyRestRequest(t.method)||(n=1),t.url.substr(0,p.processQuery.length).toLowerCase()===p.processQuery.toLowerCase()){var r=t.url.indexOf("?");if(r>0)for(var o=t.url.substr(r+1).split("&"),i=0;i<o.length;i++){var a=o[i].split("=");if(a[0].toLowerCase()===p.flags){n=parseInt(a[1]),n&=1;break}}}return W.buildRequestMessageSafeArray("",n,t.method,t.url,t.headers,t.body)},e._parseHttpResponseHeaders=function(t){var n={};if(!e.isNullOrEmptyString(t))for(var r=new RegExp("\r?\n"),o=t.split(r),i=0;i<o.length;i++){var a=o[i];if(null!=a){var s=a.indexOf(":");if(s>0){var c=a.substr(0,s),u=a.substr(s+1);c=e.trim(c),u=e.trim(u),n[c.toUpperCase()]=u}}}return n},e._parseErrorResponse=function(t){var n,r,o=null;if(e.isPlainJsonObject(t.body))o=t.body;else if(!e.isNullOrEmptyString(t.body)){var i=e.trim(t.body);try{o=JSON.parse(i)}catch(t){e.log("Error when parse "+i)}}return!e.isNullOrUndefined(o)&&"object"==typeof o&&o.error?(r=o.error.code,n=e._getResourceString(J.connectionFailureWithDetails,[t.statusCode.toString(),o.error.code,o.error.message])):n=e._getResourceString(J.connectionFailureWithStatus,t.statusCode.toString()),e.isNullOrEmptyString(r)&&(r=j.connectionFailure),{errorCode:r,errorMessage:n}},e._copyHeaders=function(e,t){if(e&&t)for(var n in e)t[n]=e[n]},e._toCamelLowerCase=function(t){if(e.isNullOrEmptyString(t))return t;for(var n=0;n<t.length&&t.charCodeAt(n)>=65&&t.charCodeAt(n)<=90;)n++;return n<t.length?t.substr(0,n).toLowerCase()+t.substr(n):t.toLowerCase()},e._fixupApiFlags=function(e){return"boolean"==typeof e&&(e=e?1:0),e},e.definePropertyThrowUnloadedException=function(t,n,r){Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get:function(){throw e.createPropertyNotLoadedException(n,r)},set:function(){throw e.createCannotUpdateReadOnlyPropertyException(n,r)}})},e.defineReadOnlyPropertyWithValue=function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:function(){return r},set:function(){throw e.createCannotUpdateReadOnlyPropertyException(null,n)}})},e.processRetrieveResult=function(t,n,r,o){if(!e.isNullOrUndefined(n))if(o){var i=n[p.itemsLowerCase];if(Array.isArray(i)){for(var a=[],s=0;s<i.length;s++){var c=o(i[s],s),u={};u[p.proxy]=c,c._handleRetrieveResult(i[s],u),a.push(u)}e.defineReadOnlyPropertyWithValue(r,p.itemsLowerCase,a)}}else{var l=t[p.scalarPropertyNames],d=t[p.navigationPropertyNames],f=t[p.className];if(l)for(s=0;s<l.length;s++){var h=n[m=l[s]];e.isUndefined(h)?e.definePropertyThrowUnloadedException(r,f,m):e.defineReadOnlyPropertyWithValue(r,m,h)}if(d)for(s=0;s<d.length;s++){var m;h=n[m=d[s]];if(e.isUndefined(h))e.definePropertyThrowUnloadedException(r,f,m);else{var g=t[m],y={};g._handleRetrieveResult(h,y),y[p.proxy]=g,Array.isArray(y[p.itemsLowerCase])&&(y=y[p.itemsLowerCase]),e.defineReadOnlyPropertyWithValue(r,m,y)}}}},e.fieldName_m__items="m__items",e.fieldName_isCollection="_isCollection",e._logEnabled=!1,e._synchronousCleanup=!1,e._doApiNotSupportedCheck=!1,e.s_underscoreCharCode="_".charCodeAt(0),e}();t.Utility=G}).call(this,n(4),n(19).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(5),i=new(function(){function e(){}return e.prototype.sendMessageToHost=function(e){o.DataServiceManager.InvokeNative("RichApiDataService","ProcessMessageToHost",e)},e}()),a=function(){function e(){}return e.prototype.Invoke=function(e,t){"ProcessMessageFromHost"===e&&i.onMessageFromHost&&i.onMessageFromHost(t)},e}();o.ReactNativeReka.init(),o.DataServiceManager.RegisterService("RichApiDataService",(function(){return new a})),r.HostBridge.init(i)},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,d=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=OfficePlatformGlobal.ReactNativeReka},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);r.CustomTypeRegistry.registerTypeInfos({"FileIO::FileInfo":{docId:"$string"},"FileIO::Response":{Result:"$string"},"FileIO::ConfigurationPayload":{modelId:"$number"},"FileIO::ModelInputPayload":{modelConstantInput:["$indexer","$number"],relevantTcids:["$array","$number"]},"FileIO::ModelOutputPayload":{output:"$boolean",isModelFlightable:"$boolean",calcDurationSec:"$number"},"FileIO::ConfigResponse":{validConfig:"$boolean",bundleVersion:"$string"}}),t.ServiceInfos={NativeFileIOSave:["FileIO::NativeFileIOSave",{SaveFile:["ReturnsPromiseMethod","FileIO::Response",["FileIO::FileInfo"]]}],NativeNotNow:["FileIO::NativeNotNow",{NotNow:["ReturnsPromiseMethod","FileIO::Response",["FileIO::FileInfo"]]}],ModelEvaluationService:["FileIO::ModelEvaluationService",{initConfiguration:["ReturnsPromiseMethod","FileIO::ConfigResponse",["FileIO::ConfigurationPayload"]],evaluate:["ReturnsPromiseMethod","FileIO::ModelOutputPayload",["FileIO::ModelInputPayload"]]}]},t.NativeServices={NativeFileIOSave:r.RekaServiceRegistry.getNativeService(t.ServiceInfos.NativeFileIOSave),NativeNotNow:r.RekaServiceRegistry.getNativeService(t.ServiceInfos.NativeNotNow)}},function(e,t,n){n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),e.exports=n(17)},function(e,t,n){"use strict";(function(e){if(void 0!==e.__platformBundles){var t=e.__platformBundles.concat();Reflect.deleteProperty(e,"__platformBundles");for(var n=0;n<t.length;++n)console.log("PB start "+(n+1)+"/"+t.length),e.eval(t[n]),console.log("PB done  "+(n+1)+"/"+t.length)}}).call(this,n(0))},function(e,t,n){Object.assign=function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r){e[o]=r[o]}}return e},Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e}},function(e,t,n){(function(e){const t=function(){function e(e,t){return e}function t(e,t,s){const d=function(e,t){if(i(t))return e.stylize("undefined","undefined");if(n=t,"string"==typeof n){const n=`'${JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')}'`;return e.stylize(n,"string")}var n;if(function(e){return"number"==typeof e}(t))return e.stylize(""+t,"number");if(function(e){return"boolean"==typeof e}(t))return e.stylize(""+t,"boolean");if(o(t))return e.stylize("null","null")}(e,t);if(d)return d;const h=Object.keys(t),p=function(e){const t={};return e.forEach((e,n)=>{t[e]=!0}),t}(h);if(u(t)&&(h.indexOf("message")>=0||h.indexOf("description")>=0))return n(t);if(0===h.length){if(l(t)){const n=t.name?": "+t.name:"";return e.stylize(`[Function${n}]`,"special")}if(a(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(c(t))return e.stylize(Date.prototype.toString.call(t),"date");if(u(t))return n(t)}let m="",g=!1,y=["{","}"];var b;if(b=t,Array.isArray(b)&&(g=!0,y=["[","]"]),l(t)){m=` [Function${t.name?": "+t.name:""}]`}if(a(t)&&(m=" "+RegExp.prototype.toString.call(t)),c(t)&&(m=" "+Date.prototype.toUTCString.call(t)),u(t)&&(m=" "+n(t)),0===h.length&&(!g||0==t.length))return y[0]+m+y[1];if(s<0)return a(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");let _;return e.seen.push(t),_=g?function(e,t,n,o,i){const a=[];for(let i=0,s=t.length;i<s;++i)f(t,String(i))?a.push(r(e,t,n,o,String(i),!0)):a.push("");return i.forEach(i=>{i.match(/^\d+$/)||a.push(r(e,t,n,o,i,!0))}),a}(e,t,s,p,h):h.map(n=>r(e,t,s,p,n,g)),e.seen.pop(),function(e,t,n){if(e.reduce((e,t)=>(t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1),0)>60)return`${n[0]+(""===t?"":t+"\n ")} ${e.join(",\n  ")} ${n[1]}`;return`${n[0]+t} ${e.join(", ")} ${n[1]}`}(_,m,y)}function n(e){return`[${Error.prototype.toString.call(e)}]`}function r(e,n,r,a,s,c){let u,l,d;if(d=Object.getOwnPropertyDescriptor(n,s)||{value:n[s]},d.get?l=d.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):d.set&&(l=e.stylize("[Setter]","special")),f(a,s)||(u=`[${s}]`),l||(e.seen.indexOf(d.value)<0?(l=o(r)?t(e,d.value,null):t(e,d.value,r-1),l.indexOf("\n")>-1&&(l=c?l.split("\n").map(e=>"  "+e).join("\n").substr(2):"\n"+l.split("\n").map(e=>"   "+e).join("\n"))):l=e.stylize("[Circular]","special")),i(u)){if(c&&s.match(/^\d+$/))return l;u=JSON.stringify(""+s),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return`${u}: ${l}`}function o(e){return null===e}function i(e){return void 0===e}function a(e){return s(e)&&"[object RegExp]"===d(e)}function s(e){return"object"==typeof e&&null!==e}function c(e){return s(e)&&"[object Date]"===d(e)}function u(e){return s(e)&&("[object Error]"===d(e)||e instanceof Error)}function l(e){return"function"==typeof e}function d(e){return Object.prototype.toString.call(e)}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}return function(n,r){return t({seen:[],stylize:e},n,r.depth)}}(),n=0,r=1,o=2,i=3,a=[];a[n]="debug",a[r]="log",a[o]="warning",a[i]="error";function s(n){return function(){let r;r=1===arguments.length&&"string"==typeof arguments[0]?arguments[0]:Array.prototype.map.call(arguments,e=>t(e,{depth:10})).join(", ");let s=n;"Warning: "===r.slice(0,9)&&s>=i&&(s=o),e.__inspectorLog&&e.__inspectorLog(a[s],r,[].slice.call(arguments),1),e.nativeLoggingHook(r,s)}}function c(e,t){return Array(...Array(t)).map(()=>e)}if(e.nativeLoggingHook){e.console;e.console={error:s(i),info:s(r),log:s(r),warn:s(o),trace:s(n),debug:s(n),table:function(t){if(!Array.isArray(t)){const e=t;t=[];for(const n in e)if(e.hasOwnProperty(n)){const r=e[n];r["(index)"]=n,t.push(r)}}if(0===t.length)return void e.nativeLoggingHook("",r);const n=Object.keys(t[0]).sort(),o=[],i=[];function a(e,t){return t=t||" ",e.map((e,t)=>e+c(" ",i[t]-e.length).join("")).join(`${t}|${t}`)}n.forEach((e,n)=>{i[n]=e.length;for(let r=0;r<t.length;r++){const a=(t[r][e]||"?").toString();o[r]=o[r]||[],o[r][n]=a,i[n]=Math.max(i[n],a.length)}});const s=a(i.map(e=>c("-",e).join("")),"-"),u=[a(n),s];for(let e=0;e<t.length;e++)u.push(a(o[e]));e.nativeLoggingHook("\n"+u.join("\n"),r)},assert:function(t,n){t||e.nativeLoggingHook("Assertion failed: "+n,i)}}}else if(!e.console){const t=e.print||function(){};e.console={error:t,info:t,log:t,warn:t,trace:t,debug:t,table:t}}}).call(this,n(0))},function(e,t,n){(function(e){var t=0,n=function(e){throw e},r={setGlobalHandler:function(e){n=e},getGlobalHandler:function(){return n},reportError:function(e){n&&n(e)},reportFatalError:function(e){n&&n(e,!0)},applyWithGuard:function(e,n,o){try{return t++,e.apply(n,o)}catch(e){r.reportError(e)}finally{t--}return null},applyWithGuardIfNeeded:function(e,t,n){return r.inGuard()?e.apply(t,n):(r.applyWithGuard(e,t,n),null)},inGuard:function(){return t},guard:function(e,t,n){if("function"!=typeof e)return null;return t=t||e.name||"<generated guard>",function(){return r.applyWithGuard(e,n||this,arguments,null,t)}}};e.ErrorUtils=r}).call(this,n(0))},function(e,t,n){(function(e){if(void 0===Number.EPSILON&&Object.defineProperty(Number,"EPSILON",{value:Math.pow(2,-52)}),void 0===Number.MAX_SAFE_INTEGER&&Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:Math.pow(2,53)-1}),void 0===Number.MIN_SAFE_INTEGER&&Object.defineProperty(Number,"MIN_SAFE_INTEGER",{value:-(Math.pow(2,53)-1)}),!Number.isNaN){var t=e.isNaN;Object.defineProperty(Number,"isNaN",{configurable:!0,enumerable:!1,value:function(e){return"number"==typeof e&&t(e)},writable:!0})}}).call(this,n(0))},function(e,t){String.prototype.startsWith||(String.prototype.startsWith=function(e){"use strict";if(null==this)throw TypeError();var t=String(this),n=arguments.length>1&&Number(arguments[1])||0,r=Math.min(Math.max(n,0),t.length);return t.indexOf(String(e),n)===r}),String.prototype.endsWith||(String.prototype.endsWith=function(e){"use strict";if(null==this)throw TypeError();var t=String(this),n=t.length,r=String(e),o=arguments.length>1?Number(arguments[1])||0:n,i=Math.min(Math.max(o,0),n),a=i-r.length;return!(a<0)&&t.lastIndexOf(r,a)===a}),String.prototype.repeat||(String.prototype.repeat=function(e){"use strict";if(null==this)throw TypeError();var t=String(this);if((e=Number(e)||0)<0||e===1/0)throw RangeError();if(1===e)return t;for(var n="";e;)1&e&&(n+=t),(e>>=1)&&(t+=t);return n}),String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),String.prototype.codePointAt||(String.prototype.codePointAt=function(e){if(null==this)throw TypeError();var t=String(this),n=t.length,r=e?Number(e):0;if(Number.isNaN(r)&&(r=0),!(r<0||r>=n)){var o,i=t.charCodeAt(r);return i>=55296&&i<=56319&&n>r+1&&(o=t.charCodeAt(r+1))>=56320&&o<=57343?1024*(i-55296)+o-56320+65536:i}})},function(e,t){function n(e,t){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=Object(this),r=n.length>>>0,o=0;o<r;o++)if(e.call(t,n[o],o,n))return o;return-1}Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{enumerable:!1,writable:!0,configurable:!0,value:n}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{enumerable:!1,writable:!0,configurable:!0,value:function(e,t){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");var r=n.call(this,e,t);return-1===r?void 0:this[r]}}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{enumerable:!1,writable:!0,configurable:!0,value:function(e){var t=Object(this),n=parseInt(t.length)||0;if(0===n)return!1;var r,o,i=parseInt(arguments[1])||0;for(i>=0?r=i:(r=n+i)<0&&(r=0);r<n;){if(e===(o=t[r])||e!=e&&o!=o)return!0;r++}return!1}})},function(e,t){Array.from||(Array.from=function(e){if(null==e)throw new TypeError("Object is null or undefined");var t,n,r=arguments[1],o=arguments[2],i=this,a=Object(e),s="function"==typeof Symbol?Symbol.iterator:"@@iterator",c="function"==typeof r,u="function"==typeof a[s],l=0;if(u){t="function"==typeof i?new i:[];for(var d,f=a[s]();!(d=f.next()).done;)n=d.value,c&&(n=r.call(o,n,l)),t[l]=n,l+=1;return t.length=l,t}var h=a.length;for((isNaN(h)||h<0)&&(h=0),t="function"==typeof i?new i(h):new Array(h);l<h;)n=a[l],c&&(n=r.call(o,n,l)),t[l]=n,l+=1;return t.length=l,t})},function(e,t){!function(){"use strict";var e=Object.prototype.hasOwnProperty;"function"!=typeof Object.entries&&(Object.entries=function(t){if(null==t)throw new TypeError("Object.entries called on non-object");var n=[];for(var r in t)e.call(t,r)&&n.push([r,t[r]]);return n}),"function"!=typeof Object.values&&(Object.values=function(t){if(null==t)throw new TypeError("Object.values called on non-object");var n=[];for(var r in t)e.call(t,r)&&n.push(t[r]);return n})}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18);n(3);var o=n(5),i=n(21),a=n(30);n(2),r.AppRegistry.registerComponent("SavePrompt",(function(){return i.SaveCallout})),o.initReka(a.ModelEvaluationService)},function(e,t){e.exports=OfficePlatformGlobal.ReactNative.Components},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(20),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return u[c]=o,r(c),c++},f.clearImmediate=h}function h(e){delete u[e]}function p(e){if(l)setTimeout(p,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{h(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(0),n(4))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(22);n(3),n(2);var a=n(23),s=n(24),c=n(25),u=n(26),l=n(6),d=n(28),f=function(e){function t(t){var n=e.call(this,t)||this;return n.saveButtonClicked=function(){l.NativeServices.NativeFileIOSave.SaveFile({docId:n.props.docId}).then((function(e){n.setState({message:e.Result})})).catch((function(e){}))},n.notNowButtonClicked=function(){l.NativeServices.NativeNotNow.NotNow({docId:n.props.docId}).then((function(e){n.setState({message:e.Result})})).catch((function(e){}))},n.state={message:"empty"},n}return o(t,e),t.prototype.render=function(){return i.createElement(c.View,{style:h.outside},i.createElement(s.Text,{textStyle:"LargeStandard"},d.getString("calloutTitle")),i.createElement(c.View,{style:h.gap}),i.createElement(s.Text,null,d.getString("calloutText")," "),i.createElement(c.View,{style:h.gap}),i.createElement(c.View,{style:h.container},i.createElement(a.DefaultButton,{text:d.getString("saveButtonText"),onClick:this.saveButtonClicked}),i.createElement(c.View,{style:h.space}),i.createElement(a.DefaultButton,{text:d.getString("notNowButtonText"),onClick:this.notNowButtonClicked})))},t}(i.Component);t.SaveCallout=f;var h={container:u.StyleSheet.createViewStyle({flex:1,flexDirection:"row",justifyContent:"flex-end"}),outside:u.StyleSheet.createViewStyle({bottom:1,padding:6,margin:5}),space:u.StyleSheet.createViewStyle({width:8}),gap:u.StyleSheet.createViewStyle({height:4})}},function(e,t){e.exports=OfficePlatformGlobal.React},function(e,t){e.exports=OfficePlatformGlobal.Ply.DefaultButton},function(e,t){e.exports=OfficePlatformGlobal.Ply.Text},function(e,t){e.exports=OfficePlatformGlobal.Ply.View},function(e,t){e.exports=OfficePlatformGlobal.Ply.StyleSheet},function(e,t){e.exports=OfficePlatformGlobal.Reka},function(e,t,n){const r=n(29);e.exports=r.StringResources.createLazyTable({location:"strings.resjson"})},function(e,t){e.exports=OfficePlatformGlobal.SDX.StringResources},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(1),i=n(31),a=n(32),s=n(33),c=n(34),u=n(35),l=function(){function e(){this.SavePromptMLModel=null}return e.prototype.evaluate=function(e){if(null===this.SavePromptMLModel)return Promise.resolve(o.getDefaultModelOutput());if(!i.checkCompatibility(this.SavePromptMLModel.getModelRequirements(),e)){var t=o.getDefaultModelOutput();return t.isModelFlightable=!1,Promise.resolve(t)}var n=Date.now(),r=this.SavePromptMLModel.evaluate(e),a=Date.now()-n;return r.calcDurationSec=a,Promise.resolve(r)},e.prototype.initConfiguration=function(e){o.MLConfiguration.register(e);var t={validConfig:!0,bundleVersion:"1.0.0.0"};switch(o.MLConfiguration.getModelID()){case o.SavePromptModel.LR:this.SavePromptMLModel=new s.SavePromptModelLRImpl;break;case o.SavePromptModel.ClickStream:this.SavePromptMLModel=new c.SavePromptModelClickStreamImpl;break;case o.SavePromptModel.Onyx:this.SavePromptMLModel=new u.SavePromptModelOnyxImpl;break;case o.SavePromptModel.Heuristic:this.SavePromptMLModel=new a.SavePromptModelHeuristicImpl;break;default:t.validConfig=!1}return Promise.resolve(t)},e.ServiceInfo=r.ServiceInfos.ModelEvaluationService,e}();t.ModelEvaluationService=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkCompatibility=function(e,t){for(var n=0,r=e;n<r.length;n++){if(!(r[n]in t.modelConstantInput))return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(){}return e.prototype.getModelRequirements=function(){return[r.ModelParameter.DwellTimeSec,r.ModelParameter.RowCount,r.ModelParameter.TileUpdateCount]},e.prototype.evaluate=function(e){var t=r.getDefaultModelOutput(),n=e.modelConstantInput;return n[r.ModelParameter.RowCount]<52||n[r.ModelParameter.TileUpdateCount]<146||n[r.ModelParameter.DwellTimeSec]<60||(t.output=!0),t},e}();t.SavePromptModelHeuristicImpl=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(){}return e.prototype.getModelRequirements=function(){return[r.ModelParameter.DwellTimeSec,r.ModelParameter.RowCount,r.ModelParameter.TileUpdateCount]},e.prototype.evaluate=function(e){var t=r.getDefaultModelOutput(),n=e.modelConstantInput,o=n[r.ModelParameter.DwellTimeSec]/3600;if(0===o)return t;var i=n[r.ModelParameter.TileUpdateCount]/o;return.01582433*n[r.ModelParameter.TileUpdateCount]+-.02992947*o+25957e-8*n[r.ModelParameter.RowCount]+-69022e-8*i-.99775024>=14.285950663717738&&(t.output=!0),t},e}();t.SavePromptModelLRImpl=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(){this.tcidToWeight={24:-1.3288369925779793,768:.8288308468483366,795:-1.273178170186842,2521:-1.4574533693095872,2626:-.8023760403852735,2799:.795099188397689,3719:-1.1199206689708436,3997:-.8041372457110557,5736:-.8393742397453676,5908:-1.230428584719355,7035:-1.4001748573525037,11323:-.923789089850057,12499:-1.0191671847061208,12808:1.0866703843329601,13145:-.805440472452837,14767:.804483081317101,14791:.8086062956132883,15292:.9237440576419294,16238:1.003080676681458,18074:.8434182149627534,20802:-2.14110610345336,24134:-1.2205327164872002,27187:.8740641028617783,27302:-1.1409566136789155,27323:-.9636398087590168}}return e.prototype.getModelRequirements=function(){return[r.ModelParameter.DwellTimeSec,r.ModelParameter.RowCount,r.ModelParameter.TileUpdateCount,r.ModelParameter.RelevantTcidsExists]},e.prototype.evaluate=function(e){var t=r.getDefaultModelOutput(),n=e.modelConstantInput,o=n[r.ModelParameter.DwellTimeSec]/3600;if(0===o)return t;for(var i=n[r.ModelParameter.TileUpdateCount]/o,a=.000384075809*n[r.ModelParameter.RowCount]+.00694562125*n[r.ModelParameter.TileUpdateCount]+-.00946702474*o+181743748e-13*i,s=-.0567784228*e.relevantTcids.length,c=0,u=e.relevantTcids;c<u.length;c++){var l=u[c];l in this.tcidToWeight&&(s+=this.tcidToWeight[l])}return s+a+-.23831275>=1.6248&&(t.output=!0),t},e}();t.SavePromptModelClickStreamImpl=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(){this.tcidToWeight={19:-.9634002655461523,24:-1.6320642705216424,795:-1.2616032096018865,2521:-1.3165550392176244,2799:.7772081792469913,3719:-1.0500886124973445,5736:-1.2813985472431204,6920:1.0602900051006168,7035:-1.5295724715956758,12499:-1.1640716749344764,19139:-1.0939200022925253,20802:-1.4124485909961755,27302:-.8096784986791372}}return e.prototype.getModelRequirements=function(){return[r.ModelParameter.DwellTimeSec,r.ModelParameter.RowCount,r.ModelParameter.TileUpdateCount,r.ModelParameter.RelevantTcidsExists]},e.prototype.evaluate=function(e){var t=r.getDefaultModelOutput(),n=e.modelConstantInput,o=n[r.ModelParameter.DwellTimeSec]/3600;if(0===o)return t;for(var i=n[r.ModelParameter.TileUpdateCount]/o,a=.000300133378*n[r.ModelParameter.RowCount]+.0109039234*n[r.ModelParameter.TileUpdateCount]+-.00313122907*o+-21202502e-12*i,s=-.0493733704*e.relevantTcids.length,c=0,u=e.relevantTcids;c<u.length;c++){var l=u[c];l in this.tcidToWeight&&(s+=this.tcidToWeight[l])}return s+a+-.98225566>=4.7079&&(t.output=!0),t},e}();t.SavePromptModelOnyxImpl=o}]);
//# sourceMappingURL=index.win32.bundle.map