buzzcasting-utils 1.14.3 → 1.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,4 +3,4 @@ var e=function(e){return e.CARDS=`cards`,e.CLOUD=`cloud`,e.DASHBOARD=`dashboard`
3
3
  <`),fe=e=>e.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g,``).replace(/\s*\{\s*/g,`{`).replace(/\s*\}\s*/g,`}`).replace(/\s*\:\s*/g,`:`).replace(/\s*\;\s*/g,`;`).replace(/\s*\,\s*/g,`,`).replace(/\s*\~\s*/g,`~`).replace(/\s*\>\s*/g,`>`).replace(/\s*\+\s*/g,`+`).replace(/\s*\!\s*/g,`!`),pe=e=>e.replace(/\,/g,`, `).replace(/\{/g,` {
4
4
  `).replace(/\}/g,`}
5
5
  `).replace(/\;/g,`;
6
- `);function me(e,t){let n=[{value:1,symbol:``},{value:1e3,symbol:`k`},{value:1e6,symbol:`M`},{value:1e9,symbol:`G`},{value:0xe8d4a51000,symbol:`T`},{value:0x38d7ea4c68000,symbol:`P`},{value:0xde0b6b3a7640000,symbol:`E`},{value:1e21,symbol:`Z`},{value:1e24,symbol:`Y`}],r=/\.0+$|(\.\d*[1-9])0+$/,i;for(i=n.length-1;i>0&&!(e>=n[i].value);i--);return(e/n[i].value).toFixed(t).replace(r,`$1`)+n[i].symbol}function he(e){let t=RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g,` `))||null}var ge=e=>new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get(t)})[e];function _e(e){return e[Math.floor(Math.random()*e.length)]}function ve(e){switch(e.language){case`ar`:return{direction:`rtl`,textAlign:`right`};default:return{direction:`ltr`,textAlign:`left`}}}var ye=e=>{switch(e.language){case`ar`:case`ml`:return`rtl`;default:return`ltr`}};function be(e){let t=e.filter(e=>e!==void 0);return t.forEach(e=>{if(e.content=window.__bc.opts.suspended===!0?`License suspended, please contact your Sales Representative to restore service`:e.content?.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,``)||``,e.sender!==null)switch(!0){case e.sender.title===`Unknown author`:e.sender.title=``,e.sender.name=``;break;case e.sender.title===e.sender.name:e.sender.name=``;break;case e.channel===`tw`:e.sender.name=`@${e.sender.name}`}else e.sender={title:``,name:``,id:``,avatar:``,bio:``,location:``,following:0,verified:0,listed:0,followers:0,favourites:0,messages:0,influence:0};if(e.sender.title===``&&e.link!==``){let t=new URL(e.link);e.sender.title=t.hostname.replace(`www.`,``)}}),t}function xe(e,t,n,r){e.stopPropagation(),t.showModal({showComponent:`card-modal`,props:{data:n,options:r}})}function Se(e){let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}var Ce=class e{static EPOCH=Date.UTC(1970,0,1).valueOf();static SHARD_ID=1;static SEQUENCE=1;static generate({timestamp:t=Date.now(),shard_id:n=e.SHARD_ID}={}){t=t instanceof Date?t.valueOf():new Date(t).valueOf();let r=BigInt(t)-BigInt(e.EPOCH)<<BigInt(22);return r|=BigInt(n%1024)<<BigInt(12),r|=BigInt(e.SEQUENCE++%4096),r.toString()}static parse(t){let n=e.binary(t);return{timestamp:e.extractBits(t,1,41),shard_id:e.extractBits(t,42,10),sequence:e.extractBits(t,52),binary:n}}static isValid(t){if(!/^[\d]{19}$/.test(t))return!1;try{return e.parse(t),!0}catch{return!1}}static extractBits(t,n,r){return parseInt(r?e.binary(t).substring(n,n+r):e.binary(t).substring(n),2)}static binary(e){let t=BigInt(e).toString(2);return t.length<64?`0000000000000000000000000000000000000000000000000000000000000000`.substring(0,64-t.length)+t:t}};function we(){let e=``;for(let t=0;t<7;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return e}var Te=n=>{switch(n?.type){case e.MESSAGES:return t.MESSAGES;case e.SERIES:return t.SERIES;case e.CLOUD:return t.CLOUD;default:return t.NO_UPDATES}},Ee=(e=6)=>Math.random().toString(36).substring(2,e+2),De=(e,t=[])=>!t.find(function(t){return t===e}),$=(e,t=[])=>{let n=0,r=``;for(;r==``&&n<100;)r=Ee(e),De(r,t)||(r=``,n++);return r},Oe=e=>{switch(!0){case e<0:return`text-down text-xs`;case e>0:return`text-up text-xs`;default:return`text-white text-xs`}},ke=(e,t,n)=>Promise.race([e,Ae(t,n)]),Ae=(e,t)=>new Promise((n,r)=>setTimeout(()=>t===void 0?n(`ok`):r(t),e));function je(e){let t=`${e.type}.${e.topics}`;return e.order&&(t+=`.${e.order}`),e.period&&(t+=`.${e.period}`),t}function Me(e){if(e.widget===void 0){let t=e.topics?.split(`-`);t&&t.length>1?(e.dashboard=t?t[0]:``,e.widget=t?t[1]:``):(e.widget=e.topics,e.dashboard=e.slide)}return e}function Ne(e,t){let n,i,a,o,s;switch(e.moderation){case r.BEFORE:n=new Date,i=e.beforeTime?.split(`:`),a=Number.parseInt(i?i[0]:`00`),o=Number.parseInt(i?i[1]:`00`),s=Number.parseInt(i?i[2]:`00`),t.before=n.setHours(a,o,s,0)/1e3,t.period||=n.getDay()===1?72:24;break;case r.DELAYED:e.delay&&e.delay>0&&(t.delay=`${e.delay}`);break;case r.APPROVED:t.approved=`1`;break;default:e.period!==0&&(t.period=e.period)}return t}var Pe=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({}),Fe=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({});export{e as API,t as CSS,n as EVENTS,Pe as GeoType,q as HTMLParser,I as HTMLtoDOM,F as HTMLtoXML,r as MODERATION,ne as RGBAchangeA,i as STORAGE,Fe as ShapeType,Ce as Snowflake,oe as abbr,a as anonymize,o as attachedMedia,s as attrs,u as awaitElement,d as brandLogo,p as camelCase,l as camelCasedProps,m as camelToHyphen,f as camelize,h as capitalizeFirstLetter,g as clearContents,E as cloudToGraph,re as debounce,b as deepMerge,ye as dir,S as escape,c as filterAttributes,w as flatten,C as formatContent,D as getGuid,je as getKey,he as getParameterByName,ge as getQueryParam,ie as hasHWA,P as hashSum,X as html2json,ae as intToString,se as isEmpty,Z as json2html,ce as log,le as logging,pe as maxifyCss,de as maxifyHtml,fe as minifyCss,ue as minifyHtml,Ne as moderation,me as numberFormatter,_ as randomColor,te as randomRGB,ee as randomRGBA,v as randomRGBAfull,_e as randomValue,ve as rtl,be as sanitize,T as seriesToGraph,xe as showModal,Se as shuffleMessages,y as stall,we as stringGen,Te as typeCss,$ as uniq,x as unique,Oe as upDownColor,Me as widgetParams,ke as wrapPromise};
6
+ `);function me(e,t){let n=[{value:1,symbol:``},{value:1e3,symbol:`k`},{value:1e6,symbol:`M`},{value:1e9,symbol:`G`},{value:0xe8d4a51000,symbol:`T`},{value:0x38d7ea4c68000,symbol:`P`},{value:0xde0b6b3a7640000,symbol:`E`},{value:1e21,symbol:`Z`},{value:1e24,symbol:`Y`}],r=/\.0+$|(\.\d*[1-9])0+$/,i;for(i=n.length-1;i>0&&!(e>=n[i].value);i--);return(e/n[i].value).toFixed(t).replace(r,`$1`)+n[i].symbol}function he(e){let t=RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g,` `))||null}var ge=e=>new Proxy(new URLSearchParams(window.location.search),{get:(e,t)=>e.get(t)})[e];function _e(e){return e[Math.floor(Math.random()*e.length)]}function ve(e){switch(e.language){case`ar`:return{direction:`rtl`,textAlign:`right`};default:return{direction:`ltr`,textAlign:`left`}}}var ye=e=>{switch(e.language){case`ar`:case`ml`:return`rtl`;default:return`ltr`}};function be(e){let t=e.filter(e=>e!==void 0);return t.forEach(e=>{if(e.content=typeof window<`u`&&window.__bc?.opts?.suspended===!0?`License suspended, please contact your Sales Representative to restore service`:e.content?.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g,``)||``,e.sender!=null)switch(!0){case e.sender.title===`Unknown author`:e.sender.title=``,e.sender.name=``;break;case e.sender.title===e.sender.name:e.sender.name=``;break;case e.channel===`tw`:e.sender.name=`@${e.sender.name}`}else e.sender={title:``,name:``,id:``,avatar:``,bio:``,location:``,following:0,verified:0,listed:0,followers:0,favourites:0,messages:0,influence:0};let t=typeof e.link==`string`?e.link.trim():``;if(e.sender.title===``&&t!==``)try{e.sender.title=new URL(t).hostname.replace(`www.`,``)}catch{}}),t}function xe(e,t,n,r){e.stopPropagation(),t.showModal({showComponent:`card-modal`,props:{data:n,options:r}})}function Se(e){let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}var Ce=class e{static EPOCH=Date.UTC(1970,0,1).valueOf();static SHARD_ID=1;static SEQUENCE=1;static generate({timestamp:t=Date.now(),shard_id:n=e.SHARD_ID}={}){t=t instanceof Date?t.valueOf():new Date(t).valueOf();let r=BigInt(t)-BigInt(e.EPOCH)<<BigInt(22);return r|=BigInt(n%1024)<<BigInt(12),r|=BigInt(e.SEQUENCE++%4096),r.toString()}static parse(t){let n=e.binary(t);return{timestamp:e.extractBits(t,1,41),shard_id:e.extractBits(t,42,10),sequence:e.extractBits(t,52),binary:n}}static isValid(t){if(!/^[\d]{19}$/.test(t))return!1;try{return e.parse(t),!0}catch{return!1}}static extractBits(t,n,r){return parseInt(r?e.binary(t).substring(n,n+r):e.binary(t).substring(n),2)}static binary(e){let t=BigInt(e).toString(2);return t.length<64?`0000000000000000000000000000000000000000000000000000000000000000`.substring(0,64-t.length)+t:t}};function we(){let e=``;for(let t=0;t<7;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return e}var Te=n=>{switch(n?.type){case e.MESSAGES:return t.MESSAGES;case e.SERIES:return t.SERIES;case e.CLOUD:return t.CLOUD;default:return t.NO_UPDATES}},Ee=(e=6)=>Math.random().toString(36).substring(2,e+2),De=(e,t=[])=>!t.find(function(t){return t===e}),$=(e,t=[])=>{let n=0,r=``;for(;r==``&&n<100;)r=Ee(e),De(r,t)||(r=``,n++);return r},Oe=e=>{switch(!0){case e<0:return`text-down text-xs`;case e>0:return`text-up text-xs`;default:return`text-white text-xs`}},ke=(e,t,n)=>Promise.race([e,Ae(t,n)]),Ae=(e,t)=>new Promise((n,r)=>setTimeout(()=>t===void 0?n(`ok`):r(t),e));function je(e){let t=`${e.type}.${e.topics}`;return e.order&&(t+=`.${e.order}`),e.period&&(t+=`.${e.period}`),t}function Me(e){if(e.widget===void 0){let t=e.topics?.split(`-`);t&&t.length>1?(e.dashboard=t?t[0]:``,e.widget=t?t[1]:``):(e.widget=e.topics,e.dashboard=e.slide)}return e}function Ne(e,t){let n,i,a,o,s;switch(e.moderation){case r.BEFORE:n=new Date,i=e.beforeTime?.split(`:`),a=Number.parseInt(i?i[0]:`00`),o=Number.parseInt(i?i[1]:`00`),s=Number.parseInt(i?i[2]:`00`),t.before=n.setHours(a,o,s,0)/1e3,t.period||=n.getDay()===1?72:24;break;case r.DELAYED:e.delay&&e.delay>0&&(t.delay=`${e.delay}`);break;case r.APPROVED:t.approved=`1`;break;default:e.period!==0&&(t.period=e.period)}return t}var Pe=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({}),Fe=function(e){return e.MultiPolygon=`MultiPolygon`,e.Polygon=`Polygon`,e}({});export{e as API,t as CSS,n as EVENTS,Pe as GeoType,q as HTMLParser,I as HTMLtoDOM,F as HTMLtoXML,r as MODERATION,ne as RGBAchangeA,i as STORAGE,Fe as ShapeType,Ce as Snowflake,oe as abbr,a as anonymize,o as attachedMedia,s as attrs,u as awaitElement,d as brandLogo,p as camelCase,l as camelCasedProps,m as camelToHyphen,f as camelize,h as capitalizeFirstLetter,g as clearContents,E as cloudToGraph,re as debounce,b as deepMerge,ye as dir,S as escape,c as filterAttributes,w as flatten,C as formatContent,D as getGuid,je as getKey,he as getParameterByName,ge as getQueryParam,ie as hasHWA,P as hashSum,X as html2json,ae as intToString,se as isEmpty,Z as json2html,ce as log,le as logging,pe as maxifyCss,de as maxifyHtml,fe as minifyCss,ue as minifyHtml,Ne as moderation,me as numberFormatter,_ as randomColor,te as randomRGB,ee as randomRGBA,v as randomRGBAfull,_e as randomValue,ve as rtl,be as sanitize,T as seriesToGraph,xe as showModal,Se as shuffleMessages,y as stall,we as stringGen,Te as typeCss,$ as uniq,x as unique,Oe as upDownColor,Me as widgetParams,ke as wrapPromise};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-utils",
3
3
  "type": "module",
4
- "version": "1.14.3",
4
+ "version": "1.14.4",
5
5
  "packageManager": "pnpm@11.5.2",
6
6
  "private": false,
7
7
  "repository": {