PageSourceSearch

https://onepe.ai/build/assets/Edit-B68mpI3t.js

js onepe.ai collected 2026-10-05 14:39:01 UTC 37,015 bytes, 11 lines download raw bytes

1import{u as B,a as R,r as u,j as e,H as D,c as S,b as O}from"./app-D4IBpXEE.js";import{A as U}from"./AdminLayout-B7cFynqJ.js";import{f as F}from"./datetime-BfxD2VX1.js";import{u as b}from"./useTranslation-mV-gvqqz.js";import{A as G}from"./arrow-left-BfMoYKHZ.js";import{I as V}from"./info-BhVLnjFm.js";import{T as N}from"./Trans-Z-pFVM8q.js";import{C as T}from"./circle-check-big-Cs_dpEV5.js";import{C as E}from"./circle-x-Btp33Tip.js";import{F as H}from"./flask-conical-BOzbcWoq.js";import{c as L}from"./createLucideIcon-CNbh77gd.js";import{L as K}from"./link-2-CoTuHk7B.js";import{C as q}from"./check-BE3CBA3r.js";import{C as W}from"./copy-tFkIONE-.js";import{B as $}from"./book-open-CP9xNsRl.js";import{C as Y}from"./chevron-up-8C2WggIW.js";import{C as Q}from"./chevron-down-BD_xrt_b.js";import{E as X}from"./eye-off-C_05pR1F.js";import{E as J}from"./eye--y4uUAE3.js";import"./Sidebar-CzTRGA0N.js";import"./useBranding-B7C0EavV.js";import"./plus-BtmR7ya-.js";import"./x-Bdl9lUlz.js";import"./Topbar-YNLa3oLe.js";import"./ApplicationLogo-Bp8Si-NU.js";import"./Tabs-CO9UBWDc.js";import"./Modal-BG2UZmBH.js";import"./useLocale-DI-M_4se.js";import"./search-DEcyoQmh.js";import"./loader-circle-D9S0CuXo.js";import"./user-DjuKNgwl.js";import"./file-text-Bmh95Nys.js";import"./users-CkbR-kb7.js";import"./globe-DvUr_wFZ.js";import"./shield-check-D7ft-euV.js";import"./user-cog-Uq6F85Cy.js";import"./clock-CjNziwQQ.js";import"./key-round-BvhkL2Uv.js";/**
2 * @license lucide-react v0.575.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Z=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],ee=L("hard-drive",Z);/**
7 * @license lucide-react v0.575.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const te=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],se=L("rotate-ccw",te),ae={storage_s3:{title:"Amazon S3 Setup",steps:["Sign in to the AWS Console at aws.amazon.com.","Go to IAM → Users → Create user with programmatic access.","Attach the AmazonS3FullAccess policy (or a scoped bucket policy).","Copy the Access Key ID and Secret Access Key.","Create an S3 bucket and note the bucket name and region."],link:"https://s3.console.aws.amazon.com",linkLabel:"Open AWS Console"},storage_do:{title:"DigitalOcean Spaces Setup",steps:["Log in to cloud.digitalocean.com.","Navigate to Spaces → Create a Space, choose a region.","Go to API → Spaces Access Keys → Generate New Key.","Copy the Access Key and Secret.","Enter the Space name and region endpoint."],link:"https://cloud.digitalocean.com/spaces",linkLabel:"Open DigitalOcean"},storage_wasabi:{title:"Wasabi Cloud Storage Setup",steps:["Sign up or log in at console.wasabisys.com.","Create a new bucket and note its name and region.","Go to Access Keys → Create New Access Key.","Copy the Access Key ID and Secret Access Key."],link:"https://console.wasabisys.com",linkLabel:"Open Wasabi Console"},meta_app:{title:"Meta App — Complete Setup Guide",subtitle:"Covers WhatsApp Business API · Instagram DMs · Messenger · Facebook Social Posting · Embedded Signup",sections:[{heading:"Step 1 — Create & Configure Your Meta App",icon:"create",steps:['Go to developers.facebook.com → "My Apps" → "Create App".','Select app type: "Business" (required for WhatsApp + Messenger).',"Fill in app name, contact email, and attach your Business Manager account.","Under Settings → Basic, copy your App ID and App Secret into the fields below.","Set App Domain to your production domain (e.g. yourdomain.com).",'Under Settings → Advanced, enable "Allow API access to App settings" for system user tokens.']},{heading:"Step 2 — WhatsApp Business API",icon:"whatsapp",note:"Required for WhatsApp messaging and Embedded Signup (Connect WhatsApp button).",steps:['In your app dashboard, click "Add Product" → add WhatsApp.',"Go to WhatsApp → Getting Started to see your test WABA and ph
11one number.","In Meta Business Suite → System Users, create a System User with ADMIN role.",'Click "Add Assets" → assign your WhatsApp Business Account to the system user.',"Generate a Permanent Token for the system user with these permissions:"],permissions:["whatsapp_business_management","whatsapp_business_messaging","business_management"],steps2:['Paste the generated token into the "System User Access Token" field below.',"For the Webhook: go to WhatsApp → Configuration, set Callback URL to: {APP_URL}/webhooks/whatsapp/{VERIFY_TOKEN} (shown in Channel Setup after adding a WABA)."]},{heading:"Step 3 — Embedded Signup (One-Click Connect)",icon:"signup",note:"Lets your clients connect WhatsApp / Instagram / Messenger with a single button click instead of manual token entry.",steps:['Add "Facebook Login for Business" product to your app.',"Go to Facebook Login for Business → Configurations → Create Configuration.",'WhatsApp config: set Permissions to whatsapp_business_management + whatsapp_business_messaging. Copy the config_id → paste into "Embedded Signup Config ID (WhatsApp)" below.','Social config (Instagram + Messenger): set the permissions listed below. Copy the config_id → paste into "Embedded Signup Config ID (Instagram / Messenger)" below.'],permissions:["instagram_basic","instagram_manage_messages","pages_messaging","pages_manage_metadata","pages_read_engagement","pages_show_list"],steps2:["Under your app Settings → Basic → App Domains, add your domain.","Under Facebook Login → Settings, add Valid OAuth Redirect URIs: {APP_URL}/app/inbox/setup"]},{heading:"Step 4 — Instagram Business DMs",icon:"instagram",note:"Allows receiving and sending Instagram Direct Messages in the Inbox.",steps:['Add "Messenger" product to your app (Instagram DMs use the Messenger API).','Go to Messenger → Instagram Settings → enable "Connected Tools".',"Set the Webhook callback URL to: {APP_URL}/webhooks/meta/{VERIFY_TOKEN} (shown in Channel Setup).","Subscribe to these webhook fields:"],permissions:["instagram_basic","instagram_manage_messages","pages_manage_metadata"],webhookFields:["messages","messaging_postbacks","messaging_optins","message_deliveries","message_reads"]},{heading:"Step 5 — Facebook Messenger DMs",icon:"messenger",note:"Allows receiving and sending Facebook Page messages in the Inbox.",steps:["Go to Messenger → Settings in your app dashboard.","Set Webhook callback URL to: {APP_URL}/webhooks/meta/{VERIFY_TOKEN}.","Subscribe the webhook to these fields:"],permissions:["pages_messaging","pages_manage_metadata","pages_read_engagement"],webhookFields:["messages","messaging_postbacks","messaging_optins","message_deliveries","message_reads"],steps2:["Pages are subscribed automatically when a client connects via Embedded Signup."]},{heading:"Step 6 — Facebook & Instagram Social Posting",icon:"social",note:"Required only if you use the Social Posting feature to publish posts to Facebook Pages or Instagram.",steps:['Add "Facebook Login" product to your app.',"Go to Facebook Login → Settings and add Valid OAuth Redirect URI: {APP_URL}/auth/facebook/callback","Request the following permissions (some require App Review for Advanced Access):"],permissions:["pages_manage_posts","pages_read_engagement","pages_show_list","instagram_basic","instagram_content_publish","public_profile","email"],steps2:['Submit your app for App Review for any permissions marked as "Advanced Access" (pages_manage_posts, instagram_content_publish).',"Add a Privacy Policy URL and Terms of Service URL under Settings → Basic before submitting for review."]},{heading:"Step 7 — Go Live",icon:"live",steps:["Switch your app from Development to Live mode (top toggle in Meta App Dashboard).","In App Review → Permissions, request Advanced Access for any restricted permissions.","Add Privacy Policy URL and Terms of Service URL under Settings → Basic.","Enable the integration using the toggle at the top of this admin page."]}],links:[{href:"https://developers.facebook.com/apps",label:"Meta App Dashboard"},{href:"https://business.facebook.com/settings/system-users",label:"System Users"},{href:"https://developers.facebook.com/docs/whatsapp/embedded-signup",label:"Embedded Signup Docs"},{href:"https://developers.facebook.com/docs/messenger-platform",label:"Messenger Platform Docs"}]},oauth_linkedin:{title:"LinkedIn OAuth Setup",steps:["Go to linkedin.com/developers and sign in.",'Click "Create App", fill in company and app details.','Under "Auth" tab, add redirect URL: {your-domain}/auth/linkedin/callback',"Copy the Client ID and Client Secret.","Request r_liteprofile and r_emailaddress permissions."],link:"https://www.linkedin.com/developers/apps",linkLabel:"Open LinkedIn Developers"}
11,oauth_twitter:{title:"Twitter / X OAuth Setup",steps:["Go to developer.twitter.com and apply for a developer account.","Create a new Project and App.",'Under "User authentication settings", enable OAuth 2.0.',"Set the callback URL to: {your-domain}/auth/twitter/callback",'Copy the Client ID and Client Secret from "Keys and tokens" tab.'],link:"https://developer.twitter.com/en/portal/apps/new",linkLabel:"Open Twitter Developer Portal"},oauth_youtube:{title:"YouTube / Google OAuth Setup",steps:["Go to console.cloud.google.com and create or select a project.","Navigate to APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID.","Set the authorized redirect URI to: {your-domain}/auth/google/callback","Enable the YouTube Data API v3 in APIs & Services → Library.","Copy the Client ID and Client Secret."],link:"https://console.cloud.google.com/apis/credentials",linkLabel:"Open Google Cloud Console"},oauth_shopify:{title:"Shopify App (OAuth) Setup",subtitle:"Lets merchants connect their Shopify store with one click instead of pasting an API token.",steps:["Go to the Shopify Partner dashboard → Apps → Create app → Create app manually.",'Open the app → Configuration. Under "App URL" put your app URL, and under "Allowed redirection URL(s)" add the Callback URL shown above this guide.',"For unlisted/custom distribution you do NOT need to submit for App Store review.",'Open "API credentials" / "Client credentials" and copy the API key (Client ID) and API secret key (Client secret) into the fields below.',"Request scopes are handled automatically by this app (orders, customers, products, checkouts, fulfillments).","Save, then merchants can connect from E-Commerce → Stores → Connect with Shopify."],link:"https://partners.shopify.com",linkLabel:"Open Shopify Partners"},oauth_bigcommerce:{title:"BigCommerce App (OAuth) Setup",subtitle:"Lets merchants install your app from their BigCommerce control panel to auto-connect.",steps:["Go to the BigCommerce Developer Portal → My Apps → Create an app.",'Under "Technical", set the Auth Callback URL to the Callback URL shown above this guide. Load/Uninstall callbacks can point to the same host.',"Enable OAuth scopes: Orders, Customers (read), Products, Information & Settings (read), Carts (read), Webhooks (manage).","Copy the Client ID and Client Secret into the fields below.","Keep the app in Draft for unlisted use — no marketplace review needed; install it from your store's control panel under Apps → My Apps."],link:"https://devtools.bigcommerce.com/my/apps",linkLabel:"Open BigCommerce Dev Portal"},oauth_tiktok:{title:"TikTok OAuth Setup",steps:["Go to developers.tiktok.com and sign in.",'Create an app under "Manage apps".',"Add the callback URL: {your-domain}/auth/tiktok/callback","Request the user.info.basic scope.","Copy the Client Key and Client Secret."],link:"https://developers.tiktok.com",linkLabel:"Open TikTok Developers"},llm_openai_default:{title:"OpenAI API Setup",steps:["Sign up or log in at platform.openai.com.","Go to API Keys → Create new secret key.","Copy the key immediately — it won't be shown again.","Add billing details under Settings → Billing."],link:"https://platform.openai.com/api-keys",linkLabel:"Open OpenAI Platform"},llm_anthropic_default:{title:"Anthropic Claude API Setup",steps:["Sign up or log in at console.anthropic.com.","Go to Account Settings → API Keys → Create Key.","Copy the key — shown only once.","Add a credit card under Billing to activate the API."],link:"https://console.anthropic.com/keys",linkLabel:"Open Anthropic Console"},llm_gemini_default:{title:"Google Gemini API Setup",steps:["Go to aistudio.google.com and sign in with a Google account.",'Click "Get API key" → "Create API key in new project".',"Copy the generated API key."],link:"https://aistudio.google.com/app/apikey",linkLabel:"Open Google AI Studio"},sms_twilio_default:{title:"Twilio SMS Setup",steps:["Sign up at twilio.com and verify your account.","From the Console Dashboard, copy your Account SID and Auth Token.","Go to Phone Numbers → Buy a Number with SMS capability.","Enter the Account SID, Auth Token, and the Twilio phone number."],link:"https://console.twilio.com",linkLabel:"Open Twilio Console"},sms_nexmo_default:{title:"Vonage (Nexmo) SMS Setup",steps:["Sign up at vonage.com.","From the API Dashboard, copy your API Key and API Secret.","Purchase a virtual number under Numbers → Buy Numbers."],link:"https://dashboard.nexmo.com",linkLabel:"Open Vonage Dashboard"},sms_messagebird_default:{title:"MessageBird SMS Setup",steps:["Sign up at messagebird.com.","Go to Developers → API access keys → Add access key.","Copy the live API key.","Optionally buy a virtual number under Numbers."],link:"https://dashboard.messagebird.com/en/developers/access",linkLabel:"Open MessageBird Dashboard"},google_places:{title:"Google Places API Setup",steps:["Go to console.cloud.google.com and create or select a project.",'Navigate to APIs & Services → Library → search "Places API" → Enable.',"Go to APIs & Services → Credentials → Create Credentials → API Key.","Optionally restrict the key to Places API only for security."],link:"https://console.cloud.google.com/apis/library/places-backend.googleapis.com",linkLabel:"Open Google Cloud Console"},qdrant:{title:"Qdrant Vector Store Setup",steps:["Option A — Qdrant Cloud: Sign up at cloud.qdrant.io, create a cluster, copy the cluster URL and API key.","Option B — Self-hosted: Run with Docker: docker run -p 6333:6333 qdrant/qdrant","For self
11-hosted, the URL is typically http://localhost:6333 (no API key needed).","Paste the URL and API key (if applicable) into the credentials form."],link:"https://cloud.qdrant.io",linkLabel:"Open Qdrant Cloud"}};function re({p:a}){return e.jsx("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-mono font-medium bg-blue-100 dark:bg-blue-900/40 text-blue-700 dark:text-blue-300 border border-blue-200 dark:border-blue-800",children:a})}function ne({url:a}){const{t:o}=b(),[l,c]=u.useState(!1);if(!a)return null;const s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(a),c(!0),setTimeout(()=>c(!1),1500)};return e.jsxs("div",{className:"rounded-xl border border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-900 p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-brand-100 dark:bg-brand-900/30 text-brand-600 dark:text-brand-400 shrink-0",children:e.jsx(K,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200",children:o("integrations.callback_url_title")}),e.jsx("p",{className:"text-xs text-neutral-400",children:o("integrations.callback_url_desc")})]})]}),e.jsxs("div",{className:"mt-3 flex items-center gap-2 rounded-lg bg-neutral-50 dark:bg-neutral-800 px-3 py-2",children:[e.jsx("code",{className:"flex-1 truncate text-xs text-neutral-600 dar
11k:text-neutral-300",children:a}),e.jsx("button",{type:"button",onClick:s,className:"flex items-center gap-1 rounded-md border border-neutral-200 dark:border-neutral-700 px-2 py-1 text-xs font-medium text-neutral-600 dark:text-neutral-300 hover:bg-white dark:hover:bg-neutral-700 shrink-0",children:l?e.jsxs(e.Fragment,{children:[e.jsx(q,{className:"h-3.5 w-3.5 text-green-500"})," ",o("integrations.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"h-3.5 w-3.5"})," ",o("integrations.copy")]})})]})]})}function oe({provider:a}){const{t:o}=b(),[l,c]=u.useState(!1),s=ae[a];if(!s)return null;const i=Array.isArray(s.sections);return e.jsxs("div",{className:"rounded-xl border border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-900 p-5",children:[e.jsxs("button",{type:"button",onClick:()=>c(t=>!t),className:"flex items-center gap-2 w-full text-left",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-amber-100 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400 shrink-0",children:e.jsx($,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200",children:o("integrations.setup_guide")}),e.jsx("p",{className:"text-xs text-neutral-400 mt-0.5 truncate",children:s.title})]}),l?e.jsx(Y,{className:"h-4 w-4 text-neutral-400 shrink-0"}):e.jsx(Q,{className:"h-4 w-4 text-neutral-400 shrink-0"})]}),l&&e.jsxs("div",{className:"mt-4 rounded-xl bg-blue-50 dark:bg-blue-900/20 border border-blue-100 dark:border-blue-900/40 px-4 py-3 space-y-4",children:[s.subtitle&&e.jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400 font-medium",children:s.subtitle}),i?e.jsx("div",{className:"space-y-4",children:s.sections.map((t,p)=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wider text-blue-700 dark:text-blue-300 border-b border-blue-200 dark:border-blue-800 pb-1",children:t.heading}),t.note&&e.jsxs("div",{className:"flex items-start gap-1.5 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 px-2.5 py-1.5",children:[e.jsx("span",{className:"text-amber-600 dark:text-amber-400 text-[10px] font-bold uppercase tracking-wide shrink-0 mt-0.5",children:o("integrations.note")}),e.jsx("p",{className:"text-[11px] text-amber-700 dark:text-amber-300",children:t.note})]}),t.steps&&e.jsx("ol",{className:"space-y-1.5",children:t.steps.map((n,d)=>e.jsxs("li",{className:"flex gap-2 text-xs text-blue-700 dark:text-blue-400",children:[e.jsxs("span",{className:"shrink-0 w-4 text-right font-semibold text-blue-500",children:[d+1,"."]}),e.jsx("span",{children:n})]},d))}),t.permissions&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-semibold text-blue-600 dark:text-blue-400 uppercase tracking-wide mb-1",children:o("integrations.required_permissions")}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.permissions.map(n=>e.jsx(re,{p:n},n))})]}),t.webhookFields&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-semibold text-purple-600 dark:text-purple-400 uppercase tracking-wide mb-1",children:o("integrations.webhook_fields")}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.webhookFields.map(n=>e.jsx("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-mono font-medium bg-purple-100 dark:bg-purple-900/40 text-purple-700 dark:text-purple-300 border border-purple-200 dark:border-purple-800",children:n},n))})]}),t.steps2&&e.jsx("ol",{className:"space-y-1.5",children:t.steps2.map((n,d)=>e.jsxs("li",{className:"flex gap-2 text-xs text-blue-700 dark:text-blue-400",children:[e.jsxs("span",{className:"shrink-0 w-4 text-right font-semibold text-blue-500",children:[(t.steps?t.steps.length:0)+d+1,"."]}),e.jsx("span",{children:n})]},d))})]},p))}):e.jsx("ol",{className:"space-y-1.5",children:s.steps.map((t,p)=>e.jsxs("li",{className:"flex gap-2 text-xs text-blue-700 dark:text-blue-400",children:[e.jsxs("span",{className:"shrink-0 font-medium text-blue-500",children:[p+1,"."]}
11),e.jsx("span",{children:t})]},p))}),s.links?e.jsx("div",{className:"flex flex-wrap gap-4 pt-2 border-t border-blue-200 dark:border-blue-800",children:s.links.map(t=>e.jsxs("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-medium text-blue-600 dark:text-blue-400 hover:underline",children:[t.label," →"]},t.href))}):s.link?e.jsxs("a",{href:s.link,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs font-medium text-blue-600 dark:text-blue-400 hover:underline pt-1",children:[s.linkLabel," →"]}):null]})]})}const k={storage_local:{bg:"bg-sky-100 dark:bg-sky-900/40",color:"#0ea5e9",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M2 7a2 2 0 012-2h12a2 2 0 012 2v1H2V7zm0 3h16v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4zm3 2a1 1 0 100 2 1 1 0 000-2zm3 0a1 1 0 100 2 1 1 0 000-2z"})})},storage_s3:{bg:"bg-orange-100 dark:bg-orange-900/30",color:"#FF9900",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M10 2L4 5.8v8.4L10 18l6-3.8V5.8L10 2zm0 2.3l3.9 2.46-3.9 2.36L6.1 6.76 10 4.3zM5.5 8.1l3.9 2.36v4.7L5.5 12.8V8.1zm5.1 2.36l3.9-2.36V12.8l-3.9 2.36v-4.7z"})})},storage_do:{bg:"bg-blue-100 dark:bg-blue-900/30",color:"#0080FF",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M10 2a8 8 0 110 16A8 8 0 0110 2zm0 2.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zm0 2a3.5 3.5 0 110 7 3.5 3.5 0 010-7zm0 2a1.5 1.5 0 100 3 1.5 1.5 0 000-3zM6 15.5H4.5V14H6v1.5zm-2-2.5H2.5V11.5H4V13z"})})},storage_wasabi:{bg:"bg-green-100 dark:bg-green-900/30",color:"#3CBA54",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M2.5 14.5L5 7l2.5 5 2.5-5 2.5 5 2.5-5 2.5 7.5h-2l-1-3-2 4-2-4-1 3h-2zm14-9A1.5 1.5 0 1114 7a1.5 1.5 0 012.5-1.5z"})})},meta_app:{bg:"bg-blue-100 dark:bg-blue-900/30",color:"#0866FF",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M2.5 10C2.5 7.24 4.74 5 7.5 5c1.32 0 2.52.5 3.42 1.32A5 5 0 0114.5 5C17.26 5 19.5 7.24 19.5 10v.5c0 2.76-2.24 5-5 5a5 5 0 01-3.58-1.5A5 5 0 017.5 15.5C4.74 15.5 2.5 13.26 2.5 10.5V10zm5 3.5c1.38 0 2.5-1.12 2.5-2.5v-.5c0-1.38-1.12-2.5-2.5-2.5S5 9.12 5 10.5V11c0 1.38 1.12 2.5 2.5 2.5zm7 0c1.38 0 2.5-1.12 2.5-2.5V10c0-1.38-1.12-2.5-2.5-2.5S12 8.62 12 10v.5c0 1.38 1.12 2.5 2.5 2.5z"})})},oauth_linkedin:{bg:"bg-sky-100 dark:bg-sky-900/30",color:"#0A66C2",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M4.5 3C3.67 3 3 3.67 3 4.5S3.67 6 4.5 6 6 5.33 6 4.5 5.33 3 4.5 3zM3 7.5h3V17H3V7.5zm4.5 0H10v1.3c.45-.78 1.45-1.5 2.75-1.5 2.95 0 3.5 1.94 3.5 4.47V17H13v-4.73c0-1.13-.02-2.58-1.57-2.58-1.57 0-1.81 1.23-1.81 2.5V17H7.5V7.5z"})})},oauth_twitter:{bg:"bg-neutral-200 dark:bg-neutral-700/60",color:"#0f0f0f",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M3.5 3h3.1l2.9 4.1L12.6 3h2.3l-4 5 4.6 6h-3.1L9.2 9.7 5.9 14H3.6l4.3-5.3L3.5 3zm2.3 1.2l8 10.4h1.2L7 4.2H5.8z"})})},oauth_youtube:{bg:"bg-red-100 dark:bg-red-900/30",color:"#FF0000",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M17.5 6.2S17.25 4.8 16.6 4.1c-.67-.72-1.43-.73-1.78-.77C12.6 3.2 10 3.2 10 3.2s-2.6 0-4.82.13c-.35.04-1.1.05-1.78.77C2.75 4.8 2.5 6.2 2.5 6.2S2.25 7.86 2.25 9.5v1.5c0 1.64.25 3.3.25 3.3s.25 1.4.9 2.1c.68.72 1.57.7 1.97.77 1.43.14 6.08.19 6.08.19s2.6 0 4.82-.15c.35-.04 1.1-.05 1.78-.77.65-.7.9-2.1.9-2.1S17.75 12.64 17.75 11V9.5c0-1.64-.25-3.3-.25-3.3zM8.5 12.75v-5.5l5 2.75-5 2.75z"})})},oauth_tiktok:{bg:"bg-neutral-200 dark:bg-neutral-700/60",color:"#000000",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M13.5 2h-2.25v9.5A2.25 2.25 0 119 9.2V7a4.5 4.5 0 104.5 4.5V6.25A6.24 6.24 0 0017 7V4.75A4.25 4.25 0 0113.5 2z"})})},llm_openai_default:{bg:"bg-emerald-100 dark:bg-emerald-900/30",color:"#10a37f",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M10 2a3.9 3.9 0 00-3.68 2.6A3.9 3.9 0 003.6 8.32a3.9 3.9 0 000 3.36 3.9 3.9 0 002.72 3.72A3.9 3.9 0 0010 18a3.9 3.9 0 003.68-2.6 3.9 3.9 0 002.72-3.72 3.9 3.9 0 000-3.36A3.9 3.9 0 0013.68 4.6 3.9 3.9 0 0010 2zm0 4a2 2 0 110 4 2 2 0 010-4z"})})}
11,llm_anthropic_default:{bg:"bg-orange-100 dark:bg-orange-900/30",color:"#d4793b",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M10 2.5L3.5 17h3.2l1.1-2.8h4.4l1.1 2.8h3.2L10 2.5zm0 4.3l1.6 4.2H8.4L10 6.8z"})})},llm_gemini_default:{bg:"bg-blue-100 dark:bg-blue-900/30",color:"#4285F4",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M10 2l2 6h6l-5 3.6 1.9 5.9L10 14l-4.9 3.5L7 11.6 2 8h6l2-6z"})})},sms_twilio_default:{bg:"bg-red-100 dark:bg-red-900/30",color:"#F22F46",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M10 2a8 8 0 100 16A8 8 0 0010 2zm-2.5 4.5a1.5 1.5 0 110 3 1.5 1.5 0 010-3zm5 0a1.5 1.5 0 110 3 1.5 1.5 0 010-3zm-5 5a1.5 1.5 0 110 3 1.5 1.5 0 010-3zm5 0a1.5 1.5 0 110 3 1.5 1.5 0 010-3z"})})},sms_nexmo_default:{bg:"bg-purple-100 dark:bg-purple-900/30",color:"#6E3697",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M3.5 3h3.3L10 9.5 13.2 3h3.3L10 17 3.5 3z"})})},sms_messagebird_default:{bg:"bg-blue-100 dark:bg-blue-900/30",color:"#2481CC",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M18 9c0-3.31-3.58-6-8-6S2 5.69 2 9c0 2.12 1.32 4 3.38 5.14-.1.48-.46 1.74-.88 2.36 0 0 2.04-.42 3.52-1.56.64.1 1.3.16 1.98.16 4.42 0 8-2.69 8-6zM6 8.5a1 1 0 110 2 1 1 0 010-2zm4 0a1 1 0 110 2 1 1 0 010-2zm4 0a1 1 0 110 2 1 1 0 010-2z"})})},sms_smsbd_default:{bg:"bg-teal-100 dark:bg-teal-900/30",color:"#0d9488",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M3 5a1 1 0 011-1h12a1 1 0 011 1v8a1 1 0 01-1 1H4a1 1 0 01-1-1V5zm2 1.5v5h2.5c1.1 0 2-.9 2-2v-1c0-1.1-.9-2-2-2H5zm5 0v5h2.5c.83 0 1.5-.67 1.5-1.5v-2c0-.83-.67-1.5-1.5-1.5H10zm-3.5 1.5h1c.28 0 .5.22.5.5v1c0 .28-.22.5-.5.5h-1v-2zm5 0h1c.28 0 .5.22.5.5v2c0 .28-.22.5-.5.5h-1V8z"})})},sms_reve_default:{bg:"bg-indigo-100 dark:bg-indigo-900/30",color:"#4f46e5",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M3 5a1 1 0 011-1h12a1 1 0 011 1v8a1 1 0 01-1 1H4a1 1 0 01-1-1V5zm2 1.5v5h1.5v-2h1l1 2H10l-1.1-2.1c.67-.26 1.1-.9 1.1-1.65 0-1-.8-1.75-1.75-1.75H5zm5 0L12.5 11 15 6.5h-1.7L12 9.3l-1.3-2.8H10zm-3.5 1.4h.75c.28 0 .5.22.5.5s-.22.5-.5.5H6.5V7.9z"})})},google_places:{bg:"bg-red-100 dark:bg-red-900/30",color:"#EA4335",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M10 2a6 6 0 016 6c0 4.5-6 11-6 11S4 12.5 4 8a6 6 0 016-6zm0 3.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5z"})})},qdrant:{bg:"bg-rose-100 dark:bg-rose-900/30",color:"#DC143C",icon:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:e.jsx("path",{d:"M10 2l5 3v3.5L10 11.5 5 8.5V5l5-3zm0 11L5 10v3l5 5 5-5v-3l-5 3zm-4.5-4.7L10 11l4.5-2.7V5.7L10 3 5.5 5.7v2.6z"})})}};function le({label:a,fieldKey:o,value:l,onChange:c,required:s,hint:i}){const{t}=b(),[p,n]=u.useState(!1),d=l&&/^•+/.test(l);return e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-neutral-700 dark:text-neutral-300 mb-1",children:[a," ",s&&e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:p?"text":"password",value:l,onChange:h=>c(o,h.target.value),placeholder:t(d?"integrations.unchanged_placeholder":"integrations.enter_value"),className:"w-full rounded-lg border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 px-3 py-2 pr-10 text-sm text-neutral-900 dark:text-neutral-100 focus:outline-none focus:ring-2 focus:ring-brand-500"}),e.jsx("button",{type:"button",onClick:()=>n(h=>!h),className:"absolute right-2 top-1/2 -translate-y-1/2 text-neutral-400 hover:text-neutral-600 dar
11k:hover:text-neutral-200",children:p?e.jsx(X,{className:"h-4 w-4"}):e.jsx(J,{className:"h-4 w-4"})})]}),i&&e.jsx("p",{className:"mt-1 text-xs text-neutral-400 dark:text-neutral-500",children:i})]})}function ie({label:a,fieldKey:o,value:l,onChange:c,required:s,hint:i}){return e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-neutral-700 dark:text-neutral-300 mb-1",children:[a," ",s&&e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:l,onChange:t=>c(o,t.target.value),className:"w-full rounded-lg border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 px-3 py-2 text-sm text-neutral-900 dark:text-neutral-100 focus:outline-none focus:ring-2 focus:ring-brand-500"}),i&&e.jsx("p",{className:"mt-1 text-xs text-neutral-400 dark:text-neutral-500",children:i})]})}const I=["storage_local","storage_s3","storage_do","storage_wasabi"];function de({provider:a}){const{t:o}=b();if(!I.includes(a))return null;const l=a==="storage_local";return e.jsxs("div",{className:"flex gap-3 rounded-xl border border-sky-200 dark:border-sky-800 bg-sky-50 dark:bg-sky-900/20 px-4 py-3 text-sm text-sky-800 dark:text-sky-200",children:[e.jsx(ee,{className:"h-5 w-5 shrink-0 mt-0.5 text-sky-500"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:o("integrations.storage_provider")}),l?e.jsx("p",{className:"text-xs opacity-80",children:o("integrations.storage_local_banner")}):e.jsx("p",{className:"text-xs opacity-80",children:e.jsx(N,{i18nKey:"integrations.storage_remote_banner",components:{strong:e.jsx("strong",{}),code:e.jsx("code",{className:"bg-sky-100 dark:bg-sky-800 px-1 rounded"})}})})]})]})}function $e({provider:a,label:o,category:l,fields:c,config:s,callbackUrl:i=null}){const{t}=b(),p=B().props.timezone||"Asia/Dhaka",{data:n,setData:d,put:h,processing:y,errors:v}=R({enabled:s.enabled,mode:s.mode,credentials:{...s.credentials}}),[x,f]=u.useState(null),[w,j]=u.useState(!1),[_,A]=u.useState(!1),C=(r,m)=>{d("credentials",{...n.credentials,[r]:m})},P=r=>{r.preventDefault(),h(route("admin.integrations.update",a),{preserveScroll:!0})},z=async()=>{var r,m;j(!0),f(null);try{const{data:g}=await S.post(route("admin.integrations.test",a));f(g)}catch(g){f({ok:!1,message:((m=(r=g==null?void 0:g.response)==null?void 0:r.data)==null?void 0:m.message)||t("integrations.request_failed")})}finally{j(!1)}},M=async()=>{if(confirm(t("integrations.rotate_confirm"))){A(!0);try{await S.post(route("admin.integrations.rotate",a)),O.reload({only:["config"]})}finally{A(!1)}}};return e.jsxs(U,{title:`${t("integrations.title")} · ${o}`,children:[e.jsx(D,{title:`${o} · ${t("integrations.title")} · ${t("head.admin")}`}),e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("a",{href:route("admin.integrations.index"),className:"text-neutral-400 hover:text-neutral-600 dar
11k:hover:text-neutral-200 transition",children:e.jsx(G,{className:"h-5 w-5"})}),k[a]&&e.jsx("div",{className:`flex items-center justify-center w-10 h-10 rounded-xl shrink-0 ${k[a].bg}`,style:{color:k[a].color},children:k[a].icon}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-neutral-400 uppercase tracking-wider",children:l}),e.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-neutral-100",children:o})]})]}),e.jsx(de,{provider:a}),e.jsx(ne,{url:i}),e.jsx(oe,{provider:a}),e.jsxs("form",{onSubmit:P,className:"space-y-6",children:[e.jsxs("div",{className:"rounded-xl border border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-900 p-5 space-y-4",children:[e.jsx("h3",{className:"font-medium text-neutral-800 dark:text-neutral-200",children:t("integrations.status")}),e.jsxs("div",{className:"flex flex-wrap gap-6",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:n.enabled,onChange:r=>d("enabled",r.target.checked),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),e.jsx("span",{className:"text-sm text-neutral-700 dark:text-neutral-300",children:t("common.enabled")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:t("integrations.mode_label")}
11),e.jsxs("select",{value:n.mode,onChange:r=>d("mode",r.target.value),className:"rounded border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 px-2 py-1 text-sm text-neutral-800 dark:text-neutral-200",children:[e.jsx("option",{value:"live",children:t("integrations.mode_live")}),e.jsx("option",{value:"test",children:t("integrations.mode_test")})]})]})]})]}),e.jsxs("div",{className:"rounded-xl border border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-900 p-5 space-y-4",children:[e.jsx("h3",{className:"font-medium text-neutral-800 dark:text-neutral-200",children:t("integrations.credentials")}),a==="storage_local"?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-neutral-500 dark:text-neutral-400",children:[e.jsx(V,{className:"h-4 w-4 shrink-0"}),t("integrations.no_credentials_local")]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-xs text-neutral-400",children:t("integrations.encrypted_note")}),c.map(r=>r.type==="password"?e.jsx(le,{label:r.label,fieldKey:r.key,value:n.credentials[r.key]??"",onChange:C,required:r.required,hint:r.hint},r.key):e.jsx(ie,{label:r.label,fieldKey:r.key,value:n.credentials[r.key]??"",onChange:C,required:r.required,hint:r.hint},r.key)),a==="meta_app"&&n.credentials.config_id_whatsapp&&n.credentials.config_id_social&&n.credentials.config_id_whatsapp===n.credentials.config_id_social&&e.jsxs("div",{className:"rounded-lg border border-amber-200 dark:border-amber-700 bg-amber-50 dark:bg-amber-900/20 px-3 py-2.5 text-xs text-amber-700 dark:text-amber-300 flex items-start gap-2",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5 shrink-0 mt-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),e.jsx("span",{children:e.jsx(N,{i18nKey:"integrations.config_id_conflict",components:{strong:e.jsx("strong",{}),em:e.jsx("em",{})}})})]})]}),v&&Object.values(v).map((r,m)=>e.jsx("p",{className:"text-xs text-red-500",children:r},m))]}),x&&e.jsxs("div",{className:`flex items-start gap-2 rounded-lg px-4 py-3 text-sm ${x.ok?"bg-green-50 dark:bg-green-900/30 text-green-800 dark:text-green-200":"bg-red-50 dark:bg-red-900/30 text-red-800 dark:text-red-200"}`,children:[x.ok?e.jsx(T,{className:"h-4 w-4 mt-0.5 shrink-0"}):e.jsx(E,{className:"h-4 w-4 mt-0.5 shrink-0"}),x.message]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx("button",{type:"submit",disabled:y,className:"rounded-lg bg-brand-600 px-5 py-2 text-sm font-medium text-white hover:bg-brand-700 disabled:opacity-60 transition",children:t(y?"integrations.saving":"common.save")}),e.jsxs("button",{type:"button",disabled:w,onClick:z,className:"flex items-center gap-1.5 rounded-lg border border-neutral-300 dark:border-neutral-600 px-4 py-2 text-sm font-medium text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800 disabled:opacity-60 transition",children:[e.jsx(H,{className:"h-4 w-4"}),t(w?"integrations.testing":"integrations.test_connection")]}),!I.includes(a)&&e.jsxs("button",{type:"button",disabled:_,onClick:M,className:"flex items-center gap-1.5 rounded-lg border border-neutral-300 dark:border-neutral-600 px-4 py-2 text-sm font-medium text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-800 disabled:opacity-60 transition",children:[e.jsx(se,{className:"h-4 w-4"}),t(_?"integrations.rotating":"integrations.rotate_webhook_secret")]})]})]}),s.last_test_status!=="untested"&&e.jsxs("div",{className:"text-xs text-neutral-400",children:[t("integrations.last_tested"),": ",s.last_tested_at?F(s.last_tested_at,p):t("integrations.never")," · ",e.jsx("span",{className:s.last_test_status==="ok"?"text-green-500":"text-red-500",children:s.last_test_status}),s.last_test_message&&` · ${s.last_test_message}`]})]})]})}export{$e as default};

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.