1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`e33397df-d589-49b2-89b9-69334b2d64fb`,e._sentryDebugIdIdentifier=`sentry-dbid-e33397df-d589-49b2-89b9-69334b2d64fb`)}catch{}})();import{G_ as e}from"./workflow-canvas-DzR8g4rF.js";import{t}from"./timezones-Ct5Oiyxw.js";import{t as n}from"./guess-timezone-DiLybaQy.js";import{i as r}from"./analytics-query-filter-0yKE4NqZ.js";var i=[`settings`,`unsupportedFrom`,`from`],a=new Set([`today`,`yesterday`,`week`,`mtd`,`ytd`,`30m`,`60m`,`24h`,`7d`,`14d`,`30d`,`90d`,`year`]),o=/^\d{4}-\d{2}-\d{2}$/,s=/^\d{4}-\d{2}-\d{2}T/,c=new Set(e),l=new Set(i),u=new Set([`UTC`,...t.map(e=>e.value)]);function d(e){return typeof e==`string`&&u.has(e)}function f(e){return e===`UTC`?`GMT`:e}function p(){let e=n();return e===`UTC`||e===`Etc/UTC`?`GMT`:d(e)?e:`GMT`}function m(e){if(typeof e!=`string`||!o.test(e))return!1;let[t,n,r]=e.split(`-`).map(Number);return t<1||n<1||n>12||r<1?!1:r<=new Date(Date.UTC(t,n,0)).getUTCDate()}function h(e){return m(e)?!0:typeof e!=`string`||!s.test(e)||!m(e.slice(0,10))?!1:Number.isFinite(Date.parse(e))}function g(e,t){return Date.parse(e)<=Date.parse(t)}function _(e){return typeof e==`string`?[...new Set(e.split(`,`).map(e=>e.trim()).filter(Boolean))].toSorted():[]}function v(e){let t=[...new Set(e.filter(Boolean))].toSorted();return t.length?t.join(`,`):void 0}function y(e){return _(e).filter(e=>c.has(e))}function b(e){return v(e.filter(e=>c.has(e)))}function x(e){return typeof e==`string`&&a.has(e)}function S(e){let t={},n=h(e.periodStart)?e.periodStart:void 0,i=h(e.periodEnd)?e.periodEnd:void 0,a=!!(n&&i&&g(n,i));(e.period===`last_full_month`||a||x(e.periodQuickRange))&&(t.period=`last_full_month`),a&&(t.periodStart=n,t.periodEnd=i),!a&&x(e.periodQuickRange)&&(t.periodQuickRange=e.periodQuickRange);let o=b(y(e.channelSet));o&&(t.channelSet=o,r(e.channelSetOperator)&&(t.channelSetOperator=e.channelSetOperator));let s=v(_(e.brandIds));return s&&(t.brandIds=s,r(e.brandOperator)&&(t.brandOperator=e.brandOperator)),d(e.timeZone)&&(t.timeZone=e.timeZone),t}function C(e){let t=S(e),n=h(t.periodStart)&&h(t.periodEnd);return{period:n?{start:t.periodStart,end:t.periodEnd}:t.period,...n?{}:t.periodQuickRange?{periodQuickRange:t.periodQuickRange}:{},channelSets:y(t.channelSet),channelSetOperator:t.channelSetOperator??`in`,brandIds:_(t.brandIds),brandOperator:t.brandOperator??`in`,...t.timeZone?{timeZone:t.timeZone}:{}}}function w(e){let t={};(e.period||e.periodQuickRange)&&(t.period=`last_full_month`),e.period&&typeof e.period!=`string`?(t.periodStart=e.period.start,t.periodEnd=e.period.end):e.periodQuickRange&&(t.periodQuickRange=e.periodQuickRange);let n=b(e.channelSets);n&&(t.channelSet=n,t.channelSetOperator=e.channelSetOperator);let r=v(e.brandIds);return r&&(t.brandIds=r,t.brandOperator=e.brandOperator),e.timeZone&&(t.timeZone=e.timeZone),t}function T(e,t){return e.period||e.periodQuickRange||!t?e:{...e,period:t}}function E(e){return e.timeZone?e:{...e,timeZone:p()}}function D(e){return{...e,channelSets:[],channelSetOperator:`in`,brandIds:[],brandOperator:`in`}}function O(e){let t=[];return e.channelSets.length&&t.push({dimension:`channel_set`,operator:e.channelSetOperator,values:e.channelSets}),e.brandIds.length&&t.push({dimension:`brand_id`,operator:e.brandOperator,values:e.brandIds}),t}function k(e){return JSON.stringify(S(e))}function A(e){let t={period:e.period,periodStart:e.periodStart,periodEnd:e.periodEnd,periodQuickRange:e.periodQuickRange,channelSet:e.channelSet,channelSetOperator:e.channelSetOperator,brandIds:e.brandIds,brandOperator:e.brandOperator,timeZone:e.timeZone},n=Object.fromEntries(Object.entries(e).filter(([e])=>!Object.hasOwn(t,e)&&!l.has(e)).toSorted(([e],[t])=>e.localeCompare(t)));return JSON.stringify({...t,...n})}export{E as a,k as c,p as d,S as f,T as i,f as l,O as n,A as o,C as r,w as s,i as t,D as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.