polarisrx 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/dist/polarisrx.umd.js +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-5{bottom:1.25rem}.left-5{left:1.25rem}.right-5{right:1.25rem}.z-\\[9999\\]{z-index:9999}.mb-3{margin-bottom:.75rem}.mr-2{margin-right:.5rem}.mt-0\\.5{margin-top:.125rem}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.h-1\\.5{height:.375rem}.h-14{height:3.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[520px\\]{height:520px}.h-full{height:100%}.w-1\\.5{width:.375rem}.w-14{width:3.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\\[360px\\]{width:360px}.w-full{width:100%}.max-w-\\[80\\%\\]{max-width:80%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes fadeSlideUp{0%{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}.animate-fadeSlideUp{animation:fadeSlideUp .2s ease-out}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:.75rem}.rounded-bl-sm{border-bottom-left-radius:.125rem}.rounded-br-sm{border-bottom-right-radius:.125rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-amber-100{--tw-border-opacity: 1;border-color:rgb(254 243 199 / var(--tw-border-opacity, 1))}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-slate-300{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/20{background-color:#fff3}.bg-white\\/60{background-color:#fff9}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.text-center{text-align:center}.font-sans{font-family:Inter,system-ui,sans-serif}.text-\\[10px\\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/75{color:#ffffffbf}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.\\[animation-delay\\:0ms\\]{animation-delay:0ms}.\\[animation-delay\\:150ms\\]{animation-delay:.15s}.\\[animation-delay\\:300ms\\]{animation-delay:.3s}.polarisrx-root *,.polarisrx-root *:before,.polarisrx-root *:after{box-sizing:border-box}.polarisrx-root{font-family:Inter,system-ui,sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5}.polarisrx-root button{border:none;background:transparent;cursor:pointer;padding:0;margin:0;font-family:inherit;font-size:inherit;line-height:inherit}.polarisrx-root input{font-family:inherit;font-size:inherit}.hover\\:bg-white\\/20:hover{background-color:#fff3}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:border-emerald-400:focus{--tw-border-opacity: 1;border-color:rgb(52 211 153 / var(--tw-border-opacity, 1))}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-emerald-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 250 229 / var(--tw-ring-opacity, 1))}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}")),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
1
2
|
import Gt, { useContext as mt, createContext as yt, forwardRef as bt, createElement as De, useState as ne, useCallback as Zt, useRef as Yt, useEffect as wt } from "react";
|
|
2
3
|
import Qt from "react-dom";
|
|
3
4
|
var gt = { exports: {} }, me = {};
|
|
@@ -2588,7 +2589,7 @@ function xs() {
|
|
|
2588
2589
|
const Os = "#059669";
|
|
2589
2590
|
function Ss() {
|
|
2590
2591
|
const [e, t] = ne(!1), { sessionId: n } = xs(), { position: r = "bottom-right", primaryColor: s = Os } = re(), o = r === "bottom-left" ? "fixed bottom-5 left-5" : "fixed bottom-5 right-5";
|
|
2591
|
-
return /* @__PURE__ */ E.jsxs("div", { className:
|
|
2592
|
+
return /* @__PURE__ */ E.jsxs("div", { className: `polarisrx-root ${o} z-[9999] flex flex-col items-end gap-3 font-sans`, children: [
|
|
2592
2593
|
e && /* @__PURE__ */ E.jsx("div", { className: "animate-fadeSlideUp", children: /* @__PURE__ */ E.jsx(An, { sessionId: n, onClose: () => t(!1) }) }),
|
|
2593
2594
|
/* @__PURE__ */ E.jsxs(
|
|
2594
2595
|
"button",
|
package/dist/polarisrx.umd.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-5{bottom:1.25rem}.left-5{left:1.25rem}.right-5{right:1.25rem}.z-\\[9999\\]{z-index:9999}.mb-3{margin-bottom:.75rem}.mr-2{margin-right:.5rem}.mt-0\\.5{margin-top:.125rem}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.h-1\\.5{height:.375rem}.h-14{height:3.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[520px\\]{height:520px}.h-full{height:100%}.w-1\\.5{width:.375rem}.w-14{width:3.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\\[360px\\]{width:360px}.w-full{width:100%}.max-w-\\[80\\%\\]{max-width:80%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes fadeSlideUp{0%{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}.animate-fadeSlideUp{animation:fadeSlideUp .2s ease-out}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:.75rem}.rounded-bl-sm{border-bottom-left-radius:.125rem}.rounded-br-sm{border-bottom-right-radius:.125rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-amber-100{--tw-border-opacity: 1;border-color:rgb(254 243 199 / var(--tw-border-opacity, 1))}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-slate-300{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/20{background-color:#fff3}.bg-white\\/60{background-color:#fff9}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.text-center{text-align:center}.font-sans{font-family:Inter,system-ui,sans-serif}.text-\\[10px\\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/75{color:#ffffffbf}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.\\[animation-delay\\:0ms\\]{animation-delay:0ms}.\\[animation-delay\\:150ms\\]{animation-delay:.15s}.\\[animation-delay\\:300ms\\]{animation-delay:.3s}.polarisrx-root *,.polarisrx-root *:before,.polarisrx-root *:after{box-sizing:border-box}.polarisrx-root{font-family:Inter,system-ui,sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5}.polarisrx-root button{border:none;background:transparent;cursor:pointer;padding:0;margin:0;font-family:inherit;font-size:inherit;line-height:inherit}.polarisrx-root input{font-family:inherit;font-size:inherit}.hover\\:bg-white\\/20:hover{background-color:#fff3}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:border-emerald-400:focus{--tw-border-opacity: 1;border-color:rgb(52 211 153 / var(--tw-border-opacity, 1))}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-emerald-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 250 229 / var(--tw-ring-opacity, 1))}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}")),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
1
2
|
(function(jn){typeof define=="function"&&define.amd?define(jn):jn()})(function(){"use strict";var jn={exports:{}},zr={},Bs={exports:{}},j={};/**
|
|
2
3
|
* @license React
|
|
3
4
|
* react.production.min.js
|
|
@@ -101,4 +102,4 @@ Error generating stack: `+o.message+`
|
|
|
101
102
|
`);return i===-1?"":l.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(`
|
|
102
103
|
`),s=i===-1?-1:o.indexOf(`
|
|
103
104
|
`,i+1),u=s===-1?"":o.slice(s+1);String(r.stack).endsWith(u)||(r.stack+=`
|
|
104
|
-
`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Gt(this.defaults,n);const{transitional:r,paramsSerializer:l,headers:o}=n;r!==void 0&&io.assertOptions(r,{silentJSONParsing:_e.transitional(_e.boolean),forcedJSONParsing:_e.transitional(_e.boolean),clarifyTimeoutError:_e.transitional(_e.boolean),legacyInterceptorReqResOrdering:_e.transitional(_e.boolean),advertiseZstdAcceptEncoding:_e.transitional(_e.boolean)},!1),l!=null&&(h.isFunction(l)?n.paramsSerializer={serialize:l}:io.assertOptions(l,{encode:_e.function,serialize:_e.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),io.assertOptions(n,{baseUrl:_e.spelling("baseURL"),withXsrfToken:_e.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&h.merge(o.common,o[n.method]);o&&h.forEach(["delete","get","head","post","put","patch","query","common"],S=>{delete o[S]}),n.headers=ge.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;u=u&&g.synchronous;const E=n.transitional||Ts;E&&E.legacyInterceptorReqResOrdering?s.unshift(g.fulfilled,g.rejected):s.push(g.fulfilled,g.rejected)});const a=[];this.interceptors.response.forEach(function(g){a.push(g.fulfilled,g.rejected)});let d,m=0,y;if(!u){const S=[Vf.bind(this),void 0];for(S.unshift(...s),S.push(...a),y=S.length,d=Promise.resolve(n);m<y;)d=d.then(S[m++],S[m++]);return d}y=s.length;let v=n;for(;m<y;){const S=s[m++],g=s[m++];try{v=S(v)}catch(E){g.call(this,E);break}}try{d=Vf.call(this,v)}catch(S){return Promise.reject(S)}for(m=0,y=a.length;m<y;)d=d.then(a[m++],a[m++]);return d}getUri(t){t=Gt(this.defaults,t);const n=Df(t.baseURL,t.url,t.allowAbsoluteUrls);return Rf(n,t.params,t.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(t){Zt.prototype[t]=function(n,r){return this.request(Gt(r||{},{method:t,url:n,data:(r||{}).data}))}}),h.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,i,s){return this.request(Gt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Zt.prototype[t]=n(),t!=="query"&&(Zt.prototype[t+"Form"]=n(!0))});let xy=class Jf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(l=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](l);r._listeners=null}),this.promise.then=l=>{let o;const i=new Promise(s=>{r.subscribe(s),o=s}).then(l);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,s){r.reason||(r.reason=new Tr(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Jf(function(l){t=l}),cancel:t}}};function _y(e){return function(n){return e.apply(null,n)}}function Cy(e){return h.isObject(e)&&e.isAxiosError===!0}const Us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Us).forEach(([e,t])=>{Us[t]=e});function Qf(e){const t=new Zt(e),n=ff(Zt.prototype.request,t);return h.extend(n,Zt.prototype,t,{allOwnKeys:!0}),h.extend(n,t,null,{allOwnKeys:!0}),n.create=function(l){return Qf(Gt(e,l))},n}const G=Qf(Pr);G.Axios=Zt,G.CanceledError=Tr,G.CancelToken=xy,G.isCancel=Pf,G.VERSION=zs,G.toFormData=no,G.AxiosError=N,G.Cancel=G.CanceledError,G.all=function(t){return Promise.all(t)},G.spread=_y,G.isAxiosError=Cy,G.mergeConfig=Gt,G.AxiosHeaders=ge,G.formToJSON=e=>Of(h.isHTMLForm(e)?new FormData(e):e),G.getAdapter=Hf.getAdapter,G.HttpStatusCode=Us,G.default=G;const{Axios:Hy,AxiosError:Vy,CanceledError:Wy,isCancel:Qy,CancelToken:Ky,VERSION:Xy,all:qy,Cancel:Jy,isAxiosError:Yy,spread:Gy,toFormData:Zy,AxiosHeaders:by,HttpStatusCode:eg,formToJSON:tg,getAdapter:ng,mergeConfig:rg,create:lg}=G,Is=G.create({baseURL:"http://localhost:8000",headers:{"Content-Type":"application/json"}});Is.interceptors.response.use(e=>e,e=>{var r,l;const t=(r=e.response)==null?void 0:r.data,n=(l=e.response)==null?void 0:l.status;return console.error(`[PolarisRX] API error ${n}:`,(t==null?void 0:t.detail)??e.message),Promise.reject(e)});const Kf="polarisrx_user_uuid",Ry="polarisrx_session_id";function Ny(){const{apiKey:e}=Cr(),[t,n]=b.useState({sessionId:null,userUuid:null,ready:!1,error:null});return b.useEffect(()=>{let r=!1;const l=e?{"X-Pharmacy-Key":e}:{};async function o(){try{const i=localStorage.getItem(Kf),{data:s}=await Is.post("/widget/users/",i?{user_uuid:i}:{},{headers:l});if(r)return;const u=s.user_uuid;localStorage.setItem(Kf,u);const{data:a}=await Is.post("/widget/sessions/",{user_uuid:u},{headers:l});if(r)return;localStorage.setItem(Ry,a.id),n({sessionId:a.id,userUuid:u,ready:!0,error:null})}catch(i){r||n(s=>({...s,ready:!1,error:String(i)}))}}return o(),()=>{r=!0}},[e]),t}const Oy="#059669";function Py(){const[e,t]=b.useState(!1),{sessionId:n}=Ny(),{position:r="bottom-right",primaryColor:l=Oy}=Cr(),o=r==="bottom-left"?"fixed bottom-5 left-5":"fixed bottom-5 right-5";return D.jsxs("div",{className
|
|
105
|
+
`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Gt(this.defaults,n);const{transitional:r,paramsSerializer:l,headers:o}=n;r!==void 0&&io.assertOptions(r,{silentJSONParsing:_e.transitional(_e.boolean),forcedJSONParsing:_e.transitional(_e.boolean),clarifyTimeoutError:_e.transitional(_e.boolean),legacyInterceptorReqResOrdering:_e.transitional(_e.boolean),advertiseZstdAcceptEncoding:_e.transitional(_e.boolean)},!1),l!=null&&(h.isFunction(l)?n.paramsSerializer={serialize:l}:io.assertOptions(l,{encode:_e.function,serialize:_e.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),io.assertOptions(n,{baseUrl:_e.spelling("baseURL"),withXsrfToken:_e.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&h.merge(o.common,o[n.method]);o&&h.forEach(["delete","get","head","post","put","patch","query","common"],S=>{delete o[S]}),n.headers=ge.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;u=u&&g.synchronous;const E=n.transitional||Ts;E&&E.legacyInterceptorReqResOrdering?s.unshift(g.fulfilled,g.rejected):s.push(g.fulfilled,g.rejected)});const a=[];this.interceptors.response.forEach(function(g){a.push(g.fulfilled,g.rejected)});let d,m=0,y;if(!u){const S=[Vf.bind(this),void 0];for(S.unshift(...s),S.push(...a),y=S.length,d=Promise.resolve(n);m<y;)d=d.then(S[m++],S[m++]);return d}y=s.length;let v=n;for(;m<y;){const S=s[m++],g=s[m++];try{v=S(v)}catch(E){g.call(this,E);break}}try{d=Vf.call(this,v)}catch(S){return Promise.reject(S)}for(m=0,y=a.length;m<y;)d=d.then(a[m++],a[m++]);return d}getUri(t){t=Gt(this.defaults,t);const n=Df(t.baseURL,t.url,t.allowAbsoluteUrls);return Rf(n,t.params,t.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(t){Zt.prototype[t]=function(n,r){return this.request(Gt(r||{},{method:t,url:n,data:(r||{}).data}))}}),h.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,i,s){return this.request(Gt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Zt.prototype[t]=n(),t!=="query"&&(Zt.prototype[t+"Form"]=n(!0))});let xy=class Jf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(l=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](l);r._listeners=null}),this.promise.then=l=>{let o;const i=new Promise(s=>{r.subscribe(s),o=s}).then(l);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,s){r.reason||(r.reason=new Tr(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Jf(function(l){t=l}),cancel:t}}};function _y(e){return function(n){return e.apply(null,n)}}function Cy(e){return h.isObject(e)&&e.isAxiosError===!0}const Us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Us).forEach(([e,t])=>{Us[t]=e});function Qf(e){const t=new Zt(e),n=ff(Zt.prototype.request,t);return h.extend(n,Zt.prototype,t,{allOwnKeys:!0}),h.extend(n,t,null,{allOwnKeys:!0}),n.create=function(l){return Qf(Gt(e,l))},n}const G=Qf(Pr);G.Axios=Zt,G.CanceledError=Tr,G.CancelToken=xy,G.isCancel=Pf,G.VERSION=zs,G.toFormData=no,G.AxiosError=N,G.Cancel=G.CanceledError,G.all=function(t){return Promise.all(t)},G.spread=_y,G.isAxiosError=Cy,G.mergeConfig=Gt,G.AxiosHeaders=ge,G.formToJSON=e=>Of(h.isHTMLForm(e)?new FormData(e):e),G.getAdapter=Hf.getAdapter,G.HttpStatusCode=Us,G.default=G;const{Axios:Hy,AxiosError:Vy,CanceledError:Wy,isCancel:Qy,CancelToken:Ky,VERSION:Xy,all:qy,Cancel:Jy,isAxiosError:Yy,spread:Gy,toFormData:Zy,AxiosHeaders:by,HttpStatusCode:eg,formToJSON:tg,getAdapter:ng,mergeConfig:rg,create:lg}=G,Is=G.create({baseURL:"http://localhost:8000",headers:{"Content-Type":"application/json"}});Is.interceptors.response.use(e=>e,e=>{var r,l;const t=(r=e.response)==null?void 0:r.data,n=(l=e.response)==null?void 0:l.status;return console.error(`[PolarisRX] API error ${n}:`,(t==null?void 0:t.detail)??e.message),Promise.reject(e)});const Kf="polarisrx_user_uuid",Ry="polarisrx_session_id";function Ny(){const{apiKey:e}=Cr(),[t,n]=b.useState({sessionId:null,userUuid:null,ready:!1,error:null});return b.useEffect(()=>{let r=!1;const l=e?{"X-Pharmacy-Key":e}:{};async function o(){try{const i=localStorage.getItem(Kf),{data:s}=await Is.post("/widget/users/",i?{user_uuid:i}:{},{headers:l});if(r)return;const u=s.user_uuid;localStorage.setItem(Kf,u);const{data:a}=await Is.post("/widget/sessions/",{user_uuid:u},{headers:l});if(r)return;localStorage.setItem(Ry,a.id),n({sessionId:a.id,userUuid:u,ready:!0,error:null})}catch(i){r||n(s=>({...s,ready:!1,error:String(i)}))}}return o(),()=>{r=!0}},[e]),t}const Oy="#059669";function Py(){const[e,t]=b.useState(!1),{sessionId:n}=Ny(),{position:r="bottom-right",primaryColor:l=Oy}=Cr(),o=r==="bottom-left"?"fixed bottom-5 left-5":"fixed bottom-5 right-5";return D.jsxs("div",{className:`polarisrx-root ${o} z-[9999] flex flex-col items-end gap-3 font-sans`,children:[e&&D.jsx("div",{className:"animate-fadeSlideUp",children:D.jsx(Uh,{sessionId:n,onClose:()=>t(!1)})}),D.jsxs("button",{onClick:()=>t(i=>!i),style:{backgroundColor:l},className:"relative w-14 h-14 rounded-full hover:opacity-90 text-white shadow-lg hover:shadow-xl transition-all duration-200 flex items-center justify-center","aria-label":e?"Fechar chat":"Abrir chat",children:[e?D.jsx(af,{className:"w-6 h-6"}):D.jsx(Oh,{className:"w-6 h-6"}),!e&&D.jsx(Mh,{})]})]})}function Ty(e,t){const n=document.querySelector(e);if(!n)throw new Error(`[PolarisRX] Mount point "${e}" not found`);ho.createRoot(n).render(D.jsx(Lh,{value:t,children:D.jsx(Py,{})}))}typeof window<"u"&&(window.PolarisRXWidget={mount:Ty})});
|