import f from"crypto";import r from"fs";import{e as a}from"./index-B8MOUWcP.mjs";import{IS_MAC_OS as t,IS_VENTURA_OR_UP as s,IS_WINDOWS as i,IS_LINUX as d}from"./constants-DED7MIJj.mjs";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"4.2.860"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="58823a8a-b8f2-41fa-b372-041547f1f420",e._sentryDebugIdIdentifier="sentry-dbid-58823a8a-b8f2-41fa-b372-041547f1f420")})()}catch{}function l(){if(t)return s?"System Settings":"System Preferences";if(i)return"Windows Settings";if(d)return"Settings/Preferences"}const c=Object.freeze({BRAND_NAME:"Beeper",APP_NAME:"Beeper",BROWSER_EXTENSION_NAME:"Beeper browser extension",SYSTEM_PREFS_LABEL:l(),TRAY_NAME:t?"Menu Bar":"Tray",SHOW_IN_FOLDER_LABEL:t?"Show in Finder":"Show in folder"}),u=Buffer.from(`[ZoneTransfer]\r
ZoneId=3`);async function o(e){if(!r.existsSync(e))throw new Error("writeWindowsZoneIdentifier didn't find the original file");await r.promises.writeFile(`${e}:Zone.Identifier`,u,{flag:"wx"})}const _="0003";async function S(e){if(t){const n=[_,Math.trunc(Date.now()/1e3).toString(16),c.APP_NAME,f.randomUUID()].join(";");await a("/usr/bin/xattr",["-w","com.apple.quarantine",n,e],{reject:!1})}else i&&await o(e).catch(n=>logger.error(n))}const g=Object.freeze(Object.defineProperty({__proto__:null,quarantineFile:S,writeWindowsZoneIdentifier:o},Symbol.toStringTag,{value:"Module"}));export{c as e,g as f,S as q};
//# sourceMappingURL=fs-xattr-D9kndW7T.mjs.map
