diff --git a/dist/powerbi.min.js b/dist/powerbi.min.js index 586f5b87..b5ed1a05 100644 --- a/dist/powerbi.min.js +++ b/dist/powerbi.min.js @@ -1,16 +1,8 @@ -<<<<<<< HEAD -/*! powerbi-client v2.6.0 | (c) 2016 Microsoft Corporation MIT */ -!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){function e(a){if(r[a])return r[a].exports;var i=r[a]={exports:{},id:a,loaded:!1};return t[a].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){var a=r(1);e.service=a;var i=r(15);e.factories=i;var o=r(4);e.models=o;var n=r(5);e.Report=n.Report;var l=r(11);e.Dashboard=l.Dashboard;var s=r(12);e.Tile=s.Tile;var d=r(2);e.Embed=d.Embed;var u=r(6);e.Page=u.Page;var p=r(13);e.Qna=p.Qna;var c=r(14);e.Visual=c.Visual;var f=r(7);e.VisualDescriptor=f.VisualDescriptor;var h=new a.Service(i.hpmFactory,i.wpmpFactory,i.routerFactory);window.powerbi=h},function(t,e,r){var a=r(2),i=r(5),o=r(10),n=r(11),l=r(12),s=r(6),d=r(13),u=r(14),p=r(3),c=function(){function t(e,r,a,i){var o=this;void 0===i&&(i={}),this.wpmp=r(i.wpmpName,i.logMessages),this.hpm=e(this.wpmp,null,i.version,i.type),this.router=a(this.wpmp),this.router.post("/reports/:uniqueId/events/:eventName",function(t,e){var r={type:"report",id:t.params.uniqueId,name:t.params.eventName,value:t.body};o.handleEvent(r)}),this.router.post("/reports/:uniqueId/pages/:pageName/events/:eventName",function(t,e){var r={type:"report",id:t.params.uniqueId,name:t.params.eventName,value:t.body};o.handleEvent(r)}),this.router.post("/reports/:uniqueId/pages/:pageName/visuals/:visualName/events/:eventName",function(t,e){var r={type:"report",id:t.params.uniqueId,name:t.params.eventName,value:t.body};o.handleEvent(r)}),this.router.post("/dashboards/:uniqueId/events/:eventName",function(t,e){var r={type:"dashboard",id:t.params.uniqueId,name:t.params.eventName,value:t.body};o.handleEvent(r)}),this.router.post("/tile/:uniqueId/events/:eventName",function(t,e){var r={type:"tile",id:t.params.uniqueId,name:t.params.eventName,value:t.body};o.handleEvent(r)}),this.router.post("/qna/:uniqueId/events/:eventName",function(t,e){var r={type:"qna",id:t.params.uniqueId,name:t.params.eventName,value:t.body};o.handleEvent(r)}),this.embeds=[],this.config=p.assign({},t.defaultConfig,i),this.config.autoEmbedOnContentLoaded&&this.enableAutoEmbed()}return t.prototype.createReport=function(t,e){e.type="create";var r=t,a=new o.Create(this,r,e);return r.powerBiEmbed=a,this.addOrOverwriteEmbed(a,t),a},t.prototype.init=function(t,e){var r=this;void 0===e&&(e=void 0),t=t&&t instanceof HTMLElement?t:document.body;var i=Array.prototype.slice.call(t.querySelectorAll("["+a.Embed.embedUrlAttribute+"]"));return i.map(function(t){return r.embed(t,e)})},t.prototype.embed=function(t,e){return void 0===e&&(e={}),this.embedInternal(t,e)},t.prototype.load=function(t,e){return void 0===e&&(e={}),this.embedInternal(t,e,!0)},t.prototype.embedInternal=function(t,e,r){void 0===e&&(e={});var a,i=t;return a=i.powerBiEmbed?this.embedExisting(i,e,r):this.embedNew(i,e,r)},t.prototype.embedNew=function(e,r,o){var n=r.type||e.getAttribute(a.Embed.typeAttribute);if(!n)throw new Error("Attempted to embed using config "+JSON.stringify(r)+" on element "+e.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 '"+a.Embed.typeAttribute+'="'+i.Report.type.toLowerCase()+"\"'.");r.type=n;var l=p.find(function(t){return n===t.type.toLowerCase()},t.components);if(!l)throw new Error("Attempted to embed component of type: "+n+" but did not find any matching component. Please verify the type you specified is intended.");var s=new l(this,e,r,o);return e.powerBiEmbed=s,this.addOrOverwriteEmbed(s,e),s},t.prototype.embedExisting=function(t,e,r){var a=p.find(function(e){return e.element===t},this.embeds);if(!a)throw new Error("Attempted to embed using config "+JSON.stringify(e)+" on element "+t.outerHTML+" which already has embedded comopnent associated, but could not find the existing comopnent 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.");if(e.type&&"qna"===e.type.toLowerCase())return this.embedNew(t,e);if("string"==typeof e.type&&e.type!==a.config.type){if("report"===e.type&&"create"===a.config.type){var o=new i.Report(this,t,e,(!1),t.powerBiEmbed.iframe);return o.load(e),t.powerBiEmbed=o,this.addOrOverwriteEmbed(a,t),o}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(e)+" on element "+t.outerHTML+", but the existing element contains an embed of type: "+this.config.type+" which does not match the new type: "+e.type)}return a.load(e,r),a},t.prototype.enableAutoEmbed=function(){var t=this;window.addEventListener("DOMContentLoaded",function(e){return t.init(document.body)},!1)},t.prototype.get=function(t){var e=t;if(!e.powerBiEmbed)throw new Error("You attempted to get an instance of powerbi component associated with element: "+t.outerHTML+" but there was no associated instance.");return e.powerBiEmbed},t.prototype.find=function(t){return p.find(function(e){return e.config.uniqueId===t},this.embeds)},t.prototype.addOrOverwriteEmbed=function(t,e){this.embeds=this.embeds.filter(function(t){return t.element.id!==e.id}),this.embeds.push(t)},t.prototype.reset=function(t){var e=t;if(e.powerBiEmbed){p.remove(function(t){return t===e.powerBiEmbed},this.embeds),delete e.powerBiEmbed;var r=t.querySelector("iframe");r&&(void 0!==r.remove?r.remove():r.parentElement.removeChild(r))}},t.prototype.handleTileEvents=function(t){"tile"===t.type&&this.handleEvent(t)},t.prototype.handleEvent=function(t){var e=p.find(function(e){return e.config.uniqueId===t.id},this.embeds);if(e){var r=t.value;if("pageChanged"===t.name){var a="newPage",i=r[a];if(!i)throw new Error("Page model not found at 'event.value."+a+"'.");r[a]=new s.Page(e,i.name,i.displayName,(!0))}p.raiseCustomEvent(e.element,t.name,r)}},t.prototype.preload=function(t,e){var r=document.createElement("iframe");r.setAttribute("style","display:none;"),r.setAttribute("src",t.embedUrl),r.setAttribute("scrolling","no"),r.setAttribute("allowfullscreen","false");var a=e;return a||(a=document.getElementsByTagName("body")[0]),a.appendChild(r),r.onload=function(){p.raiseCustomEvent(r,"preloaded",{})},r},t.components=[l.Tile,i.Report,n.Dashboard,d.Qna,u.Visual],t.defaultConfig={autoEmbedOnContentLoaded:!1,onError:function(){for(var t=[],e=0;e0?"&":"?";return t+=a+e+"="+r}e.raiseCustomEvent=r,e.findIndex=a,e.find=i,e.remove=o,e.assign=n,e.createRandomString=l,e.addParamToUrl=s},function(t,e,r){/*! powerbi-models v1.0.7 | (c) 2016 Microsoft Corporation MIT */ -!function(e,r){t.exports=r()}(this,function(){return function(t){function e(a){if(r[a])return r[a].exports;var i=r[a]={exports:{},id:a,loaded:!1};return t[a].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function a(t){return l(t)&&!!t.keys}function i(t){return o(t)===U.Basic&&!!t.keyValues}function o(t){if(t.filterType)return t.filterType;var e=t,r=t;return"string"==typeof e.operator&&Array.isArray(e.values)?U.Basic:"string"==typeof r.logicalOperator&&Array.isArray(r.conditions)?U.Advanced:U.Unknown}function n(t){return void 0!==t.table&&void 0!==t.measure}function l(t){return void 0!==t.table&&void 0!==t.column}function s(t){return void 0!==t.table&&void 0!==t.hierarchy&&void 0!==t.hierarchyLevel}function d(t){var e=t.message;return e||(e=t.path+" is invalid. Not meeting "+t.keyword+" constraint"),{message:e}}function u(t){var r=e.Validators.visualSelectorValidator.validate(t);return r?r.map(d):void 0}function p(t){var r=e.Validators.slicerValidator.validate(t);return r?r.map(d):void 0}function c(t){var r=e.Validators.slicerStateValidator.validate(t);return r?r.map(d):void 0}function f(t){var r=e.Validators.playBookmarkRequestValidator.validate(t);return r?r.map(d):void 0}function h(t){var r=e.Validators.addBookmarkRequestValidator.validate(t);return r?r.map(d):void 0}function v(t){var r=e.Validators.applyBookmarkByNameRequestValidator.validate(t);return r?r.map(d):void 0}function y(t){var r=e.Validators.applyBookmarkStateRequestValidator.validate(t);return r?r.map(d):void 0}function m(t){var r=e.Validators.settingsValidator.validate(t);return r?r.map(d):void 0}function g(t){var r=e.Validators.customPageSizeValidator.validate(t);return r?r.map(d):void 0}function V(t){var r=e.Validators.extentionValidator.validate(t);return r?r.map(d):void 0}function w(t){var r=e.Validators.reportLoadValidator.validate(t);return r?r.map(d):void 0}function b(t){var r=e.Validators.reportCreateValidator.validate(t);return r?r.map(d):void 0}function E(t){var r=e.Validators.dashboardLoadValidator.validate(t);return r?r.map(d):void 0}function O(t){var r=e.Validators.tileLoadValidator.validate(t);return r?r.map(d):void 0}function P(t){var r=e.Validators.pageValidator.validate(t);return r?r.map(d):void 0}function _(t){var r=e.Validators.filtersValidator.validate(t);return r?r.map(d):void 0}function T(t){var r=e.Validators.saveAsParametersValidator.validate(t);return r?r.map(d):void 0}function S(t){var r=e.Validators.loadQnaValidator.validate(t);return r?r.map(d):void 0}function k(t){var r=e.Validators.qnaInterpretInputDataValidator.validate(t);return r?r.map(d):void 0}function A(t){var r=e.Validators.exportDataRequestValidator.validate(t);return r?r.map(d):void 0}var R=this&&this.__extends||function(){var t=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])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.Validators=r(1).Validators;var F;!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"}(F=e.PageSizeType||(e.PageSizeType={}));var x;!function(t){t[t.FitToPage=0]="FitToPage",t[t.FitToWidth=1]="FitToWidth",t[t.ActualSize=2]="ActualSize"}(x=e.DisplayOption||(e.DisplayOption={}));var q;!function(t){t[t.Default=0]="Default",t[t.Transparent=1]="Transparent"}(q=e.BackgroundType||(e.BackgroundType={}));var M;!function(t){t[t.Visible=0]="Visible",t[t.Hidden=1]="Hidden"}(M=e.VisualContainerDisplayMode||(e.VisualContainerDisplayMode={}));var C;!function(t){t[t.Master=0]="Master",t[t.Custom=1]="Custom",t[t.MobilePortrait=2]="MobilePortrait",t[t.MobileLandscape=3]="MobileLandscape"}(C=e.LayoutType||(e.LayoutType={}));var I;!function(t){t[t.AlwaysVisible=0]="AlwaysVisible",t[t.HiddenInViewMode=1]="HiddenInViewMode"}(I=e.SectionVisibility||(e.SectionVisibility={}));var j;!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"}(j=e.Permissions||(e.Permissions={}));var N;!function(t){t[t.View=0]="View",t[t.Edit=1]="Edit"}(N=e.ViewMode||(e.ViewMode={}));var L;!function(t){t[t.Aad=0]="Aad",t[t.Embed=1]="Embed"}(L=e.TokenType||(e.TokenType={}));var U;!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"}(U=e.FilterType||(e.FilterType={}));var D;!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"}(D=e.RelativeDateFilterTimeUnit||(e.RelativeDateFilterTimeUnit={}));var W;!function(t){t[t.InLast=0]="InLast",t[t.InThis=1]="InThis",t[t.InNext=2]="InNext"}(W=e.RelativeDateOperators||(e.RelativeDateOperators={}));var B=function(){function t(t,e){this.target=t,this.filterType=e}return t.prototype.toJSON=function(){return{$schema:this.schemaUrl,target:this.target,filterType:this.filterType}},t}();e.Filter=B;var H=function(t){function e(r,a,i){var o=t.call(this,r,U.Unknown)||this;return o.message=a,o.notSupportedTypeName=i,o.schemaUrl=e.schemaUrl,o}return R(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}(B);e.NotSupportedFilter=H;var z=function(t){function e(r,a,i){var o=t.call(this,r,U.IncludeExclude)||this;return o.values=i,o.isExclude=a,o.schemaUrl=e.schemaUrl,o}return R(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}(B);e.IncludeExcludeFilter=z;var J=function(t){function e(r,a,i){var o=t.call(this,r,U.TopN)||this;return o.operator=a,o.itemCount=i,o.schemaUrl=e.schemaUrl,o}return R(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.operator=this.operator,e.itemCount=this.itemCount,e},e.schemaUrl="http://powerbi.com/product/schema#topN",e}(B);e.TopNFilter=J;var Y=function(t){function e(r,a,i,o,n){var l=t.call(this,r,U.RelativeDate)||this;return l.operator=a,l.timeUnitsCount=i,l.timeUnitType=o,l.includeToday=n,l.schemaUrl=e.schemaUrl,l}return R(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}(B);e.RelativeDateFilter=Y;var Q=function(t){function e(r,a){for(var i=[],o=2;o0&&!i)throw new Error("You shold pass the values to be filtered for each key. You passed: no values and "+n+" keys");if(0===n&&i&&i.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;l2)throw new Error("AdvancedFilters may not have more than two conditions. You passed: "+i.length);if(1===l.length&&"And"!==a)throw new Error('Logical Operator must be "And" when there is only one condition provided');return n.conditions=l,n}return R(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}(B);e.AdvancedFilter=$,e.isFilterKeyColumnsTarget=a,e.isBasicFilterWithKeys=i,e.getFilterType=o,e.isMeasure=n,e.isColumn=l,e.isHierarchy=s;var K;!function(t){t[t.Interactive=0]="Interactive",t[t.ResultOnly=1]="ResultOnly"}(K=e.QnaMode||(e.QnaMode={}));var X;!function(t){t[t.Summarized=0]="Summarized",t[t.Underlying=1]="Underlying"}(X=e.ExportDataType||(e.ExportDataType={}));var Z;!function(t){t[t.Off=0]="Off",t[t.Presentation=1]="Presentation"}(Z=e.BookmarksPlayMode||(e.BookmarksPlayMode={}));var tt=function(){function t(t){this.$schema=t}return t.prototype.toJSON=function(){return{$schema:this.$schema}},t}();e.Selector=tt;var et=function(t){function e(r){var a=t.call(this,e.schemaUrl)||this;return a.visualName=r,a}return R(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}(tt);e.VisualSelector=et,e.validateVisualSelector=u,e.validateSlicer=p,e.validateSlicerState=c,e.validatePlayBookmarkRequest=f,e.validateAddBookmarkRequest=h,e.validateApplyBookmarkByNameRequest=v,e.validateApplyBookmarkStateRequest=y,e.validateSettings=m,e.validateCustomPageSize=g,e.validateExtension=V,e.validateReportLoad=w,e.validateCreateReport=b,e.validateDashboardLoad=E,e.validateTileLoad=O,e.validatePage=P,e.validateFilter=_,e.validateSaveAsParameters=T,e.validateLoadQnaConfiguration=S,e.validateQnaInterpretInputData=k,e.validateExportDataRequest=A},function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});var a=r(2),i=r(3),o=r(5),n=r(6),l=r(7),s=r(8),d=r(9),u=r(10),p=r(11),c=r(12),f=r(13),h=r(14),v=r(15),y=r(16),m=r(17),g=r(18),V=r(19),w=r(20),b=r(21);e.Validators={advancedFilterTypeValidator:new a.EnumValidator([0]),advancedFilterValidator:new l.AdvancedFilterValidator,anyArrayValidator:new a.ArrayValidator([new d.AnyOfValidator([new a.StringValidator,new a.NumberValidator,new a.BooleanValidator])]),anyFilterValidator:new d.AnyOfValidator([new l.BasicFilterValidator,new l.AdvancedFilterValidator,new l.IncludeExcludeFilterValidator,new l.NotSupportedFilterValidator,new l.RelativeDateFilterValidator,new l.TopNFilterValidator]),anyValueValidator:new d.AnyOfValidator([new a.StringValidator,new a.NumberValidator,new a.BooleanValidator]),basicFilterTypeValidator:new a.EnumValidator([1]),basicFilterValidator:new l.BasicFilterValidator,playBookmarkRequestValidator:new n.PlayBookmarkRequestValidator,addBookmarkRequestValidator:new n.AddBookmarkRequestValidator,applyBookmarkByNameRequestValidator:new n.ApplyBookmarkByNameRequestValidator,applyBookmarkStateRequestValidator:new n.ApplyBookmarkStateRequestValidator,applyBookmarkValidator:new d.AnyOfValidator([new n.ApplyBookmarkByNameRequestValidator,new n.ApplyBookmarkStateRequestValidator]),backgroundValidator:new a.EnumValidator([0,1]),booleanArrayValidator:new a.BooleanArrayValidator,booleanValidator:new a.BooleanValidator,commandExtensionValidator:new i.CommandExtensionValidator,conditionItemValidator:new l.ConditionItemValidator,customLayoutValidator:new g.CustomLayoutValidator,customLayoutDisplayOptionValidator:new a.EnumValidator([0,1,2]),customPageSizeValidator:new h.CustomPageSizeValidator,dashboardLoadValidator:new c.DashboardLoadValidator,displayStateModeValidator:new a.EnumValidator([0,1]),displayStateValidator:new g.DisplayStateValidator,exportDataRequestValidator:new V.ExportDataRequestValidator,extensionPointsValidator:new i.ExtensionPointsValidator,extentionArrayValidator:new a.ArrayValidator([new i.ExtensionValidator]),extentionValidator:new i.ExtensionValidator,fieldRequiredValidator:new s.FieldRequiredValidator,filterColumnTargetValidator:new l.FilterColumnTargetValidator,filterConditionsValidator:new a.ArrayValidator([new l.ConditionItemValidator]),filterHierarchyTargetValidator:new l.FilterHierarchyTargetValidator,filterMeasureTargetValidator:new l.FilterMeasureTargetValidator,filterTargetValidator:new d.AnyOfValidator([new l.FilterColumnTargetValidator,new l.FilterHierarchyTargetValidator,new l.FilterMeasureTargetValidator]),filtersArrayValidator:new a.ArrayValidator([new d.AnyOfValidator([new l.BasicFilterValidator,new l.AdvancedFilterValidator,new l.RelativeDateFilterValidator])]),filtersValidator:new l.FilterValidator,includeExcludeFilterValidator:new l.IncludeExcludeFilterValidator,includeExludeFilterTypeValidator:new a.EnumValidator([3]),layoutTypeValidator:new a.EnumValidator([0,1,2,3]),loadQnaValidator:new v.LoadQnaValidator,menuExtensionValidator:new i.MenuExtensionValidator,notSupportedFilterTypeValidator:new a.EnumValidator([2]),notSupportedFilterValidator:new l.NotSupportedFilterValidator,numberArrayValidator:new a.NumberArrayValidator,numberValidator:new a.NumberValidator,pageLayoutValidator:new m.MapValidator([new a.StringValidator],[new g.VisualLayoutValidator]),pageSizeTypeValidator:new a.EnumValidator([0,1,2,3,4,5]),pageSizeValidator:new h.PageSizeValidator,pageValidator:new h.PageValidator,pageViewFieldValidator:new h.PageViewFieldValidator,pagesLayoutValidator:new m.MapValidator([new a.StringValidator],[new g.PageLayoutValidator]),permissionsValidator:new a.EnumValidator([0,1,2,4,7]),qnaInterpretInputDataValidator:new v.QnaInterpretInputDataValidator,qnaSettingValidator:new v.QnaSettingsValidator,relativeDateFilterOperatorValidator:new a.EnumValidator([0,1,2]),relativeDateFilterTimeUnitTypeValidator:new a.EnumValidator([0,1,2,3,4,5,6]),relativeDateFilterTypeValidator:new a.EnumValidator([4]),relativeDateFilterValidator:new l.RelativeDateFilterValidator,reportCreateValidator:new p.ReportCreateValidator,reportLoadValidator:new u.ReportLoadValidator,saveAsParametersValidator:new y.SaveAsParametersValidator,settingsValidator:new o.SettingsValidator,slicerValidator:new b.SlicerValidator,slicerStateValidator:new b.SlicerStateValidator,stringArrayValidator:new a.StringArrayValidator,stringValidator:new a.StringValidator,tileLoadValidator:new f.TileLoadValidator,tokenTypeValidator:new a.EnumValidator([0,1]),topNFilterTypeValidator:new a.EnumValidator([5]),topNFilterValidator:new l.TopNFilterValidator,viewModeValidator:new a.EnumValidator([0,1]),visualLayoutValidator:new g.VisualLayoutValidator,visualSelectorValidator:new w.VisualSelectorValidator}},function(t,e){var r=this&&this.__extends||function(){var t=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])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}();Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(){}return t.prototype.validate=function(t,e,r){return null==t?null:"object"!=typeof t||Array.isArray(t)?[{message:void 0!==r?r+" must be an object":"input must be an object",path:e,keyword:"type"}]:null},t}();e.ObjectValidator=a;var i=function(){function t(t){this.itemValidators=t}return t.prototype.validate=function(t,e,r){if(null==t)return null;if(!Array.isArray(t))return[{message:r+" property is invalid",path:(e?e+".":"")+r,keyword:"type"}];for(var a=0;a0?"&":"?";return t+=a+e+"="+r}e.raiseCustomEvent=r,e.findIndex=a,e.find=i,e.remove=o,e.assign=n,e.createRandomString=l,e.addParamToUrl=s},function(t,e,r){/*! powerbi-models v1.0.8 | (c) 2016 Microsoft Corporation MIT */ !function(e,r){t.exports=r()}(this,function(){return function(t){function e(a){if(r[a])return r[a].exports;var i=r[a]={exports:{},id:a,loaded:!1};return t[a].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function a(t){return l(t)&&!!t.keys}function i(t){return o(t)===B.Basic&&!!t.keyValues}function o(t){if(t.filterType)return t.filterType;var e=t,r=t;return"string"==typeof e.operator&&Array.isArray(e.values)?B.Basic:"string"==typeof r.logicalOperator&&Array.isArray(r.conditions)?B.Advanced:B.Unknown}function n(t){return void 0!==t.table&&void 0!==t.measure}function l(t){return void 0!==t.table&&void 0!==t.column}function s(t){return void 0!==t.table&&void 0!==t.hierarchy&&void 0!==t.hierarchyLevel}function d(t){var e=t.message;return e||(e=t.path+" is invalid. Not meeting "+t.keyword+" constraint"),{message:e}}function u(t){var r=e.Validators.visualSelectorValidator.validate(t);return r?r.map(d):void 0}function p(t){var r=e.Validators.slicerValidator.validate(t);return r?r.map(d):void 0}function c(t){var r=e.Validators.slicerStateValidator.validate(t);return r?r.map(d):void 0}function f(t){var r=e.Validators.playBookmarkRequestValidator.validate(t);return r?r.map(d):void 0}function h(t){var r=e.Validators.addBookmarkRequestValidator.validate(t);return r?r.map(d):void 0}function v(t){var r=e.Validators.applyBookmarkByNameRequestValidator.validate(t);return r?r.map(d):void 0}function y(t){var r=e.Validators.applyBookmarkStateRequestValidator.validate(t);return r?r.map(d):void 0}function m(t){var r=e.Validators.settingsValidator.validate(t);return r?r.map(d):void 0}function g(t){var r=e.Validators.customPageSizeValidator.validate(t);return r?r.map(d):void 0}function V(t){var r=e.Validators.extentionValidator.validate(t);return r?r.map(d):void 0}function w(t){var r=e.Validators.reportLoadValidator.validate(t);return r?r.map(d):void 0}function b(t){var r=e.Validators.reportCreateValidator.validate(t);return r?r.map(d):void 0}function E(t){var r=e.Validators.dashboardLoadValidator.validate(t);return r?r.map(d):void 0}function O(t){var r=e.Validators.tileLoadValidator.validate(t);return r?r.map(d):void 0}function _(t){var r=e.Validators.pageValidator.validate(t);return r?r.map(d):void 0}function P(t){var r=e.Validators.filtersValidator.validate(t);return r?r.map(d):void 0}function T(t){var r=e.Validators.saveAsParametersValidator.validate(t);return r?r.map(d):void 0}function S(t){var r=e.Validators.loadQnaValidator.validate(t);return r?r.map(d):void 0}function k(t){var r=e.Validators.qnaInterpretInputDataValidator.validate(t);return r?r.map(d):void 0}function A(t){var r=e.Validators.exportDataRequestValidator.validate(t);return r?r.map(d):void 0}function R(t){var r=e.Validators.visualHeaderValidator.validate(t);return r?r.map(d):void 0}function F(t){var r=e.Validators.visualSettingsValidator.validate(t);return r?r.map(d):void 0}var x=this&&this.__extends||function(){var t=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])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.Validators=r(1).Validators;var M;!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"}(M=e.TraceType||(e.TraceType={}));var q;!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"}(q=e.PageSizeType||(e.PageSizeType={}));var C;!function(t){t[t.FitToPage=0]="FitToPage",t[t.FitToWidth=1]="FitToWidth",t[t.ActualSize=2]="ActualSize"}(C=e.DisplayOption||(e.DisplayOption={}));var I;!function(t){t[t.Default=0]="Default",t[t.Transparent=1]="Transparent"}(I=e.BackgroundType||(e.BackgroundType={}));var j;!function(t){t[t.Visible=0]="Visible",t[t.Hidden=1]="Hidden"}(j=e.VisualContainerDisplayMode||(e.VisualContainerDisplayMode={}));var N;!function(t){t[t.Master=0]="Master",t[t.Custom=1]="Custom",t[t.MobilePortrait=2]="MobilePortrait",t[t.MobileLandscape=3]="MobileLandscape"}(N=e.LayoutType||(e.LayoutType={}));var L;!function(t){t[t.AlwaysVisible=0]="AlwaysVisible",t[t.HiddenInViewMode=1]="HiddenInViewMode"}(L=e.SectionVisibility||(e.SectionVisibility={}));var U;!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"}(U=e.Permissions||(e.Permissions={}));var D;!function(t){t[t.View=0]="View",t[t.Edit=1]="Edit"}(D=e.ViewMode||(e.ViewMode={}));var W;!function(t){t[t.Aad=0]="Aad",t[t.Embed=1]="Embed"}(W=e.TokenType||(e.TokenType={}));var B;!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"}(B=e.FilterType||(e.FilterType={}));var H;!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"}(H=e.RelativeDateFilterTimeUnit||(e.RelativeDateFilterTimeUnit={}));var z;!function(t){t[t.InLast=0]="InLast",t[t.InThis=1]="InThis",t[t.InNext=2]="InNext"}(z=e.RelativeDateOperators||(e.RelativeDateOperators={}));var J=function(){function t(t,e){this.target=t,this.filterType=e}return t.prototype.toJSON=function(){return{$schema:this.schemaUrl,target:this.target,filterType:this.filterType}},t}();e.Filter=J;var Y=function(t){function e(r,a,i){var o=t.call(this,r,B.Unknown)||this;return o.message=a,o.notSupportedTypeName=i,o.schemaUrl=e.schemaUrl,o}return x(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}(J);e.NotSupportedFilter=Y;var Q=function(t){function e(r,a,i){var o=t.call(this,r,B.IncludeExclude)||this;return o.values=i,o.isExclude=a,o.schemaUrl=e.schemaUrl,o}return x(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}(J);e.IncludeExcludeFilter=Q;var G=function(t){function e(r,a,i){var o=t.call(this,r,B.TopN)||this;return o.operator=a,o.itemCount=i,o.schemaUrl=e.schemaUrl,o}return x(e,t),e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.operator=this.operator,e.itemCount=this.itemCount,e},e.schemaUrl="http://powerbi.com/product/schema#topN",e}(J);e.TopNFilter=G;var $=function(t){function e(r,a,i,o,n){var l=t.call(this,r,B.RelativeDate)||this;return l.operator=a,l.timeUnitsCount=i,l.timeUnitType=o,l.includeToday=n,l.schemaUrl=e.schemaUrl,l}return x(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}(J);e.RelativeDateFilter=$;var K=function(t){function e(r,a){for(var i=[],o=2;o0&&!i)throw new Error("You shold pass the values to be filtered for each key. You passed: no values and "+n+" keys");if(0===n&&i&&i.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;l2)throw new Error("AdvancedFilters may not have more than two conditions. You passed: "+i.length);if(1===l.length&&"And"!==a)throw new Error('Logical Operator must be "And" when there is only one condition provided');return n.conditions=l,n}return x(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}(J);e.AdvancedFilter=Z,e.isFilterKeyColumnsTarget=a,e.isBasicFilterWithKeys=i,e.getFilterType=o,e.isMeasure=n,e.isColumn=l,e.isHierarchy=s;var tt;!function(t){t[t.Interactive=0]="Interactive",t[t.ResultOnly=1]="ResultOnly"}(tt=e.QnaMode||(e.QnaMode={}));var et;!function(t){t[t.Summarized=0]="Summarized",t[t.Underlying=1]="Underlying"}(et=e.ExportDataType||(e.ExportDataType={}));var rt;!function(t){t[t.Off=0]="Off",t[t.Presentation=1]="Presentation"}(rt=e.BookmarksPlayMode||(e.BookmarksPlayMode={}));var at=function(){function t(t){this.$schema=t}return t.prototype.toJSON=function(){return{$schema:this.$schema}},t}();e.Selector=at;var it=function(t){function e(r){var a=t.call(this,e.schemaUrl)||this;return a.visualName=r,a}return x(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}(at);e.VisualSelector=it,e.validateVisualSelector=u,e.validateSlicer=p,e.validateSlicerState=c,e.validatePlayBookmarkRequest=f,e.validateAddBookmarkRequest=h,e.validateApplyBookmarkByNameRequest=v,e.validateApplyBookmarkStateRequest=y,e.validateSettings=m,e.validateCustomPageSize=g,e.validateExtension=V,e.validateReportLoad=w,e.validateCreateReport=b,e.validateDashboardLoad=E,e.validateTileLoad=O,e.validatePage=_,e.validateFilter=P,e.validateSaveAsParameters=T,e.validateLoadQnaConfiguration=S,e.validateQnaInterpretInputData=k,e.validateExportDataRequest=A,e.validateVisualHeader=R,e.validateVisualSettings=F},function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0});var a=r(2),i=r(3),o=r(5),n=r(6),l=r(7),s=r(8),d=r(9),u=r(10),p=r(11),c=r(12),f=r(13),h=r(14),v=r(15),y=r(16),m=r(17),g=r(18),V=r(19),w=r(20),b=r(21),E=r(22),O=r(22),_=r(22);e.Validators={advancedFilterTypeValidator:new a.EnumValidator([0]),advancedFilterValidator:new l.AdvancedFilterValidator,anyArrayValidator:new a.ArrayValidator([new d.AnyOfValidator([new a.StringValidator,new a.NumberValidator,new a.BooleanValidator])]),anyFilterValidator:new d.AnyOfValidator([new l.BasicFilterValidator,new l.AdvancedFilterValidator,new l.IncludeExcludeFilterValidator,new l.NotSupportedFilterValidator,new l.RelativeDateFilterValidator,new l.TopNFilterValidator]),anyValueValidator:new d.AnyOfValidator([new a.StringValidator,new a.NumberValidator,new a.BooleanValidator]),basicFilterTypeValidator:new a.EnumValidator([1]),basicFilterValidator:new l.BasicFilterValidator,playBookmarkRequestValidator:new n.PlayBookmarkRequestValidator,addBookmarkRequestValidator:new n.AddBookmarkRequestValidator,applyBookmarkByNameRequestValidator:new n.ApplyBookmarkByNameRequestValidator,applyBookmarkStateRequestValidator:new n.ApplyBookmarkStateRequestValidator,applyBookmarkValidator:new d.AnyOfValidator([new n.ApplyBookmarkByNameRequestValidator,new n.ApplyBookmarkStateRequestValidator]),backgroundValidator:new a.EnumValidator([0,1]),booleanArrayValidator:new a.BooleanArrayValidator,booleanValidator:new a.BooleanValidator,commandExtensionValidator:new i.CommandExtensionValidator,conditionItemValidator:new l.ConditionItemValidator,customLayoutValidator:new g.CustomLayoutValidator,customLayoutDisplayOptionValidator:new a.EnumValidator([0,1,2]),customPageSizeValidator:new h.CustomPageSizeValidator,dashboardLoadValidator:new c.DashboardLoadValidator,displayStateModeValidator:new a.EnumValidator([0,1]),displayStateValidator:new g.DisplayStateValidator,exportDataRequestValidator:new V.ExportDataRequestValidator,extensionPointsValidator:new i.ExtensionPointsValidator,extentionArrayValidator:new a.ArrayValidator([new i.ExtensionValidator]),extentionValidator:new i.ExtensionValidator,fieldRequiredValidator:new s.FieldRequiredValidator,filterColumnTargetValidator:new l.FilterColumnTargetValidator,filterConditionsValidator:new a.ArrayValidator([new l.ConditionItemValidator]),filterHierarchyTargetValidator:new l.FilterHierarchyTargetValidator,filterMeasureTargetValidator:new l.FilterMeasureTargetValidator,filterTargetValidator:new d.AnyOfValidator([new l.FilterColumnTargetValidator,new l.FilterHierarchyTargetValidator,new l.FilterMeasureTargetValidator]),filtersArrayValidator:new a.ArrayValidator([new d.AnyOfValidator([new l.BasicFilterValidator,new l.AdvancedFilterValidator,new l.RelativeDateFilterValidator])]),filtersValidator:new l.FilterValidator,includeExcludeFilterValidator:new l.IncludeExcludeFilterValidator,includeExludeFilterTypeValidator:new a.EnumValidator([3]),layoutTypeValidator:new a.EnumValidator([0,1,2,3]),loadQnaValidator:new v.LoadQnaValidator,menuExtensionValidator:new i.MenuExtensionValidator,notSupportedFilterTypeValidator:new a.EnumValidator([2]),notSupportedFilterValidator:new l.NotSupportedFilterValidator,numberArrayValidator:new a.NumberArrayValidator,numberValidator:new a.NumberValidator,pageLayoutValidator:new m.MapValidator([new a.StringValidator],[new g.VisualLayoutValidator]),pageSizeTypeValidator:new a.EnumValidator([0,1,2,3,4,5]),pageSizeValidator:new h.PageSizeValidator,pageValidator:new h.PageValidator,pageViewFieldValidator:new h.PageViewFieldValidator,pagesLayoutValidator:new m.MapValidator([new a.StringValidator],[new g.PageLayoutValidator]),permissionsValidator:new a.EnumValidator([0,1,2,4,7]),qnaInterpretInputDataValidator:new v.QnaInterpretInputDataValidator,qnaSettingValidator:new v.QnaSettingsValidator,relativeDateFilterOperatorValidator:new a.EnumValidator([0,1,2]),relativeDateFilterTimeUnitTypeValidator:new a.EnumValidator([0,1,2,3,4,5,6]),relativeDateFilterTypeValidator:new a.EnumValidator([4]),relativeDateFilterValidator:new l.RelativeDateFilterValidator,reportCreateValidator:new p.ReportCreateValidator,reportLoadValidator:new u.ReportLoadValidator,saveAsParametersValidator:new y.SaveAsParametersValidator,settingsValidator:new o.SettingsValidator,slicerValidator:new b.SlicerValidator,slicerStateValidator:new b.SlicerStateValidator,stringArrayValidator:new a.StringArrayValidator,stringValidator:new a.StringValidator,tileLoadValidator:new f.TileLoadValidator,tokenTypeValidator:new a.EnumValidator([0,1]),topNFilterTypeValidator:new a.EnumValidator([5]),topNFilterValidator:new l.TopNFilterValidator,viewModeValidator:new a.EnumValidator([0,1]),visualHeaderSettingsValidator:new E.VisualHeaderSettingsValidator,visualHeaderValidator:new O.VisualHeaderValidator,visualLayoutValidator:new g.VisualLayoutValidator,visualHeadersValidator:new a.ArrayValidator([new O.VisualHeaderValidator]),visualSelectorValidator:new w.VisualSelectorValidator,visualSettingsValidator:new _.VisualSettingsValidator}},function(t,e){var r=this&&this.__extends||function(){var t=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])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}();Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(){}return t.prototype.validate=function(t,e,r){return null==t?null:"object"!=typeof t||Array.isArray(t)?[{message:void 0!==r?r+" must be an object":"input must be an object",path:e,keyword:"type"}]:null},t}();e.ObjectValidator=a;var i=function(){function t(t){this.itemValidators=t}return t.prototype.validate=function(t,e,r){if(null==t)return null;if(!Array.isArray(t))return[{message:r+" property is invalid",path:(e?e+".":"")+r,keyword:"type"}];for(var a=0;a>>>>>> powerbi/master !function(e,r){t.exports=r()}(this,function(){return function(t){function e(a){if(r[a])return r[a].exports;var i=r[a]={exports:{},id:a,loaded:!1};return t[a].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e){"use strict";var r=function(){function t(e){var r=this;void 0===e&&(e={processTrackingProperties:{addTrackingProperties:t.defaultAddTrackingProperties,getTrackingProperties:t.defaultGetTrackingProperties},isErrorMessage:t.defaultIsErrorMessage,receiveWindow:window,name:t.createRandomString()}),this.pendingRequestPromises={},this.addTrackingProperties=e.processTrackingProperties&&e.processTrackingProperties.addTrackingProperties||t.defaultAddTrackingProperties,this.getTrackingProperties=e.processTrackingProperties&&e.processTrackingProperties.getTrackingProperties||t.defaultGetTrackingProperties,this.isErrorMessage=e.isErrorMessage||t.defaultIsErrorMessage,this.receiveWindow=e.receiveWindow||window,this.name=e.name||t.createRandomString(),this.logMessages=e.logMessages||!1,this.eventSourceOverrideWindow=e.eventSourceOverrideWindow,this.suppressWarnings=e.suppressWarnings||!1,this.logMessages&&console.log("new WindowPostMessageProxy created with name: "+this.name+" receiving on window: "+this.receiveWindow.document.title),this.handlers=[],this.windowMessageHandler=function(t){return r.onMessageReceived(t)},this.start()}return t.defaultAddTrackingProperties=function(e,r){return e[t.messagePropertyName]=r,e},t.defaultGetTrackingProperties=function(e){return e[t.messagePropertyName]},t.defaultIsErrorMessage=function(t){return!!t.error},t.createDeferred=function(){var t={resolve:null,reject:null,promise:null},e=new Promise(function(e,r){t.resolve=e,t.reject=r});return t.promise=e,t},t.createRandomString=function(){return(Math.random()+1).toString(36).substring(7)},t.prototype.addHandler=function(t){this.handlers.push(t)},t.prototype.removeHandler=function(t){var e=this.handlers.indexOf(t);if(e===-1)throw new Error("You attempted to remove a handler but no matching handler was found.");this.handlers.splice(e,1)},t.prototype.start=function(){this.receiveWindow.addEventListener("message",this.windowMessageHandler)},t.prototype.stop=function(){this.receiveWindow.removeEventListener("message",this.windowMessageHandler)},t.prototype.postMessage=function(e,r){var a={id:t.createRandomString()};this.addTrackingProperties(r,a),this.logMessages&&(console.log(this.name+" Posting message:"),console.log(JSON.stringify(r,null," "))),e.postMessage(r,"*");var i=t.createDeferred();return this.pendingRequestPromises[a.id]=i,i.promise},t.prototype.sendResponse=function(t,e,r){this.addTrackingProperties(e,r),this.logMessages&&(console.log(this.name+" Sending response:"),console.log(JSON.stringify(e,null," "))),t.postMessage(e,"*")},t.prototype.onMessageReceived=function(t){var e=this;this.logMessages&&(console.log(this.name+" Received message:"),console.log("type: "+t.type),console.log(JSON.stringify(t.data,null," ")));var r=this.eventSourceOverrideWindow||t.source,a=t.data;if("object"!=typeof a)return void(this.suppressWarnings||console.warn("Proxy("+this.name+"): Received message that was not an object. Discarding message"));var i;try{i=this.getTrackingProperties(a)}catch(o){this.suppressWarnings||console.warn("Proxy("+this.name+"): Error occurred when attempting to get tracking properties from incoming message:",JSON.stringify(a,null," "),"Error: ",o)}var n;if(i&&(n=this.pendingRequestPromises[i.id]),n){var l=!0;try{l=this.isErrorMessage(a)}catch(o){console.warn("Proxy("+this.name+") Error occurred when trying to determine if message is consider an error response. Message: ",JSON.stringify(a,null,""),"Error: ",o)}l?n.reject(a):n.resolve(a),delete this.pendingRequestPromises[i.id]}else{var s=this.handlers.some(function(t){var o=!1;try{o=t.test(a)}catch(n){e.suppressWarnings||console.warn("Proxy("+e.name+"): Error occurred when handler was testing incoming message:",JSON.stringify(a,null," "),"Error: ",n)}if(o){var l=void 0;try{l=Promise.resolve(t.handle(a))}catch(n){e.suppressWarnings||console.warn("Proxy("+e.name+"): Error occurred when handler was processing incoming message:",JSON.stringify(a,null," "),"Error: ",n),l=Promise.resolve()}return l.then(function(t){if(!t){var o="Handler for message: "+JSON.stringify(a,null," ")+" did not return a response message. The default response message will be returned instead.";e.suppressWarnings||console.warn("Proxy("+e.name+"): "+o),t={warning:o}}e.sendResponse(r,t,i)}),!0}});s||this.suppressWarnings||console.warn("Proxy("+this.name+") did not handle message. Handlers: "+this.handlers.length+" Message: "+JSON.stringify(a,null,"")+".")}},t.messagePropertyName="windowPostMessageProxy",t}();e.WindowPostMessageProxy=r}])})},function(t,e,r){/*! http-post-message v0.2.3 | (c) 2016 Microsoft Corporation MIT */ !function(e,r){t.exports=r()}(this,function(){return function(t){function e(a){if(r[a])return r[a].exports;var i=r[a]={exports:{},id:a,loaded:!1};return t[a].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e){"use strict";var r=function(){function t(t,e,r){void 0===e&&(e={}),this.defaultHeaders=e,this.defaultTargetWindow=r,this.windowPostMessageProxy=t}return t.addTrackingProperties=function(t,e){return t.headers=t.headers||{},e&&e.id&&(t.headers.id=e.id),t},t.getTrackingProperties=function(t){return{id:t.headers&&t.headers.id}},t.isErrorMessage=function(t){return"number"==typeof(t&&t.statusCode)&&!(200<=t.statusCode&&t.statusCode<300)},t.prototype.get=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"GET",url:t,headers:e},r)},t.prototype.post=function(t,e,r,a){return void 0===r&&(r={}),void 0===a&&(a=this.defaultTargetWindow),this.send({method:"POST",url:t,headers:r,body:e},a)},t.prototype.put=function(t,e,r,a){return void 0===r&&(r={}),void 0===a&&(a=this.defaultTargetWindow),this.send({method:"PUT",url:t,headers:r,body:e},a)},t.prototype.patch=function(t,e,r,a){return void 0===r&&(r={}),void 0===a&&(a=this.defaultTargetWindow),this.send({method:"PATCH",url:t,headers:r,body:e},a)},t.prototype["delete"]=function(t,e,r,a){return void 0===e&&(e=null),void 0===r&&(r={}),void 0===a&&(a=this.defaultTargetWindow),this.send({method:"DELETE",url:t,headers:r,body:e},a)},t.prototype.send=function(t,e){if(void 0===e&&(e=this.defaultTargetWindow),t.headers=this.assign({},this.defaultHeaders,t.headers),!e)throw new Error("target window is not provided. You must either provide the target window explicitly as argument to request, or specify default target window when constructing instance of this class.");return this.windowPostMessageProxy.postMessage(e,t)},t.prototype.assign=function(t){for(var e=[],r=1;r2&&"[]"===n.slice(l-2)&&(s=!0,n=n.slice(0,l-2),r[n]||(r[n]=[])),i=o[1]?w(o[1]):""),s?r[n].push(i):r[n]=i}return r},recognize:function(t){var e,r,a,i=[this.rootState],o={},n=!1;if(a=t.indexOf("?"),a!==-1){var l=t.substr(a+1,t.length);t=t.substr(0,a),o=this.parseQueryString(l)}for(t=decodeURI(t),"/"!==t.charAt(0)&&(t="/"+t),e=t.length,e>1&&"/"===t.charAt(e-1)&&(t=t.substr(0,e-1),n=!0),r=0;r>>>>>> powerbi/master "powerbi-router": "^0.1", "window-post-message-proxy": "^0.2" },