diff --git a/dist/powerbi-client.d.ts b/dist/powerbi-client.d.ts index baf9a5ff..b91e640e 100644 --- a/dist/powerbi-client.d.ts +++ b/dist/powerbi-client.d.ts @@ -1,4 +1,4 @@ -// powerbi-client v2.19.1 +// powerbi-client v2.21.1 // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. declare module "config" { @@ -150,6 +150,14 @@ declare module "embed" { test(event: IEvent): boolean; handle(event: ICustomEvent): void; } + /** @hidden */ + export interface ISessionHeaders { + uid: string; + sdkSessionId: string; + tokenProviderSupplied?: boolean; + bootstrapped?: boolean; + sdkVersion?: string; + } /** * Base class for all Power BI embed components * @@ -426,12 +434,12 @@ declare module "embed" { */ populateConfig(config: IBootstrapEmbedConfiguration, isBootstrap: boolean): void; /** - * Validate EventHooks - * - * @private - * @param {models.EventHooks} eventHooks - * @hidden - */ + * Validate EventHooks + * + * @private + * @param {models.EventHooks} eventHooks + * @hidden + */ private validateEventHooks; /** * Adds locale parameters to embedUrl @@ -1998,7 +2006,7 @@ declare module "visual" { declare module "service" { import { WindowPostMessageProxy } from 'window-post-message-proxy'; import { HttpPostMessage } from 'http-post-message'; - import { Router } from 'powerbi-router'; + import { Router, IExtendedRequest, Response as IExtendedResponse } from 'powerbi-router'; import { IReportCreateConfiguration } from 'powerbi-models'; import { Embed, IBootstrapEmbedConfiguration, IDashboardEmbedConfiguration, IEmbedConfiguration, IEmbedConfigurationBase, IQnaEmbedConfiguration, IReportEmbedConfiguration, ITileEmbedConfiguration, IVisualEmbedConfiguration } from "embed"; export interface IEvent { @@ -2049,6 +2057,7 @@ declare module "service" { onError?: (error: any) => any; version?: string; type?: string; + sdkWrapperVersion?: string; } export interface IService { hpm: HttpPostMessage; @@ -2091,7 +2100,7 @@ declare module "service" { * @hidden */ wpmp: WindowPostMessageProxy; - private router; + router: Router; private uniqueSessionId; /** * Creates an instance of a Power BI Service. @@ -2154,6 +2163,12 @@ declare module "service" { getNumberOfComponents(): number; /** @hidden */ getSdkSessionId(): string; + /** + * Returns the Power BI Client SDK version + * + * @hidden + */ + getSDKVersion(): string; /** * Given a configuration based on a Power BI element, saves the component instance that reference the element for later lookup. * @@ -2222,7 +2237,7 @@ declare module "service" { * @hidden */ handleTileEvents(event: IEvent): void; - private invokeSDKHook; + invokeSDKHook(hook: Function, req: IExtendedRequest, res: IExtendedResponse): Promise; /** * Given an event object, finds the embed component with the matching type and ID, and invokes its handleEvent method with the event object. * @@ -2240,6 +2255,14 @@ declare module "service" { * @param {HTMLElement} [element=undefined] */ preload(config: IComponentEmbedConfiguration | IEmbedConfigurationBase, element?: HTMLElement): HTMLIFrameElement; + /** + * Use this API to set SDK info + * + * @hidden + * @param {string} type + * @returns {void} + */ + setSdkInfo(type: string, version: string): void; } } declare module "bookmarksManager" { diff --git a/dist/powerbi.js b/dist/powerbi.js index 0ec81531..304ea40b 100644 --- a/dist/powerbi.js +++ b/dist/powerbi.js @@ -1,4 +1,4 @@ -// powerbi-client v2.19.1 +// powerbi-client v2.21.1 // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. (function webpackUniversalModuleDefinition(root, factory) { @@ -99,6 +99,525 @@ return /******/ (function(modules) { // webpackBootstrap /************************************************************************/ /******/ ({ +/***/ "./node_modules/assert/assert.js": +/*!***************************************!*\ + !*** ./node_modules/assert/assert.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { + +var objectAssign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js"); + +// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js +// original notice: + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +function compare(a, b) { + if (a === b) { + return 0; + } + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + + if (x < y) { + return -1; + } + if (y < x) { + return 1; + } + return 0; +} +function isBuffer(b) { + if (global.Buffer && typeof global.Buffer.isBuffer === 'function') { + return global.Buffer.isBuffer(b); + } + return !!(b != null && b._isBuffer); +} + +// based on node assert, original notice: +// NB: The URL to the CommonJS spec is kept just for tradition. +// node-assert has evolved a lot since then, both in API and behavior. + +// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 +// +// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! +// +// Originally from narwhal.js (http://narwhaljs.org) +// Copyright (c) 2009 Thomas Robinson <280north.com> +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the 'Software'), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +var util = __webpack_require__(/*! util/ */ "./node_modules/util/util.js"); +var hasOwn = Object.prototype.hasOwnProperty; +var pSlice = Array.prototype.slice; +var functionsHaveNames = (function () { + return function foo() {}.name === 'foo'; +}()); +function pToString (obj) { + return Object.prototype.toString.call(obj); +} +function isView(arrbuf) { + if (isBuffer(arrbuf)) { + return false; + } + if (typeof global.ArrayBuffer !== 'function') { + return false; + } + if (typeof ArrayBuffer.isView === 'function') { + return ArrayBuffer.isView(arrbuf); + } + if (!arrbuf) { + return false; + } + if (arrbuf instanceof DataView) { + return true; + } + if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) { + return true; + } + return false; +} +// 1. The assert module provides functions that throw +// AssertionError's when particular conditions are not met. The +// assert module must conform to the following interface. + +var assert = module.exports = ok; + +// 2. The AssertionError is defined in assert. +// new assert.AssertionError({ message: message, +// actual: actual, +// expected: expected }) + +var regex = /\s*function\s+([^\(\s]*)\s*/; +// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js +function getName(func) { + if (!util.isFunction(func)) { + return; + } + if (functionsHaveNames) { + return func.name; + } + var str = func.toString(); + var match = str.match(regex); + return match && match[1]; +} +assert.AssertionError = function AssertionError(options) { + this.name = 'AssertionError'; + this.actual = options.actual; + this.expected = options.expected; + this.operator = options.operator; + if (options.message) { + this.message = options.message; + this.generatedMessage = false; + } else { + this.message = getMessage(this); + this.generatedMessage = true; + } + var stackStartFunction = options.stackStartFunction || fail; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, stackStartFunction); + } else { + // non v8 browsers so we can have a stacktrace + var err = new Error(); + if (err.stack) { + var out = err.stack; + + // try to strip useless frames + var fn_name = getName(stackStartFunction); + var idx = out.indexOf('\n' + fn_name); + if (idx >= 0) { + // once we have located the function frame + // we need to strip out everything before it (and its line) + var next_line = out.indexOf('\n', idx + 1); + out = out.substring(next_line + 1); + } + + this.stack = out; + } + } +}; + +// assert.AssertionError instanceof Error +util.inherits(assert.AssertionError, Error); + +function truncate(s, n) { + if (typeof s === 'string') { + return s.length < n ? s : s.slice(0, n); + } else { + return s; + } +} +function inspect(something) { + if (functionsHaveNames || !util.isFunction(something)) { + return util.inspect(something); + } + var rawname = getName(something); + var name = rawname ? ': ' + rawname : ''; + return '[Function' + name + ']'; +} +function getMessage(self) { + return truncate(inspect(self.actual), 128) + ' ' + + self.operator + ' ' + + truncate(inspect(self.expected), 128); +} + +// At present only the three keys mentioned above are used and +// understood by the spec. Implementations or sub modules can pass +// other keys to the AssertionError's constructor - they will be +// ignored. + +// 3. All of the following functions must throw an AssertionError +// when a corresponding condition is not met, with a message that +// may be undefined if not provided. All assertion methods provide +// both the actual and expected values to the assertion error for +// display purposes. + +function fail(actual, expected, message, operator, stackStartFunction) { + throw new assert.AssertionError({ + message: message, + actual: actual, + expected: expected, + operator: operator, + stackStartFunction: stackStartFunction + }); +} + +// EXTENSION! allows for well behaved errors defined elsewhere. +assert.fail = fail; + +// 4. Pure assertion tests whether a value is truthy, as determined +// by !!guard. +// assert.ok(guard, message_opt); +// This statement is equivalent to assert.equal(true, !!guard, +// message_opt);. To test strictly for the value true, use +// assert.strictEqual(true, guard, message_opt);. + +function ok(value, message) { + if (!value) fail(value, true, message, '==', assert.ok); +} +assert.ok = ok; + +// 5. The equality assertion tests shallow, coercive equality with +// ==. +// assert.equal(actual, expected, message_opt); + +assert.equal = function equal(actual, expected, message) { + if (actual != expected) fail(actual, expected, message, '==', assert.equal); +}; + +// 6. The non-equality assertion tests for whether two objects are not equal +// with != assert.notEqual(actual, expected, message_opt); + +assert.notEqual = function notEqual(actual, expected, message) { + if (actual == expected) { + fail(actual, expected, message, '!=', assert.notEqual); + } +}; + +// 7. The equivalence assertion tests a deep equality relation. +// assert.deepEqual(actual, expected, message_opt); + +assert.deepEqual = function deepEqual(actual, expected, message) { + if (!_deepEqual(actual, expected, false)) { + fail(actual, expected, message, 'deepEqual', assert.deepEqual); + } +}; + +assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) { + if (!_deepEqual(actual, expected, true)) { + fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual); + } +}; + +function _deepEqual(actual, expected, strict, memos) { + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + } else if (isBuffer(actual) && isBuffer(expected)) { + return compare(actual, expected) === 0; + + // 7.2. If the expected value is a Date object, the actual value is + // equivalent if it is also a Date object that refers to the same time. + } else if (util.isDate(actual) && util.isDate(expected)) { + return actual.getTime() === expected.getTime(); + + // 7.3 If the expected value is a RegExp object, the actual value is + // equivalent if it is also a RegExp object with the same source and + // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). + } else if (util.isRegExp(actual) && util.isRegExp(expected)) { + return actual.source === expected.source && + actual.global === expected.global && + actual.multiline === expected.multiline && + actual.lastIndex === expected.lastIndex && + actual.ignoreCase === expected.ignoreCase; + + // 7.4. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if ((actual === null || typeof actual !== 'object') && + (expected === null || typeof expected !== 'object')) { + return strict ? actual === expected : actual == expected; + + // If both values are instances of typed arrays, wrap their underlying + // ArrayBuffers in a Buffer each to increase performance + // This optimization requires the arrays to have the same type as checked by + // Object.prototype.toString (aka pToString). Never perform binary + // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their + // bit patterns are not identical. + } else if (isView(actual) && isView(expected) && + pToString(actual) === pToString(expected) && + !(actual instanceof Float32Array || + actual instanceof Float64Array)) { + return compare(new Uint8Array(actual.buffer), + new Uint8Array(expected.buffer)) === 0; + + // 7.5 For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else if (isBuffer(actual) !== isBuffer(expected)) { + return false; + } else { + memos = memos || {actual: [], expected: []}; + + var actualIndex = memos.actual.indexOf(actual); + if (actualIndex !== -1) { + if (actualIndex === memos.expected.indexOf(expected)) { + return true; + } + } + + memos.actual.push(actual); + memos.expected.push(expected); + + return objEquiv(actual, expected, strict, memos); + } +} + +function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +} + +function objEquiv(a, b, strict, actualVisitedObjects) { + if (a === null || a === undefined || b === null || b === undefined) + return false; + // if one is a primitive, the other must be same + if (util.isPrimitive(a) || util.isPrimitive(b)) + return a === b; + if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) + return false; + var aIsArgs = isArguments(a); + var bIsArgs = isArguments(b); + if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) + return false; + if (aIsArgs) { + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b, strict); + } + var ka = objectKeys(a); + var kb = objectKeys(b); + var key, i; + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length !== kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] !== kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) + return false; + } + return true; +} + +// 8. The non-equivalence assertion tests for any deep inequality. +// assert.notDeepEqual(actual, expected, message_opt); + +assert.notDeepEqual = function notDeepEqual(actual, expected, message) { + if (_deepEqual(actual, expected, false)) { + fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); + } +}; + +assert.notDeepStrictEqual = notDeepStrictEqual; +function notDeepStrictEqual(actual, expected, message) { + if (_deepEqual(actual, expected, true)) { + fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual); + } +} + + +// 9. The strict equality assertion tests strict equality, as determined by ===. +// assert.strictEqual(actual, expected, message_opt); + +assert.strictEqual = function strictEqual(actual, expected, message) { + if (actual !== expected) { + fail(actual, expected, message, '===', assert.strictEqual); + } +}; + +// 10. The strict non-equality assertion tests for strict inequality, as +// determined by !==. assert.notStrictEqual(actual, expected, message_opt); + +assert.notStrictEqual = function notStrictEqual(actual, expected, message) { + if (actual === expected) { + fail(actual, expected, message, '!==', assert.notStrictEqual); + } +}; + +function expectedException(actual, expected) { + if (!actual || !expected) { + return false; + } + + if (Object.prototype.toString.call(expected) == '[object RegExp]') { + return expected.test(actual); + } + + try { + if (actual instanceof expected) { + return true; + } + } catch (e) { + // Ignore. The instanceof check doesn't work for arrow functions. + } + + if (Error.isPrototypeOf(expected)) { + return false; + } + + return expected.call({}, actual) === true; +} + +function _tryBlock(block) { + var error; + try { + block(); + } catch (e) { + error = e; + } + return error; +} + +function _throws(shouldThrow, block, expected, message) { + var actual; + + if (typeof block !== 'function') { + throw new TypeError('"block" argument must be a function'); + } + + if (typeof expected === 'string') { + message = expected; + expected = null; + } + + actual = _tryBlock(block); + + message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + + (message ? ' ' + message : '.'); + + if (shouldThrow && !actual) { + fail(actual, expected, 'Missing expected exception' + message); + } + + var userProvidedMessage = typeof message === 'string'; + var isUnwantedException = !shouldThrow && util.isError(actual); + var isUnexpectedException = !shouldThrow && actual && !expected; + + if ((isUnwantedException && + userProvidedMessage && + expectedException(actual, expected)) || + isUnexpectedException) { + fail(actual, expected, 'Got unwanted exception' + message); + } + + if ((shouldThrow && actual && expected && + !expectedException(actual, expected)) || (!shouldThrow && actual)) { + throw actual; + } +} + +// 11. Expected to throw an error: +// assert.throws(block, Error_opt, message_opt); + +assert.throws = function(block, /*optional*/error, /*optional*/message) { + _throws(true, block, error, message); +}; + +// EXTENSION! This is annoying to write outside this module. +assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) { + _throws(false, block, error, message); +}; + +assert.ifError = function(err) { if (err) throw err; }; + +// Expose a strict only variant of assert +function strict(value, message) { + if (!value) fail(value, true, message, '==', strict); +} +assert.strict = objectAssign(strict, assert, { + equal: assert.strictEqual, + deepEqual: assert.deepStrictEqual, + notEqual: assert.notStrictEqual, + notDeepEqual: assert.notDeepStrictEqual +}); +assert.strict.strict = assert.strict; + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + if (hasOwn.call(obj, key)) keys.push(key); + } + return keys; +}; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) + +/***/ }), + /***/ "./node_modules/http-post-message/dist/httpPostMessage.js": /*!****************************************************************!*\ !*** ./node_modules/http-post-message/dist/httpPostMessage.js ***! @@ -281,6 +800,108 @@ return /******/ (function(modules) { // webpackBootstrap ; //# sourceMappingURL=httpPostMessage.js.map +/***/ }), + +/***/ "./node_modules/object-assign/index.js": +/*!*********************************************!*\ + !*** ./node_modules/object-assign/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + + /***/ }), /***/ "./node_modules/powerbi-models/dist/models.js": @@ -290,103 +911,18 @@ return /******/ (function(modules) { // webpackBootstrap /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -// powerbi-models v1.9.8 +// powerbi-models v1.11.0 // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. (function webpackUniversalModuleDefinition(root, factory) { if(true) module.exports = factory(); else {} -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 0); -/******/ }) -/************************************************************************/ -/******/ ([ +})(this, () => { +return /******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ([ /* 0 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -394,17 +930,20 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateZoomLevel = exports.validateCustomTheme = exports.validateCommandsSettings = exports.validateVisualSettings = exports.validateVisualHeader = exports.validateExportDataRequest = exports.validateQnaInterpretInputData = exports.validateLoadQnaConfiguration = exports.validateSaveAsParameters = exports.validateUpdateFiltersRequest = exports.validateFilter = exports.validatePage = exports.validateTileLoad = exports.validateDashboardLoad = exports.validateCreateReport = exports.validatePaginatedReportLoad = exports.validateReportLoad = exports.validateMenuGroupExtension = exports.validateExtension = exports.validateCustomPageSize = exports.validateVisualizationsPane = exports.validateSyncSlicersPane = exports.validateSelectionPane = exports.validatePageNavigationPane = exports.validateFieldsPane = exports.validateFiltersPane = exports.validateBookmarksPane = exports.validatePanes = exports.validateSettings = exports.validateCaptureBookmarkRequest = exports.validateApplyBookmarkStateRequest = exports.validateApplyBookmarkByNameRequest = exports.validateAddBookmarkRequest = exports.validatePlayBookmarkRequest = exports.validateSlicerState = exports.validateSlicer = exports.validateVisualSelector = exports.isIExtensionArray = exports.isIExtensions = exports.isGroupedMenuExtension = exports.isFlatMenuExtension = exports.isReportFiltersArray = exports.isOnLoadFilters = exports.VisualDataRoleKindPreference = exports.VisualDataRoleKind = exports.CommandDisplayOption = exports.SlicerTargetSelector = exports.VisualTypeSelector = exports.VisualSelector = exports.PageSelector = exports.Selector = exports.SortDirection = exports.LegendPosition = exports.TextAlignment = exports.CommonErrorCodes = exports.BookmarksPlayMode = exports.ExportDataType = exports.QnaMode = exports.PageNavigationPosition = exports.isColumnAggr = exports.isHierarchyLevelAggr = exports.isHierarchyLevel = exports.isColumn = exports.isMeasure = exports.getFilterType = exports.isBasicFilterWithKeys = exports.isFilterKeyColumnsTarget = exports.AdvancedFilter = exports.TupleFilter = exports.IdentityFilter = exports.BasicFilterWithKeys = exports.BasicFilter = exports.RelativeTimeFilter = exports.RelativeDateFilter = exports.TopNFilter = exports.IncludeExcludeFilter = exports.NotSupportedFilter = exports.Filter = exports.RelativeDateOperators = exports.RelativeDateFilterTimeUnit = exports.FilterType = exports.FiltersLevel = exports.FiltersOperations = exports.MenuLocation = exports.ContrastMode = exports.TokenType = exports.ViewMode = exports.Permissions = exports.SectionVisibility = exports.ReportAlignment = exports.HyperlinkClickBehavior = exports.LayoutType = exports.VisualContainerDisplayMode = exports.BackgroundType = exports.DisplayOption = exports.PageSizeType = exports.TraceType = void 0; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PageSelector = exports.Selector = exports.SortDirection = exports.LegendPosition = exports.TextAlignment = exports.CommonErrorCodes = exports.BookmarksPlayMode = exports.ExportDataType = exports.QnaMode = exports.PageNavigationPosition = exports.isPercentOfGrandTotal = exports.isColumnAggr = exports.isHierarchyLevelAggr = exports.isHierarchyLevel = exports.isColumn = exports.isMeasure = exports.getFilterType = exports.isBasicFilterWithKeys = exports.isFilterKeyColumnsTarget = exports.HierarchyFilter = exports.AdvancedFilter = exports.TupleFilter = exports.IdentityFilter = exports.BasicFilterWithKeys = exports.BasicFilter = exports.RelativeTimeFilter = exports.RelativeDateFilter = exports.TopNFilter = exports.IncludeExcludeFilter = exports.NotSupportedFilter = exports.Filter = exports.RelativeDateOperators = exports.RelativeDateFilterTimeUnit = exports.FilterType = exports.FiltersLevel = exports.FiltersOperations = exports.MenuLocation = exports.ContrastMode = exports.TokenType = exports.ViewMode = exports.Permissions = exports.SectionVisibility = exports.ReportAlignment = exports.HyperlinkClickBehavior = exports.LayoutType = exports.VisualContainerDisplayMode = exports.BackgroundType = exports.DisplayOption = exports.PageSizeType = exports.TraceType = void 0; +exports.validateZoomLevel = exports.validateCustomTheme = exports.validateCommandsSettings = exports.validateVisualSettings = exports.validateVisualHeader = exports.validateExportDataRequest = exports.validateQnaInterpretInputData = exports.validateLoadQnaConfiguration = exports.validateSaveAsParameters = exports.validateUpdateFiltersRequest = exports.validateFilter = exports.validatePage = exports.validateTileLoad = exports.validateDashboardLoad = exports.validateCreateReport = exports.validatePaginatedReportLoad = exports.validateReportLoad = exports.validateMenuGroupExtension = exports.validateExtension = exports.validateCustomPageSize = exports.validateVisualizationsPane = exports.validateSyncSlicersPane = exports.validateSelectionPane = exports.validatePageNavigationPane = exports.validateFieldsPane = exports.validateFiltersPane = exports.validateBookmarksPane = exports.validatePanes = exports.validateSettings = exports.validateCaptureBookmarkRequest = exports.validateApplyBookmarkStateRequest = exports.validateApplyBookmarkByNameRequest = exports.validateAddBookmarkRequest = exports.validatePlayBookmarkRequest = exports.validateSlicerState = exports.validateSlicer = exports.validateVisualSelector = exports.isIExtensionArray = exports.isIExtensions = exports.isGroupedMenuExtension = exports.isFlatMenuExtension = exports.isReportFiltersArray = exports.isOnLoadFilters = exports.VisualDataRoleKindPreference = exports.VisualDataRoleKind = exports.CommandDisplayOption = exports.SlicerTargetSelector = exports.VisualTypeSelector = exports.VisualSelector = void 0; var validator_1 = __webpack_require__(1); var TraceType; (function (TraceType) { @@ -521,6 +1060,7 @@ var FilterType; FilterType[FilterType["Tuple"] = 6] = "Tuple"; FilterType[FilterType["RelativeTime"] = 7] = "RelativeTime"; FilterType[FilterType["Identity"] = 8] = "Identity"; + FilterType[FilterType["Hierarchy"] = 9] = "Hierarchy"; })(FilterType = exports.FilterType || (exports.FilterType = {})); var RelativeDateFilterTimeUnit; (function (RelativeDateFilterTimeUnit) { @@ -682,6 +1222,7 @@ var BasicFilter = /** @class */ (function (_super) { * new BasicFilter('a', 'b', [1,2]); */ if (Array.isArray(values[0])) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion _this.values = values[0]; } else { @@ -708,7 +1249,7 @@ var BasicFilterWithKeys = /** @class */ (function (_super) { _this.target = target; var numberOfKeys = target.keys ? target.keys.length : 0; if (numberOfKeys > 0 && !keyValues) { - throw new Error("You should pass the values to be filtered for each key. You passed: no values and " + numberOfKeys + " keys"); + throw new Error("You should pass the values to be filtered for each key. You passed: no values and ".concat(numberOfKeys, " keys")); } if (numberOfKeys === 0 && keyValues && keyValues.length > 0) { throw new Error("You passed key values but your target object doesn't contain the keys to be filtered"); @@ -718,7 +1259,7 @@ var BasicFilterWithKeys = /** @class */ (function (_super) { if (keyValue) { var lengthOfArray = keyValue.length; if (lengthOfArray !== numberOfKeys) { - throw new Error("Each tuple of key values should contain a value for each of the keys. You passed: " + lengthOfArray + " values and " + numberOfKeys + " keys"); + throw new Error("Each tuple of key values should contain a value for each of the keys. You passed: ".concat(lengthOfArray, " values and ").concat(numberOfKeys, " keys")); } } } @@ -782,7 +1323,7 @@ var AdvancedFilter = /** @class */ (function (_super) { // Guard statements if (typeof logicalOperator !== "string" || logicalOperator.length === 0) { // TODO: It would be nicer to list out the possible logical operators. - throw new Error("logicalOperator must be a valid operator, You passed: " + logicalOperator); + throw new Error("logicalOperator must be a valid operator, You passed: ".concat(logicalOperator)); } _this.logicalOperator = logicalOperator; var extractedConditions; @@ -792,13 +1333,14 @@ var AdvancedFilter = /** @class */ (function (_super) { * new AdvancedFilter('a', 'b', "And", [{ value: 1, operator: "Equals" }, { value: 2, operator: "IsGreaterThan" }]); */ if (Array.isArray(conditions[0])) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion extractedConditions = conditions[0]; } else { extractedConditions = conditions; } if (extractedConditions.length > 2) { - throw new Error("AdvancedFilters may not have more than two conditions. You passed: " + conditions.length); + throw new Error("AdvancedFilters may not have more than two conditions. You passed: ".concat(conditions.length)); } if (extractedConditions.length === 1 && logicalOperator !== "And") { throw new Error("Logical Operator must be \"And\" when there is only one condition provided"); @@ -816,6 +1358,24 @@ var AdvancedFilter = /** @class */ (function (_super) { return AdvancedFilter; }(Filter)); exports.AdvancedFilter = AdvancedFilter; +var HierarchyFilter = /** @class */ (function (_super) { + __extends(HierarchyFilter, _super); + function HierarchyFilter(target, hierarchyData) { + var _this = _super.call(this, target, FilterType.Hierarchy) || this; + _this.schemaUrl = HierarchyFilter.schemaUrl; + _this.hierarchyData = hierarchyData; + return _this; + } + HierarchyFilter.prototype.toJSON = function () { + var filter = _super.prototype.toJSON.call(this); + filter.hierarchyData = this.hierarchyData; + filter.target = this.target; + return filter; + }; + HierarchyFilter.schemaUrl = "http://powerbi.com/product/schema#hierarchy"; + return HierarchyFilter; +}(Filter)); +exports.HierarchyFilter = HierarchyFilter; function isFilterKeyColumnsTarget(target) { return isColumn(target) && !!target.keys; } @@ -863,6 +1423,10 @@ function isColumnAggr(arg) { return !!(arg.table && arg.column && arg.aggregationFunction); } exports.isColumnAggr = isColumnAggr; +function isPercentOfGrandTotal(arg) { + return !!arg.percentOfGrandTotal; +} +exports.isPercentOfGrandTotal = isPercentOfGrandTotal; var PageNavigationPosition; (function (PageNavigationPosition) { PageNavigationPosition[PageNavigationPosition["Bottom"] = 0] = "Bottom"; @@ -1040,7 +1604,7 @@ exports.isIExtensionArray = isIExtensionArray; function normalizeError(error) { var message = error.message; if (!message) { - message = error.path + " is invalid. Not meeting " + error.keyword + " constraint"; + message = "".concat(error.path, " is invalid. Not meeting ").concat(error.keyword, " constraint"); } return { message: message @@ -1235,11 +1799,11 @@ exports.validateZoomLevel = validateZoomLevel; /***/ }), /* 1 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Validators = void 0; var barsValidator_1 = __webpack_require__(2); var bookmarkValidator_1 = __webpack_require__(5); @@ -1274,7 +1838,7 @@ exports.Validators = { advancedFilterTypeValidator: new typeValidator_1.EnumValidator([0]), advancedFilterValidator: new filtersValidator_1.AdvancedFilterValidator(), anyArrayValidator: new typeValidator_1.ArrayValidator([new anyOfValidator_1.AnyOfValidator([new typeValidator_1.StringValidator(), new typeValidator_1.NumberValidator(), new typeValidator_1.BooleanValidator()])]), - anyFilterValidator: new anyOfValidator_1.AnyOfValidator([new filtersValidator_1.BasicFilterValidator(), new filtersValidator_1.AdvancedFilterValidator(), new filtersValidator_1.IncludeExcludeFilterValidator(), new filtersValidator_1.NotSupportedFilterValidator(), new filtersValidator_1.RelativeDateFilterValidator(), new filtersValidator_1.TopNFilterValidator(), new filtersValidator_1.RelativeTimeFilterValidator()]), + anyFilterValidator: new anyOfValidator_1.AnyOfValidator([new filtersValidator_1.BasicFilterValidator(), new filtersValidator_1.AdvancedFilterValidator(), new filtersValidator_1.IncludeExcludeFilterValidator(), new filtersValidator_1.NotSupportedFilterValidator(), new filtersValidator_1.RelativeDateFilterValidator(), new filtersValidator_1.TopNFilterValidator(), new filtersValidator_1.RelativeTimeFilterValidator(), new filtersValidator_1.HierarchyFilterValidator()]), anyValueValidator: new anyOfValidator_1.AnyOfValidator([new typeValidator_1.StringValidator(), new typeValidator_1.NumberValidator(), new typeValidator_1.BooleanValidator()]), actionBarValidator: new barsValidator_1.ActionBarValidator(), applyBookmarkByNameRequestValidator: new bookmarkValidator_1.ApplyBookmarkByNameRequestValidator(), @@ -1317,9 +1881,9 @@ exports.Validators = { filterConditionsValidator: new typeValidator_1.ArrayValidator([new filtersValidator_1.ConditionItemValidator()]), filterHierarchyTargetValidator: new filtersValidator_1.FilterHierarchyTargetValidator(), filterMeasureTargetValidator: new filtersValidator_1.FilterMeasureTargetValidator(), - filterTargetValidator: new anyOfValidator_1.AnyOfValidator([new filtersValidator_1.FilterColumnTargetValidator(), new filtersValidator_1.FilterHierarchyTargetValidator(), new filtersValidator_1.FilterMeasureTargetValidator()]), + filterTargetValidator: new anyOfValidator_1.AnyOfValidator([new filtersValidator_1.FilterColumnTargetValidator(), new filtersValidator_1.FilterHierarchyTargetValidator(), new filtersValidator_1.FilterMeasureTargetValidator(), new typeValidator_1.ArrayValidator([new anyOfValidator_1.AnyOfValidator([new filtersValidator_1.FilterColumnTargetValidator(), new filtersValidator_1.FilterHierarchyTargetValidator(), new filtersValidator_1.FilterMeasureTargetValidator(), new filtersValidator_1.FilterKeyColumnsTargetValidator(), new filtersValidator_1.FilterKeyHierarchyTargetValidator()])])]), filterValidator: new filtersValidator_1.FilterValidator(), - filterTypeValidator: new typeValidator_1.EnumValidator([0, 1, 2, 3, 4, 5, 6, 7]), + filterTypeValidator: new typeValidator_1.EnumValidator([0, 1, 2, 3, 4, 5, 6, 7, 9]), filtersArrayValidator: new typeValidator_1.ArrayValidator([new filtersValidator_1.FilterValidator()]), filtersOperationsUpdateValidator: new typeValidator_1.EnumValidator([1, 2, 3]), filtersOperationsRemoveAllValidator: new typeValidator_1.EnumValidator([0]), @@ -1327,6 +1891,8 @@ exports.Validators = { hyperlinkClickBehaviorValidator: new typeValidator_1.EnumValidator([0, 1, 2]), includeExcludeFilterValidator: new filtersValidator_1.IncludeExcludeFilterValidator(), includeExludeFilterTypeValidator: new typeValidator_1.EnumValidator([3]), + hierarchyFilterTypeValidator: new typeValidator_1.EnumValidator([9]), + hierarchyFilterValuesValidator: new typeValidator_1.ArrayValidator([new filtersValidator_1.HierarchyFilterNodeValidator()]), layoutTypeValidator: new typeValidator_1.EnumValidator([0, 1, 2, 3]), loadQnaValidator: new qnaValidator_1.LoadQnaValidator(), menuExtensionValidator: new anyOfValidator_1.AnyOfValidator([new extensionsValidator_1.FlatMenuExtensionValidator(), new extensionsValidator_1.GroupedMenuExtensionValidator()]), @@ -1349,6 +1915,7 @@ exports.Validators = { paginatedReportCommandsValidator: new commandsSettingsValidator_1.PaginatedReportCommandsValidator(), paginatedReportLoadValidator: new paginatedReportLoadValidator_1.PaginatedReportLoadValidator(), paginatedReportsettingsValidator: new settingsValidator_1.PaginatedReportSettingsValidator(), + parameterValuesArrayValidator: new typeValidator_1.ArrayValidator([new paginatedReportLoadValidator_1.ReportParameterFieldsValidator()]), parametersPanelValidator: new parameterPanelValidator_1.ParametersPanelValidator(), permissionsValidator: new typeValidator_1.EnumValidator([0, 1, 2, 4, 7]), playBookmarkRequestValidator: new bookmarkValidator_1.PlayBookmarkRequestValidator(), @@ -1402,7 +1969,7 @@ exports.Validators = { /***/ }), /* 2 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -1410,16 +1977,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ActionBarValidator = exports.ReportBarsValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -1478,11 +2047,11 @@ exports.ActionBarValidator = ActionBarValidator; /***/ }), /* 3 */ -/***/ (function(module, exports) { +/***/ ((__unused_webpack_module, exports) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MultipleFieldsValidator = void 0; var MultipleFieldsValidator = /** @class */ (function () { function MultipleFieldsValidator(fieldValidatorsPairs) { @@ -1512,7 +2081,7 @@ exports.MultipleFieldsValidator = MultipleFieldsValidator; /***/ }), /* 4 */ -/***/ (function(module, exports) { +/***/ (function(__unused_webpack_module, exports) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -1520,16 +2089,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RangeValidator = exports.NumberArrayValidator = exports.BooleanArrayValidator = exports.StringArrayValidator = exports.EnumValidator = exports.SchemaValidator = exports.ValueValidator = exports.NumberValidator = exports.BooleanValidator = exports.StringValidator = exports.TypeValidator = exports.ArrayValidator = exports.ObjectValidator = void 0; var ObjectValidator = /** @class */ (function () { function ObjectValidator() { @@ -1566,7 +2137,7 @@ var ArrayValidator = /** @class */ (function () { }]; } for (var i = 0; i < input.length; i++) { - var fieldsPath = (path ? path + "." : "") + field + "." + i; + var fieldsPath = (path ? path + "." : "") + field + "." + i.toString(); for (var _i = 0, _a = this.itemValidators; _i < _a.length; _i++) { var validator = _a[_i]; var errors = validator.validate(input[i], fieldsPath, field); @@ -1758,7 +2329,7 @@ var RangeValidator = /** @class */ (function (_super) { // input is a number, now check if it's in the given range if (input > this.maxValue || input < this.minValue) { return [{ - message: field + " must be a number between " + this.minValue + " and " + this.maxValue, + message: field + " must be a number between " + this.minValue.toString() + " and " + this.maxValue.toString(), path: (path ? path + "." : "") + field, keyword: "range" }]; @@ -1772,7 +2343,7 @@ exports.RangeValidator = RangeValidator; /***/ }), /* 5 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -1780,16 +2351,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CaptureBookmarkRequestValidator = exports.CaptureBookmarkOptionsValidator = exports.ApplyBookmarkStateRequestValidator = exports.ApplyBookmarkByNameRequestValidator = exports.AddBookmarkRequestValidator = exports.PlayBookmarkRequestValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -1960,7 +2533,7 @@ exports.CaptureBookmarkRequestValidator = CaptureBookmarkRequestValidator; /***/ }), /* 6 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -1968,16 +2541,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PaginatedReportCommandsValidator = exports.SingleCommandSettingsValidator = exports.CommandsSettingsValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -2040,6 +2615,26 @@ var CommandsSettingsValidator = /** @class */ (function (_super) { field: "spotlight", validators: [validator_1.Validators.singleCommandSettingsValidator] }, + { + field: "insightsAnalysis", + validators: [validator_1.Validators.singleCommandSettingsValidator] + }, + { + field: "addComment", + validators: [validator_1.Validators.singleCommandSettingsValidator] + }, + { + field: "groupVisualContainers", + validators: [validator_1.Validators.singleCommandSettingsValidator] + }, + { + field: "summarize", + validators: [validator_1.Validators.singleCommandSettingsValidator] + }, + { + field: "clearSelection", + validators: [validator_1.Validators.singleCommandSettingsValidator] + } ]; var multipleFieldsValidator = new multipleFieldsValidator_1.MultipleFieldsValidator(fields); return multipleFieldsValidator.validate(input, path, field); @@ -2105,7 +2700,7 @@ exports.PaginatedReportCommandsValidator = PaginatedReportCommandsValidator; /***/ }), /* 7 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -2113,16 +2708,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CustomThemeValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -2155,7 +2752,7 @@ exports.CustomThemeValidator = CustomThemeValidator; /***/ }), /* 8 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -2163,16 +2760,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DashboardLoadValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -2226,7 +2825,7 @@ exports.DashboardLoadValidator = DashboardLoadValidator; /***/ }), /* 9 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -2234,16 +2833,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DatasetBindingValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -2277,7 +2878,7 @@ exports.DatasetBindingValidator = DatasetBindingValidator; /***/ }), /* 10 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -2285,16 +2886,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ExportDataRequestValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -2331,7 +2934,7 @@ exports.ExportDataRequestValidator = ExportDataRequestValidator; /***/ }), /* 11 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -2339,16 +2942,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ExtensionsValidator = exports.MenuGroupExtensionValidator = exports.ExtensionValidator = exports.CommandExtensionValidator = exports.ExtensionItemValidator = exports.ExtensionPointsValidator = exports.GroupedMenuExtensionValidator = exports.FlatMenuExtensionValidator = exports.MenuExtensionBaseValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -2622,7 +3227,7 @@ exports.ExtensionsValidator = ExtensionsValidator; /***/ }), /* 12 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -2630,17 +3235,19 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OnLoadFiltersValidator = exports.OnLoadFiltersBaseRemoveOperationValidator = exports.OnLoadFiltersBaseValidator = exports.ConditionItemValidator = exports.RemoveFiltersRequestValidator = exports.UpdateFiltersRequestValidator = exports.FilterValidator = exports.IncludeExcludeFilterValidator = exports.NotSupportedFilterValidator = exports.TopNFilterValidator = exports.RelativeTimeFilterValidator = exports.RelativeDateFilterValidator = exports.RelativeDateTimeFilterValidator = exports.AdvancedFilterValidator = exports.BasicFilterValidator = exports.FilterValidatorBase = exports.FilterDisplaySettingsValidator = exports.FilterMeasureTargetValidator = exports.FilterKeyHierarchyTargetValidator = exports.FilterHierarchyTargetValidator = exports.FilterKeyColumnsTargetValidator = exports.FilterColumnTargetValidator = void 0; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OnLoadFiltersValidator = exports.OnLoadFiltersBaseRemoveOperationValidator = exports.OnLoadFiltersBaseValidator = exports.ConditionItemValidator = exports.RemoveFiltersRequestValidator = exports.UpdateFiltersRequestValidator = exports.FilterValidator = exports.HierarchyFilterNodeValidator = exports.HierarchyFilterValidator = exports.IncludeExcludeFilterValidator = exports.NotSupportedFilterValidator = exports.TopNFilterValidator = exports.RelativeTimeFilterValidator = exports.RelativeDateFilterValidator = exports.RelativeDateTimeFilterValidator = exports.AdvancedFilterValidator = exports.BasicFilterValidator = exports.FilterValidatorBase = exports.FilterDisplaySettingsValidator = exports.FilterMeasureTargetValidator = exports.FilterKeyHierarchyTargetValidator = exports.FilterHierarchyTargetValidator = exports.FilterKeyColumnsTargetValidator = exports.FilterColumnTargetValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); var validator_1 = __webpack_require__(1); @@ -3048,25 +3655,91 @@ var TopNFilterValidator = /** @class */ (function (_super) { }, { field: "filterType", - validators: [validator_1.Validators.topNFilterTypeValidator] + validators: [validator_1.Validators.topNFilterTypeValidator] + }, + { + field: "orderBy", + validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.filterTargetValidator] + } + ]; + var multipleFieldsValidator = new multipleFieldsValidator_1.MultipleFieldsValidator(fields); + return multipleFieldsValidator.validate(input, path, field); + }; + return TopNFilterValidator; +}(FilterValidatorBase)); +exports.TopNFilterValidator = TopNFilterValidator; +var NotSupportedFilterValidator = /** @class */ (function (_super) { + __extends(NotSupportedFilterValidator, _super); + function NotSupportedFilterValidator() { + return _super !== null && _super.apply(this, arguments) || this; + } + NotSupportedFilterValidator.prototype.validate = function (input, path, field) { + if (input == null) { + return null; + } + var errors = _super.prototype.validate.call(this, input, path, field); + if (errors) { + return errors; + } + var fields = [ + { + field: "message", + validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.stringValidator] + }, + { + field: "notSupportedTypeName", + validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.stringValidator] + }, + { + field: "filterType", + validators: [validator_1.Validators.notSupportedFilterTypeValidator] + }, + ]; + var multipleFieldsValidator = new multipleFieldsValidator_1.MultipleFieldsValidator(fields); + return multipleFieldsValidator.validate(input, path, field); + }; + return NotSupportedFilterValidator; +}(FilterValidatorBase)); +exports.NotSupportedFilterValidator = NotSupportedFilterValidator; +var IncludeExcludeFilterValidator = /** @class */ (function (_super) { + __extends(IncludeExcludeFilterValidator, _super); + function IncludeExcludeFilterValidator() { + return _super !== null && _super.apply(this, arguments) || this; + } + IncludeExcludeFilterValidator.prototype.validate = function (input, path, field) { + if (input == null) { + return null; + } + var errors = _super.prototype.validate.call(this, input, path, field); + if (errors) { + return errors; + } + var fields = [ + { + field: "isExclude", + validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.booleanValidator] + }, + { + field: "values", + validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.anyArrayValidator] + }, + { + field: "filterType", + validators: [validator_1.Validators.includeExludeFilterTypeValidator] }, - { - field: "orderBy", - validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.filterTargetValidator] - } ]; var multipleFieldsValidator = new multipleFieldsValidator_1.MultipleFieldsValidator(fields); return multipleFieldsValidator.validate(input, path, field); }; - return TopNFilterValidator; + return IncludeExcludeFilterValidator; }(FilterValidatorBase)); -exports.TopNFilterValidator = TopNFilterValidator; -var NotSupportedFilterValidator = /** @class */ (function (_super) { - __extends(NotSupportedFilterValidator, _super); - function NotSupportedFilterValidator() { +exports.IncludeExcludeFilterValidator = IncludeExcludeFilterValidator; +var HierarchyFilterValidator = /** @class */ (function (_super) { + __extends(HierarchyFilterValidator, _super); + function HierarchyFilterValidator() { return _super !== null && _super.apply(this, arguments) || this; } - NotSupportedFilterValidator.prototype.validate = function (input, path, field) { + HierarchyFilterValidator.prototype.validate = function (input, path, field) { if (input == null) { return null; } @@ -3076,30 +3749,26 @@ var NotSupportedFilterValidator = /** @class */ (function (_super) { } var fields = [ { - field: "message", - validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.stringValidator] - }, - { - field: "notSupportedTypeName", - validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.stringValidator] + field: "hierarchyData", + validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.hierarchyFilterValuesValidator] }, { field: "filterType", - validators: [validator_1.Validators.notSupportedFilterTypeValidator] + validators: [validator_1.Validators.hierarchyFilterTypeValidator] }, ]; var multipleFieldsValidator = new multipleFieldsValidator_1.MultipleFieldsValidator(fields); return multipleFieldsValidator.validate(input, path, field); }; - return NotSupportedFilterValidator; + return HierarchyFilterValidator; }(FilterValidatorBase)); -exports.NotSupportedFilterValidator = NotSupportedFilterValidator; -var IncludeExcludeFilterValidator = /** @class */ (function (_super) { - __extends(IncludeExcludeFilterValidator, _super); - function IncludeExcludeFilterValidator() { +exports.HierarchyFilterValidator = HierarchyFilterValidator; +var HierarchyFilterNodeValidator = /** @class */ (function (_super) { + __extends(HierarchyFilterNodeValidator, _super); + function HierarchyFilterNodeValidator() { return _super !== null && _super.apply(this, arguments) || this; } - IncludeExcludeFilterValidator.prototype.validate = function (input, path, field) { + HierarchyFilterNodeValidator.prototype.validate = function (input, path, field) { if (input == null) { return null; } @@ -3109,24 +3778,28 @@ var IncludeExcludeFilterValidator = /** @class */ (function (_super) { } var fields = [ { - field: "isExclude", - validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.booleanValidator] + field: "value", + validators: [validator_1.Validators.anyValueValidator] }, { - field: "values", - validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.anyArrayValidator] + field: "keyValues", + validators: [validator_1.Validators.anyArrayValidator] }, { - field: "filterType", - validators: [validator_1.Validators.includeExludeFilterTypeValidator] + field: "children", + validators: [validator_1.Validators.hierarchyFilterValuesValidator] }, + { + field: "operator", + validators: [validator_1.Validators.stringValidator] + } ]; var multipleFieldsValidator = new multipleFieldsValidator_1.MultipleFieldsValidator(fields); return multipleFieldsValidator.validate(input, path, field); }; - return IncludeExcludeFilterValidator; -}(FilterValidatorBase)); -exports.IncludeExcludeFilterValidator = IncludeExcludeFilterValidator; + return HierarchyFilterNodeValidator; +}(typeValidator_1.ObjectValidator)); +exports.HierarchyFilterNodeValidator = HierarchyFilterNodeValidator; var FilterValidator = /** @class */ (function (_super) { __extends(FilterValidator, _super); function FilterValidator() { @@ -3323,7 +3996,7 @@ exports.OnLoadFiltersValidator = OnLoadFiltersValidator; /***/ }), /* 13 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -3331,16 +4004,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PageLayoutValidator = exports.DisplayStateValidator = exports.VisualLayoutValidator = exports.CustomLayoutValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -3481,7 +4156,7 @@ exports.PageLayoutValidator = PageLayoutValidator; /***/ }), /* 14 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -3489,16 +4164,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PageViewFieldValidator = exports.PageValidator = exports.CustomPageSizeValidator = exports.PageSizeValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -3610,7 +4287,7 @@ exports.PageViewFieldValidator = PageViewFieldValidator; /***/ }), /* 15 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -3618,16 +4295,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.VisualizationsPaneValidator = exports.SyncSlicersPaneValidator = exports.SelectionPaneValidator = exports.PageNavigationPaneValidator = exports.FiltersPaneValidator = exports.FieldsPaneValidator = exports.BookmarksPaneValidator = exports.QnaPanesValidator = exports.ReportPanesValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -3893,7 +4572,7 @@ exports.VisualizationsPaneValidator = VisualizationsPaneValidator; /***/ }), /* 16 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -3901,16 +4580,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.QnaInterpretInputDataValidator = exports.QnaSettingsValidator = exports.LoadQnaValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4030,7 +4711,7 @@ exports.QnaInterpretInputDataValidator = QnaInterpretInputDataValidator; /***/ }), /* 17 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4038,16 +4719,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ReportCreateValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4097,7 +4780,7 @@ exports.ReportCreateValidator = ReportCreateValidator; /***/ }), /* 18 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4105,16 +4788,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ReportLoadValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4200,7 +4885,7 @@ exports.ReportLoadValidator = ReportLoadValidator; /***/ }), /* 19 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4208,17 +4893,19 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PaginatedReportLoadValidator = void 0; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ReportParameterFieldsValidator = exports.PaginatedReportLoadValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); var validator_1 = __webpack_require__(1); @@ -4255,6 +4942,18 @@ var PaginatedReportLoadValidator = /** @class */ (function (_super) { { field: "tokenType", validators: [validator_1.Validators.tokenTypeValidator] + }, + { + field: "embedUrl", + validators: [validator_1.Validators.stringValidator] + }, + { + field: "type", + validators: [validator_1.Validators.stringValidator] + }, + { + field: "parameterValues", + validators: [validator_1.Validators.parameterValuesArrayValidator] } ]; var multipleFieldsValidator = new multipleFieldsValidator_1.MultipleFieldsValidator(fields); @@ -4263,11 +4962,34 @@ var PaginatedReportLoadValidator = /** @class */ (function (_super) { return PaginatedReportLoadValidator; }(typeValidator_1.ObjectValidator)); exports.PaginatedReportLoadValidator = PaginatedReportLoadValidator; +var ReportParameterFieldsValidator = /** @class */ (function () { + function ReportParameterFieldsValidator() { + } + ReportParameterFieldsValidator.prototype.validate = function (input, path, field) { + if (input == null) { + return null; + } + var fields = [ + { + field: "name", + validators: [validator_1.Validators.fieldRequiredValidator, validator_1.Validators.stringValidator] + }, + { + field: "value", + validators: [validator_1.Validators.stringValidator] + }, + ]; + var multipleFieldsValidator = new multipleFieldsValidator_1.MultipleFieldsValidator(fields); + return multipleFieldsValidator.validate(input, path, field); + }; + return ReportParameterFieldsValidator; +}()); +exports.ReportParameterFieldsValidator = ReportParameterFieldsValidator; /***/ }), /* 20 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4275,16 +4997,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SaveAsParametersValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4318,7 +5042,7 @@ exports.SaveAsParametersValidator = SaveAsParametersValidator; /***/ }), /* 21 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4326,16 +5050,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SlicerTargetSelectorValidator = exports.VisualTypeSelectorValidator = exports.VisualSelectorValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4433,7 +5159,7 @@ exports.SlicerTargetSelectorValidator = SlicerTargetSelectorValidator; /***/ }), /* 22 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4441,16 +5167,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PaginatedReportSettingsValidator = exports.SettingsValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4577,7 +5305,7 @@ exports.PaginatedReportSettingsValidator = PaginatedReportSettingsValidator; /***/ }), /* 23 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4585,16 +5313,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SlicerStateValidator = exports.SlicerValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4657,7 +5387,7 @@ exports.SlicerStateValidator = SlicerStateValidator; /***/ }), /* 24 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4665,16 +5395,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TileLoadValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4736,7 +5468,7 @@ exports.TileLoadValidator = TileLoadValidator; /***/ }), /* 25 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4744,16 +5476,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.VisualHeaderValidator = exports.VisualHeaderSettingsValidator = exports.VisualSettingsValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -4841,11 +5575,11 @@ exports.VisualHeaderValidator = VisualHeaderValidator; /***/ }), /* 26 */ -/***/ (function(module, exports) { +/***/ ((__unused_webpack_module, exports) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AnyOfValidator = void 0; var AnyOfValidator = /** @class */ (function () { function AnyOfValidator(validators) { @@ -4880,11 +5614,11 @@ exports.AnyOfValidator = AnyOfValidator; /***/ }), /* 27 */ -/***/ (function(module, exports) { +/***/ ((__unused_webpack_module, exports) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.FieldForbiddenValidator = void 0; var FieldForbiddenValidator = /** @class */ (function () { function FieldForbiddenValidator() { @@ -4906,11 +5640,11 @@ exports.FieldForbiddenValidator = FieldForbiddenValidator; /***/ }), /* 28 */ -/***/ (function(module, exports) { +/***/ ((__unused_webpack_module, exports) => { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.FieldRequiredValidator = void 0; var FieldRequiredValidator = /** @class */ (function () { function FieldRequiredValidator() { @@ -4932,7 +5666,7 @@ exports.FieldRequiredValidator = FieldRequiredValidator; /***/ }), /* 29 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -4940,16 +5674,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MapValidator = void 0; var typeValidator_1 = __webpack_require__(4); var MapValidator = /** @class */ (function (_super) { @@ -4996,7 +5732,7 @@ exports.MapValidator = MapValidator; /***/ }), /* 30 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -5004,16 +5740,18 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -Object.defineProperty(exports, "__esModule", { value: true }); +Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ParametersPanelValidator = void 0; var multipleFieldsValidator_1 = __webpack_require__(3); var typeValidator_1 = __webpack_require__(4); @@ -5050,7 +5788,42 @@ exports.ParametersPanelValidator = ParametersPanelValidator; /***/ }) -/******/ ]); +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __webpack_require__(0); +/******/ +/******/ return __webpack_exports__; +/******/ })() +; }); //# sourceMappingURL=models.js.map @@ -5848,34 +6621,1025 @@ return /******/ (function(modules) { // webpackBootstrap //# sourceMappingURL=route-recognizer.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)(module))) -/***/ }, -/* 2 */ -/***/ function(module, exports) { +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; + } + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + module.exports = function() { throw new Error("define cannot be used indirect"); }; + + +/***/ } +/******/ ]) +}); +; +//# sourceMappingURL=router.js.map + +/***/ }), + +/***/ "./node_modules/process/browser.js": +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), + +/***/ "./node_modules/util/node_modules/inherits/inherits_browser.js": +/*!*********************************************************************!*\ + !*** ./node_modules/util/node_modules/inherits/inherits_browser.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} + - module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - module.children = []; - module.webpackPolyfill = 1; - } - return module; - } +/***/ }), + +/***/ "./node_modules/util/support/isBufferBrowser.js": +/*!******************************************************!*\ + !*** ./node_modules/util/support/isBufferBrowser.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.readUInt8 === 'function'; +} -/***/ }, -/* 3 */ -/***/ function(module, exports) { +/***/ }), - module.exports = function() { throw new Error("define cannot be used indirect"); }; +/***/ "./node_modules/util/util.js": +/*!***********************************!*\ + !*** ./node_modules/util/util.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { +/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || + function getOwnPropertyDescriptors(obj) { + var keys = Object.keys(obj); + var descriptors = {}; + for (var i = 0; i < keys.length; i++) { + descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]); + } + return descriptors; + }; + +var formatRegExp = /%[sdj%]/g; +exports.format = function(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + if (typeof process !== 'undefined' && process.noDeprecation === true) { + return fn; + } + + // Allow for deprecating things in the process of starting up. + if (typeof process === 'undefined') { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ "./node_modules/util/support/isBufferBrowser.js"); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = __webpack_require__(/*! inherits */ "./node_modules/util/node_modules/inherits/inherits_browser.js"); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined; + +exports.promisify = function promisify(original) { + if (typeof original !== 'function') + throw new TypeError('The "original" argument must be of type Function'); + + if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) { + var fn = original[kCustomPromisifiedSymbol]; + if (typeof fn !== 'function') { + throw new TypeError('The "util.promisify.custom" argument must be of type Function'); + } + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return fn; + } + + function fn() { + var promiseResolve, promiseReject; + var promise = new Promise(function (resolve, reject) { + promiseResolve = resolve; + promiseReject = reject; + }); + + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + args.push(function (err, value) { + if (err) { + promiseReject(err); + } else { + promiseResolve(value); + } + }); + + try { + original.apply(this, args); + } catch (err) { + promiseReject(err); + } + + return promise; + } + + Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); + + if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return Object.defineProperties( + fn, + getOwnPropertyDescriptors(original) + ); +} + +exports.promisify.custom = kCustomPromisifiedSymbol + +function callbackifyOnRejected(reason, cb) { + // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). + // Because `null` is a special error value in callbacks which means "no error + // occurred", we error-wrap so the callback consumer can distinguish between + // "the promise rejected with null" or "the promise fulfilled with undefined". + if (!reason) { + var newReason = new Error('Promise was rejected with a falsy value'); + newReason.reason = reason; + reason = newReason; + } + return cb(reason); +} + +function callbackify(original) { + if (typeof original !== 'function') { + throw new TypeError('The "original" argument must be of type Function'); + } + + // We DO NOT return the promise as it gives the user a false sense that + // the promise is actually somehow related to the callback's execution + // and that the callback throwing will reject the promise. + function callbackified() { + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + + var maybeCb = args.pop(); + if (typeof maybeCb !== 'function') { + throw new TypeError('The last argument must be of type Function'); + } + var self = this; + var cb = function() { + return maybeCb.apply(self, arguments); + }; + // In true node style we process the callback on `nextTick` with all the + // implications (stack, `uncaughtException`, `async_hooks`) + original.apply(this, args) + .then(function(ret) { process.nextTick(cb, null, ret) }, + function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) }); + } + + Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)); + Object.defineProperties(callbackified, + getOwnPropertyDescriptors(original)); + return callbackified; +} +exports.callbackify = callbackify; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js"))) + +/***/ }), + +/***/ "./node_modules/webpack/buildin/global.js": +/*!***********************************!*\ + !*** (webpack)/buildin/global.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; -/***/ } -/******/ ]) -}); -; -//# sourceMappingURL=router.js.map /***/ }), @@ -7167,7 +8931,7 @@ exports.BookmarksManager = BookmarksManager; Object.defineProperty(exports, "__esModule", { value: true }); /** @ignore */ /** */ var config = { - version: '2.19.1', + version: '2.21.1', type: 'js' }; exports.default = config; @@ -7427,7 +9191,7 @@ var Dashboard = /** @class */ (function (_super) { var config = this.config; var dashboardId = config.id || this.element.getAttribute(Dashboard.dashboardIdAttribute) || Dashboard.findIdFromEmbedUrl(config.embedUrl); if (typeof dashboardId !== 'string' || dashboardId.length === 0) { - throw new Error("Dashboard id is required, but it was not found. You must provide an id either as part of embed configuration or as attribute '" + Dashboard.dashboardIdAttribute + "'."); + throw new Error("Dashboard id is required, but it was not found. You must provide an id either as part of embed configuration or as attribute '".concat(Dashboard.dashboardIdAttribute, "'.")); } return dashboardId; }; @@ -7594,24 +9358,32 @@ var Embed = /** @class */ (function () { * @returns {Promise} */ Embed.prototype.createReport = function (config) { + var _a; return __awaiter(this, void 0, void 0, function () { - var errors, response, response_1; - return __generator(this, function (_a) { - switch (_a.label) { + var errors, headers, response, response_1; + return __generator(this, function (_b) { + switch (_b.label) { case 0: errors = models.validateCreateReport(config); if (errors) { throw errors; } - _a.label = 1; + _b.label = 1; case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.service.hpm.post("/report/create", config, { uid: this.config.uniqueId, sdkSessionId: this.service.getSdkSessionId() }, this.iframe.contentWindow)]; + _b.trys.push([1, 3, , 4]); + headers = { + uid: this.config.uniqueId, + sdkSessionId: this.service.getSdkSessionId() + }; + if (!!((_a = this.eventHooks) === null || _a === void 0 ? void 0 : _a.accessTokenProvider)) { + headers.tokenProviderSupplied = true; + } + return [4 /*yield*/, this.service.hpm.post("/report/create", config, headers, this.iframe.contentWindow)]; case 2: - response = _a.sent(); + response = _b.sent(); return [2 /*return*/, response.body]; case 3: - response_1 = _a.sent(); + response_1 = _b.sent(); throw response_1.body; case 4: return [2 /*return*/]; } @@ -7725,10 +9497,11 @@ var Embed = /** @class */ (function () { * @returns {Promise} */ Embed.prototype.load = function (phasedRender) { + var _a; return __awaiter(this, void 0, void 0, function () { var path, headers, timeNow, response, response_5; - return __generator(this, function (_a) { - switch (_a.label) { + return __generator(this, function (_b) { + switch (_b.label) { case 0: if (!this.config.accessToken) { console.debug("Power BI SDK iframe is loaded but powerbi.embed is not called yet."); @@ -7745,21 +9518,24 @@ var Embed = /** @class */ (function () { bootstrapped: this.config.bootstrapped, sdkVersion: sdkConfig.default.version }; + if (!!((_a = this.eventHooks) === null || _a === void 0 ? void 0 : _a.accessTokenProvider)) { + headers.tokenProviderSupplied = true; + } timeNow = new Date(); if (this.lastLoadRequest && (0, util_1.getTimeDiffInMilliseconds)(this.lastLoadRequest, timeNow) < 100) { console.debug("Power BI SDK sent more than two /report/load requests in the last 100ms interval."); return [2 /*return*/]; } this.lastLoadRequest = timeNow; - _a.label = 1; + _b.label = 1; case 1: - _a.trys.push([1, 3, , 4]); + _b.trys.push([1, 3, , 4]); return [4 /*yield*/, this.service.hpm.post(path, this.config, headers, this.iframe.contentWindow)]; case 2: - response = _a.sent(); + response = _b.sent(); return [2 /*return*/, response.body]; case 3: - response_5 = _a.sent(); + response_5 = _b.sent(); throw response_5.body; case 4: return [2 /*return*/]; } @@ -7819,7 +9595,7 @@ var Embed = /** @class */ (function () { */ Embed.prototype.on = function (eventName, handler) { if (this.allowedEvents.indexOf(eventName) === -1) { - throw new Error("eventName must be one of " + this.allowedEvents + ". You passed: " + eventName); + throw new Error("eventName must be one of ".concat(this.allowedEvents, ". You passed: ").concat(eventName)); } this.eventHandlers.push({ test: function (event) { return event.name === eventName; }, @@ -7890,7 +9666,7 @@ var Embed = /** @class */ (function () { Embed.prototype.getAccessToken = function (globalAccessToken) { var accessToken = this.config.accessToken || this.element.getAttribute(Embed.accessTokenAttribute) || globalAccessToken; if (!accessToken) { - throw new Error("No access token was found for element. You must specify an access token directly on the element using attribute '" + Embed.accessTokenAttribute + "' or specify a global token at: powerbi.accessToken."); + throw new Error("No access token was found for element. You must specify an access token directly on the element using attribute '".concat(Embed.accessTokenAttribute, "' or specify a global token at: powerbi.accessToken.")); } return accessToken; }; @@ -7944,12 +9720,12 @@ var Embed = /** @class */ (function () { this.configChanged(isBootstrap); }; /** - * Validate EventHooks - * - * @private - * @param {models.EventHooks} eventHooks - * @hidden - */ + * Validate EventHooks + * + * @private + * @param {models.EventHooks} eventHooks + * @hidden + */ Embed.prototype.validateEventHooks = function (eventHooks) { if (!eventHooks) { return; @@ -7968,7 +9744,7 @@ var Embed = /** @class */ (function () { } var accessTokenProvider = eventHooks.accessTokenProvider; if (!!accessTokenProvider) { - if (this.embedtype.toLowerCase() !== "report" || this.config.tokenType !== models.TokenType.Aad) { + if ((['create', 'quickcreate', 'report'].indexOf(this.embedtype.toLowerCase()) === -1) || this.config.tokenType !== models.TokenType.Aad) { throw new Error("accessTokenProvider is only supported in report SaaS embed"); } } @@ -8006,7 +9782,7 @@ var Embed = /** @class */ (function () { embedUrl = this.getDefaultEmbedUrl(this.config.hostname); } if (typeof embedUrl !== 'string' || embedUrl.length === 0) { - throw new Error("Embed Url is required, but it was not found. You must provide an embed url either as part of embed configuration or as attribute '" + Embed.embedUrlAttribute + "'."); + throw new Error("Embed Url is required, but it was not found. You must provide an embed url either as part of embed configuration or as attribute '".concat(Embed.embedUrlAttribute, "'.")); } return embedUrl; }; @@ -8024,9 +9800,9 @@ var Embed = /** @class */ (function () { throw new Error("HTTP is not allowed. HTTPS is required"); } if (hostname.indexOf("https://") === 0) { - return hostname + "/" + endpoint; + return "".concat(hostname, "/").concat(endpoint); } - return "https://" + hostname + "/" + endpoint; + return "https://".concat(hostname, "/").concat(endpoint); }; /** * Gets a unique ID from the first available location: options, attribute. @@ -8268,12 +10044,13 @@ var window_post_message_proxy_1 = __webpack_require__(/*! window-post-message-pr var http_post_message_1 = __webpack_require__(/*! http-post-message */ "./node_modules/http-post-message/dist/httpPostMessage.js"); var powerbi_router_1 = __webpack_require__(/*! powerbi-router */ "./node_modules/powerbi-router/dist/router.js"); var config_1 = __webpack_require__(/*! ./config */ "./src/config.ts"); -var hpmFactory = function (wpmp, defaultTargetWindow, sdkVersion, sdkType) { +var hpmFactory = function (wpmp, defaultTargetWindow, sdkVersion, sdkType, sdkWrapperVersion) { if (sdkVersion === void 0) { sdkVersion = config_1.default.version; } if (sdkType === void 0) { sdkType = config_1.default.type; } return new http_post_message_1.HttpPostMessage(wpmp, { 'x-sdk-type': sdkType, - 'x-sdk-version': sdkVersion + 'x-sdk-version': sdkVersion, + 'x-sdk-wrapper-version': sdkWrapperVersion, }, defaultTargetWindow); }; exports.hpmFactory = hpmFactory; @@ -8398,7 +10175,7 @@ var Page = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.report.service.hpm.get("/report/pages/" + this.name + "/filters", { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.get("/report/pages/".concat(this.name, "/filters"), { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 1: response = _a.sent(); return [2 /*return*/, response.body]; @@ -8434,7 +10211,7 @@ var Page = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.report.service.hpm.post("/report/pages/" + this.name + "/filters", updateFiltersRequest, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.post("/report/pages/".concat(this.name, "/filters"), updateFiltersRequest, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 2: return [2 /*return*/, _a.sent()]; case 3: response_2 = _a.sent(); @@ -8481,7 +10258,7 @@ var Page = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.report.service.hpm.put("/report/pages/" + this.name + "/filters", filters, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.put("/report/pages/".concat(this.name, "/filters"), filters, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 1: return [2 /*return*/, _a.sent()]; case 2: response_3 = _a.sent(); @@ -8508,7 +10285,7 @@ var Page = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.report.service.hpm.delete("/report/pages/" + this.name, {}, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.delete("/report/pages/".concat(this.name), {}, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 1: response = _a.sent(); return [2 /*return*/, response.body]; @@ -8575,7 +10352,7 @@ var Page = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.report.service.hpm.put("/report/pages/" + this.name + "/name", page, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.put("/report/pages/".concat(this.name, "/name"), page, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 2: return [2 /*return*/, _a.sent()]; case 3: response_6 = _a.sent(); @@ -8608,7 +10385,7 @@ var Page = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.report.service.hpm.get("/report/pages/" + this.name + "/visuals", { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.get("/report/pages/".concat(this.name, "/visuals"), { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 2: response = _a.sent(); return [2 /*return*/, response.body @@ -8646,7 +10423,7 @@ var Page = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.report.service.hpm.get("/report/pages/" + this.name + "/visuals", { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.get("/report/pages/".concat(this.name, "/visuals"), { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 2: response = _a.sent(); visual = response.body.find(function (v) { return v.name === visualName; }); @@ -8781,7 +10558,7 @@ var Page = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.report.service.hpm.get("/report/pages/" + this.name + "/visuals", { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.get("/report/pages/".concat(this.name, "/visuals"), { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 2: response = _a.sent(); return [2 /*return*/, response.body @@ -8818,7 +10595,7 @@ var Page = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.report.service.hpm.get("/report/pages/" + this.name + "/layoutTypes/" + layoutTypeEnum, { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; + return [4 /*yield*/, this.report.service.hpm.get("/report/pages/".concat(this.name, "/layoutTypes/").concat(layoutTypeEnum), { uid: this.report.config.uniqueId }, this.report.iframe.contentWindow)]; case 2: response = _a.sent(); return [2 /*return*/, response.body]; @@ -9125,6 +10902,7 @@ var util_1 = __webpack_require__(/*! ./util */ "./src/util.ts"); var errors_1 = __webpack_require__(/*! ./errors */ "./src/errors.ts"); var page_1 = __webpack_require__(/*! ./page */ "./src/page.ts"); var bookmarksManager_1 = __webpack_require__(/*! ./bookmarksManager */ "./src/bookmarksManager.ts"); +var assert = __webpack_require__(/*! assert */ "./node_modules/assert/assert.js"); /** * The Power BI Report embed component * @@ -9152,6 +10930,39 @@ var Report = /** @class */ (function (_super) { _this.phasedLoadPath = "/report/prepare"; Array.prototype.push.apply(_this.allowedEvents, Report.allowedEvents); _this.bookmarksManager = new bookmarksManager_1.BookmarksManager(service, config, _this.iframe); + service.router.post("/reports/".concat(_this.config.uniqueId, "/eventHooks/:eventName"), function (req, _res) { return __awaiter(_this, void 0, void 0, function () { + var _a; + var _b, _c; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _a = req.params.eventName; + switch (_a) { + case "preQuery": return [3 /*break*/, 1]; + case "newAccessToken": return [3 /*break*/, 3]; + } + return [3 /*break*/, 5]; + case 1: + req.body = req.body || {}; + req.body.report = this; + return [4 /*yield*/, service.invokeSDKHook((_b = this.eventHooks) === null || _b === void 0 ? void 0 : _b.applicationContextProvider, req, _res)]; + case 2: + _d.sent(); + return [3 /*break*/, 6]; + case 3: + req.body = req.body || {}; + req.body.report = this; + return [4 /*yield*/, service.invokeSDKHook((_c = this.eventHooks) === null || _c === void 0 ? void 0 : _c.accessTokenProvider, req, _res)]; + case 4: + _d.sent(); + return [3 /*break*/, 6]; + case 5: + assert(false, "".concat(req.params.eventName, " eventHook is not supported")); + return [3 /*break*/, 6]; + case 6: return [2 /*return*/]; + } + }); + }); }); return _this; } /** @@ -9260,7 +11071,7 @@ var Report = /** @class */ (function (_super) { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.service.hpm.delete("/report/pages/" + pageName, {}, { uid: this.config.uniqueId }, this.iframe.contentWindow)]; + return [4 /*yield*/, this.service.hpm.delete("/report/pages/".concat(pageName), {}, { uid: this.config.uniqueId }, this.iframe.contentWindow)]; case 1: response = _a.sent(); return [2 /*return*/, response.body]; @@ -9295,7 +11106,7 @@ var Report = /** @class */ (function (_super) { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.service.hpm.put("/report/pages/" + pageName + "/name", page, { uid: this.config.uniqueId }, this.iframe.contentWindow)]; + return [4 /*yield*/, this.service.hpm.put("/report/pages/".concat(pageName, "/name"), page, { uid: this.config.uniqueId }, this.iframe.contentWindow)]; case 2: response = _a.sent(); return [2 /*return*/, response.body]; @@ -9445,7 +11256,7 @@ var Report = /** @class */ (function (_super) { var config = this.config; var reportId = config.id || this.element.getAttribute(Report.reportIdAttribute) || Report.findIdFromEmbedUrl(config.embedUrl); if (typeof reportId !== 'string' || reportId.length === 0) { - throw new Error("Report id is required, but it was not found. You must provide an id either as part of embed configuration or as attribute '" + Report.reportIdAttribute + "'."); + throw new Error("Report id is required, but it was not found. You must provide an id either as part of embed configuration or as attribute '".concat(Report.reportIdAttribute, "'.")); } return reportId; }; @@ -10578,6 +12389,7 @@ var page_1 = __webpack_require__(/*! ./page */ "./src/page.ts"); var qna_1 = __webpack_require__(/*! ./qna */ "./src/qna.ts"); var visual_1 = __webpack_require__(/*! ./visual */ "./src/visual.ts"); var utils = __webpack_require__(/*! ./util */ "./src/util.ts"); +var sdkConfig = __webpack_require__(/*! ./config */ "./src/config.ts"); /** * The Power BI Service embed component, which is the entry point to embed all other Power BI components into your application * @@ -10596,49 +12408,12 @@ var Service = /** @class */ (function () { * @hidden */ function Service(hpmFactory, wpmpFactory, routerFactory, config) { - var _this = this; if (config === void 0) { config = {}; } + var _this = this; this.wpmp = wpmpFactory(config.wpmpName, config.logMessages); - this.hpm = hpmFactory(this.wpmp, null, config.version, config.type); + this.hpm = hpmFactory(this.wpmp, null, config.version, config.type, config.sdkWrapperVersion); this.router = routerFactory(this.wpmp); this.uniqueSessionId = utils.generateUUID(); - this.router.post('/reports/:uniqueId/eventHooks/:eventName', function (req, _res) { return __awaiter(_this, void 0, void 0, function () { - var embed, _a; - var _b, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - embed = utils.find(function (embed) { - return (embed.config.uniqueId === req.params.uniqueId); - }, this.embeds); - if (!embed) { - return [2 /*return*/]; - } - _a = req.params.eventName; - switch (_a) { - case "preQuery": return [3 /*break*/, 1]; - case "newAccessToken": return [3 /*break*/, 3]; - } - return [3 /*break*/, 5]; - case 1: - req.body = req.body || {}; - req.body.report = embed; - return [4 /*yield*/, this.invokeSDKHook((_b = embed.eventHooks) === null || _b === void 0 ? void 0 : _b.applicationContextProvider, req, _res)]; - case 2: - _d.sent(); - return [3 /*break*/, 6]; - case 3: - req.body = req.body || {}; - req.body.report = embed; - return [4 /*yield*/, this.invokeSDKHook((_c = embed.eventHooks) === null || _c === void 0 ? void 0 : _c.accessTokenProvider, req, _res)]; - case 4: - _d.sent(); - return [3 /*break*/, 6]; - case 5: return [3 /*break*/, 6]; - case 6: return [2 /*return*/]; - } - }); - }); }); /** * Adds handler for report events. */ @@ -10745,7 +12520,7 @@ var Service = /** @class */ (function () { var _this = this; if (config === void 0) { config = undefined; } container = (container && container instanceof HTMLElement) ? container : document.body; - var elements = Array.prototype.slice.call(container.querySelectorAll("[" + embed_1.Embed.embedUrlAttribute + "]")); + var elements = Array.prototype.slice.call(container.querySelectorAll("[".concat(embed_1.Embed.embedUrlAttribute, "]"))); return elements.map(function (element) { return _this.embed(element, config); }); }; /** @@ -10791,7 +12566,7 @@ var Service = /** @class */ (function () { var powerBiElement = element; if (powerBiElement.powerBiEmbed) { if (isBootstrap) { - throw new Error("Attempted to bootstrap element " + element.outerHTML + ", but the element is already a powerbi element."); + throw new Error("Attempted to bootstrap element ".concat(element.outerHTML, ", but the element is already a powerbi element.")); } component = this.embedExisting(powerBiElement, config, phasedRender); } @@ -10811,6 +12586,14 @@ var Service = /** @class */ (function () { Service.prototype.getSdkSessionId = function () { return this.uniqueSessionId; }; + /** + * Returns the Power BI Client SDK version + * + * @hidden + */ + Service.prototype.getSDKVersion = function () { + return sdkConfig.default.version; + }; /** * Given a configuration based on a Power BI element, saves the component instance that reference the element for later lookup. * @@ -10824,13 +12607,13 @@ var Service = /** @class */ (function () { var componentType = config.type || element.getAttribute(embed_1.Embed.typeAttribute); if (!componentType) { var scrubbedConfig = __assign(__assign({}, config), { accessToken: "" }); - throw new Error("Attempted to embed using config " + JSON.stringify(scrubbedConfig) + " on element " + element.outerHTML + ", but could not determine what type of component to embed. You must specify a type in the configuration or as an attribute such as '" + embed_1.Embed.typeAttribute + "=\"" + report_1.Report.type.toLowerCase() + "\"'."); + throw new Error("Attempted to embed using config ".concat(JSON.stringify(scrubbedConfig), " on element ").concat(element.outerHTML, ", but could not determine what type of component to embed. You must specify a type in the configuration or as an attribute such as '").concat(embed_1.Embed.typeAttribute, "=\"").concat(report_1.Report.type.toLowerCase(), "\"'.")); } // Saves the type as part of the configuration so that it can be referenced later at a known location. config.type = componentType; var Component = utils.find(function (embedComponent) { return componentType === embedComponent.type.toLowerCase(); }, Service.components); if (!Component) { - throw new Error("Attempted to embed component of type: " + componentType + " but did not find any matching component. Please verify the type you specified is intended."); + throw new Error("Attempted to embed component of type: ".concat(componentType, " but did not find any matching component. Please verify the type you specified is intended.")); } var component = new Component(this, element, config, phasedRender, isBootstrap); element.powerBiEmbed = component; @@ -10850,7 +12633,7 @@ var Service = /** @class */ (function () { var component = utils.find(function (x) { return x.element === element; }, this.embeds); if (!component) { var scrubbedConfig = __assign(__assign({}, config), { accessToken: "" }); - throw new Error("Attempted to embed using config " + JSON.stringify(scrubbedConfig) + " on element " + element.outerHTML + " which already has embedded component associated, but could not find the existing component in the list of active components. This could indicate the embeds list is out of sync with the DOM, or the component is referencing the incorrect HTML element."); + throw new Error("Attempted to embed using config ".concat(JSON.stringify(scrubbedConfig), " on element ").concat(element.outerHTML, " which already has embedded component associated, but could not find the existing component in the list of active components. This could indicate the embeds list is out of sync with the DOM, or the component is referencing the incorrect HTML element.")); } // TODO: Multiple embedding to the same iframe is not supported in QnA if (config.type && config.type.toLowerCase() === "qna") { @@ -10874,7 +12657,7 @@ var Service = /** @class */ (function () { return report; } var scrubbedConfig = __assign(__assign({}, config), { accessToken: "" }); - throw new Error("Embedding on an existing element with a different type than the previous embed object is not supported. Attempted to embed using config " + JSON.stringify(scrubbedConfig) + " on element " + element.outerHTML + ", but the existing element contains an embed of type: " + this.config.type + " which does not match the new type: " + config.type); + throw new Error("Embedding on an existing element with a different type than the previous embed object is not supported. Attempted to embed using config ".concat(JSON.stringify(scrubbedConfig), " on element ").concat(element.outerHTML, ", but the existing element contains an embed of type: ").concat(this.config.type, " which does not match the new type: ").concat(config.type)); } component.populateConfig(config, /* isBootstrap */ false); component.load(phasedRender); @@ -10902,7 +12685,7 @@ var Service = /** @class */ (function () { Service.prototype.get = function (element) { var powerBiElement = element; if (!powerBiElement.powerBiEmbed) { - throw new Error("You attempted to get an instance of powerbi component associated with element: " + element.outerHTML + " but there was no associated instance."); + throw new Error("You attempted to get an instance of powerbi component associated with element: ".concat(element.outerHTML, " but there was no associated instance.")); } return powerBiElement.powerBiEmbed; }; @@ -11023,7 +12806,7 @@ var Service = /** @class */ (function () { var pageKey = 'newPage'; var page = value[pageKey]; if (!page) { - throw new Error("Page model not found at 'event.value." + pageKey + "'."); + throw new Error("Page model not found at 'event.value.".concat(pageKey, "'.")); } value[pageKey] = new page_1.Page(embed, page.name, page.displayName, true /* isActive */); } @@ -11054,6 +12837,17 @@ var Service = /** @class */ (function () { }; return iframeContent; }; + /** + * Use this API to set SDK info + * + * @hidden + * @param {string} type + * @returns {void} + */ + Service.prototype.setSdkInfo = function (type, version) { + this.hpm.defaultHeaders['x-sdk-type'] = type; + this.hpm.defaultHeaders['x-sdk-wrapper-version'] = version; + }; /** * A list of components that this service can embed */ @@ -11282,7 +13076,7 @@ exports.raiseCustomEvent = raiseCustomEvent; */ function findIndex(predicate, xs) { if (!Array.isArray(xs)) { - throw new Error("You attempted to call find with second parameter that was not an array. You passed: " + xs); + throw new Error("You attempted to call find with second parameter that was not an array. You passed: ".concat(xs)); } var index; xs.some(function (x, i) { @@ -11657,7 +13451,7 @@ var Visual = /** @class */ (function (_super) { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.service.hpm.get("/report/pages/" + config.pageName + "/visuals", { uid: this.config.uniqueId }, this.iframe.contentWindow)]; + return [4 /*yield*/, this.service.hpm.get("/report/pages/".concat(config.pageName, "/visuals"), { uid: this.config.uniqueId }, this.iframe.contentWindow)]; case 2: response = _a.sent(); embeddedVisuals = response.body.filter(function (pageVisual) { return pageVisual.name === config.visualName; }); @@ -11823,9 +13617,9 @@ var Visual = /** @class */ (function (_super) { case powerbi_models_1.FiltersLevel.Report: return "/report/filters"; case powerbi_models_1.FiltersLevel.Page: - return "/report/pages/" + config.pageName + "/filters"; + return "/report/pages/".concat(config.pageName, "/filters"); default: - return "/report/pages/" + config.pageName + "/visuals/" + config.visualName + "/filters"; + return "/report/pages/".concat(config.pageName, "/visuals/").concat(config.visualName, "/filters"); } }; /** @hidden */ @@ -11926,7 +13720,7 @@ var VisualDescriptor = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.page.report.service.hpm.get("/report/pages/" + this.page.name + "/visuals/" + this.name + "/filters", { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; + return [4 /*yield*/, this.page.report.service.hpm.get("/report/pages/".concat(this.page.name, "/visuals/").concat(this.name, "/filters"), { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; case 1: response = _a.sent(); return [2 /*return*/, response.body]; @@ -11962,7 +13756,7 @@ var VisualDescriptor = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.page.report.service.hpm.post("/report/pages/" + this.page.name + "/visuals/" + this.name + "/filters", updateFiltersRequest, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; + return [4 /*yield*/, this.page.report.service.hpm.post("/report/pages/".concat(this.page.name, "/visuals/").concat(this.name, "/filters"), updateFiltersRequest, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; case 2: return [2 /*return*/, _a.sent()]; case 3: response_2 = _a.sent(); @@ -12009,7 +13803,7 @@ var VisualDescriptor = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.page.report.service.hpm.put("/report/pages/" + this.page.name + "/visuals/" + this.name + "/filters", filters, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; + return [4 /*yield*/, this.page.report.service.hpm.put("/report/pages/".concat(this.page.name, "/visuals/").concat(this.name, "/filters"), filters, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; case 1: return [2 /*return*/, _a.sent()]; case 2: response_3 = _a.sent(); @@ -12045,7 +13839,7 @@ var VisualDescriptor = /** @class */ (function () { _a.label = 1; case 1: _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, this.page.report.service.hpm.post("/report/pages/" + this.page.name + "/visuals/" + this.name + "/exportData", exportDataRequestBody, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; + return [4 /*yield*/, this.page.report.service.hpm.post("/report/pages/".concat(this.page.name, "/visuals/").concat(this.name, "/exportData"), exportDataRequestBody, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; case 2: response = _a.sent(); return [2 /*return*/, response.body]; @@ -12074,7 +13868,7 @@ var VisualDescriptor = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.page.report.service.hpm.put("/report/pages/" + this.page.name + "/visuals/" + this.name + "/slicer", state, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; + return [4 /*yield*/, this.page.report.service.hpm.put("/report/pages/".concat(this.page.name, "/visuals/").concat(this.name, "/slicer"), state, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; case 1: return [2 /*return*/, _a.sent()]; case 2: response_5 = _a.sent(); @@ -12102,7 +13896,7 @@ var VisualDescriptor = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.page.report.service.hpm.get("/report/pages/" + this.page.name + "/visuals/" + this.name + "/slicer", { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; + return [4 /*yield*/, this.page.report.service.hpm.get("/report/pages/".concat(this.page.name, "/visuals/").concat(this.name, "/slicer"), { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; case 1: response = _a.sent(); return [2 /*return*/, response.body]; @@ -12127,7 +13921,7 @@ var VisualDescriptor = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.page.report.service.hpm.post("/report/pages/" + this.page.name + "/visuals/" + this.name + "/clone", request, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; + return [4 /*yield*/, this.page.report.service.hpm.post("/report/pages/".concat(this.page.name, "/visuals/").concat(this.name, "/clone"), request, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; case 1: response = _a.sent(); return [2 /*return*/, response.body]; @@ -12156,7 +13950,7 @@ var VisualDescriptor = /** @class */ (function () { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, this.page.report.service.hpm.put("/report/pages/" + this.page.name + "/visuals/" + this.name + "/sortBy", request, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; + return [4 /*yield*/, this.page.report.service.hpm.put("/report/pages/".concat(this.page.name, "/visuals/").concat(this.name, "/sortBy"), request, { uid: this.page.report.config.uniqueId }, this.page.report.iframe.contentWindow)]; case 1: return [2 /*return*/, _a.sent()]; case 2: response_8 = _a.sent(); diff --git a/dist/powerbi.min.js b/dist/powerbi.min.js index 5ffef31b..d24eac5c 100644 --- a/dist/powerbi.min.js +++ b/dist/powerbi.min.js @@ -1,10 +1,21 @@ -// powerbi-client v2.19.1 +// powerbi-client v2.21.1 // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["powerbi-client"]=e():t["powerbi-client"]=e()}(this,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(i,a,function(e){return t[e]}.bind(null,a));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=13)}([function(t,e,r){var i;i=function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(i,a,function(e){return t[e]}.bind(null,a));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){var i,a=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.validateZoomLevel=e.validateCustomTheme=e.validateCommandsSettings=e.validateVisualSettings=e.validateVisualHeader=e.validateExportDataRequest=e.validateQnaInterpretInputData=e.validateLoadQnaConfiguration=e.validateSaveAsParameters=e.validateUpdateFiltersRequest=e.validateFilter=e.validatePage=e.validateTileLoad=e.validateDashboardLoad=e.validateCreateReport=e.validatePaginatedReportLoad=e.validateReportLoad=e.validateMenuGroupExtension=e.validateExtension=e.validateCustomPageSize=e.validateVisualizationsPane=e.validateSyncSlicersPane=e.validateSelectionPane=e.validatePageNavigationPane=e.validateFieldsPane=e.validateFiltersPane=e.validateBookmarksPane=e.validatePanes=e.validateSettings=e.validateCaptureBookmarkRequest=e.validateApplyBookmarkStateRequest=e.validateApplyBookmarkByNameRequest=e.validateAddBookmarkRequest=e.validatePlayBookmarkRequest=e.validateSlicerState=e.validateSlicer=e.validateVisualSelector=e.isIExtensionArray=e.isIExtensions=e.isGroupedMenuExtension=e.isFlatMenuExtension=e.isReportFiltersArray=e.isOnLoadFilters=e.VisualDataRoleKindPreference=e.VisualDataRoleKind=e.CommandDisplayOption=e.SlicerTargetSelector=e.VisualTypeSelector=e.VisualSelector=e.PageSelector=e.Selector=e.SortDirection=e.LegendPosition=e.TextAlignment=e.CommonErrorCodes=e.BookmarksPlayMode=e.ExportDataType=e.QnaMode=e.PageNavigationPosition=e.isColumnAggr=e.isHierarchyLevelAggr=e.isHierarchyLevel=e.isColumn=e.isMeasure=e.getFilterType=e.isBasicFilterWithKeys=e.isFilterKeyColumnsTarget=e.AdvancedFilter=e.TupleFilter=e.IdentityFilter=e.BasicFilterWithKeys=e.BasicFilter=e.RelativeTimeFilter=e.RelativeDateFilter=e.TopNFilter=e.IncludeExcludeFilter=e.NotSupportedFilter=e.Filter=e.RelativeDateOperators=e.RelativeDateFilterTimeUnit=e.FilterType=e.FiltersLevel=e.FiltersOperations=e.MenuLocation=e.ContrastMode=e.TokenType=e.ViewMode=e.Permissions=e.SectionVisibility=e.ReportAlignment=e.HyperlinkClickBehavior=e.LayoutType=e.VisualContainerDisplayMode=e.BackgroundType=e.DisplayOption=e.PageSizeType=e.TraceType=void 0;var o,n=r(1);!function(t){t[t.Information=0]="Information",t[t.Verbose=1]="Verbose",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.ExpectedError=4]="ExpectedError",t[t.UnexpectedError=5]="UnexpectedError",t[t.Fatal=6]="Fatal"}(e.TraceType||(e.TraceType={})),function(t){t[t.Widescreen=0]="Widescreen",t[t.Standard=1]="Standard",t[t.Cortana=2]="Cortana",t[t.Letter=3]="Letter",t[t.Custom=4]="Custom",t[t.Mobile=5]="Mobile"}(e.PageSizeType||(e.PageSizeType={})),function(t){t[t.FitToPage=0]="FitToPage",t[t.FitToWidth=1]="FitToWidth",t[t.ActualSize=2]="ActualSize"}(e.DisplayOption||(e.DisplayOption={})),function(t){t[t.Default=0]="Default",t[t.Transparent=1]="Transparent"}(e.BackgroundType||(e.BackgroundType={})),function(t){t[t.Visible=0]="Visible",t[t.Hidden=1]="Hidden"}(e.VisualContainerDisplayMode||(e.VisualContainerDisplayMode={})),function(t){t[t.Master=0]="Master",t[t.Custom=1]="Custom",t[t.MobilePortrait=2]="MobilePortrait",t[t.MobileLandscape=3]="MobileLandscape"}(e.LayoutType||(e.LayoutType={})),function(t){t[t.Navigate=0]="Navigate",t[t.NavigateAndRaiseEvent=1]="NavigateAndRaiseEvent",t[t.RaiseEvent=2]="RaiseEvent"}(e.HyperlinkClickBehavior||(e.HyperlinkClickBehavior={})),function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.None=3]="None"}(e.ReportAlignment||(e.ReportAlignment={})),function(t){t[t.AlwaysVisible=0]="AlwaysVisible",t[t.HiddenInViewMode=1]="HiddenInViewMode"}(e.SectionVisibility||(e.SectionVisibility={})),function(t){t[t.Read=0]="Read",t[t.ReadWrite=1]="ReadWrite",t[t.Copy=2]="Copy",t[t.Create=4]="Create",t[t.All=7]="All"}(e.Permissions||(e.Permissions={})),function(t){t[t.View=0]="View",t[t.Edit=1]="Edit"}(e.ViewMode||(e.ViewMode={})),function(t){t[t.Aad=0]="Aad",t[t.Embed=1]="Embed"}(e.TokenType||(e.TokenType={})),function(t){t[t.None=0]="None",t[t.HighContrast1=1]="HighContrast1",t[t.HighContrast2=2]="HighContrast2",t[t.HighContrastBlack=3]="HighContrastBlack",t[t.HighContrastWhite=4]="HighContrastWhite"}(e.ContrastMode||(e.ContrastMode={})),function(t){t[t.Bottom=0]="Bottom",t[t.Top=1]="Top"}(e.MenuLocation||(e.MenuLocation={})),function(t){t[t.RemoveAll=0]="RemoveAll",t[t.ReplaceAll=1]="ReplaceAll",t[t.Add=2]="Add",t[t.Replace=3]="Replace"}(e.FiltersOperations||(e.FiltersOperations={})),function(t){t[t.Report=0]="Report",t[t.Page=1]="Page",t[t.Visual=2]="Visual"}(e.FiltersLevel||(e.FiltersLevel={})),function(t){t[t.Advanced=0]="Advanced",t[t.Basic=1]="Basic",t[t.Unknown=2]="Unknown",t[t.IncludeExclude=3]="IncludeExclude",t[t.RelativeDate=4]="RelativeDate",t[t.TopN=5]="TopN",t[t.Tuple=6]="Tuple",t[t.RelativeTime=7]="RelativeTime",t[t.Identity=8]="Identity"}(o=e.FilterType||(e.FilterType={})),function(t){t[t.Days=0]="Days",t[t.Weeks=1]="Weeks",t[t.CalendarWeeks=2]="CalendarWeeks",t[t.Months=3]="Months",t[t.CalendarMonths=4]="CalendarMonths",t[t.Years=5]="Years",t[t.CalendarYears=6]="CalendarYears",t[t.Minutes=7]="Minutes",t[t.Hours=8]="Hours"}(e.RelativeDateFilterTimeUnit||(e.RelativeDateFilterTimeUnit={})),function(t){t[t.InLast=0]="InLast",t[t.InThis=1]="InThis",t[t.InNext=2]="InNext"}(e.RelativeDateOperators||(e.RelativeDateOperators={}));var l=function(){function t(t,e){this.target=t,this.filterType=e}return t.prototype.toJSON=function(){var t={$schema:this.schemaUrl,target:this.target,filterType:this.filterType};return void 0!==this.displaySettings&&(t.displaySettings=this.displaySettings),t},t}();e.Filter=l;var s=function(t){function e(r,i,a){var n=t.call(this,r,o.Unknown)||this;return n.message=i,n.notSupportedTypeName=a,n.schemaUrl=e.schemaUrl,n}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.message=this.message,e.notSupportedTypeName=this.notSupportedTypeName,e},e.schemaUrl="http://powerbi.com/product/schema#notSupported",e}(l);e.NotSupportedFilter=s;var u=function(t){function e(r,i,a){var n=t.call(this,r,o.IncludeExclude)||this;return n.values=a,n.isExclude=i,n.schemaUrl=e.schemaUrl,n}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.isExclude=this.isExclude,e.values=this.values,e},e.schemaUrl="http://powerbi.com/product/schema#includeExclude",e}(l);e.IncludeExcludeFilter=u;var d=function(t){function e(r,i,a,n){var l=t.call(this,r,o.TopN)||this;return l.operator=i,l.itemCount=a,l.schemaUrl=e.schemaUrl,l.orderBy=n,l}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.operator=this.operator,e.itemCount=this.itemCount,e.orderBy=this.orderBy,e},e.schemaUrl="http://powerbi.com/product/schema#topN",e}(l);e.TopNFilter=d;var c=function(t){function e(r,i,a,n,l){var s=t.call(this,r,o.RelativeDate)||this;return s.operator=i,s.timeUnitsCount=a,s.timeUnitType=n,s.includeToday=l,s.schemaUrl=e.schemaUrl,s}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.operator=this.operator,e.timeUnitsCount=this.timeUnitsCount,e.timeUnitType=this.timeUnitType,e.includeToday=this.includeToday,e},e.schemaUrl="http://powerbi.com/product/schema#relativeDate",e}(l);e.RelativeDateFilter=c;var p=function(t){function e(r,i,a,n){var l=t.call(this,r,o.RelativeTime)||this;return l.operator=i,l.timeUnitsCount=a,l.timeUnitType=n,l.schemaUrl=e.schemaUrl,l}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.operator=this.operator,e.timeUnitsCount=this.timeUnitsCount,e.timeUnitType=this.timeUnitType,e},e.schemaUrl="http://powerbi.com/product/schema#relativeTime",e}(l);e.RelativeTimeFilter=p;var f=function(t){function e(r,i){for(var a=[],n=2;n0&&!a)throw new Error("You should pass the values to be filtered for each key. You passed: no values and "+n+" keys");if(0===n&&a&&a.length>0)throw new Error("You passed key values but your target object doesn't contain the keys to be filtered");for(var l=0,s=o.keyValues;l2)throw new Error("AdvancedFilters may not have more than two conditions. You passed: "+a.length);if(1===l.length&&"And"!==i)throw new Error('Logical Operator must be "And" when there is only one condition provided');return s.conditions=l,s}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.logicalOperator=this.logicalOperator,e.conditions=this.conditions,e},e.schemaUrl="http://powerbi.com/product/schema#advanced",e}(l);function V(t){if(t.filterType)return t.filterType;var e=t,r=t;return"string"==typeof e.operator&&Array.isArray(e.values)?o.Basic:"string"==typeof r.logicalOperator&&Array.isArray(r.conditions)?o.Advanced:o.Unknown}function g(t){return!(!t.table||!t.column||t.aggregationFunction)}e.AdvancedFilter=m,e.isFilterKeyColumnsTarget=function(t){return g(t)&&!!t.keys},e.isBasicFilterWithKeys=function(t){return V(t)===o.Basic&&!!t.keyValues},e.getFilterType=V,e.isMeasure=function(t){return void 0!==t.table&&void 0!==t.measure},e.isColumn=g,e.isHierarchyLevel=function(t){return!(!(t.table&&t.hierarchy&&t.hierarchyLevel)||t.aggregationFunction)},e.isHierarchyLevelAggr=function(t){return!!(t.table&&t.hierarchy&&t.hierarchyLevel&&t.aggregationFunction)},e.isColumnAggr=function(t){return!!(t.table&&t.column&&t.aggregationFunction)},function(t){t[t.Bottom=0]="Bottom",t[t.Left=1]="Left"}(e.PageNavigationPosition||(e.PageNavigationPosition={})),function(t){t[t.Interactive=0]="Interactive",t[t.ResultOnly=1]="ResultOnly"}(e.QnaMode||(e.QnaMode={})),function(t){t[t.Summarized=0]="Summarized",t[t.Underlying=1]="Underlying"}(e.ExportDataType||(e.ExportDataType={})),function(t){t[t.Off=0]="Off",t[t.Presentation=1]="Presentation"}(e.BookmarksPlayMode||(e.BookmarksPlayMode={})),e.CommonErrorCodes={TokenExpired:"TokenExpired",NotFound:"PowerBIEntityNotFound",InvalidParameters:"Invalid parameters",LoadReportFailed:"LoadReportFailed",NotAuthorized:"PowerBINotAuthorizedException",FailedToLoadModel:"ExplorationContainer_FailedToLoadModel_DefaultDetails"},e.TextAlignment={Left:"left",Center:"center",Right:"right"},e.LegendPosition={Top:"Top",Bottom:"Bottom",Right:"Right",Left:"Left",TopCenter:"TopCenter",BottomCenter:"BottomCenter",RightCenter:"RightCenter",LeftCenter:"LeftCenter"},function(t){t[t.Ascending=1]="Ascending",t[t.Descending=2]="Descending"}(e.SortDirection||(e.SortDirection={}));var b=function(){function t(t){this.$schema=t}return t.prototype.toJSON=function(){return{$schema:this.$schema}},t}();e.Selector=b;var w=function(t){function e(r){var i=t.call(this,e.schemaUrl)||this;return i.pageName=r,i}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.pageName=this.pageName,e},e.schemaUrl="http://powerbi.com/product/schema#pageSelector",e}(b);e.PageSelector=w;var P=function(t){function e(r){var i=t.call(this,e.schemaUrl)||this;return i.visualName=r,i}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.visualName=this.visualName,e},e.schemaUrl="http://powerbi.com/product/schema#visualSelector",e}(b);e.VisualSelector=P;var _=function(t){function e(e){var r=t.call(this,P.schemaUrl)||this;return r.visualType=e,r}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.visualType=this.visualType,e},e.schemaUrl="http://powerbi.com/product/schema#visualTypeSelector",e}(b);e.VisualTypeSelector=_;var O=function(t){function e(e){var r=t.call(this,P.schemaUrl)||this;return r.target=e,r}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.target=this.target,e},e.schemaUrl="http://powerbi.com/product/schema#slicerTargetSelector",e}(b);function S(t){return Array.isArray(t)}function T(t){return t&&!!t.groupName}function E(t){return Array.isArray(t)}function F(t){var e=t.message;return e||(e=t.path+" is invalid. Not meeting "+t.keyword+" constraint"),{message:e}}e.SlicerTargetSelector=O,function(t){t[t.Enabled=0]="Enabled",t[t.Disabled=1]="Disabled",t[t.Hidden=2]="Hidden"}(e.CommandDisplayOption||(e.CommandDisplayOption={})),function(t){t[t.Grouping=0]="Grouping",t[t.Measure=1]="Measure",t[t.GroupingOrMeasure=2]="GroupingOrMeasure"}(e.VisualDataRoleKind||(e.VisualDataRoleKind={})),function(t){t[t.Measure=0]="Measure",t[t.Grouping=1]="Grouping"}(e.VisualDataRoleKindPreference||(e.VisualDataRoleKindPreference={})),e.isOnLoadFilters=function(t){return t&&!S(t)},e.isReportFiltersArray=S,e.isFlatMenuExtension=function(t){return t&&!T(t)},e.isGroupedMenuExtension=T,e.isIExtensions=function(t){return t&&!E(t)},e.isIExtensionArray=E,e.validateVisualSelector=function(t){var e=n.Validators.visualSelectorValidator.validate(t);return e?e.map(F):void 0},e.validateSlicer=function(t){var e=n.Validators.slicerValidator.validate(t);return e?e.map(F):void 0},e.validateSlicerState=function(t){var e=n.Validators.slicerStateValidator.validate(t);return e?e.map(F):void 0},e.validatePlayBookmarkRequest=function(t){var e=n.Validators.playBookmarkRequestValidator.validate(t);return e?e.map(F):void 0},e.validateAddBookmarkRequest=function(t){var e=n.Validators.addBookmarkRequestValidator.validate(t);return e?e.map(F):void 0},e.validateApplyBookmarkByNameRequest=function(t){var e=n.Validators.applyBookmarkByNameRequestValidator.validate(t);return e?e.map(F):void 0},e.validateApplyBookmarkStateRequest=function(t){var e=n.Validators.applyBookmarkStateRequestValidator.validate(t);return e?e.map(F):void 0},e.validateCaptureBookmarkRequest=function(t){var e=n.Validators.captureBookmarkRequestValidator.validate(t);return e?e.map(F):void 0},e.validateSettings=function(t){var e=n.Validators.settingsValidator.validate(t);return e?e.map(F):void 0},e.validatePanes=function(t){var e=n.Validators.reportPanesValidator.validate(t);return e?e.map(F):void 0},e.validateBookmarksPane=function(t){var e=n.Validators.bookmarksPaneValidator.validate(t);return e?e.map(F):void 0},e.validateFiltersPane=function(t){var e=n.Validators.filtersPaneValidator.validate(t);return e?e.map(F):void 0},e.validateFieldsPane=function(t){var e=n.Validators.fieldsPaneValidator.validate(t);return e?e.map(F):void 0},e.validatePageNavigationPane=function(t){var e=n.Validators.pageNavigationPaneValidator.validate(t);return e?e.map(F):void 0},e.validateSelectionPane=function(t){var e=n.Validators.selectionPaneValidator.validate(t);return e?e.map(F):void 0},e.validateSyncSlicersPane=function(t){var e=n.Validators.syncSlicersPaneValidator.validate(t);return e?e.map(F):void 0},e.validateVisualizationsPane=function(t){var e=n.Validators.visualizationsPaneValidator.validate(t);return e?e.map(F):void 0},e.validateCustomPageSize=function(t){var e=n.Validators.customPageSizeValidator.validate(t);return e?e.map(F):void 0},e.validateExtension=function(t){var e=n.Validators.extensionValidator.validate(t);return e?e.map(F):void 0},e.validateMenuGroupExtension=function(t){var e=n.Validators.menuGroupExtensionValidator.validate(t);return e?e.map(F):void 0},e.validateReportLoad=function(t){var e=n.Validators.reportLoadValidator.validate(t);return e?e.map(F):void 0},e.validatePaginatedReportLoad=function(t){var e=n.Validators.paginatedReportLoadValidator.validate(t);return e?e.map(F):void 0},e.validateCreateReport=function(t){var e=n.Validators.reportCreateValidator.validate(t);return e?e.map(F):void 0},e.validateDashboardLoad=function(t){var e=n.Validators.dashboardLoadValidator.validate(t);return e?e.map(F):void 0},e.validateTileLoad=function(t){var e=n.Validators.tileLoadValidator.validate(t);return e?e.map(F):void 0},e.validatePage=function(t){var e=n.Validators.pageValidator.validate(t);return e?e.map(F):void 0},e.validateFilter=function(t){var e=n.Validators.filterValidator.validate(t);return e?e.map(F):void 0},e.validateUpdateFiltersRequest=function(t){var e=n.Validators.updateFiltersRequestValidator.validate(t);return e?e.map(F):void 0},e.validateSaveAsParameters=function(t){var e=n.Validators.saveAsParametersValidator.validate(t);return e?e.map(F):void 0},e.validateLoadQnaConfiguration=function(t){var e=n.Validators.loadQnaValidator.validate(t);return e?e.map(F):void 0},e.validateQnaInterpretInputData=function(t){var e=n.Validators.qnaInterpretInputDataValidator.validate(t);return e?e.map(F):void 0},e.validateExportDataRequest=function(t){var e=n.Validators.exportDataRequestValidator.validate(t);return e?e.map(F):void 0},e.validateVisualHeader=function(t){var e=n.Validators.visualHeaderValidator.validate(t);return e?e.map(F):void 0},e.validateVisualSettings=function(t){var e=n.Validators.visualSettingsValidator.validate(t);return e?e.map(F):void 0},e.validateCommandsSettings=function(t){var e=n.Validators.commandsSettingsValidator.validate(t);return e?e.map(F):void 0},e.validateCustomTheme=function(t){var e=n.Validators.customThemeValidator.validate(t);return e?e.map(F):void 0},e.validateZoomLevel=function(t){var e=n.Validators.zoomLevelValidator.validate(t);return e?e.map(F):void 0}},function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.Validators=void 0;var i=r(2),a=r(5),o=r(6),n=r(7),l=r(8),s=r(9),u=r(10),d=r(11),c=r(12),p=r(13),f=r(14),h=r(15),v=r(16),y=r(17),m=r(18),V=r(19),g=r(20),b=r(21),w=r(22),P=r(23),_=r(24),O=r(25),S=r(26),T=r(27),E=r(28),F=r(29),R=r(4),x=r(30);e.Validators={addBookmarkRequestValidator:new a.AddBookmarkRequestValidator,advancedFilterTypeValidator:new R.EnumValidator([0]),advancedFilterValidator:new c.AdvancedFilterValidator,anyArrayValidator:new R.ArrayValidator([new S.AnyOfValidator([new R.StringValidator,new R.NumberValidator,new R.BooleanValidator])]),anyFilterValidator:new S.AnyOfValidator([new c.BasicFilterValidator,new c.AdvancedFilterValidator,new c.IncludeExcludeFilterValidator,new c.NotSupportedFilterValidator,new c.RelativeDateFilterValidator,new c.TopNFilterValidator,new c.RelativeTimeFilterValidator]),anyValueValidator:new S.AnyOfValidator([new R.StringValidator,new R.NumberValidator,new R.BooleanValidator]),actionBarValidator:new i.ActionBarValidator,applyBookmarkByNameRequestValidator:new a.ApplyBookmarkByNameRequestValidator,applyBookmarkStateRequestValidator:new a.ApplyBookmarkStateRequestValidator,applyBookmarkValidator:new S.AnyOfValidator([new a.ApplyBookmarkByNameRequestValidator,new a.ApplyBookmarkStateRequestValidator]),backgroundValidator:new R.EnumValidator([0,1]),basicFilterTypeValidator:new R.EnumValidator([1]),basicFilterValidator:new c.BasicFilterValidator,booleanArrayValidator:new R.BooleanArrayValidator,booleanValidator:new R.BooleanValidator,bookmarksPaneValidator:new h.BookmarksPaneValidator,captureBookmarkOptionsValidator:new a.CaptureBookmarkOptionsValidator,captureBookmarkRequestValidator:new a.CaptureBookmarkRequestValidator,commandDisplayOptionValidator:new R.EnumValidator([0,1,2]),commandExtensionSelectorValidator:new S.AnyOfValidator([new b.VisualSelectorValidator,new b.VisualTypeSelectorValidator]),commandExtensionArrayValidator:new R.ArrayValidator([new d.CommandExtensionValidator]),commandExtensionValidator:new d.CommandExtensionValidator,commandsSettingsArrayValidator:new R.ArrayValidator([new o.CommandsSettingsValidator]),commandsSettingsValidator:new o.CommandsSettingsValidator,conditionItemValidator:new c.ConditionItemValidator,contrastModeValidator:new R.EnumValidator([0,1,2,3,4]),customLayoutDisplayOptionValidator:new R.EnumValidator([0,1,2]),customLayoutValidator:new p.CustomLayoutValidator,customPageSizeValidator:new f.CustomPageSizeValidator,customThemeValidator:new n.CustomThemeValidator,dashboardLoadValidator:new l.DashboardLoadValidator,datasetBindingValidator:new s.DatasetBindingValidator,displayStateModeValidator:new R.EnumValidator([0,1]),displayStateValidator:new p.DisplayStateValidator,exportDataRequestValidator:new u.ExportDataRequestValidator,extensionArrayValidator:new R.ArrayValidator([new d.ExtensionValidator]),extensionsValidator:new S.AnyOfValidator([new R.ArrayValidator([new d.ExtensionValidator]),new d.ExtensionsValidator]),extensionPointsValidator:new d.ExtensionPointsValidator,extensionValidator:new d.ExtensionValidator,fieldForbiddenValidator:new T.FieldForbiddenValidator,fieldRequiredValidator:new E.FieldRequiredValidator,fieldsPaneValidator:new h.FieldsPaneValidator,filterColumnTargetValidator:new c.FilterColumnTargetValidator,filterDisplaySettingsValidator:new c.FilterDisplaySettingsValidator,filterConditionsValidator:new R.ArrayValidator([new c.ConditionItemValidator]),filterHierarchyTargetValidator:new c.FilterHierarchyTargetValidator,filterMeasureTargetValidator:new c.FilterMeasureTargetValidator,filterTargetValidator:new S.AnyOfValidator([new c.FilterColumnTargetValidator,new c.FilterHierarchyTargetValidator,new c.FilterMeasureTargetValidator]),filterValidator:new c.FilterValidator,filterTypeValidator:new R.EnumValidator([0,1,2,3,4,5,6,7]),filtersArrayValidator:new R.ArrayValidator([new c.FilterValidator]),filtersOperationsUpdateValidator:new R.EnumValidator([1,2,3]),filtersOperationsRemoveAllValidator:new R.EnumValidator([0]),filtersPaneValidator:new h.FiltersPaneValidator,hyperlinkClickBehaviorValidator:new R.EnumValidator([0,1,2]),includeExcludeFilterValidator:new c.IncludeExcludeFilterValidator,includeExludeFilterTypeValidator:new R.EnumValidator([3]),layoutTypeValidator:new R.EnumValidator([0,1,2,3]),loadQnaValidator:new v.LoadQnaValidator,menuExtensionValidator:new S.AnyOfValidator([new d.FlatMenuExtensionValidator,new d.GroupedMenuExtensionValidator]),menuGroupExtensionArrayValidator:new R.ArrayValidator([new d.MenuGroupExtensionValidator]),menuGroupExtensionValidator:new d.MenuGroupExtensionValidator,menuLocationValidator:new R.EnumValidator([0,1]),notSupportedFilterTypeValidator:new R.EnumValidator([2]),notSupportedFilterValidator:new c.NotSupportedFilterValidator,numberArrayValidator:new R.NumberArrayValidator,numberValidator:new R.NumberValidator,onLoadFiltersBaseValidator:new S.AnyOfValidator([new c.OnLoadFiltersBaseValidator,new c.OnLoadFiltersBaseRemoveOperationValidator]),pageLayoutValidator:new F.MapValidator([new R.StringValidator],[new p.VisualLayoutValidator]),pageNavigationPaneValidator:new h.PageNavigationPaneValidator,pageNavigationPositionValidator:new R.EnumValidator([0,1]),pageSizeTypeValidator:new R.EnumValidator([0,1,2,3,4,5]),pageSizeValidator:new f.PageSizeValidator,pageValidator:new f.PageValidator,pageViewFieldValidator:new f.PageViewFieldValidator,pagesLayoutValidator:new F.MapValidator([new R.StringValidator],[new p.PageLayoutValidator]),paginatedReportCommandsValidator:new o.PaginatedReportCommandsValidator,paginatedReportLoadValidator:new V.PaginatedReportLoadValidator,paginatedReportsettingsValidator:new w.PaginatedReportSettingsValidator,parametersPanelValidator:new x.ParametersPanelValidator,permissionsValidator:new R.EnumValidator([0,1,2,4,7]),playBookmarkRequestValidator:new a.PlayBookmarkRequestValidator,qnaInterpretInputDataValidator:new v.QnaInterpretInputDataValidator,qnaPanesValidator:new h.QnaPanesValidator,qnaSettingValidator:new v.QnaSettingsValidator,relativeDateFilterOperatorValidator:new R.EnumValidator([0,1,2]),relativeDateFilterTimeUnitTypeValidator:new R.EnumValidator([0,1,2,3,4,5,6]),relativeDateFilterTypeValidator:new R.EnumValidator([4]),relativeDateFilterValidator:new c.RelativeDateFilterValidator,relativeDateTimeFilterTypeValidator:new R.EnumValidator([4,7]),relativeDateTimeFilterUnitTypeValidator:new R.EnumValidator([0,1,2,3,4,5,6,7,8]),relativeTimeFilterTimeUnitTypeValidator:new R.EnumValidator([7,8]),relativeTimeFilterTypeValidator:new R.EnumValidator([7]),relativeTimeFilterValidator:new c.RelativeTimeFilterValidator,reportBarsValidator:new i.ReportBarsValidator,reportCreateValidator:new y.ReportCreateValidator,reportLoadFiltersValidator:new S.AnyOfValidator([new R.ArrayValidator([new c.FilterValidator]),new c.OnLoadFiltersValidator]),reportLoadValidator:new m.ReportLoadValidator,reportPanesValidator:new h.ReportPanesValidator,saveAsParametersValidator:new g.SaveAsParametersValidator,selectionPaneValidator:new h.SelectionPaneValidator,settingsValidator:new w.SettingsValidator,singleCommandSettingsValidator:new o.SingleCommandSettingsValidator,slicerSelectorValidator:new S.AnyOfValidator([new b.VisualSelectorValidator,new b.SlicerTargetSelectorValidator]),slicerStateValidator:new P.SlicerStateValidator,slicerTargetValidator:new S.AnyOfValidator([new c.FilterColumnTargetValidator,new c.FilterHierarchyTargetValidator,new c.FilterMeasureTargetValidator,new c.FilterKeyColumnsTargetValidator,new c.FilterKeyHierarchyTargetValidator]),slicerValidator:new P.SlicerValidator,stringArrayValidator:new R.StringArrayValidator,stringValidator:new R.StringValidator,syncSlicersPaneValidator:new h.SyncSlicersPaneValidator,tileLoadValidator:new _.TileLoadValidator,tokenTypeValidator:new R.EnumValidator([0,1]),topNFilterTypeValidator:new R.EnumValidator([5]),topNFilterValidator:new c.TopNFilterValidator,updateFiltersRequestValidator:new S.AnyOfValidator([new c.UpdateFiltersRequestValidator,new c.RemoveFiltersRequestValidator]),viewModeValidator:new R.EnumValidator([0,1]),visualCommandSelectorValidator:new S.AnyOfValidator([new b.VisualSelectorValidator,new b.VisualTypeSelectorValidator]),visualHeaderSelectorValidator:new S.AnyOfValidator([new b.VisualSelectorValidator,new b.VisualTypeSelectorValidator]),visualHeaderSettingsValidator:new O.VisualHeaderSettingsValidator,visualHeaderValidator:new O.VisualHeaderValidator,visualHeadersValidator:new R.ArrayValidator([new O.VisualHeaderValidator]),visualizationsPaneValidator:new h.VisualizationsPaneValidator,visualLayoutValidator:new p.VisualLayoutValidator,visualSelectorValidator:new b.VisualSelectorValidator,visualSettingsValidator:new O.VisualSettingsValidator,visualTypeSelectorValidator:new b.VisualTypeSelectorValidator,zoomLevelValidator:new R.RangeValidator(.25,4)}},function(t,e,r){var i,a=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBarValidator=e.ReportBarsValidator=void 0;var o=r(3),n=r(4),l=r(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.validate=function(e,r,i){if(null==e)return null;var a=t.prototype.validate.call(this,e,r,i);if(a)return a;var n=[{field:"actionBar",validators:[l.Validators.actionBarValidator]}];return new o.MultipleFieldsValidator(n).validate(e,r,i)},e}(n.ObjectValidator);e.ReportBarsValidator=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.validate=function(e,r,i){if(null==e)return null;var a=t.prototype.validate.call(this,e,r,i);if(a)return a;var n=[{field:"visible",validators:[l.Validators.booleanValidator]}];return new o.MultipleFieldsValidator(n).validate(e,r,i)},e}(n.ObjectValidator);e.ActionBarValidator=u},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MultipleFieldsValidator=void 0;var r=function(){function t(t){this.fieldValidatorsPairs=t}return t.prototype.validate=function(t,e,r){if(!this.fieldValidatorsPairs)return null;for(var i=e?e+"."+r:r,a=0,o=this.fieldValidatorsPairs;athis.maxValue||e0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0?"&":"?";return t+=i+e+"="+r},e.isSavedInternal=function(t,e,a){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,t.get("/report/hasUnsavedChanges",{uid:e},a)];case 1:return[2,!r.sent().body];case 2:throw r.sent().body;case 3:return[2]}}))}))},e.isRDLEmbed=function(t){return t&&t.toLowerCase().indexOf("/rdlembed?")>=0},e.autoAuthInEmbedUrl=function(t){return t&&decodeURIComponent(t).toLowerCase().indexOf("autoauth=true")>=0},e.getRandomValue=o,e.getTimeDiffInMilliseconds=function(t,e){return Math.abs(t.getTime()-e.getTime())}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.FilterBuilder=void 0;var r=function(){function t(){}return t.prototype.withTargetObject=function(t){return this.target=t,this},t.prototype.withColumnTarget=function(t,e){return this.target={table:t,column:e},this},t.prototype.withMeasureTarget=function(t,e){return this.target={table:t,measure:e},this},t.prototype.withHierarchyLevelTarget=function(t,e,r){return this.target={table:t,hierarchy:e,hierarchyLevel:r},this},t.prototype.withColumnAggregation=function(t,e,r){return this.target={table:t,column:e,aggregationFunction:r},this},t.prototype.withHierarchyLevelAggregationTarget=function(t,e,r,i){return this.target={table:t,hierarchy:e,hierarchyLevel:r,aggregationFunction:i},this},t}();e.FilterBuilder=r},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedUrlNotSupported=e.APINotSupportedForRDLError=void 0,e.APINotSupportedForRDLError="This API is currently not supported for RDL reports",e.EmbedUrlNotSupported="Embed URL is invalid for this scenario. Please use Power BI REST APIs to get the valid URL"},function(t,e,r){var i,a=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__awaiter||function(t,e,r,i){return new(r||(r=Promise))((function(a,o){function n(t){try{s(i.next(t))}catch(t){o(t)}}function l(t){try{s(i.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(n,l)}s((i=i.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var r,i,a,o,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=2&o[0]?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(!(a=n.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0&&a[a.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]{return t=[function(t,e,r){var i,a=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.PageSelector=e.Selector=e.SortDirection=e.LegendPosition=e.TextAlignment=e.CommonErrorCodes=e.BookmarksPlayMode=e.ExportDataType=e.QnaMode=e.PageNavigationPosition=e.isPercentOfGrandTotal=e.isColumnAggr=e.isHierarchyLevelAggr=e.isHierarchyLevel=e.isColumn=e.isMeasure=e.getFilterType=e.isBasicFilterWithKeys=e.isFilterKeyColumnsTarget=e.HierarchyFilter=e.AdvancedFilter=e.TupleFilter=e.IdentityFilter=e.BasicFilterWithKeys=e.BasicFilter=e.RelativeTimeFilter=e.RelativeDateFilter=e.TopNFilter=e.IncludeExcludeFilter=e.NotSupportedFilter=e.Filter=e.RelativeDateOperators=e.RelativeDateFilterTimeUnit=e.FilterType=e.FiltersLevel=e.FiltersOperations=e.MenuLocation=e.ContrastMode=e.TokenType=e.ViewMode=e.Permissions=e.SectionVisibility=e.ReportAlignment=e.HyperlinkClickBehavior=e.LayoutType=e.VisualContainerDisplayMode=e.BackgroundType=e.DisplayOption=e.PageSizeType=e.TraceType=void 0,e.validateZoomLevel=e.validateCustomTheme=e.validateCommandsSettings=e.validateVisualSettings=e.validateVisualHeader=e.validateExportDataRequest=e.validateQnaInterpretInputData=e.validateLoadQnaConfiguration=e.validateSaveAsParameters=e.validateUpdateFiltersRequest=e.validateFilter=e.validatePage=e.validateTileLoad=e.validateDashboardLoad=e.validateCreateReport=e.validatePaginatedReportLoad=e.validateReportLoad=e.validateMenuGroupExtension=e.validateExtension=e.validateCustomPageSize=e.validateVisualizationsPane=e.validateSyncSlicersPane=e.validateSelectionPane=e.validatePageNavigationPane=e.validateFieldsPane=e.validateFiltersPane=e.validateBookmarksPane=e.validatePanes=e.validateSettings=e.validateCaptureBookmarkRequest=e.validateApplyBookmarkStateRequest=e.validateApplyBookmarkByNameRequest=e.validateAddBookmarkRequest=e.validatePlayBookmarkRequest=e.validateSlicerState=e.validateSlicer=e.validateVisualSelector=e.isIExtensionArray=e.isIExtensions=e.isGroupedMenuExtension=e.isFlatMenuExtension=e.isReportFiltersArray=e.isOnLoadFilters=e.VisualDataRoleKindPreference=e.VisualDataRoleKind=e.CommandDisplayOption=e.SlicerTargetSelector=e.VisualTypeSelector=e.VisualSelector=void 0;var n,o=r(1);!function(t){t[t.Information=0]="Information",t[t.Verbose=1]="Verbose",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.ExpectedError=4]="ExpectedError",t[t.UnexpectedError=5]="UnexpectedError",t[t.Fatal=6]="Fatal"}(e.TraceType||(e.TraceType={})),function(t){t[t.Widescreen=0]="Widescreen",t[t.Standard=1]="Standard",t[t.Cortana=2]="Cortana",t[t.Letter=3]="Letter",t[t.Custom=4]="Custom",t[t.Mobile=5]="Mobile"}(e.PageSizeType||(e.PageSizeType={})),function(t){t[t.FitToPage=0]="FitToPage",t[t.FitToWidth=1]="FitToWidth",t[t.ActualSize=2]="ActualSize"}(e.DisplayOption||(e.DisplayOption={})),function(t){t[t.Default=0]="Default",t[t.Transparent=1]="Transparent"}(e.BackgroundType||(e.BackgroundType={})),function(t){t[t.Visible=0]="Visible",t[t.Hidden=1]="Hidden"}(e.VisualContainerDisplayMode||(e.VisualContainerDisplayMode={})),function(t){t[t.Master=0]="Master",t[t.Custom=1]="Custom",t[t.MobilePortrait=2]="MobilePortrait",t[t.MobileLandscape=3]="MobileLandscape"}(e.LayoutType||(e.LayoutType={})),function(t){t[t.Navigate=0]="Navigate",t[t.NavigateAndRaiseEvent=1]="NavigateAndRaiseEvent",t[t.RaiseEvent=2]="RaiseEvent"}(e.HyperlinkClickBehavior||(e.HyperlinkClickBehavior={})),function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.None=3]="None"}(e.ReportAlignment||(e.ReportAlignment={})),function(t){t[t.AlwaysVisible=0]="AlwaysVisible",t[t.HiddenInViewMode=1]="HiddenInViewMode"}(e.SectionVisibility||(e.SectionVisibility={})),function(t){t[t.Read=0]="Read",t[t.ReadWrite=1]="ReadWrite",t[t.Copy=2]="Copy",t[t.Create=4]="Create",t[t.All=7]="All"}(e.Permissions||(e.Permissions={})),function(t){t[t.View=0]="View",t[t.Edit=1]="Edit"}(e.ViewMode||(e.ViewMode={})),function(t){t[t.Aad=0]="Aad",t[t.Embed=1]="Embed"}(e.TokenType||(e.TokenType={})),function(t){t[t.None=0]="None",t[t.HighContrast1=1]="HighContrast1",t[t.HighContrast2=2]="HighContrast2",t[t.HighContrastBlack=3]="HighContrastBlack",t[t.HighContrastWhite=4]="HighContrastWhite"}(e.ContrastMode||(e.ContrastMode={})),function(t){t[t.Bottom=0]="Bottom",t[t.Top=1]="Top"}(e.MenuLocation||(e.MenuLocation={})),function(t){t[t.RemoveAll=0]="RemoveAll",t[t.ReplaceAll=1]="ReplaceAll",t[t.Add=2]="Add",t[t.Replace=3]="Replace"}(e.FiltersOperations||(e.FiltersOperations={})),function(t){t[t.Report=0]="Report",t[t.Page=1]="Page",t[t.Visual=2]="Visual"}(e.FiltersLevel||(e.FiltersLevel={})),function(t){t[t.Advanced=0]="Advanced",t[t.Basic=1]="Basic",t[t.Unknown=2]="Unknown",t[t.IncludeExclude=3]="IncludeExclude",t[t.RelativeDate=4]="RelativeDate",t[t.TopN=5]="TopN",t[t.Tuple=6]="Tuple",t[t.RelativeTime=7]="RelativeTime",t[t.Identity=8]="Identity",t[t.Hierarchy=9]="Hierarchy"}(n=e.FilterType||(e.FilterType={})),function(t){t[t.Days=0]="Days",t[t.Weeks=1]="Weeks",t[t.CalendarWeeks=2]="CalendarWeeks",t[t.Months=3]="Months",t[t.CalendarMonths=4]="CalendarMonths",t[t.Years=5]="Years",t[t.CalendarYears=6]="CalendarYears",t[t.Minutes=7]="Minutes",t[t.Hours=8]="Hours"}(e.RelativeDateFilterTimeUnit||(e.RelativeDateFilterTimeUnit={})),function(t){t[t.InLast=0]="InLast",t[t.InThis=1]="InThis",t[t.InNext=2]="InNext"}(e.RelativeDateOperators||(e.RelativeDateOperators={}));var l=function(){function t(t,e){this.target=t,this.filterType=e}return t.prototype.toJSON=function(){var t={$schema:this.schemaUrl,target:this.target,filterType:this.filterType};return void 0!==this.displaySettings&&(t.displaySettings=this.displaySettings),t},t}();e.Filter=l;var s=function(t){function e(r,i,a){var o=t.call(this,r,n.Unknown)||this;return o.message=i,o.notSupportedTypeName=a,o.schemaUrl=e.schemaUrl,o}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.message=this.message,e.notSupportedTypeName=this.notSupportedTypeName,e},e.schemaUrl="http://powerbi.com/product/schema#notSupported",e}(l);e.NotSupportedFilter=s;var u=function(t){function e(r,i,a){var o=t.call(this,r,n.IncludeExclude)||this;return o.values=a,o.isExclude=i,o.schemaUrl=e.schemaUrl,o}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.isExclude=this.isExclude,e.values=this.values,e},e.schemaUrl="http://powerbi.com/product/schema#includeExclude",e}(l);e.IncludeExcludeFilter=u;var d=function(t){function e(r,i,a,o){var l=t.call(this,r,n.TopN)||this;return l.operator=i,l.itemCount=a,l.schemaUrl=e.schemaUrl,l.orderBy=o,l}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.operator=this.operator,e.itemCount=this.itemCount,e.orderBy=this.orderBy,e},e.schemaUrl="http://powerbi.com/product/schema#topN",e}(l);e.TopNFilter=d;var c=function(t){function e(r,i,a,o,l){var s=t.call(this,r,n.RelativeDate)||this;return s.operator=i,s.timeUnitsCount=a,s.timeUnitType=o,s.includeToday=l,s.schemaUrl=e.schemaUrl,s}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.operator=this.operator,e.timeUnitsCount=this.timeUnitsCount,e.timeUnitType=this.timeUnitType,e.includeToday=this.includeToday,e},e.schemaUrl="http://powerbi.com/product/schema#relativeDate",e}(l);e.RelativeDateFilter=c;var p=function(t){function e(r,i,a,o){var l=t.call(this,r,n.RelativeTime)||this;return l.operator=i,l.timeUnitsCount=a,l.timeUnitType=o,l.schemaUrl=e.schemaUrl,l}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.operator=this.operator,e.timeUnitsCount=this.timeUnitsCount,e.timeUnitType=this.timeUnitType,e},e.schemaUrl="http://powerbi.com/product/schema#relativeTime",e}(l);e.RelativeTimeFilter=p;var f=function(t){function e(r,i){for(var a=[],o=2;o0&&!a)throw new Error("You should pass the values to be filtered for each key. You passed: no values and ".concat(o," keys"));if(0===o&&a&&a.length>0)throw new Error("You passed key values but your target object doesn't contain the keys to be filtered");for(var l=0,s=n.keyValues;l2)throw new Error("AdvancedFilters may not have more than two conditions. You passed: ".concat(a.length));if(1===l.length&&"And"!==i)throw new Error('Logical Operator must be "And" when there is only one condition provided');return s.conditions=l,s}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.logicalOperator=this.logicalOperator,e.conditions=this.conditions,e},e.schemaUrl="http://powerbi.com/product/schema#advanced",e}(l);e.AdvancedFilter=m;var g=function(t){function e(r,i){var a=t.call(this,r,n.Hierarchy)||this;return a.schemaUrl=e.schemaUrl,a.hierarchyData=i,a}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.hierarchyData=this.hierarchyData,e.target=this.target,e},e.schemaUrl="http://powerbi.com/product/schema#hierarchy",e}(l);function V(t){if(t.filterType)return t.filterType;var e=t,r=t;return"string"==typeof e.operator&&Array.isArray(e.values)?n.Basic:"string"==typeof r.logicalOperator&&Array.isArray(r.conditions)?n.Advanced:n.Unknown}function b(t){return!(!t.table||!t.column||t.aggregationFunction)}e.HierarchyFilter=g,e.isFilterKeyColumnsTarget=function(t){return b(t)&&!!t.keys},e.isBasicFilterWithKeys=function(t){return V(t)===n.Basic&&!!t.keyValues},e.getFilterType=V,e.isMeasure=function(t){return void 0!==t.table&&void 0!==t.measure},e.isColumn=b,e.isHierarchyLevel=function(t){return!(!(t.table&&t.hierarchy&&t.hierarchyLevel)||t.aggregationFunction)},e.isHierarchyLevelAggr=function(t){return!!(t.table&&t.hierarchy&&t.hierarchyLevel&&t.aggregationFunction)},e.isColumnAggr=function(t){return!!(t.table&&t.column&&t.aggregationFunction)},e.isPercentOfGrandTotal=function(t){return!!t.percentOfGrandTotal},function(t){t[t.Bottom=0]="Bottom",t[t.Left=1]="Left"}(e.PageNavigationPosition||(e.PageNavigationPosition={})),function(t){t[t.Interactive=0]="Interactive",t[t.ResultOnly=1]="ResultOnly"}(e.QnaMode||(e.QnaMode={})),function(t){t[t.Summarized=0]="Summarized",t[t.Underlying=1]="Underlying"}(e.ExportDataType||(e.ExportDataType={})),function(t){t[t.Off=0]="Off",t[t.Presentation=1]="Presentation"}(e.BookmarksPlayMode||(e.BookmarksPlayMode={})),e.CommonErrorCodes={TokenExpired:"TokenExpired",NotFound:"PowerBIEntityNotFound",InvalidParameters:"Invalid parameters",LoadReportFailed:"LoadReportFailed",NotAuthorized:"PowerBINotAuthorizedException",FailedToLoadModel:"ExplorationContainer_FailedToLoadModel_DefaultDetails"},e.TextAlignment={Left:"left",Center:"center",Right:"right"},e.LegendPosition={Top:"Top",Bottom:"Bottom",Right:"Right",Left:"Left",TopCenter:"TopCenter",BottomCenter:"BottomCenter",RightCenter:"RightCenter",LeftCenter:"LeftCenter"},function(t){t[t.Ascending=1]="Ascending",t[t.Descending=2]="Descending"}(e.SortDirection||(e.SortDirection={}));var w=function(){function t(t){this.$schema=t}return t.prototype.toJSON=function(){return{$schema:this.$schema}},t}();e.Selector=w;var O=function(t){function e(r){var i=t.call(this,e.schemaUrl)||this;return i.pageName=r,i}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.pageName=this.pageName,e},e.schemaUrl="http://powerbi.com/product/schema#pageSelector",e}(w);e.PageSelector=O;var P=function(t){function e(r){var i=t.call(this,e.schemaUrl)||this;return i.visualName=r,i}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.visualName=this.visualName,e},e.schemaUrl="http://powerbi.com/product/schema#visualSelector",e}(w);e.VisualSelector=P;var S=function(t){function e(e){var r=t.call(this,P.schemaUrl)||this;return r.visualType=e,r}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.visualType=this.visualType,e},e.schemaUrl="http://powerbi.com/product/schema#visualTypeSelector",e}(w);e.VisualTypeSelector=S;var E=function(t){function e(e){var r=t.call(this,P.schemaUrl)||this;return r.target=e,r}return a(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.target=this.target,e},e.schemaUrl="http://powerbi.com/product/schema#slicerTargetSelector",e}(w);function T(t){return Array.isArray(t)}function _(t){return t&&!!t.groupName}function F(t){return Array.isArray(t)}function x(t){var e=t.message;return e||(e="".concat(t.path," is invalid. Not meeting ").concat(t.keyword," constraint")),{message:e}}e.SlicerTargetSelector=E,function(t){t[t.Enabled=0]="Enabled",t[t.Disabled=1]="Disabled",t[t.Hidden=2]="Hidden"}(e.CommandDisplayOption||(e.CommandDisplayOption={})),function(t){t[t.Grouping=0]="Grouping",t[t.Measure=1]="Measure",t[t.GroupingOrMeasure=2]="GroupingOrMeasure"}(e.VisualDataRoleKind||(e.VisualDataRoleKind={})),function(t){t[t.Measure=0]="Measure",t[t.Grouping=1]="Grouping"}(e.VisualDataRoleKindPreference||(e.VisualDataRoleKindPreference={})),e.isOnLoadFilters=function(t){return t&&!T(t)},e.isReportFiltersArray=T,e.isFlatMenuExtension=function(t){return t&&!_(t)},e.isGroupedMenuExtension=_,e.isIExtensions=function(t){return t&&!F(t)},e.isIExtensionArray=F,e.validateVisualSelector=function(t){var e=o.Validators.visualSelectorValidator.validate(t);return e?e.map(x):void 0},e.validateSlicer=function(t){var e=o.Validators.slicerValidator.validate(t);return e?e.map(x):void 0},e.validateSlicerState=function(t){var e=o.Validators.slicerStateValidator.validate(t);return e?e.map(x):void 0},e.validatePlayBookmarkRequest=function(t){var e=o.Validators.playBookmarkRequestValidator.validate(t);return e?e.map(x):void 0},e.validateAddBookmarkRequest=function(t){var e=o.Validators.addBookmarkRequestValidator.validate(t);return e?e.map(x):void 0},e.validateApplyBookmarkByNameRequest=function(t){var e=o.Validators.applyBookmarkByNameRequestValidator.validate(t);return e?e.map(x):void 0},e.validateApplyBookmarkStateRequest=function(t){var e=o.Validators.applyBookmarkStateRequestValidator.validate(t);return e?e.map(x):void 0},e.validateCaptureBookmarkRequest=function(t){var e=o.Validators.captureBookmarkRequestValidator.validate(t);return e?e.map(x):void 0},e.validateSettings=function(t){var e=o.Validators.settingsValidator.validate(t);return e?e.map(x):void 0},e.validatePanes=function(t){var e=o.Validators.reportPanesValidator.validate(t);return e?e.map(x):void 0},e.validateBookmarksPane=function(t){var e=o.Validators.bookmarksPaneValidator.validate(t);return e?e.map(x):void 0},e.validateFiltersPane=function(t){var e=o.Validators.filtersPaneValidator.validate(t);return e?e.map(x):void 0},e.validateFieldsPane=function(t){var e=o.Validators.fieldsPaneValidator.validate(t);return e?e.map(x):void 0},e.validatePageNavigationPane=function(t){var e=o.Validators.pageNavigationPaneValidator.validate(t);return e?e.map(x):void 0},e.validateSelectionPane=function(t){var e=o.Validators.selectionPaneValidator.validate(t);return e?e.map(x):void 0},e.validateSyncSlicersPane=function(t){var e=o.Validators.syncSlicersPaneValidator.validate(t);return e?e.map(x):void 0},e.validateVisualizationsPane=function(t){var e=o.Validators.visualizationsPaneValidator.validate(t);return e?e.map(x):void 0},e.validateCustomPageSize=function(t){var e=o.Validators.customPageSizeValidator.validate(t);return e?e.map(x):void 0},e.validateExtension=function(t){var e=o.Validators.extensionValidator.validate(t);return e?e.map(x):void 0},e.validateMenuGroupExtension=function(t){var e=o.Validators.menuGroupExtensionValidator.validate(t);return e?e.map(x):void 0},e.validateReportLoad=function(t){var e=o.Validators.reportLoadValidator.validate(t);return e?e.map(x):void 0},e.validatePaginatedReportLoad=function(t){var e=o.Validators.paginatedReportLoadValidator.validate(t);return e?e.map(x):void 0},e.validateCreateReport=function(t){var e=o.Validators.reportCreateValidator.validate(t);return e?e.map(x):void 0},e.validateDashboardLoad=function(t){var e=o.Validators.dashboardLoadValidator.validate(t);return e?e.map(x):void 0},e.validateTileLoad=function(t){var e=o.Validators.tileLoadValidator.validate(t);return e?e.map(x):void 0},e.validatePage=function(t){var e=o.Validators.pageValidator.validate(t);return e?e.map(x):void 0},e.validateFilter=function(t){var e=o.Validators.filterValidator.validate(t);return e?e.map(x):void 0},e.validateUpdateFiltersRequest=function(t){var e=o.Validators.updateFiltersRequestValidator.validate(t);return e?e.map(x):void 0},e.validateSaveAsParameters=function(t){var e=o.Validators.saveAsParametersValidator.validate(t);return e?e.map(x):void 0},e.validateLoadQnaConfiguration=function(t){var e=o.Validators.loadQnaValidator.validate(t);return e?e.map(x):void 0},e.validateQnaInterpretInputData=function(t){var e=o.Validators.qnaInterpretInputDataValidator.validate(t);return e?e.map(x):void 0},e.validateExportDataRequest=function(t){var e=o.Validators.exportDataRequestValidator.validate(t);return e?e.map(x):void 0},e.validateVisualHeader=function(t){var e=o.Validators.visualHeaderValidator.validate(t);return e?e.map(x):void 0},e.validateVisualSettings=function(t){var e=o.Validators.visualSettingsValidator.validate(t);return e?e.map(x):void 0},e.validateCommandsSettings=function(t){var e=o.Validators.commandsSettingsValidator.validate(t);return e?e.map(x):void 0},e.validateCustomTheme=function(t){var e=o.Validators.customThemeValidator.validate(t);return e?e.map(x):void 0},e.validateZoomLevel=function(t){var e=o.Validators.zoomLevelValidator.validate(t);return e?e.map(x):void 0}},(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Validators=void 0;var i=r(2),a=r(5),n=r(6),o=r(7),l=r(8),s=r(9),u=r(10),d=r(11),c=r(12),p=r(13),f=r(14),h=r(15),v=r(16),y=r(17),m=r(18),g=r(19),V=r(20),b=r(21),w=r(22),O=r(23),P=r(24),S=r(25),E=r(26),T=r(27),_=r(28),F=r(29),x=r(4),R=r(30);e.Validators={addBookmarkRequestValidator:new a.AddBookmarkRequestValidator,advancedFilterTypeValidator:new x.EnumValidator([0]),advancedFilterValidator:new c.AdvancedFilterValidator,anyArrayValidator:new x.ArrayValidator([new E.AnyOfValidator([new x.StringValidator,new x.NumberValidator,new x.BooleanValidator])]),anyFilterValidator:new E.AnyOfValidator([new c.BasicFilterValidator,new c.AdvancedFilterValidator,new c.IncludeExcludeFilterValidator,new c.NotSupportedFilterValidator,new c.RelativeDateFilterValidator,new c.TopNFilterValidator,new c.RelativeTimeFilterValidator,new c.HierarchyFilterValidator]),anyValueValidator:new E.AnyOfValidator([new x.StringValidator,new x.NumberValidator,new x.BooleanValidator]),actionBarValidator:new i.ActionBarValidator,applyBookmarkByNameRequestValidator:new a.ApplyBookmarkByNameRequestValidator,applyBookmarkStateRequestValidator:new a.ApplyBookmarkStateRequestValidator,applyBookmarkValidator:new E.AnyOfValidator([new a.ApplyBookmarkByNameRequestValidator,new a.ApplyBookmarkStateRequestValidator]),backgroundValidator:new x.EnumValidator([0,1]),basicFilterTypeValidator:new x.EnumValidator([1]),basicFilterValidator:new c.BasicFilterValidator,booleanArrayValidator:new x.BooleanArrayValidator,booleanValidator:new x.BooleanValidator,bookmarksPaneValidator:new h.BookmarksPaneValidator,captureBookmarkOptionsValidator:new a.CaptureBookmarkOptionsValidator,captureBookmarkRequestValidator:new a.CaptureBookmarkRequestValidator,commandDisplayOptionValidator:new x.EnumValidator([0,1,2]),commandExtensionSelectorValidator:new E.AnyOfValidator([new b.VisualSelectorValidator,new b.VisualTypeSelectorValidator]),commandExtensionArrayValidator:new x.ArrayValidator([new d.CommandExtensionValidator]),commandExtensionValidator:new d.CommandExtensionValidator,commandsSettingsArrayValidator:new x.ArrayValidator([new n.CommandsSettingsValidator]),commandsSettingsValidator:new n.CommandsSettingsValidator,conditionItemValidator:new c.ConditionItemValidator,contrastModeValidator:new x.EnumValidator([0,1,2,3,4]),customLayoutDisplayOptionValidator:new x.EnumValidator([0,1,2]),customLayoutValidator:new p.CustomLayoutValidator,customPageSizeValidator:new f.CustomPageSizeValidator,customThemeValidator:new o.CustomThemeValidator,dashboardLoadValidator:new l.DashboardLoadValidator,datasetBindingValidator:new s.DatasetBindingValidator,displayStateModeValidator:new x.EnumValidator([0,1]),displayStateValidator:new p.DisplayStateValidator,exportDataRequestValidator:new u.ExportDataRequestValidator,extensionArrayValidator:new x.ArrayValidator([new d.ExtensionValidator]),extensionsValidator:new E.AnyOfValidator([new x.ArrayValidator([new d.ExtensionValidator]),new d.ExtensionsValidator]),extensionPointsValidator:new d.ExtensionPointsValidator,extensionValidator:new d.ExtensionValidator,fieldForbiddenValidator:new T.FieldForbiddenValidator,fieldRequiredValidator:new _.FieldRequiredValidator,fieldsPaneValidator:new h.FieldsPaneValidator,filterColumnTargetValidator:new c.FilterColumnTargetValidator,filterDisplaySettingsValidator:new c.FilterDisplaySettingsValidator,filterConditionsValidator:new x.ArrayValidator([new c.ConditionItemValidator]),filterHierarchyTargetValidator:new c.FilterHierarchyTargetValidator,filterMeasureTargetValidator:new c.FilterMeasureTargetValidator,filterTargetValidator:new E.AnyOfValidator([new c.FilterColumnTargetValidator,new c.FilterHierarchyTargetValidator,new c.FilterMeasureTargetValidator,new x.ArrayValidator([new E.AnyOfValidator([new c.FilterColumnTargetValidator,new c.FilterHierarchyTargetValidator,new c.FilterMeasureTargetValidator,new c.FilterKeyColumnsTargetValidator,new c.FilterKeyHierarchyTargetValidator])])]),filterValidator:new c.FilterValidator,filterTypeValidator:new x.EnumValidator([0,1,2,3,4,5,6,7,9]),filtersArrayValidator:new x.ArrayValidator([new c.FilterValidator]),filtersOperationsUpdateValidator:new x.EnumValidator([1,2,3]),filtersOperationsRemoveAllValidator:new x.EnumValidator([0]),filtersPaneValidator:new h.FiltersPaneValidator,hyperlinkClickBehaviorValidator:new x.EnumValidator([0,1,2]),includeExcludeFilterValidator:new c.IncludeExcludeFilterValidator,includeExludeFilterTypeValidator:new x.EnumValidator([3]),hierarchyFilterTypeValidator:new x.EnumValidator([9]),hierarchyFilterValuesValidator:new x.ArrayValidator([new c.HierarchyFilterNodeValidator]),layoutTypeValidator:new x.EnumValidator([0,1,2,3]),loadQnaValidator:new v.LoadQnaValidator,menuExtensionValidator:new E.AnyOfValidator([new d.FlatMenuExtensionValidator,new d.GroupedMenuExtensionValidator]),menuGroupExtensionArrayValidator:new x.ArrayValidator([new d.MenuGroupExtensionValidator]),menuGroupExtensionValidator:new d.MenuGroupExtensionValidator,menuLocationValidator:new x.EnumValidator([0,1]),notSupportedFilterTypeValidator:new x.EnumValidator([2]),notSupportedFilterValidator:new c.NotSupportedFilterValidator,numberArrayValidator:new x.NumberArrayValidator,numberValidator:new x.NumberValidator,onLoadFiltersBaseValidator:new E.AnyOfValidator([new c.OnLoadFiltersBaseValidator,new c.OnLoadFiltersBaseRemoveOperationValidator]),pageLayoutValidator:new F.MapValidator([new x.StringValidator],[new p.VisualLayoutValidator]),pageNavigationPaneValidator:new h.PageNavigationPaneValidator,pageNavigationPositionValidator:new x.EnumValidator([0,1]),pageSizeTypeValidator:new x.EnumValidator([0,1,2,3,4,5]),pageSizeValidator:new f.PageSizeValidator,pageValidator:new f.PageValidator,pageViewFieldValidator:new f.PageViewFieldValidator,pagesLayoutValidator:new F.MapValidator([new x.StringValidator],[new p.PageLayoutValidator]),paginatedReportCommandsValidator:new n.PaginatedReportCommandsValidator,paginatedReportLoadValidator:new g.PaginatedReportLoadValidator,paginatedReportsettingsValidator:new w.PaginatedReportSettingsValidator,parameterValuesArrayValidator:new x.ArrayValidator([new g.ReportParameterFieldsValidator]),parametersPanelValidator:new R.ParametersPanelValidator,permissionsValidator:new x.EnumValidator([0,1,2,4,7]),playBookmarkRequestValidator:new a.PlayBookmarkRequestValidator,qnaInterpretInputDataValidator:new v.QnaInterpretInputDataValidator,qnaPanesValidator:new h.QnaPanesValidator,qnaSettingValidator:new v.QnaSettingsValidator,relativeDateFilterOperatorValidator:new x.EnumValidator([0,1,2]),relativeDateFilterTimeUnitTypeValidator:new x.EnumValidator([0,1,2,3,4,5,6]),relativeDateFilterTypeValidator:new x.EnumValidator([4]),relativeDateFilterValidator:new c.RelativeDateFilterValidator,relativeDateTimeFilterTypeValidator:new x.EnumValidator([4,7]),relativeDateTimeFilterUnitTypeValidator:new x.EnumValidator([0,1,2,3,4,5,6,7,8]),relativeTimeFilterTimeUnitTypeValidator:new x.EnumValidator([7,8]),relativeTimeFilterTypeValidator:new x.EnumValidator([7]),relativeTimeFilterValidator:new c.RelativeTimeFilterValidator,reportBarsValidator:new i.ReportBarsValidator,reportCreateValidator:new y.ReportCreateValidator,reportLoadFiltersValidator:new E.AnyOfValidator([new x.ArrayValidator([new c.FilterValidator]),new c.OnLoadFiltersValidator]),reportLoadValidator:new m.ReportLoadValidator,reportPanesValidator:new h.ReportPanesValidator,saveAsParametersValidator:new V.SaveAsParametersValidator,selectionPaneValidator:new h.SelectionPaneValidator,settingsValidator:new w.SettingsValidator,singleCommandSettingsValidator:new n.SingleCommandSettingsValidator,slicerSelectorValidator:new E.AnyOfValidator([new b.VisualSelectorValidator,new b.SlicerTargetSelectorValidator]),slicerStateValidator:new O.SlicerStateValidator,slicerTargetValidator:new E.AnyOfValidator([new c.FilterColumnTargetValidator,new c.FilterHierarchyTargetValidator,new c.FilterMeasureTargetValidator,new c.FilterKeyColumnsTargetValidator,new c.FilterKeyHierarchyTargetValidator]),slicerValidator:new O.SlicerValidator,stringArrayValidator:new x.StringArrayValidator,stringValidator:new x.StringValidator,syncSlicersPaneValidator:new h.SyncSlicersPaneValidator,tileLoadValidator:new P.TileLoadValidator,tokenTypeValidator:new x.EnumValidator([0,1]),topNFilterTypeValidator:new x.EnumValidator([5]),topNFilterValidator:new c.TopNFilterValidator,updateFiltersRequestValidator:new E.AnyOfValidator([new c.UpdateFiltersRequestValidator,new c.RemoveFiltersRequestValidator]),viewModeValidator:new x.EnumValidator([0,1]),visualCommandSelectorValidator:new E.AnyOfValidator([new b.VisualSelectorValidator,new b.VisualTypeSelectorValidator]),visualHeaderSelectorValidator:new E.AnyOfValidator([new b.VisualSelectorValidator,new b.VisualTypeSelectorValidator]),visualHeaderSettingsValidator:new S.VisualHeaderSettingsValidator,visualHeaderValidator:new S.VisualHeaderValidator,visualHeadersValidator:new x.ArrayValidator([new S.VisualHeaderValidator]),visualizationsPaneValidator:new h.VisualizationsPaneValidator,visualLayoutValidator:new p.VisualLayoutValidator,visualSelectorValidator:new b.VisualSelectorValidator,visualSettingsValidator:new S.VisualSettingsValidator,visualTypeSelectorValidator:new b.VisualTypeSelectorValidator,zoomLevelValidator:new x.RangeValidator(.25,4)}},function(t,e,r){var i,a=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBarValidator=e.ReportBarsValidator=void 0;var n=r(3),o=r(4),l=r(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.validate=function(e,r,i){if(null==e)return null;var a=t.prototype.validate.call(this,e,r,i);if(a)return a;var o=[{field:"actionBar",validators:[l.Validators.actionBarValidator]}];return new n.MultipleFieldsValidator(o).validate(e,r,i)},e}(o.ObjectValidator);e.ReportBarsValidator=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.validate=function(e,r,i){if(null==e)return null;var a=t.prototype.validate.call(this,e,r,i);if(a)return a;var o=[{field:"visible",validators:[l.Validators.booleanValidator]}];return new n.MultipleFieldsValidator(o).validate(e,r,i)},e}(o.ObjectValidator);e.ActionBarValidator=u},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MultipleFieldsValidator=void 0;var r=function(){function t(t){this.fieldValidatorsPairs=t}return t.prototype.validate=function(t,e,r){if(!this.fieldValidatorsPairs)return null;for(var i=e?e+"."+r:r,a=0,n=this.fieldValidatorsPairs;athis.maxValue||e{Object.defineProperty(e,"__esModule",{value:!0}),e.AnyOfValidator=void 0;var r=function(){function t(t){this.validators=t}return t.prototype.validate=function(t,e,r){if(null==t)return null;for(var i=!1,a=0,n=this.validators;a{Object.defineProperty(e,"__esModule",{value:!0}),e.FieldForbiddenValidator=void 0;var r=function(){function t(){}return t.prototype.validate=function(t,e,r){return void 0!==t?[{message:r+" is forbidden",path:(e?e+".":"")+r,keyword:"forbidden"}]:null},t}();e.FieldForbiddenValidator=r},(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FieldRequiredValidator=void 0;var r=function(){function t(){}return t.prototype.validate=function(t,e,r){return null==t?[{message:r+" is required",path:(e?e+".":"")+r,keyword:"required"}]:null},t}();e.FieldRequiredValidator=r},function(t,e,r){var i,a=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.MapValidator=void 0;var n=function(t){function e(e,r){var i=t.call(this)||this;return i.keyValidators=e,i.valueValidators=r,i}return a(e,t),e.prototype.validate=function(e,r,i){if(null==e)return null;var a=t.prototype.validate.call(this,e,r,i);if(a)return a;for(var n in e)if(e.hasOwnProperty(n)){for(var o=(r?r+".":"")+i+"."+n,l=0,s=this.keyValidators;l0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0?"&":"?";return t+=i+e+"="+r},e.isSavedInternal=function(t,e,a){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,t.get("/report/hasUnsavedChanges",{uid:e},a)];case 1:return[2,!r.sent().body];case 2:throw r.sent().body;case 3:return[2]}}))}))},e.isRDLEmbed=function(t){return t&&t.toLowerCase().indexOf("/rdlembed?")>=0},e.autoAuthInEmbedUrl=function(t){return t&&decodeURIComponent(t).toLowerCase().indexOf("autoauth=true")>=0},e.getRandomValue=n,e.getTimeDiffInMilliseconds=function(t,e){return Math.abs(t.getTime()-e.getTime())}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.FilterBuilder=void 0;var r=function(){function t(){}return t.prototype.withTargetObject=function(t){return this.target=t,this},t.prototype.withColumnTarget=function(t,e){return this.target={table:t,column:e},this},t.prototype.withMeasureTarget=function(t,e){return this.target={table:t,measure:e},this},t.prototype.withHierarchyLevelTarget=function(t,e,r){return this.target={table:t,hierarchy:e,hierarchyLevel:r},this},t.prototype.withColumnAggregation=function(t,e,r){return this.target={table:t,column:e,aggregationFunction:r},this},t.prototype.withHierarchyLevelAggregationTarget=function(t,e,r,i){return this.target={table:t,hierarchy:e,hierarchyLevel:r,aggregationFunction:i},this},t}();e.FilterBuilder=r},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedUrlNotSupported=e.APINotSupportedForRDLError=void 0,e.APINotSupportedForRDLError="This API is currently not supported for RDL reports",e.EmbedUrlNotSupported="Embed URL is invalid for this scenario. Please use Power BI REST APIs to get the valid URL"},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.default={version:"2.21.1",type:"js"}},function(t,e,r){var i,a=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),n=this&&this.__awaiter||function(t,e,r,i){return new(r||(r=Promise))((function(a,n){function o(t){try{s(i.next(t))}catch(t){n(t)}}function l(t){try{s(i.throw(t))}catch(t){n(t)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,l)}s((i=i.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var r,i,a,n,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return n={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function l(n){return function(l){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,i&&(a=2&n[0]?i.return:n[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return o.label++,{value:n[1],done:!1};case 5:o.label++,i=n[1],n=[0];continue;case 7:n=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1] + * @license MIT + */function a(t,e){if(t===e)return 0;for(var r=t.length,i=e.length,a=0,n=Math.min(r,i);a=0;u--)if(d[u]!==c[u])return!1;for(u=d.length-1;u>=0;u--)if(l=d[u],!V(t[l],e[l],r,i))return!1;return!0}(t,e,r,i))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function O(t,e,r,i){var a;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),a=function(t){var e;try{t()}catch(t){e=t}return e}(e),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!a&&m(a,r,"Missing expected exception"+i);var n="string"==typeof i,l=!t&&a&&!r;if((!t&&o.isError(a)&&n&&w(a,r)||l)&&m(a,r,"Got unwanted exception"+i),t&&a&&r&&!w(a,r)||!t&&a)throw a}p.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=v(y((e=this).actual),128)+" "+e.operator+" "+v(y(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var i=new Error;if(i.stack){var a=i.stack,n=h(r),o=a.indexOf("\n"+n);if(o>=0){var l=a.indexOf("\n",o+1);a=a.substring(l+1)}this.stack=a}}},o.inherits(p.AssertionError,Error),p.fail=m,p.ok=g,p.equal=function(t,e,r){t!=e&&m(t,e,r,"==",p.equal)},p.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",p.notEqual)},p.deepEqual=function(t,e,r){V(t,e,!1)||m(t,e,r,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(t,e,r){V(t,e,!0)||m(t,e,r,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(t,e,r){V(t,e,!1)&&m(t,e,r,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function t(e,r,i){V(e,r,!0)&&m(e,r,i,"notDeepStrictEqual",t)},p.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",p.strictEqual)},p.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",p.notStrictEqual)},p.throws=function(t,e,r){O(!0,t,e,r)},p.doesNotThrow=function(t,e,r){O(!1,t,e,r)},p.ifError=function(t){if(t)throw t},p.strict=i((function t(e,r){e||m(e,!0,r,"==",t)}),p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var P=Object.keys||function(t){var e=[];for(var r in t)l.call(t,r)&&e.push(r);return e}}).call(this,r(17))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(t){i[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,l,s=o(t),u=1;u=n)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return t}})),s=i[r];r=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),h(r)?i.showHidden=r:r&&e._extend(i,r),g(i.showHidden)&&(i.showHidden=!1),g(i.depth)&&(i.depth=2),g(i.colors)&&(i.colors=!1),g(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=s),d(i,t,i.depth)}function s(t,e){var r=l.styles[e];return r?"["+l.colors[r][0]+"m"+t+"["+l.colors[r][1]+"m":t}function u(t,e){return t}function d(t,r,i){if(t.customInspect&&r&&P(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var a=r.inspect(i,t);return m(a)||(a=d(t,a,i)),a}var n=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(h(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,r);if(n)return n;var o=Object.keys(r),l=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),O(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(r);if(0===o.length){if(P(r)){var s=r.name?": "+r.name:"";return t.stylize("[Function"+s+"]","special")}if(V(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(O(r))return c(r)}var u,b="",S=!1,E=["{","}"];(f(r)&&(S=!0,E=["[","]"]),P(r))&&(b=" [Function"+(r.name?": "+r.name:"")+"]");return V(r)&&(b=" "+RegExp.prototype.toString.call(r)),w(r)&&(b=" "+Date.prototype.toUTCString.call(r)),O(r)&&(b=" "+c(r)),0!==o.length||S&&0!=r.length?i<0?V(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),u=S?function(t,e,r,i,a){for(var n=[],o=0,l=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(u,b,E)):E[0]+b+E[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,i,a,n){var o,l,s;if((s=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]}).get?l=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(l=t.stylize("[Setter]","special")),F(i,a)||(o="["+a+"]"),l||(t.seen.indexOf(s.value)<0?(l=v(r)?d(t,s.value,null):d(t,s.value,r-1)).indexOf("\n")>-1&&(l=n?l.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+l.split("\n").map((function(t){return" "+t})).join("\n")):l=t.stylize("[Circular]","special")),g(o)){if(n&&a.match(/^\d+$/))return l;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+l}function f(t){return Array.isArray(t)}function h(t){return"boolean"==typeof t}function v(t){return null===t}function y(t){return"number"==typeof t}function m(t){return"string"==typeof t}function g(t){return void 0===t}function V(t){return b(t)&&"[object RegExp]"===S(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===S(t)}function O(t){return b(t)&&("[object Error]"===S(t)||t instanceof Error)}function P(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(g(n)&&(n=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!o[r])if(new RegExp("\\b"+r+"\\b","i").test(n)){var i=t.pid;o[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,i,t)}}else o[r]=function(){};return o[r]},e.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=h,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=V,e.isObject=b,e.isDate=w,e.isError=O,e.isFunction=P,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(21);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(){var t=new Date,e=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":");return[t.getDate(),T[t.getMonth()],e].join(" ")}function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",_(),e.format.apply(e,arguments))},e.inherits=r(22),e._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};var x="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(x&&t[x]){var e;if("function"!=typeof(e=t[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,x,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,i=new Promise((function(t,i){e=t,r=i})),a=[],n=0;n1)for(var r=1;r0&&a[a.length-1])||6!==n[0]&&2!==n[0])){o=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]2&&"[]"===n.slice(l-2)&&(s=!0,r[n=n.slice(0,l-2)]||(r[n]=[])),a=o[1]?V(o[1]):""),s?r[n].push(a):r[n]=a}return r},recognize:function(t){var e,r,i,a=[this.rootState],o={},n=!1;if(-1!==(i=t.indexOf("?"))){var l=t.substr(i+1,t.length);t=t.substr(0,i),o=this.parseQueryString(l)}for("/"!==(t=decodeURI(t)).charAt(0)&&(t="/"+t),(e=t.length)>1&&"/"===t.charAt(e-1)&&(t=t.substr(0,e-1),n=!0),r=0;r2&&"[]"===o.slice(l-2)&&(s=!0,r[o=o.slice(0,l-2)]||(r[o]=[])),a=n[1]?g(n[1]):""),s?r[o].push(a):r[o]=a}return r},recognize:function(t){var e,r,i,a=[this.rootState],n={},o=!1;if(-1!==(i=t.indexOf("?"))){var l=t.substr(i+1,t.length);t=t.substr(0,i),n=this.parseQueryString(l)}for("/"!==(t=decodeURI(t)).charAt(0)&&(t="/"+t),(e=t.length)>1&&"/"===t.charAt(e-1)&&(t=t.substr(0,e-1),o=!0),r=0;r { if (argv.chrome) { diff --git a/package.json b/package.json index 3af94006..cbcfea9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "powerbi-client", - "version": "2.19.1", + "version": "2.21.1", "description": "JavaScript library for embedding Power BI into your apps. Provides service which makes it easy to embed different types of components and an object model which allows easy interaction with these components such as changing pages, applying filters, and responding to data selection.", "main": "dist/powerbi.js", "types": "dist/powerbi-client.d.ts", @@ -62,7 +62,7 @@ "jasmine-core": "3.10.1", "jquery": "^3.3.1", "json-loader": "^0.5.4", - "karma": "6.3.5", + "karma": "^6.3.5", "karma-chrome-launcher": "^3.1.0", "karma-firefox-launcher": "^1.2.0", "karma-jasmine": "4.0.1", @@ -74,14 +74,14 @@ "phantomjs-prebuilt": "^2.1.16", "ts-loader": "^6.2.2", "typedoc": "^0.15.0", - "typescript": "^4.1.3", + "typescript": "~4.6.0", "webpack": "^4.44.2", "webpack-stream": "^5.2.1", "yargs": "^16.1.0" }, "dependencies": { "http-post-message": "^0.2", - "powerbi-models": "^1.9.8", + "powerbi-models": "^1.11.0", "powerbi-router": "^0.1", "window-post-message-proxy": "^0.2" }, diff --git a/src/config.ts b/src/config.ts index 0761c8aa..0c528f9d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -3,7 +3,7 @@ /** @ignore *//** */ const config = { - version: '2.19.1', + version: '2.21.1', type: 'js' }; diff --git a/src/embed.ts b/src/embed.ts index 3489ffd8..d3c3b3dd 100644 --- a/src/embed.ts +++ b/src/embed.ts @@ -60,6 +60,15 @@ export interface IInternalEventHandler { handle(event: ICustomEvent): void; } +/** @hidden */ +export interface ISessionHeaders { + uid: string; + sdkSessionId: string; + tokenProviderSupplied?: boolean; + bootstrapped?: boolean; + sdkVersion?: string; +} + /** * Base class for all Power BI embed components * @@ -264,7 +273,16 @@ export abstract class Embed { } try { - const response = await this.service.hpm.post("/report/create", config, { uid: this.config.uniqueId, sdkSessionId: this.service.getSdkSessionId() }, this.iframe.contentWindow); + const headers: ISessionHeaders = { + uid: this.config.uniqueId, + sdkSessionId: this.service.getSdkSessionId() + }; + + if (!!this.eventHooks?.accessTokenProvider) { + headers.tokenProviderSupplied = true; + } + + const response = await this.service.hpm.post("/report/create", config, headers, this.iframe.contentWindow); return response.body; } catch (response) { throw response.body; @@ -359,13 +377,17 @@ export abstract class Embed { } const path = phasedRender && this.config.type === 'report' ? this.phasedLoadPath : this.loadPath; - const headers = { + const headers: ISessionHeaders = { uid: this.config.uniqueId, sdkSessionId: this.service.getSdkSessionId(), bootstrapped: this.config.bootstrapped, sdkVersion: sdkConfig.default.version }; + if (!!this.eventHooks?.accessTokenProvider) { + headers.tokenProviderSupplied = true; + } + const timeNow: Date = new Date(); if (this.lastLoadRequest && getTimeDiffInMilliseconds(this.lastLoadRequest, timeNow) < 100) { console.debug("Power BI SDK sent more than two /report/load requests in the last 100ms interval."); @@ -553,12 +575,12 @@ export abstract class Embed { } /** - * Validate EventHooks - * - * @private - * @param {models.EventHooks} eventHooks - * @hidden - */ + * Validate EventHooks + * + * @private + * @param {models.EventHooks} eventHooks + * @hidden + */ private validateEventHooks(eventHooks: models.EventHooks): void { if (!eventHooks) { return; @@ -581,7 +603,7 @@ export abstract class Embed { const accessTokenProvider = eventHooks.accessTokenProvider; if (!!accessTokenProvider) { - if (this.embedtype.toLowerCase() !== "report" || this.config.tokenType !== models.TokenType.Aad) { + if ((['create', 'quickcreate', 'report'].indexOf(this.embedtype.toLowerCase()) === -1) || this.config.tokenType !== models.TokenType.Aad) { throw new Error("accessTokenProvider is only supported in report SaaS embed"); } } diff --git a/src/factories.ts b/src/factories.ts index cac26227..43acbaf6 100644 --- a/src/factories.ts +++ b/src/factories.ts @@ -16,10 +16,11 @@ export { IRouterFactory }; -export const hpmFactory: IHpmFactory = (wpmp, defaultTargetWindow, sdkVersion = config.version, sdkType = config.type) => { +export const hpmFactory: IHpmFactory = (wpmp, defaultTargetWindow, sdkVersion = config.version, sdkType = config.type, sdkWrapperVersion?: string) => { return new HttpPostMessage(wpmp, { 'x-sdk-type': sdkType, - 'x-sdk-version': sdkVersion + 'x-sdk-version': sdkVersion, + 'x-sdk-wrapper-version': sdkWrapperVersion, }, defaultTargetWindow); }; diff --git a/src/report.ts b/src/report.ts index 6bb0dc12..d8de371c 100644 --- a/src/report.ts +++ b/src/report.ts @@ -40,6 +40,7 @@ import { IFilterable } from './ifilterable'; import { Page } from './page'; import { BookmarksManager } from './bookmarksManager'; import { VisualDescriptor } from './visualDescriptor'; +import * as assert from 'assert'; /** * A Report node within a report hierarchy @@ -94,6 +95,26 @@ export class Report extends Embed implements IReportNode, IFilterable { Array.prototype.push.apply(this.allowedEvents, Report.allowedEvents); this.bookmarksManager = new BookmarksManager(service, config, this.iframe); + + service.router.post(`/reports/${this.config.uniqueId}/eventHooks/:eventName`, async (req, _res) => { + switch (req.params.eventName) { + case "preQuery": + req.body = req.body || {}; + req.body.report = this; + await service.invokeSDKHook(this.eventHooks?.applicationContextProvider, req, _res); + break; + + case "newAccessToken": + req.body = req.body || {}; + req.body.report = this; + await service.invokeSDKHook(this.eventHooks?.accessTokenProvider, req, _res); + break; + + default: + assert(false, `${req.params.eventName} eventHook is not supported`); + break; + } + }); } /** diff --git a/src/service.ts b/src/service.ts index 1cd6ab6e..06294ab9 100644 --- a/src/service.ts +++ b/src/service.ts @@ -27,6 +27,7 @@ import { Page } from './page'; import { Qna } from './qna'; import { Visual } from './visual'; import * as utils from './util'; +import * as sdkConfig from './config'; export interface IEvent { type: string; @@ -84,6 +85,7 @@ export interface IServiceConfiguration extends IDebugOptions { onError?: (error: any) => any; version?: string; type?: string; + sdkWrapperVersion?: string; } export interface IService { @@ -144,7 +146,7 @@ export class Service implements IService { * @hidden */ wpmp: WindowPostMessageProxy; - private router: Router; + router: Router; private uniqueSessionId: string; /** @@ -158,37 +160,10 @@ export class Service implements IService { */ constructor(hpmFactory: IHpmFactory, wpmpFactory: IWpmpFactory, routerFactory: IRouterFactory, config: IServiceConfiguration = {}) { this.wpmp = wpmpFactory(config.wpmpName, config.logMessages); - this.hpm = hpmFactory(this.wpmp, null, config.version, config.type); + this.hpm = hpmFactory(this.wpmp, null, config.version, config.type, config.sdkWrapperVersion); this.router = routerFactory(this.wpmp); this.uniqueSessionId = utils.generateUUID(); - this.router.post('/reports/:uniqueId/eventHooks/:eventName', async (req, _res) => { - let embed = utils.find(embed => { - return (embed.config.uniqueId === req.params.uniqueId); - }, this.embeds); - - if (!embed) { - return; - } - - switch (req.params.eventName) { - case "preQuery": - req.body = req.body || {}; - req.body.report = embed; - await this.invokeSDKHook(embed.eventHooks?.applicationContextProvider, req, _res); - break; - - case "newAccessToken": - req.body = req.body || {}; - req.body.report = embed; - await this.invokeSDKHook(embed.eventHooks?.accessTokenProvider, req, _res); - break; - - default: - break; - } - }); - /** * Adds handler for report events. */ @@ -387,6 +362,15 @@ export class Service implements IService { return this.uniqueSessionId; } + /** + * Returns the Power BI Client SDK version + * + * @hidden + */ + getSDKVersion(): string { + return sdkConfig.default.version; + } + /** * Given a configuration based on a Power BI element, saves the component instance that reference the element for later lookup. * @@ -579,7 +563,7 @@ export class Service implements IService { } } - private async invokeSDKHook(hook: Function, req: IExtendedRequest, res: IExtendedResponse): Promise { + async invokeSDKHook(hook: Function, req: IExtendedRequest, res: IExtendedResponse): Promise { if (!hook) { res.send(404, null); return; @@ -649,4 +633,16 @@ export class Service implements IService { return iframeContent; } + + /** + * Use this API to set SDK info + * + * @hidden + * @param {string} type + * @returns {void} + */ + setSdkInfo(type: string, version: string): void { + this.hpm.defaultHeaders['x-sdk-type'] = type; + this.hpm.defaultHeaders['x-sdk-wrapper-version'] = version; + } } diff --git a/test/SDK-to-HPM.spec.ts b/test/SDK-to-HPM.spec.ts index 47b2bcd9..68a00460 100644 --- a/test/SDK-to-HPM.spec.ts +++ b/test/SDK-to-HPM.spec.ts @@ -82,7 +82,9 @@ describe('SDK-to-HPM', function () { type: "report", id: "fakeReportId", accessToken: 'fakeToken', - embedUrl: iframeSrc + tokenType: models.TokenType.Aad, + embedUrl: iframeSrc, + eventHooks: { accessTokenProvider: function () { return null; } } }; spyHpm.post.and.callFake(() => Promise.resolve({})); @@ -129,7 +131,8 @@ describe('SDK-to-HPM', function () { bootstrapped: undefined, sdkVersion: sdkConfig.default.version, uid: uniqueId, - sdkSessionId: sdkSessionId + sdkSessionId: sdkSessionId, + tokenProviderSupplied: true }; expect(spyHpm.post).toHaveBeenCalledWith('/report/load', expectedConfiguration, expectedHeaders, jasmine.any(Object)); @@ -157,7 +160,8 @@ describe('SDK-to-HPM', function () { bootstrapped: undefined, sdkVersion: sdkConfig.default.version, uid: uniqueId, - sdkSessionId: sdkSessionId + sdkSessionId: sdkSessionId, + tokenProviderSupplied: true }; expect(spyHpm.post).toHaveBeenCalledWith('/report/load', report.config, expectedHeaders, jasmine.any(Object)); expect(error).toEqual(testData.errorResponse.body); @@ -180,7 +184,8 @@ describe('SDK-to-HPM', function () { bootstrapped: undefined, sdkVersion: sdkConfig.default.version, uid: uniqueId, - sdkSessionId: sdkSessionId + sdkSessionId: sdkSessionId, + tokenProviderSupplied: true }; expect(spyHpm.post).toHaveBeenCalledWith('/report/load', report.config, expectedHeaders, jasmine.any(Object)); @@ -973,7 +978,8 @@ describe('SDK-to-HPM', function () { bootstrapped: undefined, sdkVersion: sdkConfig.default.version, uid: uniqueId, - sdkSessionId: sdkSessionId + sdkSessionId: sdkSessionId, + tokenProviderSupplied: true }; // Assert @@ -2141,7 +2147,9 @@ describe('SDK-to-HPM', function () { const embedCreateConfiguration = { datasetId: "fakeReportId", accessToken: 'fakeToken', - embedUrl: iframeSrc + tokenType: models.TokenType.Aad, + embedUrl: iframeSrc, + eventHooks: { accessTokenProvider: function () { return null; } } }; spyHpm.post.and.returnValue(Promise.resolve({})); create = powerbi.createReport(createElement, embedCreateConfiguration); @@ -2174,7 +2182,7 @@ describe('SDK-to-HPM', function () { await create.createReport(testData.createConfiguration); // Assert - expect(spyHpm.post).toHaveBeenCalledWith('/report/create', testData.createConfiguration, { uid: createUniqueId, sdkSessionId: sdkSessionId }, jasmine.any(Object)); + expect(spyHpm.post).toHaveBeenCalledWith('/report/create', testData.createConfiguration, { uid: createUniqueId, sdkSessionId: sdkSessionId, tokenProviderSupplied: true }, jasmine.any(Object)); }); it('create.createReport() returns promise that rejects with validation error if the create configuration is invalid', async function () { @@ -2182,7 +2190,9 @@ describe('SDK-to-HPM', function () { const testData = { createConfiguration: { datasetId: 'fakeId', - accessToken: 'fakeToken' + accessToken: 'fakeToken', + tokenType: models.TokenType.Aad, + eventHooks: { accessTokenProvider: function () { return null; } } }, errorResponse: { body: { @@ -2198,7 +2208,7 @@ describe('SDK-to-HPM', function () { } catch (error) { // Assert - expect(spyHpm.post).toHaveBeenCalledWith('/report/create', testData.createConfiguration, { uid: createUniqueId, sdkSessionId: sdkSessionId }, jasmine.any(Object)); + expect(spyHpm.post).toHaveBeenCalledWith('/report/create', testData.createConfiguration, { uid: createUniqueId, sdkSessionId: sdkSessionId , tokenProviderSupplied: true}, jasmine.any(Object)); expect(error).toEqual(testData.errorResponse.body); } }); @@ -2208,7 +2218,9 @@ describe('SDK-to-HPM', function () { const testData = { createConfiguration: { datasetId: 'fakeId', - accessToken: 'fakeToken' + accessToken: 'fakeToken', + tokenType: models.TokenType.Aad, + eventHooks: { accessTokenProvider: function () { return null; } } }, response: { body: null @@ -2220,7 +2232,7 @@ describe('SDK-to-HPM', function () { // Act const response = await create.createReport(testData.createConfiguration); // Assert - expect(spyHpm.post).toHaveBeenCalledWith('/report/create', testData.createConfiguration, { uid: createUniqueId, sdkSessionId: sdkSessionId }, jasmine.any(Object)); + expect(spyHpm.post).toHaveBeenCalledWith('/report/create', testData.createConfiguration, { uid: createUniqueId, sdkSessionId: sdkSessionId, tokenProviderSupplied: true }, jasmine.any(Object)); expect(response).toEqual(null); }); });