onairos 2.1.7 → 2.1.9

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.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("Onairos",["React","ReactDOM"],t):"object"==typeof exports?exports.Onairos=t(require("react"),require("react-dom")):e.Onairos=t(e.React,e.ReactDOM)}(this,((e,t)=>(()=>{"use strict";var n={745:(e,t,n)=>{var s=n(346);t.createRoot=s.createRoot,t.hydrateRoot=s.hydrateRoot},639:t=>{t.exports=e},346:e=>{e.exports=t}},s={};function o(e){var t=s[e];if(void 0!==t)return t.exports;var a=s[e]={exports:{}};return n[e](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&!e;)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var a={};return(()=>{o.r(a);var e=o(639),t=o.n(e),n=o(745);class s extends e.Component{constructor(e){super(e),this.state={connected:!1,open:!1,isConnecting:!1},this.handleClose=this.handleClose.bind(this),this.handleOpen=this.handleOpen.bind(this),this.youtubeConnect=this.youtubeConnect.bind(this),this.setConnected=this.setConnected.bind(this),this.setDisconnected=this.setDisconnected.bind(this)}setConnected(){this.setState({connected:!0}),this.props.onConnectionChange&&this.props.onConnectionChange("YouTube",!0),this.handleClose()}setDisconnected(){this.updateConnections("Remove","Youtube").then((()=>{this.setState({connected:!1}),this.props.onConnectionChange&&this.props.onConnectionChange("YouTube",!1),this.handleClose()})).catch((e=>{console.error("Error removing YouTube connection:",e)}))}async updateConnections(e,t){const n={session:{username:localStorage.getItem("username")||this.props.username},updateType:e,newConnection:t};try{const e=await fetch("https://api2.onairos.uk/connections/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await e.json()}catch(e){throw console.error("UpdateConnections error:",e),e}}handleOpen(){this.setState({open:!0})}handleClose(){this.setState({open:!1}),this.props.onClose&&this.props.onClose()}async youtubeConnect(){this.setState({isConnecting:!0});const e={session:{username:localStorage.getItem("username")||this.props.username}};try{const t=await fetch("https://api2.onairos.uk/youtube/authorize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();n.youtubeURL?window.location.href=n.youtubeURL:(console.error("No YouTube URL received"),this.setState({isConnecting:!1}))}catch(e){console.error("YouTube connection error:",e),this.setState({isConnecting:!1})}}render(){const{open:e=this.props.open||this.state.open}=this.props;return e?t().createElement("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},t().createElement("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden"},t().createElement("div",{className:"p-6"},t().createElement("h2",{className:"text-xl font-bold text-gray-900 mb-4"},"Grant Onairos Access to your YouTube Account?"),t().createElement("div",{className:"space-y-4 text-gray-700"},t().createElement("p",null,"Grant Permission to your YouTube Account, so we can build your Data Models."),t().createElement("div",null,t().createElement("p",{className:"font-medium mb-2"},"We will access your YouTube:"),t().createElement("ul",{className:"list-disc ml-6 space-y-1"},t().createElement("li",null,"Basic Account Info"),t().createElement("li",null,"Liked and Watched Videos"),t().createElement("li",null,"Subscribed Channels and Playlist Videos"))),t().createElement("p",null,"We will delete all the data used once your Model is Created"),t().createElement("p",{className:"text-sm"},t().createElement("a",{href:"https://onairos.uk/compliance-google-policy",className:"text-blue-600 hover:underline"},"Onairos")," ","complies with"," ",t().createElement("a",{href:"https://policies.google.com/privacy",className:"text-blue-600 hover:underline"},"Google API Services User Data Policy"))),t().createElement("div",{className:"flex space-x-3 mt-6"},t().createElement("button",{onClick:this.handleClose,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50"},"Disagree"),t().createElement("button",{onClick:this.youtubeConnect,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50"},this.state.isConnecting?"Connecting...":"Agree"))))):null}}const r=s;class i extends e.Component{constructor(e){super(e),this.state={connected:!1,open:!1,isConnecting:!1},this.handleClose=this.handleClose.bind(this),this.handleOpen=this.handleOpen.bind(this),this.linkedinConnect=this.linkedinConnect.bind(this),this.setConnected=this.setConnected.bind(this),this.setDisconnected=this.setDisconnected.bind(this)}setConnected(){this.setState({connected:!0}),this.props.onConnectionChange&&this.props.onConnectionChange("LinkedIn",!0),this.handleClose()}setDisconnected(){this.updateConnections("Remove","LinkedIn").then((()=>{this.setState({connected:!1}),this.props.onConnectionChange&&this.props.onConnectionChange("LinkedIn",!1),this.handleClose()})).catch((e=>{console.error("Error removing LinkedIn connection:",e)}))}async updateConnections(e,t){const n={session:{username:localStorage.getItem("username")||this.props.username},updateType:e,newConnection:t};try{const e=await fetch("https://api2.onairos.uk/connections/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await e.json()}catch(e){throw console.error("UpdateConnections error:",e),e}}handleOpen(){this.setState({open:!0})}handleClose(){this.setState({open:!1}),this.props.onClose&&this.props.onClose()}async linkedinConnect(){this.setState({isConnecting:!0});const e={session:{username:localStorage.getItem("username")||this.props.username}};try{const t=await fetch("https://api2.onairos.uk/linkedin/authorize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();n.linkedinURL?window.location.href=n.linkedinURL:(console.error("No LinkedIn URL received"),this.setState({isConnecting:!1}))}catch(e){console.error("LinkedIn connection error:",e),this.setState({isConnecting:!1})}}render(){const{open:e=this.props.open||this.state.open}=this.props;return e?t().createElement("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},t().createElement("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden"},t().createElement("div",{className:"p-6"},t().createElement("h2",{className:"text-xl font-bold text-gray-900 mb-4"},"Grant Onairos Access to your LinkedIn Account?"),t().createElement("div",{className:"space-y-4 text-gray-700"},t().createElement("p",null,"Grant Permission to your LinkedIn Account, so we can build your Data Models."),t().createElement("div",null,t().createElement("p",{className:"font-medium mb-2"},"We will access your LinkedIn:"),t().createElement("ul",{className:"list-disc ml-6 space-y-1"},t().createElement("li",null,"Basic Profile Information"),t().createElement("li",null,"Professional Experience"),t().createElement("li",null,"Network Connections"),t().createElement("li",null,"Posts and Activity"))),t().createElement("p",null,"We will delete all the data used once your Model is Created"),t().createElement("p",{className:"text-sm"},t().createElement("a",{href:"https://onairos.uk/privacy-policy",className:"text-blue-600 hover:underline"},"Onairos Privacy Policy")," ","- Your professional data is handled with the highest security standards.")),t().createElement("div",{className:"flex space-x-3 mt-6"},t().createElement("button",{onClick:this.handleClose,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50"},"Disagree"),t().createElement("button",{onClick:this.linkedinConnect,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50"},this.state.isConnecting?"Connecting...":"Agree"))))):null}}const c=i;class l extends e.Component{constructor(e){super(e),this.state={connected:!1,open:!1,isConnecting:!1},this.handleClose=this.handleClose.bind(this),this.handleOpen=this.handleOpen.bind(this),this.instagramConnect=this.instagramConnect.bind(this),this.setConnected=this.setConnected.bind(this),this.setDisconnected=this.setDisconnected.bind(this)}setConnected(){this.setState({connected:!0}),this.props.onConnectionChange&&this.props.onConnectionChange("Instagram",!0),this.handleClose()}setDisconnected(){this.updateConnections("Remove","Instagram").then((()=>{this.setState({connected:!1}),this.props.onConnectionChange&&this.props.onConnectionChange("Instagram",!1),this.handleClose()})).catch((e=>{console.error("Error removing Instagram connection:",e)}))}async updateConnections(e,t){const n={session:{username:localStorage.getItem("username")||this.props.username},updateType:e,newConnection:t};try{const e=await fetch("https://api2.onairos.uk/connections/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await e.json()}catch(e){throw console.error("UpdateConnections error:",e),e}}handleOpen(){this.setState({open:!0})}handleClose(){this.setState({open:!1}),this.props.onClose&&this.props.onClose()}async instagramConnect(){this.setState({isConnecting:!0});const e={session:{username:localStorage.getItem("username")||this.props.username}};try{const t=await fetch("https://api2.onairos.uk/instagram/authorize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();n.instagramURL?window.location.href=n.instagramURL:(console.error("No Instagram URL received"),this.setState({isConnecting:!1}))}catch(e){console.error("Instagram connection error:",e),this.setState({isConnecting:!1})}}render(){const{open:e=this.props.open||this.state.open}=this.props;return e?t().createElement("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},t().createElement("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden"},t().createElement("div",{className:"p-6"},t().createElement("h2",{className:"text-xl font-bold text-gray-900 mb-4"},"Grant Onairos Access to your Instagram Account?"),t().createElement("div",{className:"space-y-4 text-gray-700"},t().createElement("p",null,"Grant Permission to your Instagram Account, so we can build your Data Models."),t().createElement("div",null,t().createElement("p",{className:"font-medium mb-2"},"We will access your Instagram:"),t().createElement("ul",{className:"list-disc ml-6 space-y-1"},t().createElement("li",null,"Basic Profile Information"),t().createElement("li",null,"Posts and Stories"),t().createElement("li",null,"Liked Content"),t().createElement("li",null,"Following and Followers"))),t().createElement("p",null,"We will delete all the data used once your Model is Created"),t().createElement("p",{className:"text-sm"},t().createElement("a",{href:"https://onairos.uk/compliance-meta-policy",className:"text-blue-600 hover:underline"},"Onairos")," ","complies with"," ",t().createElement("a",{href:"https://developers.facebook.com/policy",className:"text-blue-600 hover:underline"},"Meta Platform Policy"))),t().createElement("div",{className:"flex space-x-3 mt-6"},t().createElement("button",{onClick:this.handleClose,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50"},"Disagree"),t().createElement("button",{onClick:this.instagramConnect,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50"},this.state.isConnecting?"Connecting...":"Agree"))))):null}}const d=l;class m extends e.Component{constructor(e){super(e),this.state={connected:!1,open:!1,isConnecting:!1},this.handleClose=this.handleClose.bind(this),this.handleOpen=this.handleOpen.bind(this),this.pinterestConnect=this.pinterestConnect.bind(this),this.setConnected=this.setConnected.bind(this),this.setDisconnected=this.setDisconnected.bind(this)}setConnected(){this.setState({connected:!0}),this.props.onConnectionChange&&this.props.onConnectionChange("Pinterest",!0),this.handleClose()}setDisconnected(){this.updateConnections("Remove","Pinterest").then((()=>{this.setState({connected:!1}),this.props.onConnectionChange&&this.props.onConnectionChange("Pinterest",!1),this.handleClose()})).catch((e=>{console.error("Error removing Pinterest connection:",e)}))}async updateConnections(e,t){const n={session:{username:localStorage.getItem("username")||this.props.username},updateType:e,newConnection:t};try{const e=await fetch("https://api2.onairos.uk/connections/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await e.json()}catch(e){throw console.error("UpdateConnections error:",e),e}}handleOpen(){this.setState({open:!0})}handleClose(){this.setState({open:!1}),this.props.onClose&&this.props.onClose()}async pinterestConnect(){this.setState({isConnecting:!0});const e={session:{username:localStorage.getItem("username")||this.props.username}};try{const t=await fetch("https://api2.onairos.uk/pinterest/authorize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();n.pinterestURL?window.location.href=n.pinterestURL:(console.error("No Pinterest URL received"),this.setState({isConnecting:!1}))}catch(e){console.error("Pinterest connection error:",e),this.setState({isConnecting:!1})}}render(){const{open:e=this.props.open||this.state.open}=this.props;return e?t().createElement("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},t().createElement("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden"},t().createElement("div",{className:"p-6"},t().createElement("h2",{className:"text-xl font-bold text-gray-900 mb-4"},"Grant Onairos Access to your Pinterest Account?"),t().createElement("div",{className:"space-y-4 text-gray-700"},t().createElement("p",null,"Grant Permission to your Pinterest Account, so we can build your Data Models."),t().createElement("div",null,t().createElement("p",{className:"font-medium mb-2"},"We will access your Pinterest:"),t().createElement("ul",{className:"list-disc ml-6 space-y-1"},t().createElement("li",null,"Basic Profile Information"),t().createElement("li",null,"Boards and Pins"),t().createElement("li",null,"Saved and Liked Pins"),t().createElement("li",null,"Following and Followers"))),t().createElement("p",null,"We will delete all the data used once your Model is Created"),t().createElement("p",{className:"text-sm"},t().createElement("a",{href:"https://onairos.uk/privacy-policy",className:"text-blue-600 hover:underline"},"Onairos Privacy Policy")," ","- Your creative interests and preferences are securely processed.")),t().createElement("div",{className:"flex space-x-3 mt-6"},t().createElement("button",{onClick:this.handleClose,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50"},"Disagree"),t().createElement("button",{onClick:this.pinterestConnect,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50"},this.state.isConnecting?"Connecting...":"Agree"))))):null}}const h=m;class u extends e.Component{constructor(e){super(e),this.state={connected:!1,open:!1,isConnecting:!1},this.handleClose=this.handleClose.bind(this),this.handleOpen=this.handleOpen.bind(this),this.redditConnect=this.redditConnect.bind(this),this.setConnected=this.setConnected.bind(this),this.setDisconnected=this.setDisconnected.bind(this)}setConnected(){this.setState({connected:!0}),this.props.onConnectionChange&&this.props.onConnectionChange("Reddit",!0),this.handleClose()}setDisconnected(){this.updateConnections("Remove","Reddit").then((()=>{this.setState({connected:!1}),this.props.onConnectionChange&&this.props.onConnectionChange("Reddit",!1),this.handleClose()})).catch((e=>{console.error("Error removing Reddit connection:",e)}))}async updateConnections(e,t){const n={session:{username:localStorage.getItem("username")||this.props.username},updateType:e,newConnection:t};try{const e=await fetch("https://api2.onairos.uk/connections/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await e.json()}catch(e){throw console.error("UpdateConnections error:",e),e}}handleOpen(){this.setState({open:!0})}handleClose(){this.setState({open:!1}),this.props.onClose&&this.props.onClose()}async redditConnect(){this.setState({isConnecting:!0});const e={session:{username:localStorage.getItem("username")||this.props.username}};try{const t=await fetch("https://api2.onairos.uk/reddit/authorize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();n.redditURL?window.location.href=n.redditURL:(console.error("No Reddit URL received"),this.setState({isConnecting:!1}))}catch(e){console.error("Reddit connection error:",e),this.setState({isConnecting:!1})}}render(){const{open:e=this.props.open||this.state.open}=this.props;return e?t().createElement("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},t().createElement("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden"},t().createElement("div",{className:"p-6"},t().createElement("h2",{className:"text-xl font-bold text-gray-900 mb-4"},"Grant Onairos Access to your Reddit Account?"),t().createElement("div",{className:"space-y-4 text-gray-700"},t().createElement("p",null,"Grant Permission to your Reddit Account, so we can build your Data Models."),t().createElement("div",null,t().createElement("p",{className:"font-medium mb-2"},"We will access your Reddit:"),t().createElement("ul",{className:"list-disc ml-6 space-y-1"},t().createElement("li",null,"Basic Profile Information"),t().createElement("li",null,"Posts and Comments"),t().createElement("li",null,"Upvoted and Saved Content"),t().createElement("li",null,"Subscribed Subreddits"))),t().createElement("p",null,"We will delete all the data used once your Model is Created"),t().createElement("p",{className:"text-sm"},t().createElement("a",{href:"https://onairos.uk/privacy-policy",className:"text-blue-600 hover:underline"},"Onairos Privacy Policy")," ","- Your Reddit activity helps us understand your interests and preferences.")),t().createElement("div",{className:"flex space-x-3 mt-6"},t().createElement("button",{onClick:this.handleClose,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50"},"Disagree"),t().createElement("button",{onClick:this.redditConnect,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50"},this.state.isConnecting?"Connecting...":"Agree"))))):null}}const p=u;class g extends e.Component{constructor(e){super(e),this.state={connected:!1,open:!1,isConnecting:!1},this.handleClose=this.handleClose.bind(this),this.handleOpen=this.handleOpen.bind(this),this.gmailConnect=this.gmailConnect.bind(this),this.setConnected=this.setConnected.bind(this),this.setDisconnected=this.setDisconnected.bind(this)}setConnected(){this.setState({connected:!0}),this.props.onConnectionChange&&this.props.onConnectionChange("Gmail",!0),this.handleClose()}setDisconnected(){this.updateConnections("Remove","Gmail").then((()=>{this.setState({connected:!1}),this.props.onConnectionChange&&this.props.onConnectionChange("Gmail",!1),this.handleClose()})).catch((e=>{console.error("Error removing Gmail connection:",e)}))}async updateConnections(e,t){const n={session:{username:localStorage.getItem("username")||this.props.username},updateType:e,newConnection:t};try{const e=await fetch("https://api2.onairos.uk/connections/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});return await e.json()}catch(e){throw console.error("UpdateConnections error:",e),e}}handleOpen(){this.setState({open:!0})}handleClose(){this.setState({open:!1}),this.props.onClose&&this.props.onClose()}async gmailConnect(){this.setState({isConnecting:!0});const e={session:{username:localStorage.getItem("username")||this.props.username}};try{const t=await fetch("https://api2.onairos.uk/gmail/authorize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();n.gmailURL?window.location.href=n.gmailURL:(console.error("No Gmail URL received"),this.setState({isConnecting:!1}))}catch(e){console.error("Gmail connection error:",e),this.setState({isConnecting:!1})}}render(){const{open:e=this.props.open||this.state.open}=this.props;return e?t().createElement("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},t().createElement("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden"},t().createElement("div",{className:"p-6"},t().createElement("h2",{className:"text-xl font-bold text-gray-900 mb-4"},"Grant Onairos Access to your Gmail Account?"),t().createElement("div",{className:"space-y-4 text-gray-700"},t().createElement("p",null,"Grant Permission to your Gmail Account, so we can build your Data Models."),t().createElement("div",null,t().createElement("p",{className:"font-medium mb-2"},"We will access your Gmail:"),t().createElement("ul",{className:"list-disc ml-6 space-y-1"},t().createElement("li",null,"Basic Account Information"),t().createElement("li",null,"Email Metadata (subjects, dates, senders)"),t().createElement("li",null,"Email Categories and Labels"),t().createElement("li",null,"Communication Patterns"))),t().createElement("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-3"},t().createElement("p",{className:"text-yellow-800 text-sm font-medium"},t().createElement("strong",null,"Note:")," We do NOT read the content of your emails. Only metadata is processed.")),t().createElement("p",null,"We will delete all the data used once your Model is Created"),t().createElement("p",{className:"text-sm"},t().createElement("a",{href:"https://onairos.uk/compliance-google-policy",className:"text-blue-600 hover:underline"},"Onairos")," ","complies with"," ",t().createElement("a",{href:"https://policies.google.com/privacy",className:"text-blue-600 hover:underline"},"Google API Services User Data Policy"))),t().createElement("div",{className:"flex space-x-3 mt-6"},t().createElement("button",{onClick:this.handleClose,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50"},"Disagree"),t().createElement("button",{onClick:this.gmailConnect,disabled:this.state.isConnecting,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50"},this.state.isConnecting?"Connecting...":"Agree"))))):null}}const b=g;function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x=[{name:"YouTube",icon:"📺",color:"bg-red-500",connector:"youtube"},{name:"Reddit",icon:"🔥",color:"bg-orange-500",connector:"reddit"},{name:"Instagram",icon:"📷",color:"bg-pink-500",connector:"instagram"},{name:"Pinterest",icon:"📌",color:"bg-red-600",connector:"pinterest"},{name:"LinkedIn",icon:"💼",color:"bg-blue-700",connector:"linkedin"},{name:"Gmail",icon:"📧",color:"bg-red-500",connector:"gmail"}];function w(n){let{onComplete:s,appIcon:o,appName:a="App",username:i}=n;const[l,m]=(0,e.useState)({}),[u,g]=(0,e.useState)(!1),[y,C]=(0,e.useState)(null),w=(e,t)=>{m((n=>f(f({},n),{},{[e]:t}))),C(null)},v=Object.values(l).filter(Boolean).length;return t().createElement("div",{className:"w-full max-w-md mx-auto bg-white rounded-lg shadow-xl overflow-hidden",style:{maxHeight:"90vh",height:"auto"}},t().createElement("div",{className:"p-4 sm:p-6 overflow-y-auto",style:{maxHeight:"calc(90vh - 4rem)"}},t().createElement("div",{className:"flex items-center justify-center mb-4 sm:mb-6"},t().createElement("div",{className:"flex items-center space-x-3"},t().createElement("img",{src:o||"https://onairos.sirv.com/Images/OnairosBlack.png",alt:a,className:"w-8 h-8 sm:w-10 sm:h-10 rounded-lg"}),t().createElement("div",{className:"flex items-center text-gray-400"},t().createElement("svg",{className:"w-5 h-5 sm:w-6 sm:h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t().createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"}))),t().createElement("img",{src:"https://onairos.sirv.com/Images/OnairosBlack.png",alt:"Onairos",className:"w-8 h-8 sm:w-10 sm:h-10 rounded-lg"}))),t().createElement("div",{className:"text-center mb-4 sm:mb-6"},t().createElement("h2",{className:"text-lg sm:text-xl font-bold text-gray-900 mb-2"},"Connect Your Accounts"),t().createElement("p",{className:"text-gray-600 text-xs sm:text-sm"},"Choose which accounts to connect for a personalized experience")),t().createElement("div",{className:"mb-4 sm:mb-6 p-2 sm:p-3 bg-blue-50 border border-blue-200 rounded-lg"},t().createElement("p",{className:"text-blue-800 text-xs sm:text-sm"},"🔒 Your data is never shared with anyone. It's only used to train your personal model and is stored securely.")),t().createElement("div",{className:"space-y-2 sm:space-y-3 mb-4 sm:mb-6"},x.map((e=>{const n=l[e.name]||!1;return t().createElement("div",{key:e.name,className:"flex items-center justify-between p-3 sm:p-4 border rounded-lg hover:bg-gray-50 transition-colors"},t().createElement("div",{className:"flex items-center space-x-3"},t().createElement("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-lg ".concat(e.color," flex items-center justify-center text-white text-base sm:text-lg")},e.icon),t().createElement("div",null,t().createElement("h3",{className:"font-medium text-gray-900 text-sm sm:text-base"},e.name),t().createElement("p",{className:"text-xs sm:text-sm text-gray-500"},n?"Connected":"Not connected"))),t().createElement("button",{onClick:()=>(async(e,t)=>{if(u)return;l[e]?m((t=>f(f({},t),{},{[e]:!1}))):C(t)})(e.name,e.connector),disabled:u,className:"relative inline-flex h-5 sm:h-6 w-9 sm:w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 ".concat(n?"bg-blue-600":"bg-gray-200"," ").concat(u?"opacity-50 cursor-not-allowed":"cursor-pointer")},t().createElement("span",{className:"inline-block h-3 sm:h-4 w-3 sm:w-4 transform rounded-full bg-white transition-transform ".concat(n?"translate-x-5 sm:translate-x-6":"translate-x-1")})))}))),v>0&&t().createElement("div",{className:"mb-3 sm:mb-4 p-2 sm:p-3 bg-green-50 border border-green-200 rounded-lg"},t().createElement("p",{className:"text-green-800 text-xs sm:text-sm"},"✅ ",v," account",v>1?"s":""," connected")),t().createElement("button",{onClick:()=>{const e=Object.entries(l).filter((e=>{let[t,n]=e;return n})).map((e=>{let[t]=e;return t}));s({connectedAccounts:e,totalConnections:e.length})},disabled:0===v,className:"w-full py-2 sm:py-3 px-4 rounded-lg font-semibold transition-colors text-sm sm:text-base ".concat(v>0?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-300 text-gray-500 cursor-not-allowed")},"Continue ",v>0?"with ".concat(v," account").concat(v>1?"s":""):""),t().createElement("button",{onClick:()=>s({connectedAccounts:[],totalConnections:0}),className:"w-full mt-2 py-2 text-gray-500 hover:text-gray-700 text-xs sm:text-sm"},"Skip for now")),t().createElement(r,{open:"youtube"===y,onClose:()=>C(null),onConnectionChange:w,username:i}),t().createElement(c,{open:"linkedin"===y,onClose:()=>C(null),onConnectionChange:w,username:i}),t().createElement(d,{open:"instagram"===y,onClose:()=>C(null),onConnectionChange:w,username:i}),t().createElement(h,{open:"pinterest"===y,onClose:()=>C(null),onConnectionChange:w,username:i}),t().createElement(p,{open:"reddit"===y,onClose:()=>C(null),onConnectionChange:w,username:i}),t().createElement(b,{open:"gmail"===y,onClose:()=>C(null),onConnectionChange:w,username:i}))}const v=e=>t().createElement("div",{className:"relative inline-flex items-center"},t().createElement("input",{type:"checkbox",id:"request-".concat(e.number),disabled:!e.active,onChange:t=>{const n=t.target.checked;console.log("Checkbox ".concat(e.title," is now: ").concat(n?"checked":"unchecked")),n?(e.setSelected(!0),e.changeGranted(1)):(e.setSelected(!1),e.changeGranted(-1)),e.onSelectionChange(n)},className:"\n appearance-none w-5 h-5 border rounded\n ".concat(e.active?"border-blue-500 cursor-pointer":"border-gray-300 bg-gray-100 cursor-not-allowed","\n checked:bg-blue-600 checked:border-blue-600\n focus:outline-none focus:ring-2 focus:ring-blue-500/30\n transition-colors\n ")}),t().createElement("svg",{className:"absolute left-0.5 top-0.5 w-4 h-4 text-white pointer-events-none opacity-0 peer-checked:opacity-100",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t().createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M5 13l4 4L19 7"})),!e.active&&t().createElement("span",{className:"ml-2 text-xs text-red-500 font-medium"},"Not available"));const E=function(n){const[s,o]=(0,e.useState)(!1);return t().createElement("div",{className:"bg-white rounded-xl shadow-sm hover:shadow-md transition-all overflow-hidden"},t().createElement("div",{className:"p-5"},t().createElement("div",{className:"flex items-start space-x-4"},(()=>{switch(n.title){case"Profile":return t().createElement("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center"},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-blue-600",viewBox:"0 0 20 20",fill:"currentColor"},t().createElement("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})));case"User Memories":return t().createElement("div",{className:"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center"},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-purple-600",viewBox:"0 0 20 20",fill:"currentColor"},t().createElement("path",{d:"M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z"})));default:return t().createElement("div",{className:"w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center"},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-600",viewBox:"0 0 20 20",fill:"currentColor"},t().createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})))}})(),t().createElement("div",{className:"flex-1"},t().createElement("div",{className:"flex items-center justify-between"},t().createElement("h3",{className:"font-medium text-gray-800"},n.title),t().createElement(v,{active:n.active,onSelectionChange:e=>{o(e),n.onSelectionChange(e)},changeGranted:n.changeGranted,setSelected:o,number:n.number+1,type:"Test",title:n.title})),n.descriptions&&t().createElement("div",{className:"mt-2"},t().createElement("p",{className:"text-sm text-gray-600"},n.descriptions)))),n.rewards&&t().createElement("div",{className:"mt-3 pt-3 border-t border-gray-100"},t().createElement("div",{className:"flex items-center"},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-yellow-500 mr-2",viewBox:"0 0 20 20",fill:"currentColor"},t().createElement("path",{fillRule:"evenodd",d:"M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z",clipRule:"evenodd"})),t().createElement("span",{className:"text-xs text-gray-500"},"Benefit: ",t().createElement("span",{className:"text-gray-700"},n.rewards))))))},N=o.p+"static/ca60d8c79124e56d8c1c.png",S=n=>{let{requestData:s={},dataRequester:o="App",proofMode:a=!1,domain:r="",appIcon:i=""}=n;const[c,l]=(0,e.useState)(!0),[d,m]=(0,e.useState)([]),[h,u]=(0,e.useState)(0),[p,g]=(0,e.useState)(!1),[b,y]=(0,e.useState)(["instagram","youtube","email"]),[f,C]=(0,e.useState)({}),x=(0,e.useRef)([]),v=(0,e.useRef)(null),S=(0,e.useRef)(null);function O(e){u(h+e)}return(0,e.useEffect)((()=>{g(h>0)}),[h]),(0,e.useEffect)((()=>{(async()=>{try{await new Promise((e=>setTimeout(e,1e3))),m(["Profile","User Memories"]),l(!1)}catch(e){console.error("Error loading data:",e),l(!1)}})();const e=e=>{e.data&&"dataRequest"===e.data.type&&(e.data.requestData,e.data.activeModels&&m(e.data.activeModels),e.data.userSub&&(v.current=e.data.userSub),e.data.encryptedUserPin&&(S.current=e.data.encryptedUserPin))};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[]),t().createElement("div",{className:"min-h-screen bg-gray-100"},c?t().createElement("div",{className:"flex items-center justify-center min-h-screen"},t().createElement("div",{className:"animate-spin h-8 w-8 border-2 border-blue-600 rounded-full border-t-transparent"})):0===d.length?t().createElement(w,{appIcon:"https://onairos.sirv.com/Images/OnairosBlack.png",appName:o,username:localStorage.getItem("username")}):t().createElement("div",{className:"max-w-md mx-auto p-6 space-y-4"},t().createElement("header",{className:"bg-white p-6 rounded-xl shadow-md"},t().createElement("div",{className:"flex items-center justify-between mb-6"},t().createElement("div",{className:"flex items-center space-x-2"},t().createElement("img",{src:N,alt:"Onairos Logo",className:"w-8 h-8"}),t().createElement("div",{className:"text-gray-400 mx-2"},"→"),i?t().createElement("img",{src:i,alt:"".concat(o," Logo"),className:"w-8 h-8 rounded-full"}):t().createElement("div",{className:"w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center"},t().createElement("span",{className:"text-gray-600 text-xs font-bold"},o.charAt(0)))),t().createElement("h2",{className:"text-lg font-bold text-gray-800"},o)),t().createElement("h1",{className:"text-xl font-bold text-gray-800 mb-4"},"Data Access Request"),t().createElement("p",{className:"text-gray-600 mb-6"},"Select the data you want to share with ",o),t().createElement("div",{className:"flex items-center justify-between gap-4"},t().createElement("button",{onClick:async function(){window.top.postMessage({type:"closeIframe"},"*"),window.postMessage({type:"closeIframe"},"*")},className:"border w-full border border-gray-300 hover:bg-gray-50 text-gray-700 font-medium py-3 px-4 rounded-lg transition-colors"},"Decline"),t().createElement("button",{disabled:!p,onClick:async function(){if(0!==h){const e={message:"Confirm "+o+" Data Access",confirmations:x.current};try{window.top.postMessage({type:"dataRequestComplete",approved:x.current,message:e},"*"),window.postMessage({type:"dataRequestComplete",approved:x.current,message:e},"*")}catch(e){console.error("Error sending data request:",e),window.close()}}else window.close()},className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed"},"Approve ",h>0&&"(".concat(h,")")))),t().createElement("div",{className:"space-y-3"},["Profile","User Memories"].map(((e,n)=>{const s=e.toLowerCase().replace(" ","_"),a={type:e,descriptions:"Profile"===e?"Basic profile information and preferences":"Your personal context and memory data",reward:"Profile"===e?"Personalized experience":"Contextual understanding of your preferences"};return t().createElement(E,{key:s,active:!0,title:a.type,id:a,number:n,descriptions:a.descriptions,rewards:a.reward,size:s,changeGranted:O,onSelectionChange:e=>function(e,t,n,s,o,a){const r=new Date,i={requester:e,date:r.toISOString(),name:s,reward:o,data:t};a?(console.log("Adding connection: ".concat(JSON.stringify(i))),x.current.find((n=>n.requester===e&&n.data===t))||x.current.push(i)):(console.log("Removing connection for: ".concat(t)),x.current=x.current.filter((n=>!(n.requester===e&&n.data===t)))),console.log("Current selected connections:",x.current)}(o,s,0,a.type,a.reward,e)})})),t().createElement("div",{className:"bg-white p-4 rounded-xl shadow-sm mt-4"},t().createElement("h3",{className:"text-sm font-semibold text-gray-700 mb-3"},"Your Connected Services"),t().createElement("div",{className:"flex items-center space-x-3"},b.map(((e,n)=>t().createElement("div",{key:n,className:"flex flex-col items-center"},(e=>{switch(e){case"instagram":return t().createElement("div",{className:"w-10 h-10 rounded-full bg-gradient-to-tr from-purple-500 via-pink-500 to-yellow-500 flex items-center justify-center"},t().createElement("span",{className:"text-white text-xs"},"IG"));case"youtube":return t().createElement("div",{className:"w-10 h-10 rounded-full bg-red-600 flex items-center justify-center"},t().createElement("span",{className:"text-white text-xs"},"YT"));case"email":return t().createElement("div",{className:"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center"},t().createElement("span",{className:"text-white text-xs"},"@"));default:return t().createElement("div",{className:"w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center"},t().createElement("span",{className:"text-gray-600 text-xs"},e.charAt(0).toUpperCase()))}})(e),t().createElement("span",{className:"text-xs text-gray-600 mt-1"},e)))))))))};let O=!1,k="",P=null,j=null;function R(){n.createRoot(document.getElementById("root")).render(t().createElement(S,{proofMode:O,domain:k,userSub:P,encryptedUserPin:j}))}window.addEventListener("message",(e=>{e.data&&"onairosButton"===e.data.source&&(O=e.data.proofMode||!1,k=e.data.domain||"",P=e.data.userSub||null,j=e.data.encryptedUserPin||null,R())})),window.parent.postMessage({source:"onairosIframe",action:"iframeReady"},"*"),R()})(),a})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("Onairos",["React","ReactDOM"],t):"object"==typeof exports?exports.Onairos=t(require("react"),require("react-dom")):e.Onairos=t(e.React,e.ReactDOM)}(this,((e,t)=>(()=>{"use strict";var a={745:(e,t,a)=>{var r=a(346);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},639:t=>{t.exports=e},346:e=>{e.exports=t}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return a[e](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var a=t.getElementsByTagName("script");if(a.length)for(var r=a.length-1;r>-1&&!e;)e=a[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})();var o={};return(()=>{n.r(o);var e=n(639),t=n.n(e),a=n(745);function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?r(Object(a),!0).forEach((function(t){l(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function l(e,t,a){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const s=[{name:"YouTube",icon:"📺",color:"bg-red-500",connector:"youtube"},{name:"LinkedIn",icon:"💼",color:"bg-blue-700",connector:"linkedin"},{name:"Reddit",icon:"🔥",color:"bg-orange-500",connector:"reddit"},{name:"Pinterest",icon:"📌",color:"bg-red-600",connector:"pinterest"},{name:"Instagram",icon:"📷",color:"bg-pink-500",connector:"instagram"},{name:"GitHub",icon:"⚡",color:"bg-gray-800",connector:"github"},{name:"Facebook",icon:"👥",color:"bg-blue-600",connector:"facebook"},{name:"Gmail",icon:"✉️",color:"bg-red-400",connector:"gmail"}],i={apiKey:process.env.REACT_APP_ONAIROS_API_KEY||"onairos_web_sdk_live_key_2024",baseUrl:process.env.REACT_APP_ONAIROS_BASE_URL||"https://api2.onairos.uk",sdkType:"web",enableHealthMonitoring:!0,enableAutoRefresh:!0,enableConnectionValidation:!0};function m(a){let{onComplete:r,appIcon:n,appName:o="App"}=a;const[l,m]=(0,e.useState)({}),[d,u]=(0,e.useState)(!1),[p,g]=(0,e.useState)(null),[f,b]=(0,e.useState)({}),[h,w]=(0,e.useState)({}),[v,y]=(0,e.useState)(0);(0,e.useEffect)((()=>{(()=>{const e=localStorage.getItem("onairos_oauth_platform");e&&(console.log("📱 OAuth return detected for: ".concat(e)),localStorage.removeItem("onairos_oauth_platform"),localStorage.removeItem("onairos_oauth_return"),m((t=>c(c({},t),{},{[e]:!0}))),b((t=>c(c({},t),{},{[e]:null}))),console.log("✅ ".concat(e," marked as connected from OAuth return")))})()}),[]);const x=async e=>{console.log("🚀 connectToPlatform called for: ".concat(e));const t=s.find((t=>t.name===e));if(null==t||!t.connector)return console.error("❌ No connector found for platform: ".concat(e)),!1;try{var a;u(!0),g(e),b((t=>c(c({},t),{},{[e]:null}))),console.log("🔗 Starting OAuth connection for ".concat(e,"..."));const r=localStorage.getItem("username")||(null===(a=localStorage.getItem("onairosUser"))||void 0===a?void 0:a.email)||"user@example.com",n="".concat(i.baseUrl,"/").concat(t.connector,"/authorize"),o=await fetch(n,{method:"POST",headers:{"x-api-key":i.apiKey,"Content-Type":"application/json"},body:JSON.stringify({session:{username:r,sdkType:i.sdkType,returnUrl:window.location.href,platform:e}})});if(!o.ok)throw new Error("HTTP ".concat(o.status,": ").concat(o.statusText));const l=await o.json(),s=l["".concat(t.connector,"Url")];if(!s)throw new Error("No OAuth URL received for ".concat(e));if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=768)return localStorage.setItem("onairos_oauth_platform",e),localStorage.setItem("onairos_oauth_return",window.location.href),window.location.href=s,!0;{const a=window.open(s,"".concat(t.connector,"_oauth"),"width=500,height=600,scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no");if(!a)throw new Error("Popup blocked. Please allow popups and try again.");const r=setInterval((()=>{try{if(a.closed){clearInterval(r);const t=localStorage.getItem("onairos_".concat(e,"_success")),a=localStorage.getItem("onairos_".concat(e,"_error")),n=localStorage.getItem("onairos_".concat(e,"_timestamp")),o=n&&Date.now()-parseInt(n)<3e4;t&&o?(console.log("✅ ".concat(e," OAuth completed successfully")),localStorage.removeItem("onairos_".concat(e,"_success")),localStorage.removeItem("onairos_".concat(e,"_timestamp")),m((t=>c(c({},t),{},{[e]:!0}))),b((t=>c(c({},t),{},{[e]:null})))):a&&o?(console.log("❌ ".concat(e," OAuth failed:"),a),localStorage.removeItem("onairos_".concat(e,"_error")),localStorage.removeItem("onairos_".concat(e,"_timestamp")),b((t=>c(c({},t),{},{[e]:a})))):(console.log("⚠️ ".concat(e," OAuth cancelled or no response")),b((t=>c(c({},t),{},{[e]:"Connection was cancelled"})))),u(!1),g(null)}}catch(e){}}),1e3);return setTimeout((()=>{a.closed||(a.close(),clearInterval(r),b((t=>c(c({},t),{},{[e]:"Connection timeout"}))),u(!1),g(null))}),3e5),!0}}catch(t){return console.error("❌ Error connecting to ".concat(e,":"),t),b((a=>c(c({},a),{},{[e]:t.message}))),u(!1),g(null),!1}},E=Object.values(l).filter(Boolean).length;return t().createElement("div",{className:"max-w-sm mx-auto bg-white p-4 rounded-lg shadow-lg"},t().createElement("div",{className:"flex items-center justify-center mb-4"},t().createElement("div",{className:"flex items-center space-x-2"},t().createElement("img",{src:n||"https://onairos.sirv.com/Images/OnairosBlack.png",alt:o,className:"w-8 h-8 rounded-lg"}),t().createElement("div",{className:"flex items-center text-gray-400"},t().createElement("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},t().createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"}))),t().createElement("img",{src:"https://onairos.sirv.com/Images/OnairosBlack.png",alt:"Onairos",className:"w-8 h-8 rounded-lg"}))),t().createElement("div",{className:"text-center mb-4"},t().createElement("h2",{className:"text-lg font-bold text-gray-900 mb-1"},"Connect Data"),t().createElement("p",{className:"text-gray-600 text-sm"},"Connect data here to enhance your ",o," experience")),t().createElement("div",{className:"grid grid-cols-2 gap-3 mb-4"},s.map((e=>{const a=l[e.name]||!1,r=p===e.name,n=f[e.name],o=d&&!r;return t().createElement("div",{key:e.name,className:"relative p-3 border-2 rounded-lg transition-all duration-200 cursor-pointer ".concat(o?"opacity-50 cursor-not-allowed":"hover:shadow-md"," ").concat(a?"border-green-400 bg-green-50":n?"border-red-400 bg-red-50":r?"border-blue-400 bg-blue-50":"border-gray-200 bg-white hover:border-gray-300"),onClick:()=>!o&&(async e=>{if(console.log("🔥 TOGGLE CLICKED: ".concat(e)),d&&p!==e)return void console.log("⚠️ Already connecting to ".concat(p,", ignoring click on ").concat(e));l[e]?(console.log("🔌 Disconnecting from ".concat(e,"...")),m((t=>c(c({},t),{},{[e]:!1}))),b((t=>c(c({},t),{},{[e]:null})))):await x(e)})(e.name)},t().createElement("div",{className:"w-8 h-8 rounded-lg ".concat(e.color," flex items-center justify-center text-white text-lg mb-2 mx-auto relative")},r?t().createElement("div",{className:"animate-spin h-4 w-4 border-2 border-white rounded-full border-t-transparent"}):e.icon,a&&!r&&t().createElement("div",{className:"absolute -top-1 -right-1 w-4 h-4 bg-green-500 rounded-full flex items-center justify-center"},t().createElement("svg",{className:"w-2.5 h-2.5 text-white",fill:"currentColor",viewBox:"0 0 20 20"},t().createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))),n&&!r&&t().createElement("div",{className:"absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full flex items-center justify-center"},t().createElement("svg",{className:"w-2.5 h-2.5 text-white",fill:"currentColor",viewBox:"0 0 20 20"},t().createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})))),t().createElement("div",{className:"text-center"},t().createElement("h3",{className:"font-medium text-gray-900 text-xs"},e.name),t().createElement("p",{className:"text-xs mt-1 ".concat(r?"text-blue-600":a?"text-green-600":n?"text-red-600":"text-gray-500")},r?"Connecting...":a?"Connected":n?"Failed":"Tap to connect"),n&&t().createElement("p",{className:"text-xs text-red-600 mt-1 break-words"},n)))}))),E>0&&t().createElement("div",{className:"mb-4 p-2 bg-green-50 border border-green-200 rounded-lg"},t().createElement("p",{className:"text-green-800 text-sm text-center"},"✅ ",E," connection",E>1?"s":""," active")),t().createElement("button",{onClick:()=>{const e=Object.entries(l).filter((e=>{let[t,a]=e;return a})).map((e=>{let[t]=e;return t}));r({connectedAccounts:e,totalConnections:e.length,healthScore:v,connectionHealth:h,sdkVersion:"2.1.7",enhancedFeatures:{healthMonitoring:i.enableHealthMonitoring,autoRefresh:i.enableAutoRefresh,connectionValidation:i.enableConnectionValidation}})},disabled:0===E,className:"w-full py-3 px-4 rounded-lg font-semibold transition-colors ".concat(E>0?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-300 text-gray-500 cursor-not-allowed")},E>0?"Continue with ".concat(E," connection").concat(E>1?"s":""):"Connect at least one platform"),t().createElement("button",{onClick:()=>r({connectedAccounts:[],totalConnections:0}),className:"w-full mt-2 py-2 text-gray-500 hover:text-gray-700 text-sm"},"Skip for now"))}const d=e=>t().createElement("div",{className:"relative inline-flex items-center"},t().createElement("input",{type:"checkbox",id:"request-".concat(e.number),disabled:!e.active,onChange:t=>{const a=t.target.checked;console.log("Checkbox ".concat(e.title," is now: ").concat(a?"checked":"unchecked")),a?(e.setSelected(!0),e.changeGranted(1)):(e.setSelected(!1),e.changeGranted(-1)),e.onSelectionChange(a)},className:"\n appearance-none w-5 h-5 border rounded\n ".concat(e.active?"border-blue-500 cursor-pointer":"border-gray-300 bg-gray-100 cursor-not-allowed","\n checked:bg-blue-600 checked:border-blue-600\n focus:outline-none focus:ring-2 focus:ring-blue-500/30\n transition-colors\n ")}),t().createElement("svg",{className:"absolute left-0.5 top-0.5 w-4 h-4 text-white pointer-events-none opacity-0 peer-checked:opacity-100",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t().createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M5 13l4 4L19 7"})),!e.active&&t().createElement("span",{className:"ml-2 text-xs text-red-500 font-medium"},"Not available"));const u=function(a){const[r,n]=(0,e.useState)(!1);return t().createElement("div",{className:"bg-white rounded-xl shadow-sm hover:shadow-md transition-all overflow-hidden"},t().createElement("div",{className:"p-5"},t().createElement("div",{className:"flex items-start space-x-4"},(()=>{switch(a.title){case"Profile":return t().createElement("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center"},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-blue-600",viewBox:"0 0 20 20",fill:"currentColor"},t().createElement("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})));case"User Memories":return t().createElement("div",{className:"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center"},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-purple-600",viewBox:"0 0 20 20",fill:"currentColor"},t().createElement("path",{d:"M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z"})));default:return t().createElement("div",{className:"w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center"},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-600",viewBox:"0 0 20 20",fill:"currentColor"},t().createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})))}})(),t().createElement("div",{className:"flex-1"},t().createElement("div",{className:"flex items-center justify-between"},t().createElement("h3",{className:"font-medium text-gray-800"},a.title),t().createElement(d,{active:a.active,onSelectionChange:e=>{n(e),a.onSelectionChange(e)},changeGranted:a.changeGranted,setSelected:n,number:a.number+1,type:"Test",title:a.title})),a.descriptions&&t().createElement("div",{className:"mt-2"},t().createElement("p",{className:"text-sm text-gray-600"},a.descriptions)))),a.rewards&&t().createElement("div",{className:"mt-3 pt-3 border-t border-gray-100"},t().createElement("div",{className:"flex items-center"},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-yellow-500 mr-2",viewBox:"0 0 20 20",fill:"currentColor"},t().createElement("path",{fillRule:"evenodd",d:"M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z",clipRule:"evenodd"})),t().createElement("span",{className:"text-xs text-gray-500"},"Benefit: ",t().createElement("span",{className:"text-gray-700"},a.rewards))))))},p=n.p+"static/ca60d8c79124e56d8c1c.png",g=a=>{let{requestData:r={},dataRequester:n="App",proofMode:o=!1,domain:c="",appIcon:l=""}=a;const[s,i]=(0,e.useState)(!0),[d,g]=(0,e.useState)([]),[f,b]=(0,e.useState)(0),[h,w]=(0,e.useState)(!1),[v,y]=(0,e.useState)(["instagram","youtube","email"]),[x,E]=(0,e.useState)({}),N=(0,e.useRef)([]),S=(0,e.useRef)(null),O=(0,e.useRef)(null);function k(e){b(f+e)}return(0,e.useEffect)((()=>{w(f>0)}),[f]),(0,e.useEffect)((()=>{(async()=>{try{await new Promise((e=>setTimeout(e,1e3))),g(["Profile","User Memories"]),i(!1)}catch(e){console.error("Error loading data:",e),i(!1)}})();const e=e=>{e.data&&"dataRequest"===e.data.type&&(e.data.requestData,e.data.activeModels&&g(e.data.activeModels),e.data.userSub&&(S.current=e.data.userSub),e.data.encryptedUserPin&&(O.current=e.data.encryptedUserPin))};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[]),t().createElement("div",{className:"min-h-screen bg-gray-100"},s?t().createElement("div",{className:"flex items-center justify-center min-h-screen"},t().createElement("div",{className:"animate-spin h-8 w-8 border-2 border-blue-600 rounded-full border-t-transparent"})):0===d.length?t().createElement(m,{appIcon:"https://onairos.sirv.com/Images/OnairosBlack.png",appName:n,username:localStorage.getItem("username")}):t().createElement("div",{className:"max-w-md mx-auto p-6 space-y-4"},t().createElement("header",{className:"bg-white p-6 rounded-xl shadow-md"},t().createElement("div",{className:"flex items-center justify-between mb-6"},t().createElement("div",{className:"flex items-center space-x-2"},t().createElement("img",{src:p,alt:"Onairos Logo",className:"w-8 h-8"}),t().createElement("div",{className:"text-gray-400 mx-2"},"→"),l?t().createElement("img",{src:l,alt:"".concat(n," Logo"),className:"w-8 h-8 rounded-full"}):t().createElement("div",{className:"w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center"},t().createElement("span",{className:"text-gray-600 text-xs font-bold"},n.charAt(0)))),t().createElement("h2",{className:"text-lg font-bold text-gray-800"},n)),t().createElement("h1",{className:"text-xl font-bold text-gray-800 mb-4"},"Data Access Request"),t().createElement("p",{className:"text-gray-600 mb-6"},"Select the data you want to share with ",n),t().createElement("div",{className:"flex items-center justify-between gap-4"},t().createElement("button",{onClick:async function(){window.top.postMessage({type:"closeIframe"},"*"),window.postMessage({type:"closeIframe"},"*")},className:"border w-full border border-gray-300 hover:bg-gray-50 text-gray-700 font-medium py-3 px-4 rounded-lg transition-colors"},"Decline"),t().createElement("button",{disabled:!h,onClick:async function(){if(0!==f){const e={message:"Confirm "+n+" Data Access",confirmations:N.current};try{window.top.postMessage({type:"dataRequestComplete",approved:N.current,message:e},"*"),window.postMessage({type:"dataRequestComplete",approved:N.current,message:e},"*")}catch(e){console.error("Error sending data request:",e),window.close()}}else window.close()},className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed"},"Approve ",f>0&&"(".concat(f,")")))),t().createElement("div",{className:"space-y-3"},["Profile","User Memories"].map(((e,a)=>{const r=e.toLowerCase().replace(" ","_"),o={type:e,descriptions:"Profile"===e?"Basic profile information and preferences":"Your personal context and memory data",reward:"Profile"===e?"Personalized experience":"Contextual understanding of your preferences"};return t().createElement(u,{key:r,active:!0,title:o.type,id:o,number:a,descriptions:o.descriptions,rewards:o.reward,size:r,changeGranted:k,onSelectionChange:e=>function(e,t,a,r,n,o){const c=new Date,l={requester:e,date:c.toISOString(),name:r,reward:n,data:t};o?(console.log("Adding connection: ".concat(JSON.stringify(l))),N.current.find((a=>a.requester===e&&a.data===t))||N.current.push(l)):(console.log("Removing connection for: ".concat(t)),N.current=N.current.filter((a=>!(a.requester===e&&a.data===t)))),console.log("Current selected connections:",N.current)}(n,r,0,o.type,o.reward,e)})})),t().createElement("div",{className:"bg-white p-4 rounded-xl shadow-sm mt-4"},t().createElement("h3",{className:"text-sm font-semibold text-gray-700 mb-3"},"Your Connected Services"),t().createElement("div",{className:"flex items-center space-x-3"},v.map(((e,a)=>t().createElement("div",{key:a,className:"flex flex-col items-center"},(e=>{switch(e){case"instagram":return t().createElement("div",{className:"w-10 h-10 rounded-full bg-gradient-to-tr from-purple-500 via-pink-500 to-yellow-500 flex items-center justify-center"},t().createElement("span",{className:"text-white text-xs"},"IG"));case"youtube":return t().createElement("div",{className:"w-10 h-10 rounded-full bg-red-600 flex items-center justify-center"},t().createElement("span",{className:"text-white text-xs"},"YT"));case"email":return t().createElement("div",{className:"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center"},t().createElement("span",{className:"text-white text-xs"},"@"));default:return t().createElement("div",{className:"w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center"},t().createElement("span",{className:"text-gray-600 text-xs"},e.charAt(0).toUpperCase()))}})(e),t().createElement("span",{className:"text-xs text-gray-600 mt-1"},e)))))))))};let f=!1,b="",h=null,w=null;function v(){a.createRoot(document.getElementById("root")).render(t().createElement(g,{proofMode:f,domain:b,userSub:h,encryptedUserPin:w}))}window.addEventListener("message",(e=>{e.data&&"onairosButton"===e.data.source&&(f=e.data.proofMode||!1,b=e.data.domain||"",h=e.data.userSub||null,w=e.data.encryptedUserPin||null,v())})),window.parent.postMessage({source:"onairosIframe",action:"iframeReady"},"*"),v()})(),o})()));
2
2
  //# sourceMappingURL=iframe.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"iframe.bundle.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,cAC1B,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,UAAW,CAAC,QAAS,YAAaJ,GACf,iBAAZC,QACdA,QAAiB,QAAID,EAAQG,QAAQ,SAAUA,QAAQ,cAEvDJ,EAAc,QAAIC,EAAQD,EAAY,MAAGA,EAAe,SACzD,CATD,CASGO,MAAM,CAACC,EAAkCC,I,wCCP5C,IAAIC,EAAI,EAAQ,KAEdR,EAAQS,WAAaD,EAAEC,WACvBT,EAAQU,YAAcF,EAAEE,W,UCL1BT,EAAOD,QAAUM,C,UCAjBL,EAAOD,QAAUO,C,GCCbI,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAad,QAGrB,IAAIC,EAASU,EAAyBE,GAAY,CAGjDb,QAAS,CAAC,GAOX,OAHAgB,EAAoBH,GAAUZ,EAAQA,EAAOD,QAASY,GAG/CX,EAAOD,OACf,CCrBAY,EAAoBK,EAAKhB,IACxB,IAAIiB,EAASjB,GAAUA,EAAOkB,WAC7B,IAAOlB,EAAiB,QACxB,IAAM,EAEP,OADAW,EAAoBQ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C,EAASwB,EAAMC,KAAKzB,QAAU,GAC9Be,EAAUS,EAAMC,KAAKV,SAAW,KAChCC,EAAmBQ,EAAMC,KAAKT,kBAAoB,KAGlDyC,IACF,IAIFnN,OAAOwN,OAAO9B,YAAY,CACxB6B,OAAQ,gBACRE,OAAQ,eACP,KAgBHN,G","sources":["webpack://Onairos/webpack/universalModuleDefinition","webpack://Onairos/./node_modules/react-dom/client.js","webpack://Onairos/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://Onairos/external umd {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"ReactDOM\",\"root\":\"ReactDOM\"}","webpack://Onairos/webpack/bootstrap","webpack://Onairos/webpack/runtime/compat get default export","webpack://Onairos/webpack/runtime/define property getters","webpack://Onairos/webpack/runtime/global","webpack://Onairos/webpack/runtime/hasOwnProperty shorthand","webpack://Onairos/webpack/runtime/make namespace object","webpack://Onairos/webpack/runtime/publicPath","webpack://Onairos/./src/components/connectors/YoutubeConnector.js","webpack://Onairos/./src/components/connectors/LinkedInConnector.js","webpack://Onairos/./src/components/connectors/InstagramConnector.js","webpack://Onairos/./src/components/connectors/PinterestConnector.js","webpack://Onairos/./src/components/connectors/RedditConnector.js","webpack://Onairos/./src/components/connectors/GmailConnector.js","webpack://Onairos/./src/components/UniversalOnboarding.js","webpack://Onairos/./src/iframe/components/Box.jsx","webpack://Onairos/./src/iframe/components/IndividualConnection.jsx","webpack://Onairos/./src/iframe/DataRequestPage.jsx","webpack://Onairos/./src/iframe/data_request_page.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Onairos\", [\"React\", \"ReactDOM\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Onairos\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"Onairos\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE__639__, __WEBPACK_EXTERNAL_MODULE__346__) => {\nreturn ","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","module.exports = __WEBPACK_EXTERNAL_MODULE__346__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","import React, { Component } from 'react';\r\n\r\nclass YoutubeConnector extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n connected: false,\r\n open: false,\r\n isConnecting: false,\r\n };\r\n this.handleClose = this.handleClose.bind(this);\r\n this.handleOpen = this.handleOpen.bind(this);\r\n this.youtubeConnect = this.youtubeConnect.bind(this);\r\n this.setConnected = this.setConnected.bind(this);\r\n this.setDisconnected = this.setDisconnected.bind(this);\r\n }\r\n\r\n setConnected() {\r\n this.setState({ connected: true });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('YouTube', true);\r\n }\r\n this.handleClose();\r\n }\r\n\r\n setDisconnected() {\r\n // Call UpdateConnections API to remove connection\r\n this.updateConnections('Remove', 'Youtube').then(() => {\r\n this.setState({ connected: false });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('YouTube', false);\r\n }\r\n this.handleClose();\r\n }).catch((error) => {\r\n console.error('Error removing YouTube connection:', error);\r\n });\r\n }\r\n\r\n async updateConnections(updateType, newConnection) {\r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n updateType,\r\n newConnection\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/connections/update', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n return await response.json();\r\n } catch (error) {\r\n console.error('UpdateConnections error:', error);\r\n throw error;\r\n }\r\n }\r\n\r\n handleOpen() {\r\n this.setState({ open: true });\r\n }\r\n\r\n handleClose() {\r\n this.setState({ open: false });\r\n if (this.props.onClose) {\r\n this.props.onClose();\r\n }\r\n }\r\n\r\n async youtubeConnect() {\r\n this.setState({ isConnecting: true });\r\n \r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/youtube/authorize', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n\r\n const result = await response.json();\r\n \r\n if (result.youtubeURL) {\r\n // Open OAuth URL in current window\r\n window.location.href = result.youtubeURL;\r\n } else {\r\n console.error('No YouTube URL received');\r\n this.setState({ isConnecting: false });\r\n }\r\n } catch (error) {\r\n console.error('YouTube connection error:', error);\r\n this.setState({ isConnecting: false });\r\n }\r\n }\r\n\r\n render() {\r\n const { open = this.props.open || this.state.open } = this.props;\r\n \r\n if (!open) return null;\r\n \r\n return (\r\n <div className=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\">\r\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden\">\r\n <div className=\"p-6\">\r\n <h2 className=\"text-xl font-bold text-gray-900 mb-4\">\r\n Grant Onairos Access to your YouTube Account?\r\n </h2>\r\n \r\n <div className=\"space-y-4 text-gray-700\">\r\n <p>\r\n Grant Permission to your YouTube Account, so we can build your Data Models.\r\n </p>\r\n \r\n <div>\r\n <p className=\"font-medium mb-2\">We will access your YouTube:</p>\r\n <ul className=\"list-disc ml-6 space-y-1\">\r\n <li>Basic Account Info</li>\r\n <li>Liked and Watched Videos</li>\r\n <li>Subscribed Channels and Playlist Videos</li>\r\n </ul>\r\n </div>\r\n \r\n <p>\r\n We will delete all the data used once your Model is Created\r\n </p>\r\n \r\n <p className=\"text-sm\">\r\n <a href=\"https://onairos.uk/compliance-google-policy\" className=\"text-blue-600 hover:underline\">\r\n Onairos\r\n </a>{' '}\r\n complies with{' '}\r\n <a href=\"https://policies.google.com/privacy\" className=\"text-blue-600 hover:underline\">\r\n Google API Services User Data Policy\r\n </a>\r\n </p>\r\n </div>\r\n \r\n <div className=\"flex space-x-3 mt-6\">\r\n <button\r\n onClick={this.handleClose}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50\"\r\n >\r\n Disagree\r\n </button>\r\n <button\r\n onClick={this.youtubeConnect}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50\"\r\n >\r\n {this.state.isConnecting ? 'Connecting...' : 'Agree'}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default YoutubeConnector; ","import React, { Component } from 'react';\r\n\r\nclass LinkedInConnector extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n connected: false,\r\n open: false,\r\n isConnecting: false,\r\n };\r\n this.handleClose = this.handleClose.bind(this);\r\n this.handleOpen = this.handleOpen.bind(this);\r\n this.linkedinConnect = this.linkedinConnect.bind(this);\r\n this.setConnected = this.setConnected.bind(this);\r\n this.setDisconnected = this.setDisconnected.bind(this);\r\n }\r\n\r\n setConnected() {\r\n this.setState({ connected: true });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('LinkedIn', true);\r\n }\r\n this.handleClose();\r\n }\r\n\r\n setDisconnected() {\r\n this.updateConnections('Remove', 'LinkedIn').then(() => {\r\n this.setState({ connected: false });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('LinkedIn', false);\r\n }\r\n this.handleClose();\r\n }).catch((error) => {\r\n console.error('Error removing LinkedIn connection:', error);\r\n });\r\n }\r\n\r\n async updateConnections(updateType, newConnection) {\r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n updateType,\r\n newConnection\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/connections/update', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n return await response.json();\r\n } catch (error) {\r\n console.error('UpdateConnections error:', error);\r\n throw error;\r\n }\r\n }\r\n\r\n handleOpen() {\r\n this.setState({ open: true });\r\n }\r\n\r\n handleClose() {\r\n this.setState({ open: false });\r\n if (this.props.onClose) {\r\n this.props.onClose();\r\n }\r\n }\r\n\r\n async linkedinConnect() {\r\n this.setState({ isConnecting: true });\r\n \r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/linkedin/authorize', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n\r\n const result = await response.json();\r\n \r\n if (result.linkedinURL) {\r\n window.location.href = result.linkedinURL;\r\n } else {\r\n console.error('No LinkedIn URL received');\r\n this.setState({ isConnecting: false });\r\n }\r\n } catch (error) {\r\n console.error('LinkedIn connection error:', error);\r\n this.setState({ isConnecting: false });\r\n }\r\n }\r\n\r\n render() {\r\n const { open = this.props.open || this.state.open } = this.props;\r\n \r\n if (!open) return null;\r\n \r\n return (\r\n <div className=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\">\r\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden\">\r\n <div className=\"p-6\">\r\n <h2 className=\"text-xl font-bold text-gray-900 mb-4\">\r\n Grant Onairos Access to your LinkedIn Account?\r\n </h2>\r\n \r\n <div className=\"space-y-4 text-gray-700\">\r\n <p>\r\n Grant Permission to your LinkedIn Account, so we can build your Data Models.\r\n </p>\r\n \r\n <div>\r\n <p className=\"font-medium mb-2\">We will access your LinkedIn:</p>\r\n <ul className=\"list-disc ml-6 space-y-1\">\r\n <li>Basic Profile Information</li>\r\n <li>Professional Experience</li>\r\n <li>Network Connections</li>\r\n <li>Posts and Activity</li>\r\n </ul>\r\n </div>\r\n \r\n <p>\r\n We will delete all the data used once your Model is Created\r\n </p>\r\n \r\n <p className=\"text-sm\">\r\n <a href=\"https://onairos.uk/privacy-policy\" className=\"text-blue-600 hover:underline\">\r\n Onairos Privacy Policy\r\n </a>{' '}\r\n - Your professional data is handled with the highest security standards.\r\n </p>\r\n </div>\r\n \r\n <div className=\"flex space-x-3 mt-6\">\r\n <button\r\n onClick={this.handleClose}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50\"\r\n >\r\n Disagree\r\n </button>\r\n <button\r\n onClick={this.linkedinConnect}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50\"\r\n >\r\n {this.state.isConnecting ? 'Connecting...' : 'Agree'}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default LinkedInConnector; ","import React, { Component } from 'react';\r\n\r\nclass InstagramConnector extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n connected: false,\r\n open: false,\r\n isConnecting: false,\r\n };\r\n this.handleClose = this.handleClose.bind(this);\r\n this.handleOpen = this.handleOpen.bind(this);\r\n this.instagramConnect = this.instagramConnect.bind(this);\r\n this.setConnected = this.setConnected.bind(this);\r\n this.setDisconnected = this.setDisconnected.bind(this);\r\n }\r\n\r\n setConnected() {\r\n this.setState({ connected: true });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('Instagram', true);\r\n }\r\n this.handleClose();\r\n }\r\n\r\n setDisconnected() {\r\n this.updateConnections('Remove', 'Instagram').then(() => {\r\n this.setState({ connected: false });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('Instagram', false);\r\n }\r\n this.handleClose();\r\n }).catch((error) => {\r\n console.error('Error removing Instagram connection:', error);\r\n });\r\n }\r\n\r\n async updateConnections(updateType, newConnection) {\r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n updateType,\r\n newConnection\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/connections/update', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n return await response.json();\r\n } catch (error) {\r\n console.error('UpdateConnections error:', error);\r\n throw error;\r\n }\r\n }\r\n\r\n handleOpen() {\r\n this.setState({ open: true });\r\n }\r\n\r\n handleClose() {\r\n this.setState({ open: false });\r\n if (this.props.onClose) {\r\n this.props.onClose();\r\n }\r\n }\r\n\r\n async instagramConnect() {\r\n this.setState({ isConnecting: true });\r\n \r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/instagram/authorize', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n\r\n const result = await response.json();\r\n \r\n if (result.instagramURL) {\r\n window.location.href = result.instagramURL;\r\n } else {\r\n console.error('No Instagram URL received');\r\n this.setState({ isConnecting: false });\r\n }\r\n } catch (error) {\r\n console.error('Instagram connection error:', error);\r\n this.setState({ isConnecting: false });\r\n }\r\n }\r\n\r\n render() {\r\n const { open = this.props.open || this.state.open } = this.props;\r\n \r\n if (!open) return null;\r\n \r\n return (\r\n <div className=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\">\r\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden\">\r\n <div className=\"p-6\">\r\n <h2 className=\"text-xl font-bold text-gray-900 mb-4\">\r\n Grant Onairos Access to your Instagram Account?\r\n </h2>\r\n \r\n <div className=\"space-y-4 text-gray-700\">\r\n <p>\r\n Grant Permission to your Instagram Account, so we can build your Data Models.\r\n </p>\r\n \r\n <div>\r\n <p className=\"font-medium mb-2\">We will access your Instagram:</p>\r\n <ul className=\"list-disc ml-6 space-y-1\">\r\n <li>Basic Profile Information</li>\r\n <li>Posts and Stories</li>\r\n <li>Liked Content</li>\r\n <li>Following and Followers</li>\r\n </ul>\r\n </div>\r\n \r\n <p>\r\n We will delete all the data used once your Model is Created\r\n </p>\r\n \r\n <p className=\"text-sm\">\r\n <a href=\"https://onairos.uk/compliance-meta-policy\" className=\"text-blue-600 hover:underline\">\r\n Onairos\r\n </a>{' '}\r\n complies with{' '}\r\n <a href=\"https://developers.facebook.com/policy\" className=\"text-blue-600 hover:underline\">\r\n Meta Platform Policy\r\n </a>\r\n </p>\r\n </div>\r\n \r\n <div className=\"flex space-x-3 mt-6\">\r\n <button\r\n onClick={this.handleClose}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50\"\r\n >\r\n Disagree\r\n </button>\r\n <button\r\n onClick={this.instagramConnect}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50\"\r\n >\r\n {this.state.isConnecting ? 'Connecting...' : 'Agree'}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default InstagramConnector; ","import React, { Component } from 'react';\r\n\r\nclass PinterestConnector extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n connected: false,\r\n open: false,\r\n isConnecting: false,\r\n };\r\n this.handleClose = this.handleClose.bind(this);\r\n this.handleOpen = this.handleOpen.bind(this);\r\n this.pinterestConnect = this.pinterestConnect.bind(this);\r\n this.setConnected = this.setConnected.bind(this);\r\n this.setDisconnected = this.setDisconnected.bind(this);\r\n }\r\n\r\n setConnected() {\r\n this.setState({ connected: true });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('Pinterest', true);\r\n }\r\n this.handleClose();\r\n }\r\n\r\n setDisconnected() {\r\n this.updateConnections('Remove', 'Pinterest').then(() => {\r\n this.setState({ connected: false });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('Pinterest', false);\r\n }\r\n this.handleClose();\r\n }).catch((error) => {\r\n console.error('Error removing Pinterest connection:', error);\r\n });\r\n }\r\n\r\n async updateConnections(updateType, newConnection) {\r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n updateType,\r\n newConnection\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/connections/update', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n return await response.json();\r\n } catch (error) {\r\n console.error('UpdateConnections error:', error);\r\n throw error;\r\n }\r\n }\r\n\r\n handleOpen() {\r\n this.setState({ open: true });\r\n }\r\n\r\n handleClose() {\r\n this.setState({ open: false });\r\n if (this.props.onClose) {\r\n this.props.onClose();\r\n }\r\n }\r\n\r\n async pinterestConnect() {\r\n this.setState({ isConnecting: true });\r\n \r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/pinterest/authorize', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n\r\n const result = await response.json();\r\n \r\n if (result.pinterestURL) {\r\n window.location.href = result.pinterestURL;\r\n } else {\r\n console.error('No Pinterest URL received');\r\n this.setState({ isConnecting: false });\r\n }\r\n } catch (error) {\r\n console.error('Pinterest connection error:', error);\r\n this.setState({ isConnecting: false });\r\n }\r\n }\r\n\r\n render() {\r\n const { open = this.props.open || this.state.open } = this.props;\r\n \r\n if (!open) return null;\r\n \r\n return (\r\n <div className=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\">\r\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden\">\r\n <div className=\"p-6\">\r\n <h2 className=\"text-xl font-bold text-gray-900 mb-4\">\r\n Grant Onairos Access to your Pinterest Account?\r\n </h2>\r\n \r\n <div className=\"space-y-4 text-gray-700\">\r\n <p>\r\n Grant Permission to your Pinterest Account, so we can build your Data Models.\r\n </p>\r\n \r\n <div>\r\n <p className=\"font-medium mb-2\">We will access your Pinterest:</p>\r\n <ul className=\"list-disc ml-6 space-y-1\">\r\n <li>Basic Profile Information</li>\r\n <li>Boards and Pins</li>\r\n <li>Saved and Liked Pins</li>\r\n <li>Following and Followers</li>\r\n </ul>\r\n </div>\r\n \r\n <p>\r\n We will delete all the data used once your Model is Created\r\n </p>\r\n \r\n <p className=\"text-sm\">\r\n <a href=\"https://onairos.uk/privacy-policy\" className=\"text-blue-600 hover:underline\">\r\n Onairos Privacy Policy\r\n </a>{' '}\r\n - Your creative interests and preferences are securely processed.\r\n </p>\r\n </div>\r\n \r\n <div className=\"flex space-x-3 mt-6\">\r\n <button\r\n onClick={this.handleClose}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50\"\r\n >\r\n Disagree\r\n </button>\r\n <button\r\n onClick={this.pinterestConnect}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50\"\r\n >\r\n {this.state.isConnecting ? 'Connecting...' : 'Agree'}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default PinterestConnector; ","import React, { Component } from 'react';\r\n\r\nclass RedditConnector extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n connected: false,\r\n open: false,\r\n isConnecting: false,\r\n };\r\n this.handleClose = this.handleClose.bind(this);\r\n this.handleOpen = this.handleOpen.bind(this);\r\n this.redditConnect = this.redditConnect.bind(this);\r\n this.setConnected = this.setConnected.bind(this);\r\n this.setDisconnected = this.setDisconnected.bind(this);\r\n }\r\n\r\n setConnected() {\r\n this.setState({ connected: true });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('Reddit', true);\r\n }\r\n this.handleClose();\r\n }\r\n\r\n setDisconnected() {\r\n this.updateConnections('Remove', 'Reddit').then(() => {\r\n this.setState({ connected: false });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('Reddit', false);\r\n }\r\n this.handleClose();\r\n }).catch((error) => {\r\n console.error('Error removing Reddit connection:', error);\r\n });\r\n }\r\n\r\n async updateConnections(updateType, newConnection) {\r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n updateType,\r\n newConnection\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/connections/update', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n return await response.json();\r\n } catch (error) {\r\n console.error('UpdateConnections error:', error);\r\n throw error;\r\n }\r\n }\r\n\r\n handleOpen() {\r\n this.setState({ open: true });\r\n }\r\n\r\n handleClose() {\r\n this.setState({ open: false });\r\n if (this.props.onClose) {\r\n this.props.onClose();\r\n }\r\n }\r\n\r\n async redditConnect() {\r\n this.setState({ isConnecting: true });\r\n \r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/reddit/authorize', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n\r\n const result = await response.json();\r\n \r\n if (result.redditURL) {\r\n window.location.href = result.redditURL;\r\n } else {\r\n console.error('No Reddit URL received');\r\n this.setState({ isConnecting: false });\r\n }\r\n } catch (error) {\r\n console.error('Reddit connection error:', error);\r\n this.setState({ isConnecting: false });\r\n }\r\n }\r\n\r\n render() {\r\n const { open = this.props.open || this.state.open } = this.props;\r\n \r\n if (!open) return null;\r\n \r\n return (\r\n <div className=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\">\r\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden\">\r\n <div className=\"p-6\">\r\n <h2 className=\"text-xl font-bold text-gray-900 mb-4\">\r\n Grant Onairos Access to your Reddit Account?\r\n </h2>\r\n \r\n <div className=\"space-y-4 text-gray-700\">\r\n <p>\r\n Grant Permission to your Reddit Account, so we can build your Data Models.\r\n </p>\r\n \r\n <div>\r\n <p className=\"font-medium mb-2\">We will access your Reddit:</p>\r\n <ul className=\"list-disc ml-6 space-y-1\">\r\n <li>Basic Profile Information</li>\r\n <li>Posts and Comments</li>\r\n <li>Upvoted and Saved Content</li>\r\n <li>Subscribed Subreddits</li>\r\n </ul>\r\n </div>\r\n \r\n <p>\r\n We will delete all the data used once your Model is Created\r\n </p>\r\n \r\n <p className=\"text-sm\">\r\n <a href=\"https://onairos.uk/privacy-policy\" className=\"text-blue-600 hover:underline\">\r\n Onairos Privacy Policy\r\n </a>{' '}\r\n - Your Reddit activity helps us understand your interests and preferences.\r\n </p>\r\n </div>\r\n \r\n <div className=\"flex space-x-3 mt-6\">\r\n <button\r\n onClick={this.handleClose}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50\"\r\n >\r\n Disagree\r\n </button>\r\n <button\r\n onClick={this.redditConnect}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50\"\r\n >\r\n {this.state.isConnecting ? 'Connecting...' : 'Agree'}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default RedditConnector; ","import React, { Component } from 'react';\r\n\r\nclass GmailConnector extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n connected: false,\r\n open: false,\r\n isConnecting: false,\r\n };\r\n this.handleClose = this.handleClose.bind(this);\r\n this.handleOpen = this.handleOpen.bind(this);\r\n this.gmailConnect = this.gmailConnect.bind(this);\r\n this.setConnected = this.setConnected.bind(this);\r\n this.setDisconnected = this.setDisconnected.bind(this);\r\n }\r\n\r\n setConnected() {\r\n this.setState({ connected: true });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('Gmail', true);\r\n }\r\n this.handleClose();\r\n }\r\n\r\n setDisconnected() {\r\n this.updateConnections('Remove', 'Gmail').then(() => {\r\n this.setState({ connected: false });\r\n if (this.props.onConnectionChange) {\r\n this.props.onConnectionChange('Gmail', false);\r\n }\r\n this.handleClose();\r\n }).catch((error) => {\r\n console.error('Error removing Gmail connection:', error);\r\n });\r\n }\r\n\r\n async updateConnections(updateType, newConnection) {\r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n updateType,\r\n newConnection\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/connections/update', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n return await response.json();\r\n } catch (error) {\r\n console.error('UpdateConnections error:', error);\r\n throw error;\r\n }\r\n }\r\n\r\n handleOpen() {\r\n this.setState({ open: true });\r\n }\r\n\r\n handleClose() {\r\n this.setState({ open: false });\r\n if (this.props.onClose) {\r\n this.props.onClose();\r\n }\r\n }\r\n\r\n async gmailConnect() {\r\n this.setState({ isConnecting: true });\r\n \r\n const jsonData = {\r\n session: {\r\n username: localStorage.getItem(\"username\") || this.props.username\r\n },\r\n };\r\n\r\n try {\r\n const response = await fetch('https://api2.onairos.uk/gmail/authorize', {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n body: JSON.stringify(jsonData),\r\n });\r\n\r\n const result = await response.json();\r\n \r\n if (result.gmailURL) {\r\n window.location.href = result.gmailURL;\r\n } else {\r\n console.error('No Gmail URL received');\r\n this.setState({ isConnecting: false });\r\n }\r\n } catch (error) {\r\n console.error('Gmail connection error:', error);\r\n this.setState({ isConnecting: false });\r\n }\r\n }\r\n\r\n render() {\r\n const { open = this.props.open || this.state.open } = this.props;\r\n \r\n if (!open) return null;\r\n \r\n return (\r\n <div className=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\">\r\n <div className=\"bg-white rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-hidden\">\r\n <div className=\"p-6\">\r\n <h2 className=\"text-xl font-bold text-gray-900 mb-4\">\r\n Grant Onairos Access to your Gmail Account?\r\n </h2>\r\n \r\n <div className=\"space-y-4 text-gray-700\">\r\n <p>\r\n Grant Permission to your Gmail Account, so we can build your Data Models.\r\n </p>\r\n \r\n <div>\r\n <p className=\"font-medium mb-2\">We will access your Gmail:</p>\r\n <ul className=\"list-disc ml-6 space-y-1\">\r\n <li>Basic Account Information</li>\r\n <li>Email Metadata (subjects, dates, senders)</li>\r\n <li>Email Categories and Labels</li>\r\n <li>Communication Patterns</li>\r\n </ul>\r\n </div>\r\n \r\n <div className=\"bg-yellow-50 border border-yellow-200 rounded-lg p-3\">\r\n <p className=\"text-yellow-800 text-sm font-medium\">\r\n <strong>Note:</strong> We do NOT read the content of your emails. Only metadata is processed.\r\n </p>\r\n </div>\r\n \r\n <p>\r\n We will delete all the data used once your Model is Created\r\n </p>\r\n \r\n <p className=\"text-sm\">\r\n <a href=\"https://onairos.uk/compliance-google-policy\" className=\"text-blue-600 hover:underline\">\r\n Onairos\r\n </a>{' '}\r\n complies with{' '}\r\n <a href=\"https://policies.google.com/privacy\" className=\"text-blue-600 hover:underline\">\r\n Google API Services User Data Policy\r\n </a>\r\n </p>\r\n </div>\r\n \r\n <div className=\"flex space-x-3 mt-6\">\r\n <button\r\n onClick={this.handleClose}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 disabled:opacity-50\"\r\n >\r\n Disagree\r\n </button>\r\n <button\r\n onClick={this.gmailConnect}\r\n disabled={this.state.isConnecting}\r\n className=\"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50\"\r\n >\r\n {this.state.isConnecting ? 'Connecting...' : 'Agree'}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default GmailConnector; ","import React, { useState, useEffect } from 'react';\r\nimport YoutubeConnector from './connectors/YoutubeConnector';\r\nimport LinkedInConnector from './connectors/LinkedInConnector';\r\nimport InstagramConnector from './connectors/InstagramConnector';\r\nimport PinterestConnector from './connectors/PinterestConnector';\r\nimport RedditConnector from './connectors/RedditConnector';\r\nimport GmailConnector from './connectors/GmailConnector';\r\n\r\nconst platforms = [\r\n { name: 'YouTube', icon: '📺', color: 'bg-red-500', connector: 'youtube' },\r\n { name: 'Reddit', icon: '🔥', color: 'bg-orange-500', connector: 'reddit' },\r\n { name: 'Instagram', icon: '📷', color: 'bg-pink-500', connector: 'instagram' },\r\n { name: 'Pinterest', icon: '📌', color: 'bg-red-600', connector: 'pinterest' },\r\n { name: 'LinkedIn', icon: '💼', color: 'bg-blue-700', connector: 'linkedin' },\r\n { name: 'Gmail', icon: '📧', color: 'bg-red-500', connector: 'gmail' }\r\n];\r\n\r\nexport default function UniversalOnboarding({ onComplete, appIcon, appName = 'App', username }) {\r\n const [connectedAccounts, setConnectedAccounts] = useState({});\r\n const [isConnecting, setIsConnecting] = useState(false);\r\n const [activeConnector, setActiveConnector] = useState(null);\r\n\r\n const handleConnectionChange = (platformName, isConnected) => {\r\n setConnectedAccounts(prev => ({\r\n ...prev,\r\n [platformName]: isConnected\r\n }));\r\n setActiveConnector(null);\r\n };\r\n\r\n const handleToggle = async (platformName, connectorType) => {\r\n if (isConnecting) return;\r\n \r\n const isCurrentlyConnected = connectedAccounts[platformName];\r\n \r\n if (isCurrentlyConnected) {\r\n // Disconnect - call the connector's disconnect method\r\n setConnectedAccounts(prev => ({\r\n ...prev,\r\n [platformName]: false\r\n }));\r\n } else {\r\n // Connect - open the OAuth dialog\r\n setActiveConnector(connectorType);\r\n }\r\n };\r\n\r\n const handleContinue = () => {\r\n const connected = Object.entries(connectedAccounts)\r\n .filter(([platform, isConnected]) => isConnected)\r\n .map(([platform]) => platform);\r\n \r\n onComplete({\r\n connectedAccounts: connected,\r\n totalConnections: connected.length\r\n });\r\n };\r\n\r\n const connectedCount = Object.values(connectedAccounts).filter(Boolean).length;\r\n\r\n return (\r\n <div className=\"w-full max-w-md mx-auto bg-white rounded-lg shadow-xl overflow-hidden\" style={{ maxHeight: '90vh', height: 'auto' }}>\r\n <div className=\"p-4 sm:p-6 overflow-y-auto\" style={{ maxHeight: 'calc(90vh - 4rem)' }}>\r\n {/* Header with App Logo and Arrow to Onairos */}\r\n <div className=\"flex items-center justify-center mb-4 sm:mb-6\">\r\n <div className=\"flex items-center space-x-3\">\r\n <img \r\n src={appIcon || \"https://onairos.sirv.com/Images/OnairosBlack.png\"} \r\n alt={appName} \r\n className=\"w-8 h-8 sm:w-10 sm:h-10 rounded-lg\"\r\n />\r\n <div className=\"flex items-center text-gray-400\">\r\n <svg className=\"w-5 h-5 sm:w-6 sm:h-6\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M17 8l4 4m0 0l-4 4m4-4H3\" />\r\n </svg>\r\n </div>\r\n <img \r\n src=\"https://onairos.sirv.com/Images/OnairosBlack.png\" \r\n alt=\"Onairos\" \r\n className=\"w-8 h-8 sm:w-10 sm:h-10 rounded-lg\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div className=\"text-center mb-4 sm:mb-6\">\r\n <h2 className=\"text-lg sm:text-xl font-bold text-gray-900 mb-2\">Connect Your Accounts</h2>\r\n <p className=\"text-gray-600 text-xs sm:text-sm\">\r\n Choose which accounts to connect for a personalized experience\r\n </p>\r\n </div>\r\n\r\n {/* Privacy Notice */}\r\n <div className=\"mb-4 sm:mb-6 p-2 sm:p-3 bg-blue-50 border border-blue-200 rounded-lg\">\r\n <p className=\"text-blue-800 text-xs sm:text-sm\">\r\n 🔒 Your data is never shared with anyone. It's only used to train your personal model and is stored securely.\r\n </p>\r\n </div>\r\n\r\n {/* Platform List - Vertical Layout with Toggles */}\r\n <div className=\"space-y-2 sm:space-y-3 mb-4 sm:mb-6\">\r\n {platforms.map((platform) => {\r\n const isConnected = connectedAccounts[platform.name] || false;\r\n \r\n return (\r\n <div \r\n key={platform.name}\r\n className=\"flex items-center justify-between p-3 sm:p-4 border rounded-lg hover:bg-gray-50 transition-colors\"\r\n >\r\n <div className=\"flex items-center space-x-3\">\r\n <div className={`w-8 h-8 sm:w-10 sm:h-10 rounded-lg ${platform.color} flex items-center justify-center text-white text-base sm:text-lg`}>\r\n {platform.icon}\r\n </div>\r\n <div>\r\n <h3 className=\"font-medium text-gray-900 text-sm sm:text-base\">{platform.name}</h3>\r\n <p className=\"text-xs sm:text-sm text-gray-500\">\r\n {isConnected ? 'Connected' : 'Not connected'}\r\n </p>\r\n </div>\r\n </div>\r\n \r\n {/* Toggle Switch */}\r\n <button\r\n onClick={() => handleToggle(platform.name, platform.connector)}\r\n disabled={isConnecting}\r\n className={`relative inline-flex h-5 sm:h-6 w-9 sm:w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 ${\r\n isConnected ? 'bg-blue-600' : 'bg-gray-200'\r\n } ${isConnecting ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'}`}\r\n >\r\n <span\r\n className={`inline-block h-3 sm:h-4 w-3 sm:w-4 transform rounded-full bg-white transition-transform ${\r\n isConnected ? 'translate-x-5 sm:translate-x-6' : 'translate-x-1'\r\n }`}\r\n />\r\n </button>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n\r\n {/* Connection Status */}\r\n {connectedCount > 0 && (\r\n <div className=\"mb-3 sm:mb-4 p-2 sm:p-3 bg-green-50 border border-green-200 rounded-lg\">\r\n <p className=\"text-green-800 text-xs sm:text-sm\">\r\n ✅ {connectedCount} account{connectedCount > 1 ? 's' : ''} connected\r\n </p>\r\n </div>\r\n )}\r\n\r\n {/* Continue Button */}\r\n <button\r\n onClick={handleContinue}\r\n disabled={connectedCount === 0}\r\n className={`w-full py-2 sm:py-3 px-4 rounded-lg font-semibold transition-colors text-sm sm:text-base ${\r\n connectedCount > 0\r\n ? 'bg-blue-600 text-white hover:bg-blue-700'\r\n : 'bg-gray-300 text-gray-500 cursor-not-allowed'\r\n }`}\r\n >\r\n Continue {connectedCount > 0 ? `with ${connectedCount} account${connectedCount > 1 ? 's' : ''}` : ''}\r\n </button>\r\n\r\n {/* Skip Option */}\r\n <button\r\n onClick={() => onComplete({ connectedAccounts: [], totalConnections: 0 })}\r\n className=\"w-full mt-2 py-2 text-gray-500 hover:text-gray-700 text-xs sm:text-sm\"\r\n >\r\n Skip for now\r\n </button>\r\n </div>\r\n\r\n {/* OAuth Connector Dialogs */}\r\n <YoutubeConnector \r\n open={activeConnector === 'youtube'}\r\n onClose={() => setActiveConnector(null)}\r\n onConnectionChange={handleConnectionChange}\r\n username={username}\r\n />\r\n <LinkedInConnector \r\n open={activeConnector === 'linkedin'}\r\n onClose={() => setActiveConnector(null)}\r\n onConnectionChange={handleConnectionChange}\r\n username={username}\r\n />\r\n <InstagramConnector \r\n open={activeConnector === 'instagram'}\r\n onClose={() => setActiveConnector(null)}\r\n onConnectionChange={handleConnectionChange}\r\n username={username}\r\n />\r\n <PinterestConnector \r\n open={activeConnector === 'pinterest'}\r\n onClose={() => setActiveConnector(null)}\r\n onConnectionChange={handleConnectionChange}\r\n username={username}\r\n />\r\n <RedditConnector \r\n open={activeConnector === 'reddit'}\r\n onClose={() => setActiveConnector(null)}\r\n onConnectionChange={handleConnectionChange}\r\n username={username}\r\n />\r\n <GmailConnector \r\n open={activeConnector === 'gmail'}\r\n onClose={() => setActiveConnector(null)}\r\n onConnectionChange={handleConnectionChange}\r\n username={username}\r\n />\r\n </div>\r\n );\r\n}","import React from 'react';\n\n/**\n * Box Component\n * Displays a checkbox item for data access requests\n */\nconst Box = (props) => {\n const handleChange = (e) => {\n const checked = e.target.checked;\n console.log(`Checkbox ${props.title} is now: ${checked ? 'checked' : 'unchecked'}`);\n if (checked) {\n props.setSelected(true);\n props.changeGranted(1);\n } else {\n props.setSelected(false);\n props.changeGranted(-1);\n }\n \n props.onSelectionChange(checked);\n };\n\n return (\n <div className=\"relative inline-flex items-center\">\n <input\n type=\"checkbox\"\n id={`request-${props.number}`}\n disabled={!props.active}\n onChange={handleChange}\n className={`\n appearance-none w-5 h-5 border rounded\n ${!props.active ? 'border-gray-300 bg-gray-100 cursor-not-allowed' : 'border-blue-500 cursor-pointer'}\n checked:bg-blue-600 checked:border-blue-600\n focus:outline-none focus:ring-2 focus:ring-blue-500/30\n transition-colors\n `}\n />\n <svg \n className=\"absolute left-0.5 top-0.5 w-4 h-4 text-white pointer-events-none opacity-0 peer-checked:opacity-100\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"3\" d=\"M5 13l4 4L19 7\"></path>\n </svg>\n \n {!props.active && (\n <span className=\"ml-2 text-xs text-red-500 font-medium\">\n Not available\n </span>\n )}\n </div>\n );\n};\n\nexport default Box;\n","import React, { useState } from 'react';\nimport Box from './Box';\n\n/**\n * IndividualConnection Component\n * Displays a card for each data connection request\n */\nfunction IndividualConnection(props) {\n const [selected, setSelected] = useState(false);\n\n const handleSelectionChange = (isSelected) => {\n setSelected(isSelected);\n props.onSelectionChange(isSelected);\n };\n\n // Get icon based on data type\n const getDataTypeIcon = () => {\n switch(props.title) {\n case \"Profile\":\n return (\n <div className=\"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-4 w-4 text-blue-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fillRule=\"evenodd\" d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n );\n case \"User Memories\":\n return (\n <div className=\"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-4 w-4 text-purple-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path d=\"M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z\" />\n </svg>\n </div>\n );\n default:\n return (\n <div className=\"w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-4 w-4 text-gray-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fillRule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n );\n }\n };\n\n return (\n <div className=\"bg-white rounded-xl shadow-sm hover:shadow-md transition-all overflow-hidden\">\n <div className=\"p-5\">\n <div className=\"flex items-start space-x-4\">\n {getDataTypeIcon()}\n <div className=\"flex-1\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"font-medium text-gray-800\">{props.title}</h3>\n <Box\n active={props.active}\n onSelectionChange={handleSelectionChange}\n changeGranted={props.changeGranted}\n setSelected={setSelected}\n number={props.number + 1}\n type={\"Test\"}\n title={props.title}\n />\n </div>\n \n {props.descriptions && (\n <div className=\"mt-2\">\n <p className=\"text-sm text-gray-600\">{props.descriptions}</p>\n </div>\n )}\n </div>\n </div>\n \n {props.rewards && (\n <div className=\"mt-3 pt-3 border-t border-gray-100\">\n <div className=\"flex items-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-4 w-4 text-yellow-500 mr-2\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fillRule=\"evenodd\" d=\"M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z\" clipRule=\"evenodd\" />\n </svg>\n <span className=\"text-xs text-gray-500\">Benefit: <span className=\"text-gray-700\">{props.rewards}</span></span>\n </div>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport default IndividualConnection;\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport UniversalOnboarding from '../components/UniversalOnboarding.js';\r\nimport IndividualConnection from './components/IndividualConnection';\r\nimport onairosLogo from './icons/onairos_logo.png';\r\n\r\n/**\r\n * DataRequestPage Component\r\n * Displays different data requests and handles user interactions\r\n */\r\nconst DataRequestPage = ({ requestData = {}, dataRequester = 'App', proofMode = false, domain = '', appIcon = '' }) => {\r\n const [loading, setLoading] = useState(true);\r\n const [activeModels, setActiveModels] = useState([]);\r\n const [granted, setGranted] = useState(0);\r\n const [allowSubmit, setAllowSubmit] = useState(false);\r\n const [userConnections, setUserConnections] = useState(['instagram', 'youtube', 'email']);\r\n const [selectedRequests, setSelectedRequests] = useState({});\r\n const selectedConnections = useRef([]);\r\n const userSub = useRef(null);\r\n const encryptedUserPin = useRef(null);\r\n\r\n // Update allowSubmit when granted changes\r\n useEffect(() => {\r\n if (granted > 0) {\r\n setAllowSubmit(true);\r\n } else {\r\n setAllowSubmit(false);\r\n }\r\n }, [granted]);\r\n\r\n // Simulate loading data\r\n useEffect(() => {\r\n // In a real implementation, this would fetch active models from a service\r\n const loadData = async () => {\r\n try {\r\n // Simulate API call\r\n await new Promise(resolve => setTimeout(resolve, 1000));\r\n \r\n // Sample active models - this would come from your backend\r\n setActiveModels(['Profile', 'User Memories']);\r\n setLoading(false);\r\n } catch (error) {\r\n console.error('Error loading data:', error);\r\n setLoading(false);\r\n }\r\n };\r\n \r\n loadData();\r\n\r\n // Message handler to receive data from parent window\r\n const handleMessage = (event) => {\r\n if (event.data && event.data.type === 'dataRequest') {\r\n // Process received data\r\n if (event.data.requestData) {\r\n // Update request data state\r\n }\r\n if (event.data.activeModels) {\r\n setActiveModels(event.data.activeModels);\r\n }\r\n if (event.data.userSub) {\r\n userSub.current = event.data.userSub;\r\n }\r\n if (event.data.encryptedUserPin) {\r\n encryptedUserPin.current = event.data.encryptedUserPin;\r\n }\r\n }\r\n };\r\n\r\n // Add message listener\r\n window.addEventListener('message', handleMessage);\r\n \r\n // Clean up listener\r\n return () => {\r\n window.removeEventListener('message', handleMessage);\r\n };\r\n }, []);\r\n\r\n /**\r\n * Reject all data requests\r\n */\r\n async function rejectDataRequest() {\r\n window.top.postMessage({type: 'closeIframe'}, '*');\r\n window.postMessage({type: 'closeIframe'}, '*');\r\n }\r\n\r\n /**\r\n * Send the selected data requests to the parent window\r\n */\r\n async function sendDataRequest() {\r\n if (granted === 0) {\r\n window.close();\r\n return;\r\n } else {\r\n const SignMessage = {\r\n message: 'Confirm ' + dataRequester + ' Data Access',\r\n confirmations: selectedConnections.current\r\n };\r\n \r\n // Send simplified response\r\n try {\r\n window.top.postMessage({\r\n type: 'dataRequestComplete',\r\n approved: selectedConnections.current,\r\n message: SignMessage\r\n }, '*');\r\n \r\n window.postMessage({\r\n type: 'dataRequestComplete',\r\n approved: selectedConnections.current,\r\n message: SignMessage\r\n }, '*');\r\n } catch (error) {\r\n console.error(\"Error sending data request:\", error);\r\n window.close();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Update the granted count\r\n */\r\n function changeGranted(plusMinus) {\r\n setGranted(granted + plusMinus);\r\n }\r\n\r\n /**\r\n * Handle selection of a connection/data request\r\n */\r\n function handleConnectionSelection(dataRequester, modelType, index, title, reward, isSelected) {\r\n const newDate = new Date();\r\n const newConnection = {\r\n requester: dataRequester,\r\n date: newDate.toISOString(),\r\n name: title,\r\n reward: reward,\r\n data: modelType\r\n };\r\n\r\n if (isSelected) {\r\n console.log(`Adding connection: ${JSON.stringify(newConnection)}`);\r\n if (!selectedConnections.current.find(connection => connection.requester === dataRequester && connection.data === modelType)) {\r\n selectedConnections.current.push(newConnection);\r\n }\r\n } else {\r\n console.log(`Removing connection for: ${modelType}`);\r\n selectedConnections.current = selectedConnections.current.filter(\r\n connection => !(connection.requester === dataRequester && connection.data === modelType)\r\n );\r\n }\r\n\r\n console.log('Current selected connections:', selectedConnections.current);\r\n }\r\n\r\n return (\r\n <div className=\"min-h-screen bg-gray-100\">\r\n {loading ? (\r\n <div className=\"flex items-center justify-center min-h-screen\">\r\n <div className=\"animate-spin h-8 w-8 border-2 border-blue-600 rounded-full border-t-transparent\"></div>\r\n </div>\r\n ) : activeModels.length === 0 ? (\r\n <UniversalOnboarding \r\n appIcon=\"https://onairos.sirv.com/Images/OnairosBlack.png\" \r\n appName={dataRequester}\r\n username={localStorage.getItem(\"username\")}\r\n />\r\n ) : (\r\n <div className=\"max-w-md mx-auto p-6 space-y-4\">\r\n <header className=\"bg-white p-6 rounded-xl shadow-md\">\r\n <div className=\"flex items-center justify-between mb-6\">\r\n <div className=\"flex items-center space-x-2\">\r\n <img src={onairosLogo} alt=\"Onairos Logo\" className=\"w-8 h-8\" />\r\n <div className=\"text-gray-400 mx-2\">→</div>\r\n {appIcon ? (\r\n <img src={appIcon} alt={`${dataRequester} Logo`} className=\"w-8 h-8 rounded-full\" />\r\n ) : (\r\n <div className=\"w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center\">\r\n <span className=\"text-gray-600 text-xs font-bold\">{dataRequester.charAt(0)}</span>\r\n </div>\r\n )}\r\n </div>\r\n <h2 className=\"text-lg font-bold text-gray-800\">{dataRequester}</h2>\r\n </div>\r\n \r\n <h1 className=\"text-xl font-bold text-gray-800 mb-4\">Data Access Request</h1>\r\n <p className=\"text-gray-600 mb-6\">Select the data you want to share with {dataRequester}</p>\r\n \r\n <div className=\"flex items-center justify-between gap-4\">\r\n <button\r\n onClick={rejectDataRequest}\r\n className=\"border w-full border border-gray-300 hover:bg-gray-50 text-gray-700 font-medium py-3 px-4 rounded-lg transition-colors\"\r\n >\r\n Decline\r\n </button>\r\n <button\r\n disabled={!allowSubmit}\r\n onClick={sendDataRequest}\r\n className=\"w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed\"\r\n >\r\n Approve {granted > 0 && `(${granted})`}\r\n </button>\r\n </div>\r\n </header>\r\n\r\n <div className=\"space-y-3\">\r\n {/* Only show Profile and User Memories */}\r\n {['Profile', 'User Memories'].map((dataType, index) => {\r\n const key = dataType.toLowerCase().replace(' ', '_');\r\n const product = {\r\n type: dataType,\r\n descriptions: dataType === 'Profile' ? \r\n 'Basic profile information and preferences' : \r\n 'Your personal context and memory data',\r\n reward: dataType === 'Profile' ? \r\n 'Personalized experience' : \r\n 'Contextual understanding of your preferences'\r\n };\r\n \r\n return (\r\n <IndividualConnection\r\n key={key}\r\n active={true}\r\n title={product.type}\r\n id={product}\r\n number={index}\r\n descriptions={product.descriptions}\r\n rewards={product.reward}\r\n size={key}\r\n changeGranted={changeGranted}\r\n onSelectionChange={(isSelected) =>\r\n handleConnectionSelection(dataRequester, key, index, product.type, product.reward, isSelected)\r\n }\r\n />\r\n );\r\n })}\r\n \r\n {/* User Connections Section */}\r\n <div className=\"bg-white p-4 rounded-xl shadow-sm mt-4\">\r\n <h3 className=\"text-sm font-semibold text-gray-700 mb-3\">Your Connected Services</h3>\r\n <div className=\"flex items-center space-x-3\">\r\n {userConnections.map((connection, index) => {\r\n const getConnectionIcon = (type) => {\r\n switch(type) {\r\n case 'instagram':\r\n return (\r\n <div className=\"w-10 h-10 rounded-full bg-gradient-to-tr from-purple-500 via-pink-500 to-yellow-500 flex items-center justify-center\">\r\n <span className=\"text-white text-xs\">IG</span>\r\n </div>\r\n );\r\n case 'youtube':\r\n return (\r\n <div className=\"w-10 h-10 rounded-full bg-red-600 flex items-center justify-center\">\r\n <span className=\"text-white text-xs\">YT</span>\r\n </div>\r\n );\r\n case 'email':\r\n return (\r\n <div className=\"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center\">\r\n <span className=\"text-white text-xs\">@</span>\r\n </div>\r\n );\r\n default:\r\n return (\r\n <div className=\"w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center\">\r\n <span className=\"text-gray-600 text-xs\">{type.charAt(0).toUpperCase()}</span>\r\n </div>\r\n );\r\n }\r\n };\r\n \r\n return (\r\n <div key={index} className=\"flex flex-col items-center\">\r\n {getConnectionIcon(connection)}\r\n <span className=\"text-xs text-gray-600 mt-1\">{connection}</span>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default DataRequestPage;\r\n","import React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport DataRequestPage from './DataRequestPage.jsx';\n\n// Global variables to store data from parent window\nlet proofMode = false;\nlet domain = '';\nlet userSub = null;\nlet encryptedUserPin = null;\n\n// Handle messages from the parent window\nwindow.addEventListener('message', (event) => {\n // Verify the sender origin if needed\n // if (event.origin !== 'expected-origin') return;\n \n if (event.data && event.data.source === 'onairosButton') {\n proofMode = event.data.proofMode || false;\n domain = event.data.domain || '';\n userSub = event.data.userSub || null;\n encryptedUserPin = event.data.encryptedUserPin || null;\n \n // Re-render with the new data\n renderApp();\n }\n});\n\n// Notify the parent window that the iframe is ready\nwindow.parent.postMessage({\n source: 'onairosIframe',\n action: 'iframeReady'\n}, '*');\n\n// Function to render the React app\nfunction renderApp() {\n const root = ReactDOM.createRoot(document.getElementById('root'));\n root.render(\n <DataRequestPage \n proofMode={proofMode}\n domain={domain}\n userSub={userSub}\n encryptedUserPin={encryptedUserPin}\n />\n );\n}\n\n// Initial render\nrenderApp();\n"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__639__","__WEBPACK_EXTERNAL_MODULE__346__","m","createRoot","hydrateRoot","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","g","globalThis","Function","e","window","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","length","i","Error","replace","p","YoutubeConnector","Component","constructor","props","super","state","connected","open","isConnecting","handleClose","bind","handleOpen","youtubeConnect","setConnected","setDisconnected","setState","onConnectionChange","updateConnections","then","catch","error","console","updateType","newConnection","jsonData","session","username","localStorage","getItem","response","fetch","method","headers","body","JSON","stringify","json","onClose","result","youtubeURL","href","render","React","className","onClick","disabled","LinkedInConnector","linkedinConnect","linkedinURL","InstagramConnector","instagramConnect","instagramURL","PinterestConnector","pinterestConnect","pinterestURL","RedditConnector","redditConnect","redditURL","GmailConnector","gmailConnect","gmailURL","platforms","name","icon","color","connector","UniversalOnboarding","_ref","onComplete","appIcon","appName","connectedAccounts","setConnectedAccounts","useState","setIsConnecting","activeConnector","setActiveConnector","handleConnectionChange","platformName","isConnected","prev","_objectSpread","connectedCount","values","filter","Boolean","style","maxHeight","height","alt","fill","stroke","viewBox","strokeLinecap","strokeLinejoin","strokeWidth","map","platform","concat","async","connectorType","handleToggle","handleContinue","entries","_ref2","_ref3","totalConnections","type","id","number","active","onChange","checked","target","log","title","setSelected","changeGranted","onSelectionChange","xmlns","selected","getDataTypeIcon","fillRule","clipRule","Box","isSelected","descriptions","rewards","requestData","dataRequester","proofMode","domain","loading","setLoading","activeModels","setActiveModels","granted","setGranted","allowSubmit","setAllowSubmit","userConnections","setUserConnections","selectedRequests","setSelectedRequests","selectedConnections","useRef","userSub","encryptedUserPin","plusMinus","useEffect","Promise","resolve","setTimeout","loadData","handleMessage","event","data","current","addEventListener","removeEventListener","onairosLogo","charAt","top","postMessage","SignMessage","message","confirmations","approved","close","dataType","index","toLowerCase","product","reward","IndividualConnection","size","modelType","newDate","Date","requester","date","toISOString","find","connection","push","handleConnectionSelection","toUpperCase","getConnectionIcon","renderApp","ReactDOM","getElementById","DataRequestPage","source","parent","action"],"sourceRoot":""}
1
+ {"version":3,"file":"iframe.bundle.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,cAC1B,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,UAAW,CAAC,QAAS,YAAaJ,GACf,iBAAZC,QACdA,QAAiB,QAAID,EAAQG,QAAQ,SAAUA,QAAQ,cAEvDJ,EAAc,QAAIC,EAAQD,EAAY,MAAGA,EAAe,SACzD,CATD,CASGO,MAAM,CAACC,EAAkCC,I,wCCP5C,IAAIC,EAAI,EAAQ,KAEdR,EAAQS,WAAaD,EAAEC,WACvBT,EAAQU,YAAcF,EAAEE,W,UCL1BT,EAAOD,QAAUM,C,UCAjBL,EAAOD,QAAUO,C,GCCbI,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAad,QAGrB,IAAIC,EAASU,EAAyBE,GAAY,CAGjDb,QAAS,CAAC,GAOX,OAHAgB,EAAoBH,GAAUZ,EAAQA,EAAOD,QAASY,GAG/CX,EAAOD,OACf,CCrBAY,EAAoBK,EAAKhB,IACxB,IAAIiB,EAASjB,GAAUA,EAAOkB,WAC7B,IAAOlB,EAAiB,QACxB,IAAM,EAEP,OADAW,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACpB,EAASsB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAExB,EAASuB,IAC5EE,OAAOC,eAAe1B,EAASuB,EAAK,CAAE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BnG,IAAAA,cAAA,QAAMC,UAAU,8BAA8BkG,UAS1D,ECnRV,IAAIhD,GAAY,EACZC,EAAS,GACTe,EAAU,KACVC,EAAmB,KAyBvB,SAASoC,IACMC,EAAAA,WAAoBlN,SAASmN,eAAe,SACpDC,OACH3G,IAAAA,cAAC4G,EAAe,CACdzD,UAAWA,EACXC,OAAQA,EACRe,QAASA,EACTC,iBAAkBA,IAGxB,CAhCA1L,OAAOmM,iBAAiB,WAAYH,IAI9BA,EAAMC,MAA8B,kBAAtBD,EAAMC,KAAKkC,SAC3B1D,EAAYuB,EAAMC,KAAKxB,YAAa,EACpCC,EAASsB,EAAMC,KAAKvB,QAAU,GAC9Be,EAAUO,EAAMC,KAAKR,SAAW,KAChCC,EAAmBM,EAAMC,KAAKP,kBAAoB,KAGlDoC,IACF,IAIF9N,OAAOoO,OAAO5B,YAAY,CACxB2B,OAAQ,gBACRE,OAAQ,eACP,KAgBHP,G","sources":["webpack://Onairos/webpack/universalModuleDefinition","webpack://Onairos/./node_modules/react-dom/client.js","webpack://Onairos/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://Onairos/external umd {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"ReactDOM\",\"root\":\"ReactDOM\"}","webpack://Onairos/webpack/bootstrap","webpack://Onairos/webpack/runtime/compat get default export","webpack://Onairos/webpack/runtime/define property getters","webpack://Onairos/webpack/runtime/global","webpack://Onairos/webpack/runtime/hasOwnProperty shorthand","webpack://Onairos/webpack/runtime/make namespace object","webpack://Onairos/webpack/runtime/publicPath","webpack://Onairos/./src/components/UniversalOnboarding.jsx","webpack://Onairos/./src/iframe/components/Box.jsx","webpack://Onairos/./src/iframe/components/IndividualConnection.jsx","webpack://Onairos/./src/iframe/DataRequestPage.jsx","webpack://Onairos/./src/iframe/data_request_page.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Onairos\", [\"React\", \"ReactDOM\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Onairos\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"Onairos\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE__639__, __WEBPACK_EXTERNAL_MODULE__346__) => {\nreturn ","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","module.exports = __WEBPACK_EXTERNAL_MODULE__346__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","import React, { useState, useEffect } from 'react';\r\n\r\nconst platforms = [\r\n { name: 'YouTube', icon: '📺', color: 'bg-red-500', connector: 'youtube' },\r\n { name: 'LinkedIn', icon: '💼', color: 'bg-blue-700', connector: 'linkedin' },\r\n { name: 'Reddit', icon: '🔥', color: 'bg-orange-500', connector: 'reddit' },\r\n { name: 'Pinterest', icon: '📌', color: 'bg-red-600', connector: 'pinterest' },\r\n { name: 'Instagram', icon: '📷', color: 'bg-pink-500', connector: 'instagram' },\r\n { name: 'GitHub', icon: '⚡', color: 'bg-gray-800', connector: 'github' },\r\n { name: 'Facebook', icon: '👥', color: 'bg-blue-600', connector: 'facebook' },\r\n { name: 'Gmail', icon: '✉️', color: 'bg-red-400', connector: 'gmail' }\r\n];\r\n\r\n// Enhanced SDK configuration\r\nconst sdkConfig = {\r\n apiKey: process.env.REACT_APP_ONAIROS_API_KEY || 'onairos_web_sdk_live_key_2024',\r\n baseUrl: process.env.REACT_APP_ONAIROS_BASE_URL || 'https://api2.onairos.uk',\r\n sdkType: 'web', // web, mobile, desktop\r\n enableHealthMonitoring: true,\r\n enableAutoRefresh: true,\r\n enableConnectionValidation: true\r\n};\r\n\r\n/**\r\n * UniversalOnboarding Component - Compact & Enhanced\r\n * Displays a streamlined onboarding screen for data connections\r\n */\r\nexport default function UniversalOnboarding({ onComplete, appIcon, appName = 'App' }) {\r\n const [connectedAccounts, setConnectedAccounts] = useState({});\r\n const [isConnecting, setIsConnecting] = useState(false);\r\n const [connectingPlatform, setConnectingPlatform] = useState(null);\r\n const [connectionErrors, setConnectionErrors] = useState({});\r\n const [connectionHealth, setConnectionHealth] = useState({});\r\n const [healthScore, setHealthScore] = useState(0);\r\n\r\n // Mobile device detection\r\n const isMobileDevice = () => {\r\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ||\r\n (window.innerWidth <= 768);\r\n };\r\n\r\n // Handle mobile OAuth return\r\n useEffect(() => {\r\n const handleOAuthReturn = () => {\r\n const platform = localStorage.getItem('onairos_oauth_platform');\r\n if (platform) {\r\n console.log(`📱 OAuth return detected for: ${platform}`);\r\n \r\n // Clear OAuth state\r\n localStorage.removeItem('onairos_oauth_platform');\r\n localStorage.removeItem('onairos_oauth_return');\r\n \r\n // Mark as connected\r\n setConnectedAccounts(prev => ({\r\n ...prev,\r\n [platform]: true\r\n }));\r\n \r\n // Clear any errors\r\n setConnectionErrors(prev => ({\r\n ...prev,\r\n [platform]: null\r\n }));\r\n \r\n console.log(`✅ ${platform} marked as connected from OAuth return`);\r\n }\r\n };\r\n\r\n handleOAuthReturn();\r\n }, []);\r\n\r\n const connectToPlatform = async (platformName) => {\r\n console.log(`🚀 connectToPlatform called for: ${platformName}`);\r\n \r\n const platform = platforms.find(p => p.name === platformName);\r\n if (!platform?.connector) {\r\n console.error(`❌ No connector found for platform: ${platformName}`);\r\n return false;\r\n }\r\n\r\n try {\r\n setIsConnecting(true);\r\n setConnectingPlatform(platformName);\r\n \r\n // Clear any previous errors\r\n setConnectionErrors(prev => ({\r\n ...prev,\r\n [platformName]: null\r\n }));\r\n \r\n console.log(`🔗 Starting OAuth connection for ${platformName}...`);\r\n \r\n const username = localStorage.getItem('username') || localStorage.getItem('onairosUser')?.email || 'user@example.com';\r\n \r\n // Enhanced authorize endpoint with SDK type\r\n const authorizeUrl = `${sdkConfig.baseUrl}/${platform.connector}/authorize`;\r\n \r\n const response = await fetch(authorizeUrl, {\r\n method: 'POST',\r\n headers: {\r\n 'x-api-key': sdkConfig.apiKey,\r\n 'Content-Type': 'application/json'\r\n },\r\n body: JSON.stringify({\r\n session: {\r\n username: username,\r\n sdkType: sdkConfig.sdkType, // Pass SDK type to backend\r\n returnUrl: window.location.href, // For better redirect handling\r\n platform: platformName\r\n }\r\n })\r\n });\r\n\r\n if (!response.ok) {\r\n throw new Error(`HTTP ${response.status}: ${response.statusText}`);\r\n }\r\n\r\n const responseData = await response.json();\r\n const expectedUrlKey = `${platform.connector}Url`;\r\n const oauthUrl = responseData[expectedUrlKey];\r\n\r\n if (!oauthUrl) {\r\n throw new Error(`No OAuth URL received for ${platformName}`);\r\n }\r\n \r\n if (isMobileDevice()) {\r\n // Mobile: Use redirect flow\r\n localStorage.setItem('onairos_oauth_platform', platformName);\r\n localStorage.setItem('onairos_oauth_return', window.location.href);\r\n window.location.href = oauthUrl;\r\n return true;\r\n } else {\r\n // Desktop: Use popup flow with enhanced monitoring\r\n const popup = window.open(\r\n oauthUrl,\r\n `${platform.connector}_oauth`,\r\n 'width=500,height=600,scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no'\r\n );\r\n \r\n if (!popup) {\r\n throw new Error('Popup blocked. Please allow popups and try again.');\r\n }\r\n\r\n // Enhanced popup monitoring with better success/error detection\r\n const checkInterval = setInterval(() => {\r\n try {\r\n // Check if popup is closed\r\n if (popup.closed) {\r\n clearInterval(checkInterval);\r\n \r\n // Check for success or error signals from callback page\r\n const successFlag = localStorage.getItem(`onairos_${platformName}_success`);\r\n const errorFlag = localStorage.getItem(`onairos_${platformName}_error`);\r\n const timestamp = localStorage.getItem(`onairos_${platformName}_timestamp`);\r\n \r\n // Only process recent signals (within 30 seconds)\r\n const isRecentSignal = timestamp && (Date.now() - parseInt(timestamp) < 30000);\r\n \r\n if (successFlag && isRecentSignal) {\r\n // Success flow\r\n console.log(`✅ ${platformName} OAuth completed successfully`);\r\n localStorage.removeItem(`onairos_${platformName}_success`);\r\n localStorage.removeItem(`onairos_${platformName}_timestamp`);\r\n \r\n setConnectedAccounts(prev => ({\r\n ...prev,\r\n [platformName]: true\r\n }));\r\n setConnectionErrors(prev => ({\r\n ...prev,\r\n [platformName]: null\r\n }));\r\n \r\n } else if (errorFlag && isRecentSignal) {\r\n // Error flow\r\n console.log(`❌ ${platformName} OAuth failed:`, errorFlag);\r\n localStorage.removeItem(`onairos_${platformName}_error`);\r\n localStorage.removeItem(`onairos_${platformName}_timestamp`);\r\n \r\n setConnectionErrors(prev => ({\r\n ...prev,\r\n [platformName]: errorFlag\r\n }));\r\n \r\n } else {\r\n // No signal or old signal - assume user cancelled\r\n console.log(`⚠️ ${platformName} OAuth cancelled or no response`);\r\n setConnectionErrors(prev => ({\r\n ...prev,\r\n [platformName]: 'Connection was cancelled'\r\n }));\r\n }\r\n \r\n setIsConnecting(false);\r\n setConnectingPlatform(null);\r\n }\r\n } catch (error) {\r\n // Cross-origin error when popup navigates away - this is normal\r\n // console.log(`🔄 Popup navigated away for ${platformName}`);\r\n }\r\n }, 1000);\r\n\r\n // Timeout after 5 minutes\r\n setTimeout(() => {\r\n if (!popup.closed) {\r\n popup.close();\r\n clearInterval(checkInterval);\r\n setConnectionErrors(prev => ({\r\n ...prev,\r\n [platformName]: 'Connection timeout'\r\n }));\r\n setIsConnecting(false);\r\n setConnectingPlatform(null);\r\n }\r\n }, 300000);\r\n\r\n return true;\r\n }\r\n } catch (error) {\r\n console.error(`❌ Error connecting to ${platformName}:`, error);\r\n setConnectionErrors(prev => ({\r\n ...prev,\r\n [platformName]: error.message\r\n }));\r\n setIsConnecting(false);\r\n setConnectingPlatform(null);\r\n return false;\r\n }\r\n };\r\n\r\n const handleToggle = async (platformName) => {\r\n console.log(`🔥 TOGGLE CLICKED: ${platformName}`);\r\n \r\n if (isConnecting && connectingPlatform !== platformName) {\r\n console.log(`⚠️ Already connecting to ${connectingPlatform}, ignoring click on ${platformName}`);\r\n return;\r\n }\r\n \r\n const isConnected = connectedAccounts[platformName];\r\n \r\n if (isConnected) {\r\n // Disconnect\r\n console.log(`🔌 Disconnecting from ${platformName}...`);\r\n setConnectedAccounts(prev => ({\r\n ...prev,\r\n [platformName]: false\r\n }));\r\n setConnectionErrors(prev => ({\r\n ...prev,\r\n [platformName]: null\r\n }));\r\n } else {\r\n // Connect\r\n await connectToPlatform(platformName);\r\n }\r\n };\r\n\r\n const handleContinue = () => {\r\n const connected = Object.entries(connectedAccounts)\r\n .filter(([platform, isConnected]) => isConnected)\r\n .map(([platform]) => platform);\r\n \r\n onComplete({\r\n connectedAccounts: connected,\r\n totalConnections: connected.length,\r\n healthScore: healthScore,\r\n connectionHealth: connectionHealth,\r\n sdkVersion: '2.1.7',\r\n enhancedFeatures: {\r\n healthMonitoring: sdkConfig.enableHealthMonitoring,\r\n autoRefresh: sdkConfig.enableAutoRefresh,\r\n connectionValidation: sdkConfig.enableConnectionValidation\r\n }\r\n });\r\n };\r\n\r\n const connectedCount = Object.values(connectedAccounts).filter(Boolean).length;\r\n\r\n return (\r\n <div className=\"max-w-sm mx-auto bg-white p-4 rounded-lg shadow-lg\">\r\n {/* Compact Header */}\r\n <div className=\"flex items-center justify-center mb-4\">\r\n <div className=\"flex items-center space-x-2\">\r\n <img \r\n src={appIcon || \"https://onairos.sirv.com/Images/OnairosBlack.png\"} \r\n alt={appName} \r\n className=\"w-8 h-8 rounded-lg\"\r\n />\r\n <div className=\"flex items-center text-gray-400\">\r\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M17 8l4 4m0 0l-4 4m4-4H3\" />\r\n </svg>\r\n </div>\r\n <img \r\n src=\"https://onairos.sirv.com/Images/OnairosBlack.png\" \r\n alt=\"Onairos\" \r\n className=\"w-8 h-8 rounded-lg\"\r\n />\r\n </div>\r\n </div>\r\n\r\n {/* Simple Clear Title */}\r\n <div className=\"text-center mb-4\">\r\n <h2 className=\"text-lg font-bold text-gray-900 mb-1\">Connect Data</h2>\r\n <p className=\"text-gray-600 text-sm\">\r\n Connect data here to enhance your {appName} experience\r\n </p>\r\n </div>\r\n\r\n {/* Compact Platform Grid */}\r\n <div className=\"grid grid-cols-2 gap-3 mb-4\">\r\n {platforms.map((platform) => {\r\n const isConnected = connectedAccounts[platform.name] || false;\r\n const isCurrentlyConnecting = connectingPlatform === platform.name;\r\n const hasError = connectionErrors[platform.name];\r\n const isDisabled = isConnecting && !isCurrentlyConnecting;\r\n \r\n return (\r\n <div \r\n key={platform.name}\r\n className={`relative p-3 border-2 rounded-lg transition-all duration-200 cursor-pointer ${\r\n isDisabled ? 'opacity-50 cursor-not-allowed' : 'hover:shadow-md'\r\n } ${\r\n isConnected ? 'border-green-400 bg-green-50' : \r\n hasError ? 'border-red-400 bg-red-50' :\r\n isCurrentlyConnecting ? 'border-blue-400 bg-blue-50' : \r\n 'border-gray-200 bg-white hover:border-gray-300'\r\n }`}\r\n onClick={() => !isDisabled && handleToggle(platform.name)}\r\n >\r\n {/* Platform Icon */}\r\n <div className={`w-8 h-8 rounded-lg ${platform.color} flex items-center justify-center text-white text-lg mb-2 mx-auto relative`}>\r\n {isCurrentlyConnecting ? (\r\n <div className=\"animate-spin h-4 w-4 border-2 border-white rounded-full border-t-transparent\"></div>\r\n ) : (\r\n platform.icon\r\n )}\r\n \r\n {/* Connection Status Indicator */}\r\n {isConnected && !isCurrentlyConnecting && (\r\n <div className=\"absolute -top-1 -right-1 w-4 h-4 bg-green-500 rounded-full flex items-center justify-center\">\r\n <svg className=\"w-2.5 h-2.5 text-white\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\r\n <path fillRule=\"evenodd\" d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\" clipRule=\"evenodd\" />\r\n </svg>\r\n </div>\r\n )}\r\n \r\n {hasError && !isCurrentlyConnecting && (\r\n <div className=\"absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full flex items-center justify-center\">\r\n <svg className=\"w-2.5 h-2.5 text-white\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\r\n <path fillRule=\"evenodd\" d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\" clipRule=\"evenodd\" />\r\n </svg>\r\n </div>\r\n )}\r\n </div>\r\n \r\n {/* Platform Name */}\r\n <div className=\"text-center\">\r\n <h3 className=\"font-medium text-gray-900 text-xs\">{platform.name}</h3>\r\n <p className={`text-xs mt-1 ${\r\n isCurrentlyConnecting ? 'text-blue-600' : \r\n isConnected ? 'text-green-600' : \r\n hasError ? 'text-red-600' :\r\n 'text-gray-500'\r\n }`}>\r\n {isCurrentlyConnecting ? 'Connecting...' : \r\n isConnected ? 'Connected' : \r\n hasError ? 'Failed' :\r\n 'Tap to connect'}\r\n </p>\r\n \r\n {/* Error Message */}\r\n {hasError && (\r\n <p className=\"text-xs text-red-600 mt-1 break-words\">\r\n {hasError}\r\n </p>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n\r\n {/* Connection Status Summary */}\r\n {connectedCount > 0 && (\r\n <div className=\"mb-4 p-2 bg-green-50 border border-green-200 rounded-lg\">\r\n <p className=\"text-green-800 text-sm text-center\">\r\n ✅ {connectedCount} connection{connectedCount > 1 ? 's' : ''} active\r\n </p>\r\n </div>\r\n )}\r\n\r\n {/* Continue Button */}\r\n <button\r\n onClick={handleContinue}\r\n disabled={connectedCount === 0}\r\n className={`w-full py-3 px-4 rounded-lg font-semibold transition-colors ${\r\n connectedCount > 0\r\n ? 'bg-blue-600 text-white hover:bg-blue-700'\r\n : 'bg-gray-300 text-gray-500 cursor-not-allowed'\r\n }`}\r\n >\r\n {connectedCount > 0 ? `Continue with ${connectedCount} connection${connectedCount > 1 ? 's' : ''}` : 'Connect at least one platform'}\r\n </button>\r\n\r\n {/* Skip Option */}\r\n <button\r\n onClick={() => onComplete({ connectedAccounts: [], totalConnections: 0 })}\r\n className=\"w-full mt-2 py-2 text-gray-500 hover:text-gray-700 text-sm\"\r\n >\r\n Skip for now\r\n </button>\r\n </div>\r\n );\r\n}\r\n","import React from 'react';\n\n/**\n * Box Component\n * Displays a checkbox item for data access requests\n */\nconst Box = (props) => {\n const handleChange = (e) => {\n const checked = e.target.checked;\n console.log(`Checkbox ${props.title} is now: ${checked ? 'checked' : 'unchecked'}`);\n if (checked) {\n props.setSelected(true);\n props.changeGranted(1);\n } else {\n props.setSelected(false);\n props.changeGranted(-1);\n }\n \n props.onSelectionChange(checked);\n };\n\n return (\n <div className=\"relative inline-flex items-center\">\n <input\n type=\"checkbox\"\n id={`request-${props.number}`}\n disabled={!props.active}\n onChange={handleChange}\n className={`\n appearance-none w-5 h-5 border rounded\n ${!props.active ? 'border-gray-300 bg-gray-100 cursor-not-allowed' : 'border-blue-500 cursor-pointer'}\n checked:bg-blue-600 checked:border-blue-600\n focus:outline-none focus:ring-2 focus:ring-blue-500/30\n transition-colors\n `}\n />\n <svg \n className=\"absolute left-0.5 top-0.5 w-4 h-4 text-white pointer-events-none opacity-0 peer-checked:opacity-100\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"3\" d=\"M5 13l4 4L19 7\"></path>\n </svg>\n \n {!props.active && (\n <span className=\"ml-2 text-xs text-red-500 font-medium\">\n Not available\n </span>\n )}\n </div>\n );\n};\n\nexport default Box;\n","import React, { useState } from 'react';\nimport Box from './Box';\n\n/**\n * IndividualConnection Component\n * Displays a card for each data connection request\n */\nfunction IndividualConnection(props) {\n const [selected, setSelected] = useState(false);\n\n const handleSelectionChange = (isSelected) => {\n setSelected(isSelected);\n props.onSelectionChange(isSelected);\n };\n\n // Get icon based on data type\n const getDataTypeIcon = () => {\n switch(props.title) {\n case \"Profile\":\n return (\n <div className=\"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-4 w-4 text-blue-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fillRule=\"evenodd\" d=\"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n );\n case \"User Memories\":\n return (\n <div className=\"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-4 w-4 text-purple-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path d=\"M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z\" />\n </svg>\n </div>\n );\n default:\n return (\n <div className=\"w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-4 w-4 text-gray-600\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fillRule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n );\n }\n };\n\n return (\n <div className=\"bg-white rounded-xl shadow-sm hover:shadow-md transition-all overflow-hidden\">\n <div className=\"p-5\">\n <div className=\"flex items-start space-x-4\">\n {getDataTypeIcon()}\n <div className=\"flex-1\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"font-medium text-gray-800\">{props.title}</h3>\n <Box\n active={props.active}\n onSelectionChange={handleSelectionChange}\n changeGranted={props.changeGranted}\n setSelected={setSelected}\n number={props.number + 1}\n type={\"Test\"}\n title={props.title}\n />\n </div>\n \n {props.descriptions && (\n <div className=\"mt-2\">\n <p className=\"text-sm text-gray-600\">{props.descriptions}</p>\n </div>\n )}\n </div>\n </div>\n \n {props.rewards && (\n <div className=\"mt-3 pt-3 border-t border-gray-100\">\n <div className=\"flex items-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-4 w-4 text-yellow-500 mr-2\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fillRule=\"evenodd\" d=\"M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z\" clipRule=\"evenodd\" />\n </svg>\n <span className=\"text-xs text-gray-500\">Benefit: <span className=\"text-gray-700\">{props.rewards}</span></span>\n </div>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport default IndividualConnection;\n","import React, { useState, useEffect, useRef } from 'react';\r\nimport UniversalOnboarding from '../components/UniversalOnboarding.jsx';\r\nimport IndividualConnection from './components/IndividualConnection';\r\nimport onairosLogo from './icons/onairos_logo.png';\r\n\r\n/**\r\n * DataRequestPage Component\r\n * Displays different data requests and handles user interactions\r\n */\r\nconst DataRequestPage = ({ requestData = {}, dataRequester = 'App', proofMode = false, domain = '', appIcon = '' }) => {\r\n const [loading, setLoading] = useState(true);\r\n const [activeModels, setActiveModels] = useState([]);\r\n const [granted, setGranted] = useState(0);\r\n const [allowSubmit, setAllowSubmit] = useState(false);\r\n const [userConnections, setUserConnections] = useState(['instagram', 'youtube', 'email']);\r\n const [selectedRequests, setSelectedRequests] = useState({});\r\n const selectedConnections = useRef([]);\r\n const userSub = useRef(null);\r\n const encryptedUserPin = useRef(null);\r\n\r\n // Update allowSubmit when granted changes\r\n useEffect(() => {\r\n if (granted > 0) {\r\n setAllowSubmit(true);\r\n } else {\r\n setAllowSubmit(false);\r\n }\r\n }, [granted]);\r\n\r\n // Simulate loading data\r\n useEffect(() => {\r\n // In a real implementation, this would fetch active models from a service\r\n const loadData = async () => {\r\n try {\r\n // Simulate API call\r\n await new Promise(resolve => setTimeout(resolve, 1000));\r\n \r\n // Sample active models - this would come from your backend\r\n setActiveModels(['Profile', 'User Memories']);\r\n setLoading(false);\r\n } catch (error) {\r\n console.error('Error loading data:', error);\r\n setLoading(false);\r\n }\r\n };\r\n \r\n loadData();\r\n\r\n // Message handler to receive data from parent window\r\n const handleMessage = (event) => {\r\n if (event.data && event.data.type === 'dataRequest') {\r\n // Process received data\r\n if (event.data.requestData) {\r\n // Update request data state\r\n }\r\n if (event.data.activeModels) {\r\n setActiveModels(event.data.activeModels);\r\n }\r\n if (event.data.userSub) {\r\n userSub.current = event.data.userSub;\r\n }\r\n if (event.data.encryptedUserPin) {\r\n encryptedUserPin.current = event.data.encryptedUserPin;\r\n }\r\n }\r\n };\r\n\r\n // Add message listener\r\n window.addEventListener('message', handleMessage);\r\n \r\n // Clean up listener\r\n return () => {\r\n window.removeEventListener('message', handleMessage);\r\n };\r\n }, []);\r\n\r\n /**\r\n * Reject all data requests\r\n */\r\n async function rejectDataRequest() {\r\n window.top.postMessage({type: 'closeIframe'}, '*');\r\n window.postMessage({type: 'closeIframe'}, '*');\r\n }\r\n\r\n /**\r\n * Send the selected data requests to the parent window\r\n */\r\n async function sendDataRequest() {\r\n if (granted === 0) {\r\n window.close();\r\n return;\r\n } else {\r\n const SignMessage = {\r\n message: 'Confirm ' + dataRequester + ' Data Access',\r\n confirmations: selectedConnections.current\r\n };\r\n \r\n // Send simplified response\r\n try {\r\n window.top.postMessage({\r\n type: 'dataRequestComplete',\r\n approved: selectedConnections.current,\r\n message: SignMessage\r\n }, '*');\r\n \r\n window.postMessage({\r\n type: 'dataRequestComplete',\r\n approved: selectedConnections.current,\r\n message: SignMessage\r\n }, '*');\r\n } catch (error) {\r\n console.error(\"Error sending data request:\", error);\r\n window.close();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Update the granted count\r\n */\r\n function changeGranted(plusMinus) {\r\n setGranted(granted + plusMinus);\r\n }\r\n\r\n /**\r\n * Handle selection of a connection/data request\r\n */\r\n function handleConnectionSelection(dataRequester, modelType, index, title, reward, isSelected) {\r\n const newDate = new Date();\r\n const newConnection = {\r\n requester: dataRequester,\r\n date: newDate.toISOString(),\r\n name: title,\r\n reward: reward,\r\n data: modelType\r\n };\r\n\r\n if (isSelected) {\r\n console.log(`Adding connection: ${JSON.stringify(newConnection)}`);\r\n if (!selectedConnections.current.find(connection => connection.requester === dataRequester && connection.data === modelType)) {\r\n selectedConnections.current.push(newConnection);\r\n }\r\n } else {\r\n console.log(`Removing connection for: ${modelType}`);\r\n selectedConnections.current = selectedConnections.current.filter(\r\n connection => !(connection.requester === dataRequester && connection.data === modelType)\r\n );\r\n }\r\n\r\n console.log('Current selected connections:', selectedConnections.current);\r\n }\r\n\r\n return (\r\n <div className=\"min-h-screen bg-gray-100\">\r\n {loading ? (\r\n <div className=\"flex items-center justify-center min-h-screen\">\r\n <div className=\"animate-spin h-8 w-8 border-2 border-blue-600 rounded-full border-t-transparent\"></div>\r\n </div>\r\n ) : activeModels.length === 0 ? (\r\n <UniversalOnboarding \r\n appIcon=\"https://onairos.sirv.com/Images/OnairosBlack.png\" \r\n appName={dataRequester}\r\n username={localStorage.getItem(\"username\")}\r\n />\r\n ) : (\r\n <div className=\"max-w-md mx-auto p-6 space-y-4\">\r\n <header className=\"bg-white p-6 rounded-xl shadow-md\">\r\n <div className=\"flex items-center justify-between mb-6\">\r\n <div className=\"flex items-center space-x-2\">\r\n <img src={onairosLogo} alt=\"Onairos Logo\" className=\"w-8 h-8\" />\r\n <div className=\"text-gray-400 mx-2\">→</div>\r\n {appIcon ? (\r\n <img src={appIcon} alt={`${dataRequester} Logo`} className=\"w-8 h-8 rounded-full\" />\r\n ) : (\r\n <div className=\"w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center\">\r\n <span className=\"text-gray-600 text-xs font-bold\">{dataRequester.charAt(0)}</span>\r\n </div>\r\n )}\r\n </div>\r\n <h2 className=\"text-lg font-bold text-gray-800\">{dataRequester}</h2>\r\n </div>\r\n \r\n <h1 className=\"text-xl font-bold text-gray-800 mb-4\">Data Access Request</h1>\r\n <p className=\"text-gray-600 mb-6\">Select the data you want to share with {dataRequester}</p>\r\n \r\n <div className=\"flex items-center justify-between gap-4\">\r\n <button\r\n onClick={rejectDataRequest}\r\n className=\"border w-full border border-gray-300 hover:bg-gray-50 text-gray-700 font-medium py-3 px-4 rounded-lg transition-colors\"\r\n >\r\n Decline\r\n </button>\r\n <button\r\n disabled={!allowSubmit}\r\n onClick={sendDataRequest}\r\n className=\"w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed\"\r\n >\r\n Approve {granted > 0 && `(${granted})`}\r\n </button>\r\n </div>\r\n </header>\r\n\r\n <div className=\"space-y-3\">\r\n {/* Only show Profile and User Memories */}\r\n {['Profile', 'User Memories'].map((dataType, index) => {\r\n const key = dataType.toLowerCase().replace(' ', '_');\r\n const product = {\r\n type: dataType,\r\n descriptions: dataType === 'Profile' ? \r\n 'Basic profile information and preferences' : \r\n 'Your personal context and memory data',\r\n reward: dataType === 'Profile' ? \r\n 'Personalized experience' : \r\n 'Contextual understanding of your preferences'\r\n };\r\n \r\n return (\r\n <IndividualConnection\r\n key={key}\r\n active={true}\r\n title={product.type}\r\n id={product}\r\n number={index}\r\n descriptions={product.descriptions}\r\n rewards={product.reward}\r\n size={key}\r\n changeGranted={changeGranted}\r\n onSelectionChange={(isSelected) =>\r\n handleConnectionSelection(dataRequester, key, index, product.type, product.reward, isSelected)\r\n }\r\n />\r\n );\r\n })}\r\n \r\n {/* User Connections Section */}\r\n <div className=\"bg-white p-4 rounded-xl shadow-sm mt-4\">\r\n <h3 className=\"text-sm font-semibold text-gray-700 mb-3\">Your Connected Services</h3>\r\n <div className=\"flex items-center space-x-3\">\r\n {userConnections.map((connection, index) => {\r\n const getConnectionIcon = (type) => {\r\n switch(type) {\r\n case 'instagram':\r\n return (\r\n <div className=\"w-10 h-10 rounded-full bg-gradient-to-tr from-purple-500 via-pink-500 to-yellow-500 flex items-center justify-center\">\r\n <span className=\"text-white text-xs\">IG</span>\r\n </div>\r\n );\r\n case 'youtube':\r\n return (\r\n <div className=\"w-10 h-10 rounded-full bg-red-600 flex items-center justify-center\">\r\n <span className=\"text-white text-xs\">YT</span>\r\n </div>\r\n );\r\n case 'email':\r\n return (\r\n <div className=\"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center\">\r\n <span className=\"text-white text-xs\">@</span>\r\n </div>\r\n );\r\n default:\r\n return (\r\n <div className=\"w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center\">\r\n <span className=\"text-gray-600 text-xs\">{type.charAt(0).toUpperCase()}</span>\r\n </div>\r\n );\r\n }\r\n };\r\n \r\n return (\r\n <div key={index} className=\"flex flex-col items-center\">\r\n {getConnectionIcon(connection)}\r\n <span className=\"text-xs text-gray-600 mt-1\">{connection}</span>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nexport default DataRequestPage;\r\n","import React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport DataRequestPage from './DataRequestPage.jsx';\n\n// Global variables to store data from parent window\nlet proofMode = false;\nlet domain = '';\nlet userSub = null;\nlet encryptedUserPin = null;\n\n// Handle messages from the parent window\nwindow.addEventListener('message', (event) => {\n // Verify the sender origin if needed\n // if (event.origin !== 'expected-origin') return;\n \n if (event.data && event.data.source === 'onairosButton') {\n proofMode = event.data.proofMode || false;\n domain = event.data.domain || '';\n userSub = event.data.userSub || null;\n encryptedUserPin = event.data.encryptedUserPin || null;\n \n // Re-render with the new data\n renderApp();\n }\n});\n\n// Notify the parent window that the iframe is ready\nwindow.parent.postMessage({\n source: 'onairosIframe',\n action: 'iframeReady'\n}, '*');\n\n// Function to render the React app\nfunction renderApp() {\n const root = ReactDOM.createRoot(document.getElementById('root'));\n root.render(\n <DataRequestPage \n proofMode={proofMode}\n domain={domain}\n userSub={userSub}\n encryptedUserPin={encryptedUserPin}\n />\n );\n}\n\n// Initial render\nrenderApp();\n"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__639__","__WEBPACK_EXTERNAL_MODULE__346__","m","createRoot","hydrateRoot","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","g","globalThis","Function","e","window","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","scriptUrl","importScripts","location","document","currentScript","src","scripts","getElementsByTagName","length","i","Error","replace","p","platforms","name","icon","color","connector","sdkConfig","apiKey","process","env","REACT_APP_ONAIROS_API_KEY","baseUrl","REACT_APP_ONAIROS_BASE_URL","sdkType","enableHealthMonitoring","enableAutoRefresh","enableConnectionValidation","UniversalOnboarding","_ref","onComplete","appIcon","appName","connectedAccounts","setConnectedAccounts","useState","isConnecting","setIsConnecting","connectingPlatform","setConnectingPlatform","connectionErrors","setConnectionErrors","connectionHealth","setConnectionHealth","healthScore","setHealthScore","useEffect","handleOAuthReturn","platform","localStorage","getItem","console","log","concat","removeItem","prev","_objectSpread","connectToPlatform","async","platformName","find","error","_localStorage$getItem","username","email","authorizeUrl","response","fetch","method","headers","body","JSON","stringify","session","returnUrl","href","ok","status","statusText","responseData","json","oauthUrl","test","navigator","userAgent","innerWidth","setItem","popup","open","checkInterval","setInterval","closed","clearInterval","successFlag","errorFlag","timestamp","isRecentSignal","Date","now","parseInt","setTimeout","close","message","connectedCount","values","filter","Boolean","React","className","alt","fill","stroke","viewBox","strokeLinecap","strokeLinejoin","strokeWidth","map","isConnected","isCurrentlyConnecting","hasError","isDisabled","onClick","handleToggle","fillRule","clipRule","handleContinue","connected","entries","_ref2","_ref3","totalConnections","sdkVersion","enhancedFeatures","healthMonitoring","autoRefresh","connectionValidation","disabled","props","type","id","number","active","onChange","checked","target","title","setSelected","changeGranted","onSelectionChange","xmlns","selected","getDataTypeIcon","Box","isSelected","descriptions","rewards","requestData","dataRequester","proofMode","domain","loading","setLoading","activeModels","setActiveModels","granted","setGranted","allowSubmit","setAllowSubmit","userConnections","setUserConnections","selectedRequests","setSelectedRequests","selectedConnections","useRef","userSub","encryptedUserPin","plusMinus","Promise","resolve","loadData","handleMessage","event","data","current","addEventListener","removeEventListener","onairosLogo","charAt","top","postMessage","SignMessage","confirmations","approved","dataType","index","toLowerCase","product","reward","IndividualConnection","size","modelType","newDate","newConnection","requester","date","toISOString","connection","push","handleConnectionSelection","toUpperCase","getConnectionIcon","renderApp","ReactDOM","getElementById","render","DataRequestPage","source","parent","action"],"sourceRoot":""}