@solomei-ai/intent 1.1.2 → 1.2.0
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.
- package/README.md +50 -0
- package/dist/esm/index.js +1 -1
- package/dist/intent.umd.min.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
## Intent integration
|
|
2
|
+
|
|
3
|
+
Add the **Intent** tracker to collect consented client context and send events to Callimacus. Use the npm package in modern apps (React/Vite/Next).
|
|
4
|
+
|
|
5
|
+
### Usage
|
|
6
|
+
```ts
|
|
7
|
+
// app entry
|
|
8
|
+
import {initIntent} from '@solomei-ai/thamyr-core';
|
|
9
|
+
|
|
10
|
+
initIntent({
|
|
11
|
+
baseUrl: 'https://intent.callimacus.ai', // default if omitted
|
|
12
|
+
clientId: 'cal-...', // your Callimacus Client ID
|
|
13
|
+
consent: true, // can be set to true later
|
|
14
|
+
geo: true, // can be set to true later
|
|
15
|
+
});
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Managing consent & geolocation flags
|
|
20
|
+
You can pass flags to `initIntent` or toggle them at runtime with setFlag:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {setFlag} from '@solomei-ai/thamyr-core';
|
|
24
|
+
|
|
25
|
+
// Grant or revoke consent
|
|
26
|
+
setFlag('intent:consent', true); // granted
|
|
27
|
+
setFlag('intent:consent', false); // disabled
|
|
28
|
+
|
|
29
|
+
// Enable or disable device geolocation capture
|
|
30
|
+
setFlag('intent:geo', true); // enabled
|
|
31
|
+
setFlag('intent:geo', false); // 'disabled
|
|
32
|
+
```
|
|
33
|
+
- When consent is granted, the tracker maintains a first-party cookie `intent_sid`.
|
|
34
|
+
- If consent is revoked, the tracker clears `intent_sid` and stops sending events.
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### Using `intent_sid`
|
|
38
|
+
|
|
39
|
+
Use these utilities to read or manage the session cookie from your app:
|
|
40
|
+
```ts
|
|
41
|
+
import {
|
|
42
|
+
getIntentSessionId,
|
|
43
|
+
clearIntentSessionId,
|
|
44
|
+
ensureIntentSessionId,
|
|
45
|
+
} from '@solomei-ai/thamyr-core';
|
|
46
|
+
|
|
47
|
+
const sid = getIntentSessionId(); // string | undefined, can be sent to backend
|
|
48
|
+
clearIntentSessionId(); // deletes cookie
|
|
49
|
+
ensureIntentSessionId(); // creates cookie if missing
|
|
50
|
+
```
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © 2025 Solomei AI SRL. Proprietary and confidential.
|
|
3
3
|
*/
|
|
4
|
-
import t from"html2canvas-pro";function e(){const t=[" (UTC","upright","height","6ndIMvO","timeZone","innerWidth","maxTouchPoints","enabled","random","267260uhLDcc","Battery: ","padStart","level","requestStart","SW-controlled","getEntriesByType"," | ","colorDepth","380tCYZPL","44168135vfFLJE","PWA: ","availWidth","cookieEnabled","version","includes","addEventListener","Local time: ","Tilt: ",", orientation ","/speedtest.bin","map","21BwmCiV","Screen: ",", display-mode standalone: ","fetch","onLine","mobile","reclined","width","downlink","charging","availHeight"," Mbps","DateTimeFormat","round","deviceorientation","not charging","2068678LruPtM","isSecureContext"," ms","hardwareConcurrency","TTFB ~","isArray","Referrer: ","read"," (mobile)","coarse","177102qfFnty","join","12kLiVGD","1283395VtJYZG","; DNT: ","yes","Online: ","toFixed","connection","cors","2571256UimnmN","push","9IuoEVu","Pointer/Touch: ","no-store","type","616498rRkFqS","x (avail ","rtt","number","flat","n/a","platform","referrer"," (active test)","Device geolocation: enabled","Device geolocation: disabled","slice","orientation","devicePixelRatio","language","abort","CPU: ","saveData","innerHeight","Network: ","Viewport: ","CookiesEnabled: ","getBattery","languages","function","signal","byteLength","resolvedOptions","Timezone: ","body","toString","cb=","navigation","now","responseStart","intent:geo","effectiveType","entryType","removeEventListener","abs","no SW","Platform: ","all","isFinite","(pointer: fine)","Language: ","beta","max","gamma","User agent: ","find","doNotTrack"," cores","length","userAgent"];return(e=function(){return t})()}function n(t,o){const a=e();return(n=function(t,e){return a[t-=280]})(t,o)}async function o(){const t=n,e=[];if(function(t){const e=n;return e(324)in t&&void 0!==t[e(324)]}(navigator)){const n=navigator[t(324)];n?.[t(368)]&&e[t(327)](n.effectiveType),typeof n?.[t(298)]===t(335)&&e[t(327)](n[t(298)]+t(301)),typeof n?.rtt===t(335)&&e[t(327)](n[t(334)]+t(308)),n?.saveData&&e[t(327)](t(349))}const o=await async function(t,e=3e3,o=8,a=150){const i=n;if(!(i(293)in window)||!("ReadableStream"in window))return;const r=performance[i(365)]();let c,s=0;await Promise[i(374)](Array.from({length:o},async()=>{const n=i;for(;performance[n(365)]()-r<e+a;){const o=new AbortController,i=(t[n(283)]("?")?"&":"?")+n(363)+Math[n(395)]().toString(36)[n(343)](2);try{const d=await fetch(t+i,{cache:n(330),signal:o[n(357)],mode:n(325)}),u=d[n(361)]?.getReader();if(!u)break;for(;;){const t=performance[n(365)]();if(t-r>=e+a){o[n(347)]();break}const{done:i,value:d}=await u[n(313)]();if(i)break;c??=t,t-(c??t)>=a&&(s+=d[n(358)])}}catch{}}}));const d=(c??r)+a,u=Math[i(379)](1,performance[i(365)]()-d),l=8*s/(u/1e3)/1e6;return Number[i(375)](l)&&l>0?l:void 0}(t(288),3e3,8,150),a=performance[t(402)](t(364))[t(382)](e=>e[t(369)]===t(364));let i;if(a){const e=Math.max(0,a[t(366)]-a[t(400)]);i=t(310)+Math[t(303)](e)+" ms"}const r=[];if(typeof o===t(335)&&r[t(327)]("~"+o[t(323)](1)+t(301)),i&&r.push(i),e.length&&r[t(327)]("hint: "+e[t(317)](", ")),r[t(385)])return t(351)+r[t(317)](", ")+t(340)}async function a(t=400){const e=n;if("DeviceOrientationEvent"in window&&window[e(307)])return new Promise(o=>{const a=e;let i=!1;const r=t=>{const e=n,a=typeof t[e(378)]===e(335)?t.beta:void 0,c=typeof t[e(380)]===e(335)?t[e(380)]:void 0;if(void 0===a||void 0===c)return;if(i)return;i=!0,window[e(370)](e(304),r);const s=function(t,e){const o=n,a=Math[o(371)](t),i=Math[o(371)](e);return o(a<15&&i<15?336:a>=60?388:296)}(a,c);o(e(286)+s+" (β "+Math[e(303)](a)+"°, γ "+Math.round(c)+"°)")};window.setTimeout(()=>{i||(i=!0,window[n(370)]("deviceorientation",r),o(void 0))},t),window[a(284)](a(304),r,{passive:!0})})}async function i(){const t=n;if(function(t){const e=n;return e(354)in t&&typeof t.getBattery===e(356)}(navigator))try{const e=await navigator.getBattery(),n=Math.round(100*e[t(399)]),o=[(Number[t(375)](n)?n:0)+"%",e.charging?t(299):t(305)];return t(397)+o[t(317)](", ")}catch{return}}async function r(){const t=n,e=(new(Intl[t(302)]))[t(359)]()[t(391)],r=function(t){const e=n,o=t<=0?"+":"-",a=Math.abs(t);return""+o+String(Math.floor(a/60))[e(398)](2,"0")+":"+String(a%60)[e(398)](2,"0")}((new Date).getTimezoneOffset()),c=[];c[t(327)](t(377)+navigator[t(346)]),navigator[t(355)]?.[t(385)]&&c[t(327)]("Languages: "+navigator[t(355)][t(317)](", ")),c[t(327)](t(381)+navigator[t(386)]);const s=function(){const t=n;if(!("userAgentData"in(e=navigator))||void 0===e.userAgentData)return;var e;const o=navigator.userAgentData,a=Array[t(311)](o.brands)?o.brands[t(289)](e=>e.brand+" "+e[t(282)])[t(317)](", "):void 0,i=o[t(338)]?""+o[t(338)]+(o[t(295)]?t(314):""):void 0;return[a&&"UA brands: "+a,i&&t(373)+i].filter(Boolean)[t(317)](t(403))||void 0}();s&&c[t(327)](s),c[t(327)](t(360)+e+t(387)+r+")"),c[t(327)](t(285)+(new Date)[t(362)]());const d=window[t(345)]||1;c[t(327)](t(291)+screen[t(297)]+"x"+screen[t(389)]+" @"+d+t(333)+screen[t(280)]+"x"+screen[t(300)]+", "+screen[t(404)]+"-bit)");const u=screen[t(344)]&&t(331)in screen.orientation?screen[t(344)][t(331)]:void 0;c[t(327)](t(352)+window[t(392)]+"x"+window[t(350)]+(u?t(287)+u:"")),c[t(327)](t(348)+navigator[t(309)]+t(384));const l=await o();l&&c[t(327)](l),c[t(327)](function(){const t=n,e="function"==typeof matchMedia&&matchMedia("(pointer: coarse)").matches,o=typeof matchMedia===t(356)&&matchMedia(t(376)).matches,a=e?t(315):o?"fine":"unknown",i=typeof navigator[t(393)]===t(335)?navigator.maxTouchPoints:0;return t(329)+a+", maxTouchPoints "+i}());const f=await i();f&&c[t(327)](f),c.push(t(353)+(navigator[t(281)]?"yes":"no")+t(320)+(navigator[t(383)]??t(337))),c[t(327)](t(322)+(navigator[t(294)]?t(321):"no")),document[t(339)]&&c[t(327)](t(312)+document.referrer),c[t(327)](function(){const t=n,e="function"==typeof matchMedia&&matchMedia("(display-mode: standalone)").matches,o=Boolean(navigator.serviceWorker?.controller);return t(407)+t(o?401:372)+t(292)+(e?"yes":"no")}());const m=await a();m&&c[t(327)](m);const p="undefined"!=typeof localStorage&&localStorage.getItem(t(367))===t(394);return c.push(t(p?341:342)),c[t(317)](t(403))}!function(){const t=n,o=e();for(;;)try{if(596229===-parseInt(t(332))/1+-parseInt(t(306))/2+-parseInt(t(328))/3*(-parseInt(t(396))/4)+parseInt(t(319))/5*(-parseInt(t(390))/6)+-parseInt(t(290))/7*(parseInt(t(326))/8)+parseInt(t(316))/9*(-parseInt(t(405))/10)+-parseInt(t(406))/11*(-parseInt(t(318))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}();const c=D;!function(){const t=D,e=J();for(;;)try{if(574984===-parseInt(t(597))/1+parseInt(t(379))/2+parseInt(t(476))/3*(-parseInt(t(477))/4)+-parseInt(t(504))/5*(parseInt(t(592))/6)+-parseInt(t(569))/7*(parseInt(t(554))/8)+parseInt(t(414))/9*(-parseInt(t(493))/10)+parseInt(t(465))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let s,d="",u=0;const l=c(590),f="intent:geo";let m=!1,p=!1,h=!1,g=!1,w=!1,y=!1;const v="intent:data-client-id",b=c(467),M=c(481),x=c(567),I=c(530),S=[c(551),c(468),"a",c(584),c(491),c(423),c(381),c(440)][c(507)](","),E=c(432),L=c(595),T=new Set([c(392),c(492),c(596),"family-name",c(572),c(582),c(508),c(397),c(388),c(407),c(539),c(593),c(395),"address-line3","address-level1",c(442),c(416),c(501),"country","country-name",c(560),"cc-name",c(565),c(603),c(497),c(385),c(478),"cc-exp-month","cc-exp-year","cc-csc","cc-type",c(443),c(568),c(391),c(463),c(556),"webauthn"]);function k(t){return"<"+A(t)+">"}function A(t){const e=c,n=(t[e(461)]?.(L)??"")[e(382)]();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t[e(417)]||"")[e(486)]()[e(382)]().split(/\s+/).filter(Boolean):[];return t instanceof HTMLInputElement&&t[e(424)]===e(383)?"Password":o[e(604)](t=>t[e(419)](e(387)))?e(405):o.some(t=>[e(392),e(492),e(547),e(596),e(545),"cc-given-name",e(497)][e(601)](t))?e(587):o[e(601)](e(508))?e(535):o[e(601)]("tel")?e(577):o.some(t=>t[e(419)]("bday"))?e(585):o[e(601)](e(556))?"Sex":o.some(t=>[e(539),e(593),e(395),e(513),"address-level1","address-level2","address-level3",e(501),e(560),e(380),e(502)][e(601)](t))?e(579):o[e(601)](e(388))||o[e(601)](e(407))?"Organization":t[e(461)]?.(E)?.[e(486)]()===e(558)?e(511):e(437)}function D(t,e){const n=J();return(D=function(t,e){return n[t-=377]})(t,e)}function N(t){const e=c;return t[e(516)](e(413))||t[e(461)](E)?.toLowerCase()===e(489)}function H(t){const e=c,n=t[e(461)](E);return""===n||n?.[e(486)]()===e(558)}function C(t){const e=c;if(t instanceof HTMLInputElement){if(t[e(424)]===e(383))return!0;if(t[e(424)]===e(390))return!1;const n=t[e(461)](e(588));if(n&&n[e(486)]()===e(428))return!1;if((t.autocomplete||"")[e(486)]()[e(382)]()[e(594)](/\s+/)[e(439)](Boolean).some(t=>T[e(519)](t)))return!0}if(t instanceof HTMLTextAreaElement){if((t[e(417)]||"")[e(486)]()[e(382)]()[e(594)](/\s+/)[e(439)](Boolean)[e(604)](t=>T.has(t)))return!0}return!1}function P(t){return!!H(t)||!!C(t)}function U(){const t=c,e=[],n=t=>{const e=D,n=t[e(602)]();if(n[e(482)]<=0||n.height<=0)return;const o=Math[e(420)](0,n[e(455)]),a=Math.max(0,n[e(521)]),i=Math[e(420)](0,Math[e(451)](n.right,window[e(453)])-o),r=Math[e(420)](0,Math.min(n[e(561)],window[e(523)])-a);return i<=0||r<=0?void 0:{x:o,y:a,w:i,h:r}};document.querySelectorAll("["+E+t(479)+E+t(474))[t(528)](o=>{const a=t,i=n(o);if(!i)return;const r=A(o)||a(511);e[a(536)]({...i,label:r})});return document.querySelectorAll("input, textarea")[t(528)](o=>{const a=t;if(!H(i=o)&&!C(i))return;var i;if(N(o))return;const r=n(o);if(!r)return;const c=A(o);e[a(536)]({...r,label:c})}),e}const R=()=>localStorage[c(562)](l)===c(436);function B(t){const e=c,n=encodeURIComponent(t)+"=",o=document.cookie[e(594)]("; ");for(const t of o)if(t.startsWith(n))return decodeURIComponent(t[e(450)](n[e(566)]))}function F(t,e){const n=c,o=localStorage[n(562)](I),a=null==o?void 0:Number(o),i=Number[n(546)](e)?Number(e):"number"==typeof a&&Number[n(546)](a)?a:86400,r="https:"===window[n(549)][n(418)],s=["intent_sid="+encodeURIComponent(t),n(447)+i,n(581),n(532)];r&&s[n(536)](n(540)),document.cookie=s.join("; ")}function O(){const t=c,e=window.location[t(418)]===t(518);document.cookie=t(500)+(e?t(435):"")}function W(){const t=c,e=B(t(425));if(!R())return e&&O(),void(d="");if(e)return void(d=e);const n="undefined"!=typeof crypto&&"function"==typeof crypto[t(411)]?crypto[t(411)]():Date[t(488)]()+"-"+Math[t(462)]();d=n,F(d)}function j(){return W(),R()&&Boolean(d)&&(()=>{const t=c,e=localStorage[t(562)](v);return"string"==typeof e&&e[t(382)]()[t(566)]>0})()}function q(){return!j()||h}function J(){const t=["granted","Sensitive","screenshot","filter","[onclick]","height","address-level2","bday","cloneNode","geoEnabled","removeEventListener","Max-Age=","/events","page-focus","slice","min","bbox","innerWidth","message","left","pixel body fallback failed","drawImage","no-store","speed","focus","getAttribute","random","bday-year","pageview","23584440Wqdlpr","POST","intent:data-ip","a[href]","<no visible label>","altitudeAccuracy","fillStyle","key","globalAlpha",'=""]',"middle","6EasXQs","1854992XxKtzW","cc-exp",'="mask"], [',"click","intent:data-base-url","width","capturePhase","body","context","toLowerCase","fillRect","now","ignore","setTimeout",'input[type="button"]',"given-name","10mqeQEK","isSecureContext","host","outerHTML","cc-family-name","floor","getContext","intent_sid=; Max-Age=0; Path=/; SameSite=Lax","address-level4","country-name","FileReader error","5ILbULx","toDataURL","x-sl-access-token","join","email","deviceGeoSent","stringify","Redacted","localhost","address-line3","omit","application/json","hasAttribute","hostname","https:","has","aria-label","top","passive","innerHeight","intent","string","timestamp","accuracy","forEach","altitude","intent:data-sid-max-age","hasFocus","SameSite=Lax","storage","#9ca3af","Email","push","toISOString","textAlign","street-address","Secure","getCurrentPosition","value","pointerdown","#e5e7eb","cc-name","isFinite","family-name","scrollY","location","target","button","fillText","PERMISSION_DENIED","5816NDaubz","/p.gif","sex","scroll","mask","disabled","postal-code","bottom","getItem","closest","latitude","cc-given-name","length","https://intent.callimacus.ai","bday-day","665lLJfAo","keydown","TEXTAREA","nickname","attributes","title","props","from","Phone","error","Address","heading","Path=/","username","#374151",'input[type="submit"]',"Birthday","code","Name","role","tagName","intent:consent","center","1068906OcWVje","address-line1","split","data-intent-redact-label","additional-name","579724kQLeXk","visibilitychange","textBaseline","geolocation","includes","getBoundingClientRect","cc-additional-name","some","result","strokeRect","addEventListener","1533692NXHeac","country",'[role="link"]',"trim","password","UNKNOWN","cc-number","label","cc-","organization","clearTimeout","search","bday-month","name","scrollX","function","address-line2","onerror","tel","longitude","setAttribute","input-submit","onload","load","query","Enter","Credit card","readAsDataURL","organization-title","image/jpeg","round","blur","randomUUID","visibilityState","data-html2canvas-ignore","5233194AxsGRq","number","address-level3","autocomplete","protocol","startsWith","max","INPUT","createElement",'[role="button"]',"type","intent_sid","hidden","permissions","searchbox","Unexpected FileReader result type","device","font","data-intent-redact","page-blur","px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif","; Secure"];return(J=function(){return t})()}async function z(e){const n=c,o=function(t){const e=c,n=t[e(444)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array[e(576)](t.attributes).forEach(({name:t,value:e})=>{n.setAttribute(t,e)}),n[e(542)]=P(t)?k(t):t.value,t[e(559)]&&n.setAttribute(e(559),""),n[e(496)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array[e(576)](t[e(573)]).forEach(({name:t,value:o})=>{n[e(399)](t,o)}),n[e(542)]=P(t)?k(t):t.value,t[e(559)]&&n[e(399)](e(559),""),n[e(496)]):t[e(496)]}(e),a=e.getBoundingClientRect(),i={useCORS:!0,...{x:window[n(393)],y:window[n(548)],width:window[n(453)],height:window.innerHeight,scale:1},ignoreElements:t=>t instanceof Element&&N(t)},r=await t(document.body,i),s=r.width,d=r[n(441)],u=Math[n(420)](s,d),l=.8*Math.max(window[n(453)],window.innerHeight),f=Math.min(1,l/u),m=12/(a[n(441)]||1),p=Math.min(1,Math[n(420)](f,m)),h=Math[n(409)](s*p),g=Math[n(409)](d*p),w=document[n(422)]("canvas");w[n(482)]=h,w[n(441)]=g;const y=w[n(499)]("2d");y[n(457)](r,0,0,s,d,0,0,h,g);const v=U();if(v[n(566)]){y.save(),y[n(473)]=1;for(const t of v){const e=Math[n(409)](t.x*p),o=Math.round(t.y*p),a=Math[n(409)](t.w*p),i=Math[n(409)](t.h*p);y[n(471)]=n(544),y[n(487)](e,o,a,i),y.strokeStyle=n(534),y.lineWidth=Math[n(420)](1,Math[n(498)](.02*Math.min(a,i))),y[n(377)](e,o,a,i);const r=Math[n(420)](10,Math.min(22,Math[n(498)](.35*i)));y[n(431)]=r+n(434),y.fillStyle=n(583),y[n(538)]=n(591),y[n(599)]=n(475);const c="<"+(t[n(386)]?.trim()[n(566)]?t[n(386)]:n(437))+">";y[n(552)](c,e+a/2,o+i/2,a-6)}y.restore()}const b=w[n(505)](n(408),.8);return{html:o,bbox:{x:a.x,y:a.y,w:a.width,h:a.height},img:b}}function Q(){const t=c,e=localStorage[t(562)](v),n={"Content-Type":t(515)};return e&&(n[t(506)]=e),d&&(n["x-intent-sid"]=d),n}async function X(t,e){const n=c,o=(localStorage[n(562)](M)??x)+n(448),a=JSON.stringify(t);try{if((await fetch(o,{method:n(466),headers:Q(),body:a,keepalive:e,credentials:n(514)})).ok)return}catch{}try{await async function(t,e=!1){const n=c,o=(localStorage.getItem(M)??x)+n(555);if(!(await fetch(o,{method:n(466),headers:Q(),body:JSON[n(510)](t),keepalive:e,credentials:"omit",cache:n(458)})).ok)throw new Error(n(456))}(t,e)}catch{}}async function G(t,e,n,o){const a=c;if(!j())return;const i={...e,localTime:(new Date)[a(537)]()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(i.value=P(n)?k(n):n[a(542)]);let r="",s={x:0,y:0,w:0,h:0},d="";const l=!(t===a(557)||t===a(433)||t===a(449)),f=Date[a(488)](),m=f-u>=5e3;let p=o;const h=t===a(480)||t===a(400)||t===a(464);l&&!p&&(h||m)&&(p=await z(n),u=f),p&&(r=p.html,s=p[a(452)],d=p.img);const g={ts:Date[a(488)](),event:t,props:i,html:t===a(433)||t===a(449)?"":r,bbox:s,img:d},w=document[a(412)]===a(426)||"page-blur"===t;await X(g,w)}function V(){return"enabled"===localStorage[c(562)](f)}async function Y(t={}){const e=c;if(!j())return;const n=typeof t.lat===e(415)&&"number"==typeof t.lon;if(n&&p)return;if(!n&&m)return;const o=localStorage[e(562)](b),a={context:await r()};o&&(a.ip=o);for(const[e,n]of Object.entries(t))a[e]=n;await G(e(485),a,document[e(484)],{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?p=!0:m=!0}async function _(){const t=c,e={canSend:j(),geoEnabled:V(),deviceGeoSent:p};if(!e.canSend||!e[t(445)]||e[t(509)])return;const n={secure:window[t(494)],proto:location[t(418)],host:location[t(517)]};if(n.secure||(t(495),t(512)),!("geolocation"in navigator))return;if(w)return;w=!0,h=!0;const o={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date.now();try{await(navigator[t(427)]?.[t(403)]({name:t(600)}))}catch(t){}await new Promise(e=>{const n=t;let a=!1;const i=async(t,n,o)=>{const i=D;a||(a=!0,Date[i(488)](),Number[i(546)](t)&&Number[i(546)](n)&&await Y({lat:t,lon:n,source:i(430)}),w=!1,h=!1,y=!0,e())};navigator[n(600)][n(541)](t=>{const e=D,n=t.coords;i(n[e(564)],n[e(398)],(n[e(527)],typeof n[e(529)]===e(415)&&n.altitude,"number"==typeof n[e(470)]&&n[e(470)],typeof n[e(580)]===e(415)&&n[e(580)],typeof n[e(459)]===e(415)&&n[e(459)],t[e(526)],document[e(412)],document.hasFocus()))},t=>{const e=D,n=t?.[e(586)];1===n?e(553):2===n||(3===n||e(384)),t?.[e(454)],document[e(531)](),window[e(494)],location[e(418)],location[e(517)],i(void 0,void 0)},o)})}function K(){const t=c;if(g||!V()||p)return;g=!0;const e=()=>{const t=D;window[t(446)](t(543),e,!0),window[t(446)](t(570),e,!0),_()};window[t(378)](t(543),e,!0),window.addEventListener(t(570),e,!0)}W(),window[c(378)](c(402),()=>{const t=c;j()&&(Y(),(window.isSecureContext||"localhost"===location.hostname)&&(V()&&K(),window.addEventListener(t(460),()=>{!p&&V()&&!w&&y&&_()}),document.addEventListener(t(598),()=>{!document[t(426)]&&!p&&V()&&!w&&y&&_()})))}),window[c(378)](c(533),t=>{const e=c;t.key===l&&(function(){const t=c;return localStorage[t(562)](l)===t(436)}()?(m=!1,Y(),V()&&K()):(m=!1,p=!1)),t[e(472)]===f&&(V()?K():p=!1)}),window[c(378)](c(402),()=>{const t=c;j()&&G(t(464),{url:window[t(549)].href,title:document[t(574)],ref:document.referrer},document.body)}),addEventListener(c(543),function(t,e){let n=0;return(...o)=>{const a=Date[D(488)]();a-n>=e&&(n=a,t(...o))}}(t=>{const e=c;if(q())return;const n=t.target instanceof Element?t[e(550)].closest(S):null;n instanceof HTMLElement&&(s=z(n))},50),{capture:!0,passive:!0}),addEventListener(c(480),async t=>{const e=c;if(q())return;const n=t[e(550)]instanceof Element?t.target[e(563)](S):null;if(!(n instanceof HTMLElement))return;const o=function(t){const e=c;return t[e(461)](e(520))??t[e(574)]??t.textContent?.trim()??e(469)}(n),a=s?await s:void 0;s=void 0,await G(e(480),{tag:n.tagName,label:o},n,a)},!0),addEventListener("keydown",t=>{const e=c;if(!q()&&t[e(472)]===e(404)){const n=t[e(550)];if(n instanceof HTMLElement&&(n[e(589)]===e(421)||n[e(589)]===e(571))){const t=n instanceof HTMLInputElement?n.name:void 0,o=n.id||void 0;G(e(400),{tag:n.tagName,name:t??o},n)}}},{capture:!0});let Z=!document[c(426)]&&document[c(531)](),$=document[c(531)]();const tt=()=>{const t=c;if(q())return;const e=!document[t(426)]&&document[t(531)]();e&&($=!0),$||e?e!==Z&&(Z=e,G(t(e?449:433),{},document.body)):Z=e};function et(){const t=["data-ip","354681ypQmjG","2rUFaHI","27129384khQHld","function","getAttribute","https://intent.callimacus.ai","7303338BKxLMi","setItem","now","consent","number","currentScript","sidMaxAgeSeconds","intent:data-ip","granted","random","intent_sid","1497910oCoknt","2194448gBikjY","intent:data-client-id","disabled","28BJJQQp","clientId","undefined","668369ioflbh","baseUrl","6762204WgFPIJ","intent:consent","intent:data-base-url","intent:data-sid-max-age","randomUUID","geo"];return(et=function(){return t})()}function nt(t,e){const n=at;try{if(void 0===e)return;localStorage.setItem(t,e?t===n(135)?n(122):"enabled":n(128))}catch{}}function ot(t={}){const e=at;if(localStorage[e(115)](e(127),t[e(130)]??""),localStorage[e(115)](e(121),t.ip??""),localStorage[e(115)](e(136),t[e(133)]??e(113)),typeof t[e(120)]===e(118)&&localStorage[e(115)]("intent:data-sid-max-age",String(t.sidMaxAgeSeconds)),nt(e(135),t.consent),nt("intent:geo",t[e(139)]),t[e(117)]){if(!B(e(124))){F(typeof crypto!==e(131)&&typeof crypto.randomUUID===e(144)?crypto[e(138)]():Date[e(116)]()+"-"+Math[e(123)](),t[e(120)])}}}function at(t,e){const n=et();return(at=function(t,e){return n[t-=112]})(t,e)}function it(){return B(at(124))}function rt(){W()}function ct(){O()}function st(t){const e=at;Number.isFinite(t)&&localStorage.setItem(e(137),String(t));const n=B(e(124));n&&F(n,t)}[c(460),c(410)].forEach(t=>{window[c(378)](t,tt)}),document[c(378)]("visibilitychange",tt),window[c(378)](c(557),function(t,e){let n;return(...o)=>{const a=D;void 0!==n&&window[a(389)](n),n=window[a(490)](()=>{n=void 0,t(...o)},e)}}(()=>{const t=c;q()||G(t(557),{scrollX:window[t(393)],scrollY:window[t(548)]},document[t(484)])},250),{passive:!0}),window[c(524)]??={send(t,e){j()&&G(t,e,document.body)},define(t,e){const n=c,{type:o}=e,{selector:a}=e,i=e[n(522)]??!0,r=Boolean(e[n(483)]),s=e[n(575)];addEventListener(o,async o=>{const i=n;if(q())return;let r=document[i(484)];if(typeof a===i(525)&&a[i(566)]){const t=o.target instanceof Element?o[i(550)][i(563)](a):void 0;t instanceof HTMLElement&&(r=t)}const c=typeof s===i(394)?s(o,r):s??{};let d;e[i(438)]&&(d=await z(r),u=Date[i(488)]()),await G(t,c,r,d)},{capture:r,passive:i})}},function(){const t=at,e=et();for(;;)try{if(626674===-parseInt(t(132))/1*(-parseInt(t(142))/2)+-parseInt(t(141))/3*(-parseInt(t(129))/4)+-parseInt(t(125))/5+parseInt(t(134))/6+parseInt(t(114))/7+parseInt(t(126))/8+-parseInt(t(143))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),function(){const t=at;try{const e=document[t(119)];if(!e)return;const n=e[t(112)]("data-customer-id")||void 0,o=e[t(112)](t(140))||void 0;(n||o)&&ot({clientId:n,ip:o})}catch{}}();export{ct as clearIntentSessionId,rt as ensureIntentSessionId,it as getIntentSessionId,ot as initIntent,nt as setFlag,st as setIntentSessionMaxAge};
|
|
4
|
+
import t from"html2canvas-pro";async function e(){const t=n,e=[];if(function(t){const e=n;return"connection"in t&&typeof t.connection!==e(537)}(navigator)){const n=navigator[t(499)];n?.effectiveType&&e[t(572)](n.effectiveType),"number"==typeof n?.[t(569)]&&e.push(n[t(569)]+t(463)),"number"==typeof n?.[t(545)]&&e[t(572)](n[t(545)]+" ms"),n?.[t(523)]&&e[t(572)](t(523))}const o=await async function(t,e=3e3,o=8,a=150){const i=n;if(!(i(574)in window)||!(i(513)in window))return;const r=performance[i(530)]();let c,s=0;await Promise[i(482)](Array[i(519)]({length:o},async()=>{const n=i;for(;performance[n(530)]()-r<e+a;){const o=new AbortController,i=(t[n(571)]("?")?"&":"?")+n(491)+Math[n(557)]().toString(36)[n(558)](2);try{const d=await fetch(t+i,{cache:n(554),signal:o.signal,mode:n(474)}),u=d[n(538)]?.getReader();if(!u)break;for(;;){const t=performance[n(530)]();if(t-r>=e+a){o[n(582)]();break}const{done:i,value:d}=await u.read();if(i)break;c??=t,t-(c??t)>=a&&(s+=d.byteLength)}}catch{}}}));const d=(c??r)+a,u=Math.max(1,performance[i(530)]()-d),l=8*s/(u/1e3)/1e6;return Number[i(492)](l)&&l>0?l:void 0}(t(500),3e3,8,150),a=performance[t(556)](t(498)).find(e=>e.entryType===t(498));let i;if(a){const e=Math[t(562)](0,a[t(564)]-a[t(535)]);i=t(503)+Math[t(479)](e)+" ms"}const r=[];if(typeof o===t(486)&&r[t(572)]("~"+o[t(471)](1)+" Mbps"),i&&r.push(i),e[t(524)]&&r[t(572)](t(547)+e.join(", ")),r[t(524)])return t(465)+r[t(485)](", ")+" (active test)"}function n(t,e){const o=r();return(n=function(t,e){return o[t-=458]})(t,e)}function o(){const t=n;if(!function(t){const e=n;return e(551)in t&&typeof t[e(551)]!==e(537)}(navigator))return;const e=navigator[t(551)],o=Array[t(501)](e.brands)?e[t(516)].map(e=>e[t(563)]+" "+e[t(532)])[t(485)](", "):void 0,a=e.platform?e[t(469)]+(e[t(561)]?" (mobile)":""):void 0;return[o&&t(481)+o,a&&t(497)+a].filter(Boolean)[t(485)](t(470))||void 0}async function a(t=400){const e=n;if(e(517)in window&&window[e(559)])return new Promise(o=>{const a=e;let i=!1;const r=t=>{const e=n,a=typeof t.beta===e(486)?t[e(460)]:void 0,c=typeof t[e(472)]===e(486)?t[e(472)]:void 0;if(void 0===a||void 0===c)return;if(i)return;i=!0,window[e(548)](e(549),r);const s=function(t,e){const o=n,a=Math[o(541)](t),i=Math[o(541)](e);return a<15&&i<15?o(567):a>=60?"upright":o(526)}(a,c);o(e(508)+s+e(542)+Math.round(a)+e(566)+Math.round(c)+"°)")};window[a(462)](()=>{const t=a;i||(i=!0,window[t(548)](t(549),r),o(void 0))},t),window[a(534)]("deviceorientation",r,{passive:!0})})}async function i(){const t=n;if(function(t){const e=n;return e(550)in t&&"function"==typeof t[e(550)]}(navigator))try{const e=await navigator[t(550)](),n=Math[t(479)](100*e.level),o=[(Number[t(492)](n)?n:0)+"%",e[t(459)]?t(459):t(520)];return t(490)+o[t(485)](", ")}catch{return}}function r(){const t=["Device geolocation: enabled","rtt","221080recpej","hint: ","removeEventListener","deviceorientation","getBattery","userAgentData","languages","Languages: ","no-store","getItem","getEntriesByType","random","slice","isSecureContext","DateTimeFormat","mobile","max","brand","responseStart","Device geolocation: disabled","°, γ ","flat","14315KuKyAm","downlink","1892149YQaIYM","includes","push","floor","fetch","n/a","referrer","padStart","type","21232849toWFka","serviceWorker","availWidth","abort","innerWidth","charging","beta",", maxTouchPoints ","setTimeout"," Mbps","Local time: ","Network: ","-bit)","enabled"," (UTC","platform"," | ","toFixed","gamma","x (avail ","cors","resolvedOptions","3458024zDwMuQ","207HGCUxU","(display-mode: standalone)","round","(pointer: fine)","UA brands: ","all","6JAAhok","yes","join","number","2zlqKPu","getTimezoneOffset","onLine","Battery: ","cb=","isFinite","Timezone: ","no SW","function","devicePixelRatio","Platform: ","navigation","connection","/speedtest.bin","isArray","controller","TTFB ~","colorDepth","doNotTrack","Online: ","734530lOvLuK","Tilt: ","140ZJXStO","orientation","12ZruAPz","Pointer/Touch: ","ReadableStream","Viewport: ","coarse","brands","DeviceOrientationEvent","language","from","not charging","height","availHeight","saveData","length","(pointer: coarse)","reclined","PWA: "," cores","unknown","now","maxTouchPoints","version","fine","addEventListener","requestStart","CPU: ","undefined","body","matches","cookieEnabled","abs"," (β ","1385481MfpndM"];return(r=function(){return t})()}async function c(){const t=n,r=(new(Intl[t(560)]))[t(475)]().timeZone,c=function(t){const e=n,o=t<=0?"+":"-",a=Math.abs(t);return""+o+String(Math[e(573)](a/60))[e(577)](2,"0")+":"+String(a%60).padStart(2,"0")}((new Date)[t(488)]()),s=[];s.push("Language: "+navigator[t(518)]),navigator[t(552)]?.[t(524)]&&s[t(572)](t(553)+navigator[t(552)][t(485)](", ")),s.push("User agent: "+navigator.userAgent);const d=o();d&&s.push(d),s[t(572)](t(493)+r+t(468)+c+")"),s[t(572)](t(464)+(new Date).toString());const u=window[t(496)]||1;s[t(572)]("Screen: "+screen.width+"x"+screen[t(521)]+" @"+u+t(473)+screen[t(581)]+"x"+screen[t(522)]+", "+screen[t(504)]+t(466));const l=screen[t(510)]&&t(578)in screen.orientation?screen[t(510)].type:void 0;s.push(t(514)+window[t(458)]+"x"+window.innerHeight+(l?", orientation "+l:"")),s[t(572)](t(536)+navigator.hardwareConcurrency+t(528));const f=await e();f&&s[t(572)](f),s.push(function(){const t=n,e=typeof matchMedia===t(495)&&matchMedia(t(525))[t(539)],o=typeof matchMedia===t(495)&&matchMedia(t(480))[t(539)],a=t(e?515:o?533:529),i=typeof navigator[t(531)]===t(486)?navigator.maxTouchPoints:0;return t(512)+a+t(461)+i}());const m=await i();m&&s[t(572)](m),s[t(572)]("CookiesEnabled: "+(navigator[t(540)]?t(484):"no")+"; DNT: "+(navigator[t(505)]??t(575))),s[t(572)](t(506)+(navigator[t(489)]?t(484):"no")),document[t(576)]&&s[t(572)]("Referrer: "+document[t(576)]),s[t(572)](function(){const t=n,e=typeof matchMedia===t(495)&&matchMedia(t(478))[t(539)],o=Boolean(navigator[t(580)]?.[t(502)]);return t(527)+(o?"SW-controlled":t(494))+", display-mode standalone: "+(e?t(484):"no")}());const p=await a();p&&s[t(572)](p);const h=typeof localStorage!==t(537)&&localStorage[t(555)]("intent:geo")===t(467);return s[t(572)](t(h?544:565)),s[t(485)](" | ")}!function(){const t=n,e=r();for(;;)try{if(439621===-parseInt(t(507))/1+-parseInt(t(487))/2*(parseInt(t(543))/3)+parseInt(t(509))/4*(-parseInt(t(568))/5)+-parseInt(t(483))/6*(parseInt(t(570))/7)+-parseInt(t(476))/8+parseInt(t(477))/9*(parseInt(t(546))/10)+parseInt(t(579))/11*(parseInt(t(511))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const s=f;!function(){const t=f,e=Q();for(;;)try{if(384738===-parseInt(t(268))/1+parseInt(t(348))/2+-parseInt(t(208))/3+parseInt(t(287))/4+-parseInt(t(357))/5+parseInt(t(239))/6*(parseInt(t(305))/7)+parseInt(t(219))/8*(parseInt(t(337))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();let d,u="",l=0;function f(t,e){const n=Q();return(f=function(t,e){return n[t-=205]})(t,e)}const m=s(238),p=s(242);let h=!1,g=!1,w=!1,y=!1,v=!1,b=!1;const M=s(387),I=s(396),S=s(313),x=s(250),E=[s(304),"a[href]","a",s(419),'input[type="button"]',s(366),'[role="link"]',s(235)].join(","),T=s(410),L=s(364),A=new Set(["name",s(280),s(276),s(253),"nickname",s(273),s(340),s(391),s(328),s(308),s(282),s(302),s(211),s(412),s(325),s(374),s(244),s(252),s(298),s(375),"postal-code",s(339),"cc-given-name","cc-additional-name",s(207),"cc-number",s(277),s(418),s(221),s(315),s(265),"bday",s(212),s(372),s(335),"sex",s(292)]);function k(t){return"<"+D(t)+">"}function D(t){const e=s,n=(t[e(330)]?.(L)??"").trim();if(n)return n;const o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?(t.autocomplete||"")[e(358)]().trim()[e(248)](/\s+/)[e(209)](Boolean):[];return t instanceof HTMLInputElement&&t[e(279)]===e(413)?"Password":o[e(349)](t=>t[e(294)](e(289)))?e(365):o.some(t=>["name",e(280),e(253),e(276),e(339),"cc-given-name",e(207)][e(405)](t))?e(234):o[e(405)](e(340))?e(361):o[e(405)]("tel")?e(341):o[e(349)](t=>t[e(294)](e(420)))?e(342):o.includes(e(321))?"Sex":o[e(349)](t=>[e(282),e(302),e(211),e(412),"address-level1",e(374),"address-level3",e(252),"postal-code","country",e(375)][e(405)](t))?e(307):o[e(405)](e(328))||o[e(405)](e(308))?"Organization":t[e(330)]?.(T)?.[e(358)]()===e(263)?e(296):e(284)}function H(t){const e=s;return t[e(264)]("data-html2canvas-ignore")||t.getAttribute(T)?.[e(358)]()===e(281)}function P(t){const e=s,n=t[e(330)](T);return""===n||"mask"===n?.[e(358)]()}function N(t){const e=s;if(t instanceof HTMLInputElement){if("password"===t[e(279)])return!0;if(t[e(279)]===e(223))return!1;const n=t[e(330)](e(345));if(n&&"searchbox"===n[e(358)]())return!1;if((t.autocomplete||"")[e(358)]()[e(309)]()[e(248)](/\s+/).filter(Boolean)[e(349)](t=>A[e(257)](t)))return!0}if(t instanceof HTMLTextAreaElement){if((t.autocomplete||"")[e(358)]()[e(309)]()[e(248)](/\s+/)[e(209)](Boolean)[e(349)](t=>A.has(t)))return!0}return!1}function U(t){return!!P(t)||!!N(t)}function C(){const t=s,e=[],n=t=>{const e=f,n=t[e(310)]();if(n.width<=0||n[e(270)]<=0)return;const o=Math[e(395)](0,n.left),a=Math[e(395)](0,n.top),i=Math[e(395)](0,Math[e(220)](n[e(237)],window[e(251)])-o),r=Math[e(395)](0,Math[e(220)](n[e(286)],window[e(324)])-a);return i<=0||r<=0?void 0:{x:o,y:a,w:i,h:r}};document[t(312)]("["+T+t(347)+T+t(338))[t(416)](o=>{const a=t,i=n(o);if(!i)return;const r=D(o)||a(296);e.push({...i,label:r})});return document[t(312)](t(218))[t(416)](o=>{const a=t;if(!P(i=o)&&!N(i))return;var i;if(H(o))return;const r=n(o);if(!r)return;const c=D(o);e[a(245)]({...r,label:c})}),e}const O=()=>localStorage[s(409)](m)===s(205);function R(t){const e=s,n=encodeURIComponent(t)+"=",o=document[e(343)].split("; ");for(const t of o)if(t[e(294)](n))return decodeURIComponent(t[e(367)](n[e(320)]))}function B(t,e){const n=s,o=localStorage.getItem(x),a=null==o?void 0:Number(o),i=Number[n(329)](e)?Number(e):typeof a===n(360)&&Number[n(329)](a)?a:86400,r=window[n(303)][n(271)]===n(306),c=[n(243)+encodeURIComponent(t),n(393)+i,n(322),n(246)];r&&c[n(245)]("Secure"),document.cookie=c.join("; ")}function F(){const t=s,e=window[t(303)][t(271)]===t(306);document[t(343)]="intent_sid=; Max-Age=0; Path=/; SameSite=Lax"+(e?t(404):"")}function W(){const t=s,e=R(t(293));if(!O())return e&&F(),void(u="");if(e)return void(u=e);const n="undefined"!=typeof crypto&&typeof crypto[t(262)]===t(326)?crypto[t(262)]():Date[t(388)]()+"-"+Math[t(355)]();u=n,B(u)}function j(){return W(),O()&&Boolean(u)&&(()=>{const t=s,e=localStorage.getItem(M);return typeof e===t(283)&&e[t(309)]()[t(320)]>0})()}function z(){return!j()||w}async function J(e){const n=s,o=function(t){const e=s,n=t[e(332)](!1);return n instanceof HTMLInputElement&&t instanceof HTMLInputElement?(Array[e(272)](t[e(299)])[e(416)](({name:t,value:o})=>{n[e(369)](t,o)}),n[e(386)]=U(t)?k(t):t.value,t.disabled&&n[e(369)](e(267),""),n[e(354)]):n instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement?(Array[e(272)](t[e(299)])[e(416)](({name:t,value:e})=>{n.setAttribute(t,e)}),n[e(386)]=U(t)?k(t):t[e(386)],t[e(267)]&&n[e(369)](e(267),""),n.outerHTML):t[e(354)]}(e),a=e[n(310)](),i={useCORS:!0,...{x:window[n(351)],y:window[n(381)],width:window[n(251)],height:window[n(324)],scale:1},ignoreElements:t=>t instanceof Element&&H(t)},r=await t(document.body,i),c=r[n(213)],d=r.height,u=Math[n(395)](c,d),l=.8*Math[n(395)](window.innerWidth,window.innerHeight),f=Math.min(1,l/u),m=12/(a[n(270)]||1),p=Math[n(220)](1,Math[n(395)](f,m)),h=Math[n(260)](c*p),g=Math[n(260)](d*p),w=document[n(226)]("canvas");w.width=h,w[n(270)]=g;const y=w[n(225)]("2d");y[n(275)](r,0,0,c,d,0,0,h,g);const v=C();if(v.length){y[n(230)](),y[n(231)]=1;for(const t of v){const e=Math[n(260)](t.x*p),o=Math[n(260)](t.y*p),a=Math[n(260)](t.w*p),i=Math[n(260)](t.h*p);y.fillStyle=n(297),y[n(256)](e,o,a,i),y.strokeStyle=n(344),y[n(255)]=Math[n(395)](1,Math[n(295)](.02*Math[n(220)](a,i))),y[n(394)](e,o,a,i);const r=Math[n(395)](10,Math.min(22,Math[n(295)](.35*i)));y[n(373)]=r+n(371),y.fillStyle=n(379),y[n(401)]="center",y.textBaseline=n(300);const c="<"+(t.label?.[n(309)]().length?t.label:n(284))+">";y[n(403)](c,e+a/2,o+i/2,a-6)}y.restore()}const b=w[n(377)](n(353),.8);return{html:o,bbox:{x:a.x,y:a.y,w:a[n(213)],h:a[n(270)]},img:b}}function K(){const t=s,e=localStorage.getItem(M),n={"Content-Type":t(346)};return e&&(n["x-sl-access-token"]=e),u&&(n[t(261)]=u),n}async function Z(t,e){const n=s,o=(localStorage[n(409)](I)??S)+n(400),a=JSON[n(383)](t);try{if((await fetch(o,{method:n(411),headers:K(),body:a,keepalive:e,credentials:n(319)})).ok)return}catch{}try{await async function(t,e=!1){const n=s,o=(localStorage.getItem(I)??S)+"/p.gif";if(!(await fetch(o,{method:n(411),headers:K(),body:JSON[n(383)](t),keepalive:e,credentials:n(319),cache:"no-store"})).ok)throw new Error(n(274))}(t,e)}catch{}}async function q(t,e,n,o){const a=s;if(!j())return;const i={...e,localTime:(new Date).toISOString()};(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(i.value=U(n)?k(n):n[a(386)]);let r="",c={x:0,y:0,w:0,h:0},d="";const u=!(t===a(389)||t===a(241)||t===a(370)),f=Date[a(388)](),m=f-l>=5e3;let p=o;const h=t===a(228)||t===a(417)||t===a(327);u&&!p&&(h||m)&&(p=await J(n),l=f),p&&(r=p.html,c=p[a(254)],d=p[a(222)]);const g={ts:Date[a(388)](),event:t,props:i,html:t===a(241)||t===a(370)?"":r,bbox:c,img:d},w=document.visibilityState===a(301)||t===a(241);await Z(g,w)}function G(){const t=s;return localStorage[t(409)](p)===t(398)}async function _(t={}){const e=s;if(!j())return;const n=typeof t[e(216)]===e(360)&&"number"==typeof t[e(378)];if(n&&g)return;if(!n&&h)return;const o=localStorage[e(409)]("intent:data-ip"),a={context:await c()};o&&(a.ip=o);for(const[n,o]of Object[e(331)](t))a[n]=o;await q("context",a,document[e(217)],{html:"",bbox:{x:0,y:0,w:0,h:0},img:""}),n?g=!0:h=!0}async function X(){const t=s,e={canSend:j(),geoEnabled:G(),deviceGeoSent:g};if(!e.canSend||!e[t(227)]||e[t(376)])return;const n={secure:window[t(384)],proto:location.protocol,host:location[t(224)]};if(n[t(408)]||(t(290),t(316)),!(t(247)in navigator))return;if(v)return;v=!0,w=!0;const o={enableHighAccuracy:!1,maximumAge:3e5,timeout:2e4};Date[t(388)]();try{await(navigator.permissions?.[t(232)]({name:t(247)}))}catch(t){}await new Promise(e=>{const n=t;let a=!1;const i=async(t,n,o)=>{const i=f;a||(a=!0,Date[i(388)](),Number[i(329)](t)&&Number.isFinite(n)&&await _({lat:t,lon:n,source:"device"}),v=!1,w=!1,b=!0,e())};navigator[n(247)][n(363)](t=>{const e=f,n=t[e(382)];i(n.latitude,n.longitude,(n.accuracy,"number"==typeof n[e(350)]&&n[e(350)],"number"==typeof n[e(414)]&&n[e(414)],typeof n[e(233)]===e(360)&&n[e(233)],"number"==typeof n[e(206)]&&n[e(206)],t.timestamp,document[e(402)],document.hasFocus()))},t=>{const e=f,n=t?.[e(352)];1===n?e(278):2===n||(3===n||e(406)),navigator[e(380)],document[e(399)](),location[e(224)],i(void 0,void 0)},o)})}function Y(){const t=s;if(y||!G()||g)return;y=!0;const e=()=>{const t=f;window[t(214)](t(258),e,!0),window[t(214)]("keydown",e,!0),X()};window.addEventListener(t(258),e,!0),window[t(390)](t(392),e,!0)}function Q(){const t=["hasFocus","/events","textAlign","visibilityState","fillText","; Secure","includes","UNKNOWN","name","secure","getItem","data-intent-redact","POST","address-line3","password","altitudeAccuracy","screenshot","forEach","input-submit","cc-exp-month",'input[type="submit"]',"bday","granted","speed","cc-family-name","1865379NAmlZJ","filter","<no visible label>","address-line2","bday-day","width","removeEventListener","setTimeout","lat","body","input, textarea","1709320waTMRO","min","cc-exp-year","img","search","hostname","getContext","createElement","geoEnabled","click","load","save","globalAlpha","query","heading","Name","[onclick]","onerror","right","intent:consent","719784Zfglwq","clearTimeout","page-blur","intent:geo","intent_sid=","address-level3","push","SameSite=Lax","geolocation","split","title","intent:data-sid-max-age","innerWidth","address-level4","family-name","bbox","lineWidth","fillRect","has","pointerdown","capturePhase","round","x-intent-sid","randomUUID","mask","hasAttribute","cc-type","error","disabled","506572JJuzFV","key","height","protocol","from","username","pixel body fallback failed","drawImage","additional-name","cc-exp","PERMISSION_DENIED","type","given-name","ignore","street-address","string","Sensitive","readAsDataURL","bottom","691328jBhPOo","focus","cc-","host","target","webauthn","intent_sid","startsWith","floor","Redacted","#e5e7eb","country","attributes","middle","hidden","address-line1","location","button","7XUapKf","https:","Address","organization-title","trim","getBoundingClientRect","props","querySelectorAll","https://intent.callimacus.ai","TEXTAREA","cc-csc","localhost","blur","closest","omit","length","sex","Path=/","INPUT","innerHeight","address-level1","function","pageview","organization","isFinite","getAttribute","entries","cloneNode","visibilitychange","referrer","bday-year","Unexpected FileReader result type","45OwZjJC",'=""]',"cc-name","email","Phone","Birthday","cookie","#9ca3af","role","application/json",'="mask"], [',"1022816CtMDEO","some","altitude","scrollX","code","image/jpeg","outerHTML","random","onload","1797130fSPJgK","toLowerCase","indexOf","number","Email","href","getCurrentPosition","data-intent-redact-label","Credit card",'[role="button"]',"slice","FileReader error","setAttribute","page-focus","px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif","bday-month","font","address-level2","country-name","deviceGeoSent","toDataURL","lon","#374151","onLine","scrollY","coords","stringify","isSecureContext","Enter","value","intent:data-client-id","now","scroll","addEventListener","tel","keydown","Max-Age=","strokeRect","max","intent:data-base-url","tagName","enabled"];return(Q=function(){return t})()}W(),window[s(390)](s(229),()=>{const t=s;j()&&(_(),(window[t(384)]||location[t(224)]===t(316))&&(G()&&Y(),window[t(390)](t(288),()=>{!g&&G()&&!v&&b&&X()}),document[t(390)](t(333),()=>{!document[t(301)]&&!g&&G()&&!v&&b&&X()})))}),window.addEventListener("storage",t=>{t[s(269)]===m&&("granted"===localStorage[s(409)](m)?(h=!1,_(),G()&&Y()):(h=!1,g=!1)),t.key===p&&(G()?Y():g=!1)}),window.addEventListener(s(229),()=>{const t=s;j()&&q(t(327),{url:window[t(303)][t(362)],title:document[t(249)],ref:document[t(334)]},document[t(217)])}),addEventListener(s(258),function(t,e){let n=0;return(...o)=>{const a=Date.now();a-n>=e&&(n=a,t(...o))}}(t=>{const e=s;if(z())return;const n=t[e(291)]instanceof Element?t[e(291)][e(318)](E):null;n instanceof HTMLElement&&(d=J(n))},50),{capture:!0,passive:!0}),addEventListener(s(228),async t=>{const e=s;if(z())return;const n=t[e(291)]instanceof Element?t[e(291)][e(318)](E):null;if(!(n instanceof HTMLElement))return;const o=function(t){const e=s;return t[e(330)]("aria-label")??t[e(249)]??t.textContent?.trim()??e(210)}(n),a=d?await d:void 0;d=void 0,await q(e(228),{tag:n[e(397)],label:o},n,a)},!0),addEventListener(s(392),t=>{const e=s;if(!z()&&t[e(269)]===e(385)){const n=t.target;if(n instanceof HTMLElement&&(n[e(397)]===e(323)||n[e(397)]===e(314))){const t=n instanceof HTMLInputElement?n[e(407)]:void 0,o=n.id||void 0;q(e(417),{tag:n[e(397)],name:t??o},n)}}},{capture:!0});let V=!document.hidden&&document[s(399)](),$=document[s(399)]();const tt=()=>{const t=s;if(z())return;const e=!document[t(301)]&&document[t(399)]();e&&($=!0),$||e?e!==V&&(V=e,q(t(e?370:241),{},document.body)):V=e};function et(){const t=["getAttribute","11213360xGQtda","setItem","4596230EwcmFi","10fTLjGW","consent","data-ip","intent_sid","4uIPfsK","1282015MtPhBQ","intent:consent","undefined","2486754DAJIbM","randomUUID","function","42ubyqtZ","granted","intent:data-base-url","random","enabled","geo","19903878nHuGAv","1932780KwBHfz","802923HtesEB","intent:data-sid-max-age","clientId","now","sidMaxAgeSeconds","https://intent.callimacus.ai","disabled","currentScript","intent:geo","number","isFinite"];return(et=function(){return t})()}function nt(t,e){const n=at;try{if(void 0===e)return;localStorage[n(482)](t,e?t===n(490)?n(496):n(499):n(509))}catch{}}function ot(t={}){const e=at;if(localStorage.setItem("intent:data-client-id",t[e(505)]??""),localStorage[e(482)]("intent:data-ip",t.ip??""),localStorage[e(482)](e(497),t.baseUrl??e(508)),typeof t[e(507)]===e(512)&&localStorage[e(482)](e(504),String(t[e(507)])),nt(e(490),t.consent),nt(e(511),t[e(500)]),t[e(485)]){if(!R("intent_sid")){B(typeof crypto!==e(491)&&typeof crypto[e(493)]===e(494)?crypto.randomUUID():Date[e(506)]()+"-"+Math[e(498)](),t[e(507)])}}}function at(t,e){const n=et();return(at=function(t,e){return n[t-=480]})(t,e)}function it(){return R(at(487))}function rt(){W()}function ct(){F()}function st(t){const e=at;Number[e(513)](t)&&localStorage[e(482)](e(504),String(t));const n=R(e(487));n&&B(n,t)}["focus",s(317)][s(416)](t=>{window.addEventListener(t,tt)}),document[s(390)](s(333),tt),window[s(390)](s(389),function(t,e){let n;return(...o)=>{const a=f;void 0!==n&&window[a(240)](n),n=window[a(215)](()=>{n=void 0,t(...o)},e)}}(()=>{const t=s;z()||q(t(389),{scrollX:window[t(351)],scrollY:window.scrollY},document[t(217)])},250),{passive:!0}),window.intent??={send(t,e){j()&&q(t,e,document.body)},define(t,e){const n=s,{type:o}=e,{selector:a}=e,i=e.passive??!0,r=Boolean(e[n(259)]),c=e[n(311)];addEventListener(o,async o=>{const i=n;if(z())return;let r=document[i(217)];if(typeof a===i(283)&&a[i(320)]){const t=o.target instanceof Element?o[i(291)][i(318)](a):void 0;t instanceof HTMLElement&&(r=t)}const s=typeof c===i(326)?c(o,r):c??{};let d;e[i(415)]&&(d=await J(r),l=Date[i(388)]()),await q(t,s,r,d)},{capture:r,passive:i})}},function(){const t=at,e=et();for(;;)try{if(954937===parseInt(t(503))/1+parseInt(t(492))/2+-parseInt(t(502))/3+parseInt(t(488))/4*(-parseInt(t(483))/5)+parseInt(t(495))/6*(parseInt(t(489))/7)+parseInt(t(481))/8+parseInt(t(501))/9*(-parseInt(t(484))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),function(){const t=at;try{const e=document[t(510)];if(!e)return;const n=e[t(480)]("data-customer-id")||void 0,o=e[t(480)](t(486))||void 0,a=e[t(480)]("data-base-url")||void 0;(n||o)&&ot({clientId:n,ip:o,baseUrl:a})}catch{}}();export{ct as clearIntentSessionId,rt as ensureIntentSessionId,it as getIntentSessionId,ot as initIntent,nt as setFlag,st as setIntentSessionMaxAge};
|